diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index 2046f163..3219f9b6 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -1,10091 +1,10999 @@ -// 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 == 22 && - FLATBUFFERS_VERSION_MINOR == 10 && - FLATBUFFERS_VERSION_REVISION == 26, - "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; - -struct Bytes; -struct BytesBuilder; - -struct StringTable; -struct StringTableBuilder; - -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 LegTweaksSettings; -struct LegTweaksSettingsBuilder; - -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 ClearDriftCompensationRequest; -struct ClearDriftCompensationRequestBuilder; - -struct SettingsRequest; -struct SettingsRequestBuilder; - -struct SettingsResponse; -struct SettingsResponseBuilder; - -struct ChangeSettingsRequest; -struct ChangeSettingsRequestBuilder; - -struct SteamVRTrackersSetting; -struct SteamVRTrackersSettingBuilder; - -struct FilteringSettings; -struct FilteringSettingsBuilder; - -struct DriftCompensationSettings; -struct DriftCompensationSettingsBuilder; - -struct OSCRouterSettings; -struct OSCRouterSettingsBuilder; - -struct VRCOSCSettings; -struct VRCOSCSettingsBuilder; - -struct VMCOSCSettings; -struct VMCOSCSettingsBuilder; - -struct OSCSettings; -struct OSCSettingsBuilder; - -struct OSCTrackersSetting; -struct OSCTrackersSettingBuilder; - -struct TapDetectionSettings; -struct TapDetectionSettingsBuilder; - -struct ResetsSettings; -struct ResetsSettingsBuilder; - -struct TapDetectionSetupNotification; -struct TapDetectionSetupNotificationBuilder; - -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 SerialDevice; -struct SerialDeviceBuilder; - -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 SerialDevicesRequest; -struct SerialDevicesRequestBuilder; - -struct SerialDevicesResponse; -struct SerialDevicesResponseBuilder; - -struct NewSerialDeviceResponse; -struct NewSerialDeviceResponseBuilder; - -struct StartWifiProvisioningRequest; -struct StartWifiProvisioningRequestBuilder; - -struct StopWifiProvisioningRequest; -struct StopWifiProvisioningRequestBuilder; - -struct WifiProvisioningStatusResponse; -struct WifiProvisioningStatusResponseBuilder; - -struct AutoBoneProcessRequest; -struct AutoBoneProcessRequestBuilder; - -struct AutoBoneProcessStatusResponse; -struct AutoBoneProcessStatusResponseBuilder; - -struct AutoBoneEpochResponse; -struct AutoBoneEpochResponseBuilder; - -struct AutoBoneSettings; -struct AutoBoneSettingsBuilder; - -struct HeightRequest; -struct HeightRequestBuilder; - -struct HeightResponse; -struct HeightResponseBuilder; - -struct AutoBoneApplyRequest; -struct AutoBoneApplyRequestBuilder; - -struct AutoBoneStopRecordingRequest; -struct AutoBoneStopRecordingRequestBuilder; - -struct AutoBoneCancelRecordingRequest; -struct AutoBoneCancelRecordingRequestBuilder; - -struct OverlayDisplayModeRequest; -struct OverlayDisplayModeRequestBuilder; - -struct OverlayDisplayModeChangeRequest; -struct OverlayDisplayModeChangeRequestBuilder; - -struct OverlayDisplayModeResponse; -struct OverlayDisplayModeResponseBuilder; - -struct ServerInfosRequest; -struct ServerInfosRequestBuilder; - -struct ServerInfosResponse; -struct ServerInfosResponseBuilder; - -struct LegTweaksTmpChange; -struct LegTweaksTmpChangeBuilder; - -struct LegTweaksTmpClear; -struct LegTweaksTmpClearBuilder; - -struct StatusTrackerReset; -struct StatusTrackerResetBuilder; - -struct StatusTrackerError; -struct StatusTrackerErrorBuilder; - -struct StatusSteamVRDisconnected; -struct StatusSteamVRDisconnectedBuilder; - -struct StatusUnassignedHMD; -struct StatusUnassignedHMDBuilder; - -struct StatusSystemRequest; -struct StatusSystemRequestBuilder; - -struct StatusSystemResponse; -struct StatusSystemResponseBuilder; - -struct StatusSystemUpdate; -struct StatusSystemUpdateBuilder; - -struct StatusSystemFixed; -struct StatusSystemFixedBuilder; - -struct StatusMessage; -struct StatusMessageBuilder; - -struct SetPauseTrackingRequest; -struct SetPauseTrackingRequestBuilder; - -struct ClearMountingResetRequest; -struct ClearMountingResetRequestBuilder; - -struct SaveFileNotification; -struct SaveFileNotificationBuilder; - -struct TrackingPauseStateRequest; -struct TrackingPauseStateRequestBuilder; - -struct TrackingPauseStateResponse; -struct TrackingPauseStateResponseBuilder; - -struct SerialTrackerGetWifiScanRequest; -struct SerialTrackerGetWifiScanRequestBuilder; - -struct UnknownDeviceHandshakeNotification; -struct UnknownDeviceHandshakeNotificationBuilder; - -struct AddUnknownDeviceRequest; -struct AddUnknownDeviceRequestBuilder; - -struct ForgetDeviceRequest; -struct ForgetDeviceRequestBuilder; - -} // namespace rpc - -namespace pub_sub { - -struct TopicId; -struct TopicIdBuilder; - -struct TopicHandle; -struct TopicHandleBuilder; - -struct TopicMapping; -struct TopicMappingBuilder; - -struct TopicHandleRequest; -struct TopicHandleRequestBuilder; - -struct SubscriptionRequest; -struct SubscriptionRequestBuilder; - -struct PubSubHeader; -struct PubSubHeaderBuilder; - -struct Message; -struct MessageBuilder; - -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. Maps to each possible non-tracker 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_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, - UPPER_CHEST = 22, - LEFT_HIP = 23, - RIGHT_HIP = 24, - MIN = NONE, - MAX = RIGHT_HIP -}; - -inline const BodyPart (&EnumValuesBodyPart())[23] { - 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_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, - BodyPart::UPPER_CHEST, - BodyPart::LEFT_HIP, - BodyPart::RIGHT_HIP - }; - return values; -} - -inline const char * const *EnumNamesBodyPart() { - static const char * const names[26] = { - "NONE", - "HEAD", - "NECK", - "CHEST", - "WAIST", - "HIP", - "LEFT_UPPER_LEG", - "RIGHT_UPPER_LEG", - "LEFT_LOWER_LEG", - "RIGHT_LOWER_LEG", - "LEFT_FOOT", - "RIGHT_FOOT", - "", - "", - "LEFT_LOWER_ARM", - "RIGHT_LOWER_ARM", - "LEFT_UPPER_ARM", - "RIGHT_UPPER_ARM", - "LEFT_HAND", - "RIGHT_HAND", - "LEFT_SHOULDER", - "RIGHT_SHOULDER", - "UPPER_CHEST", - "LEFT_HIP", - "RIGHT_HIP", - nullptr - }; - return names; -} - -inline const char *EnumNameBodyPart(BodyPart e) { - if (flatbuffers::IsOutRange(e, BodyPart::NONE, BodyPart::RIGHT_HIP)) 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, - TIMED_OUT = 6, - MIN = NONE, - MAX = TIMED_OUT -}; - -inline const TrackerStatus (&EnumValuesTrackerStatus())[7] { - static const TrackerStatus values[] = { - TrackerStatus::NONE, - TrackerStatus::DISCONNECTED, - TrackerStatus::OK, - TrackerStatus::BUSY, - TrackerStatus::ERROR, - TrackerStatus::OCCLUDED, - TrackerStatus::TIMED_OUT - }; - return values; -} - -inline const char * const *EnumNamesTrackerStatus() { - static const char * const names[8] = { - "NONE", - "DISCONNECTED", - "OK", - "BUSY", - "ERROR", - "OCCLUDED", - "TIMED_OUT", - nullptr - }; - return names; -} - -inline const char *EnumNameTrackerStatus(TrackerStatus e) { - if (flatbuffers::IsOutRange(e, TrackerStatus::NONE, TrackerStatus::TIMED_OUT)) return ""; - const size_t index = static_cast(e); - return EnumNamesTrackerStatus()[index]; -} - -namespace hardware_info { - -enum class McuType : uint16_t { - Other = 0, - ESP8266 = 1, - ESP32 = 2, - OWOTRACK_ANDROID = 3, - WRANGLER = 4, - OWOTRACK_IOS = 5, - ESP32_C3 = 6, - MOCOPI = 7, - DEV_RESERVED = 250, - MIN = Other, - MAX = DEV_RESERVED -}; - -inline const McuType (&EnumValuesMcuType())[9] { - static const McuType values[] = { - McuType::Other, - McuType::ESP8266, - McuType::ESP32, - McuType::OWOTRACK_ANDROID, - McuType::WRANGLER, - McuType::OWOTRACK_IOS, - McuType::ESP32_C3, - McuType::MOCOPI, - McuType::DEV_RESERVED - }; - return values; -} - -inline const char *EnumNameMcuType(McuType e) { - switch (e) { - case McuType::Other: return "Other"; - case McuType::ESP8266: return "ESP8266"; - case McuType::ESP32: return "ESP32"; - case McuType::OWOTRACK_ANDROID: return "OWOTRACK_ANDROID"; - case McuType::WRANGLER: return "WRANGLER"; - case McuType::OWOTRACK_IOS: return "OWOTRACK_IOS"; - case McuType::ESP32_C3: return "ESP32_C3"; - case McuType::MOCOPI: return "MOCOPI"; - case McuType::DEV_RESERVED: return "DEV_RESERVED"; - default: return ""; - } -} - -enum class ImuType : uint16_t { - Other = 0, - MPU9250 = 1, - MPU6500 = 2, - BNO080 = 3, - BNO085 = 4, - BNO055 = 5, - MPU6050 = 6, - BNO086 = 7, - BMI160 = 8, - ICM20948 = 9, - ICM42688 = 10, - MIN = Other, - MAX = ICM42688 -}; - -inline const ImuType (&EnumValuesImuType())[11] { - static const ImuType values[] = { - ImuType::Other, - ImuType::MPU9250, - ImuType::MPU6500, - ImuType::BNO080, - ImuType::BNO085, - ImuType::BNO055, - ImuType::MPU6050, - ImuType::BNO086, - ImuType::BMI160, - ImuType::ICM20948, - ImuType::ICM42688 - }; - return values; -} - -inline const char * const *EnumNamesImuType() { - static const char * const names[12] = { - "Other", - "MPU9250", - "MPU6500", - "BNO080", - "BNO085", - "BNO055", - "MPU6050", - "BNO086", - "BMI160", - "ICM20948", - "ICM42688", - nullptr - }; - return names; -} - -inline const char *EnumNameImuType(ImuType e) { - if (flatbuffers::IsOutRange(e, ImuType::Other, ImuType::ICM42688)) 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, - ResetResponse = 4, - AssignTrackerRequest = 5, - SettingsRequest = 6, - SettingsResponse = 7, - ChangeSettingsRequest = 8, - ClearDriftCompensationRequest = 9, - RecordBVHRequest = 10, - RecordBVHStatus = 11, - SkeletonConfigRequest = 12, - ChangeSkeletonConfigRequest = 13, - SkeletonResetAllRequest = 14, - SkeletonConfigResponse = 15, - OpenSerialRequest = 16, - CloseSerialRequest = 17, - SetWifiRequest = 18, - SerialUpdateResponse = 19, - AutoBoneProcessRequest = 20, - AutoBoneProcessStatusResponse = 21, - AutoBoneEpochResponse = 22, - OverlayDisplayModeRequest = 23, - OverlayDisplayModeChangeRequest = 24, - OverlayDisplayModeResponse = 25, - SerialTrackerRebootRequest = 26, - SerialTrackerGetInfoRequest = 27, - SerialTrackerFactoryResetRequest = 28, - SerialDevicesRequest = 29, - SerialDevicesResponse = 30, - NewSerialDeviceResponse = 31, - StartWifiProvisioningRequest = 32, - StopWifiProvisioningRequest = 33, - WifiProvisioningStatusResponse = 34, - ServerInfosRequest = 35, - ServerInfosResponse = 36, - LegTweaksTmpChange = 37, - LegTweaksTmpClear = 38, - TapDetectionSetupNotification = 39, - SetPauseTrackingRequest = 40, - StatusSystemRequest = 41, - StatusSystemResponse = 42, - StatusSystemUpdate = 43, - StatusSystemFixed = 44, - ClearMountingResetRequest = 45, - HeightRequest = 46, - HeightResponse = 47, - AutoBoneApplyRequest = 48, - AutoBoneStopRecordingRequest = 49, - AutoBoneCancelRecordingRequest = 50, - SaveFileNotification = 51, - TrackingPauseStateRequest = 52, - TrackingPauseStateResponse = 53, - SerialTrackerGetWifiScanRequest = 54, - UnknownDeviceHandshakeNotification = 55, - AddUnknownDeviceRequest = 56, - ForgetDeviceRequest = 57, - MIN = NONE, - MAX = ForgetDeviceRequest -}; - -inline const RpcMessage (&EnumValuesRpcMessage())[58] { - static const RpcMessage values[] = { - RpcMessage::NONE, - RpcMessage::HeartbeatRequest, - RpcMessage::HeartbeatResponse, - RpcMessage::ResetRequest, - RpcMessage::ResetResponse, - RpcMessage::AssignTrackerRequest, - RpcMessage::SettingsRequest, - RpcMessage::SettingsResponse, - RpcMessage::ChangeSettingsRequest, - RpcMessage::ClearDriftCompensationRequest, - 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, - RpcMessage::SerialDevicesRequest, - RpcMessage::SerialDevicesResponse, - RpcMessage::NewSerialDeviceResponse, - RpcMessage::StartWifiProvisioningRequest, - RpcMessage::StopWifiProvisioningRequest, - RpcMessage::WifiProvisioningStatusResponse, - RpcMessage::ServerInfosRequest, - RpcMessage::ServerInfosResponse, - RpcMessage::LegTweaksTmpChange, - RpcMessage::LegTweaksTmpClear, - RpcMessage::TapDetectionSetupNotification, - RpcMessage::SetPauseTrackingRequest, - RpcMessage::StatusSystemRequest, - RpcMessage::StatusSystemResponse, - RpcMessage::StatusSystemUpdate, - RpcMessage::StatusSystemFixed, - RpcMessage::ClearMountingResetRequest, - RpcMessage::HeightRequest, - RpcMessage::HeightResponse, - RpcMessage::AutoBoneApplyRequest, - RpcMessage::AutoBoneStopRecordingRequest, - RpcMessage::AutoBoneCancelRecordingRequest, - RpcMessage::SaveFileNotification, - RpcMessage::TrackingPauseStateRequest, - RpcMessage::TrackingPauseStateResponse, - RpcMessage::SerialTrackerGetWifiScanRequest, - RpcMessage::UnknownDeviceHandshakeNotification, - RpcMessage::AddUnknownDeviceRequest, - RpcMessage::ForgetDeviceRequest - }; - return values; -} - -inline const char * const *EnumNamesRpcMessage() { - static const char * const names[59] = { - "NONE", - "HeartbeatRequest", - "HeartbeatResponse", - "ResetRequest", - "ResetResponse", - "AssignTrackerRequest", - "SettingsRequest", - "SettingsResponse", - "ChangeSettingsRequest", - "ClearDriftCompensationRequest", - "RecordBVHRequest", - "RecordBVHStatus", - "SkeletonConfigRequest", - "ChangeSkeletonConfigRequest", - "SkeletonResetAllRequest", - "SkeletonConfigResponse", - "OpenSerialRequest", - "CloseSerialRequest", - "SetWifiRequest", - "SerialUpdateResponse", - "AutoBoneProcessRequest", - "AutoBoneProcessStatusResponse", - "AutoBoneEpochResponse", - "OverlayDisplayModeRequest", - "OverlayDisplayModeChangeRequest", - "OverlayDisplayModeResponse", - "SerialTrackerRebootRequest", - "SerialTrackerGetInfoRequest", - "SerialTrackerFactoryResetRequest", - "SerialDevicesRequest", - "SerialDevicesResponse", - "NewSerialDeviceResponse", - "StartWifiProvisioningRequest", - "StopWifiProvisioningRequest", - "WifiProvisioningStatusResponse", - "ServerInfosRequest", - "ServerInfosResponse", - "LegTweaksTmpChange", - "LegTweaksTmpClear", - "TapDetectionSetupNotification", - "SetPauseTrackingRequest", - "StatusSystemRequest", - "StatusSystemResponse", - "StatusSystemUpdate", - "StatusSystemFixed", - "ClearMountingResetRequest", - "HeightRequest", - "HeightResponse", - "AutoBoneApplyRequest", - "AutoBoneStopRecordingRequest", - "AutoBoneCancelRecordingRequest", - "SaveFileNotification", - "TrackingPauseStateRequest", - "TrackingPauseStateResponse", - "SerialTrackerGetWifiScanRequest", - "UnknownDeviceHandshakeNotification", - "AddUnknownDeviceRequest", - "ForgetDeviceRequest", - nullptr - }; - return names; -} - -inline const char *EnumNameRpcMessage(RpcMessage e) { - if (flatbuffers::IsOutRange(e, RpcMessage::NONE, RpcMessage::ForgetDeviceRequest)) 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::ResetResponse; -}; - -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::ClearDriftCompensationRequest; -}; - -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; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::SerialDevicesRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::SerialDevicesResponse; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::NewSerialDeviceResponse; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::StartWifiProvisioningRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::StopWifiProvisioningRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::WifiProvisioningStatusResponse; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::ServerInfosRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::ServerInfosResponse; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::LegTweaksTmpChange; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::LegTweaksTmpClear; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::TapDetectionSetupNotification; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::SetPauseTrackingRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::StatusSystemRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::StatusSystemResponse; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::StatusSystemUpdate; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::StatusSystemFixed; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::ClearMountingResetRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::HeightRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::HeightResponse; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::AutoBoneApplyRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::AutoBoneStopRecordingRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::AutoBoneCancelRecordingRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::SaveFileNotification; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::TrackingPauseStateRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::TrackingPauseStateResponse; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::SerialTrackerGetWifiScanRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::UnknownDeviceHandshakeNotification; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::AddUnknownDeviceRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::ForgetDeviceRequest; -}; - -bool VerifyRpcMessage(flatbuffers::Verifier &verifier, const void *obj, RpcMessage type); -bool VerifyRpcMessageVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); - -enum class ResetType : uint8_t { - Yaw = 0, - Full = 1, - /// Second pose for calibrating mounting rotation - Mounting = 2, - MIN = Yaw, - MAX = Mounting -}; - -inline const ResetType (&EnumValuesResetType())[3] { - static const ResetType values[] = { - ResetType::Yaw, - ResetType::Full, - ResetType::Mounting - }; - return values; -} - -inline const char * const *EnumNamesResetType() { - static const char * const names[4] = { - "Yaw", - "Full", - "Mounting", - nullptr - }; - return names; -} - -inline const char *EnumNameResetType(ResetType e) { - if (flatbuffers::IsOutRange(e, ResetType::Yaw, ResetType::Mounting)) return ""; - const size_t index = static_cast(e); - return EnumNamesResetType()[index]; -} - -enum class ResetStatus : uint8_t { - STARTED = 0, - FINISHED = 1, - MIN = STARTED, - MAX = FINISHED -}; - -inline const ResetStatus (&EnumValuesResetStatus())[2] { - static const ResetStatus values[] = { - ResetStatus::STARTED, - ResetStatus::FINISHED - }; - return values; -} - -inline const char * const *EnumNamesResetStatus() { - static const char * const names[3] = { - "STARTED", - "FINISHED", - nullptr - }; - return names; -} - -inline const char *EnumNameResetStatus(ResetStatus e) { - if (flatbuffers::IsOutRange(e, ResetStatus::STARTED, ResetStatus::FINISHED)) return ""; - const size_t index = static_cast(e); - return EnumNamesResetStatus()[index]; -} - -enum class ArmsMountingResetMode : uint8_t { - /// Upper arm going back and forearm going forward - BACK = 0, - /// Arms going forward - FORWARD = 1, - /// Arms going up to the sides into a tpose - TPOSE_UP = 2, - /// Arms going down to the sides from a tpose - TPOSE_DOWN = 3, - MIN = BACK, - MAX = TPOSE_DOWN -}; - -inline const ArmsMountingResetMode (&EnumValuesArmsMountingResetMode())[4] { - static const ArmsMountingResetMode values[] = { - ArmsMountingResetMode::BACK, - ArmsMountingResetMode::FORWARD, - ArmsMountingResetMode::TPOSE_UP, - ArmsMountingResetMode::TPOSE_DOWN - }; - return values; -} - -inline const char * const *EnumNamesArmsMountingResetMode() { - static const char * const names[5] = { - "BACK", - "FORWARD", - "TPOSE_UP", - "TPOSE_DOWN", - nullptr - }; - return names; -} - -inline const char *EnumNameArmsMountingResetMode(ArmsMountingResetMode e) { - if (flatbuffers::IsOutRange(e, ArmsMountingResetMode::BACK, ArmsMountingResetMode::TPOSE_DOWN)) return ""; - const size_t index = static_cast(e); - return EnumNamesArmsMountingResetMode()[index]; -} - -enum class SkeletonBone : uint8_t { - NONE = 0, - HEAD = 1, - NECK = 2, - CHEST = 3, - CHEST_OFFSET = 4, - WAIST = 5, - HIP = 6, - HIP_OFFSET = 7, - HIPS_WIDTH = 8, - UPPER_LEG = 9, - LOWER_LEG = 10, - FOOT_LENGTH = 11, - FOOT_SHIFT = 12, - SKELETON_OFFSET = 13, - SHOULDERS_DISTANCE = 14, - SHOULDERS_WIDTH = 15, - UPPER_ARM = 16, - LOWER_ARM = 17, - HAND_Y = 18, - HAND_Z = 19, - ELBOW_OFFSET = 20, - UPPER_CHEST = 21, - MIN = NONE, - MAX = UPPER_CHEST -}; - -inline const SkeletonBone (&EnumValuesSkeletonBone())[22] { - static const SkeletonBone values[] = { - SkeletonBone::NONE, - SkeletonBone::HEAD, - SkeletonBone::NECK, - SkeletonBone::CHEST, - SkeletonBone::CHEST_OFFSET, - SkeletonBone::WAIST, - SkeletonBone::HIP, - SkeletonBone::HIP_OFFSET, - SkeletonBone::HIPS_WIDTH, - SkeletonBone::UPPER_LEG, - SkeletonBone::LOWER_LEG, - SkeletonBone::FOOT_LENGTH, - SkeletonBone::FOOT_SHIFT, - SkeletonBone::SKELETON_OFFSET, - SkeletonBone::SHOULDERS_DISTANCE, - SkeletonBone::SHOULDERS_WIDTH, - SkeletonBone::UPPER_ARM, - SkeletonBone::LOWER_ARM, - SkeletonBone::HAND_Y, - SkeletonBone::HAND_Z, - SkeletonBone::ELBOW_OFFSET, - SkeletonBone::UPPER_CHEST - }; - return values; -} - -inline const char * const *EnumNamesSkeletonBone() { - static const char * const names[23] = { - "NONE", - "HEAD", - "NECK", - "CHEST", - "CHEST_OFFSET", - "WAIST", - "HIP", - "HIP_OFFSET", - "HIPS_WIDTH", - "UPPER_LEG", - "LOWER_LEG", - "FOOT_LENGTH", - "FOOT_SHIFT", - "SKELETON_OFFSET", - "SHOULDERS_DISTANCE", - "SHOULDERS_WIDTH", - "UPPER_ARM", - "LOWER_ARM", - "HAND_Y", - "HAND_Z", - "ELBOW_OFFSET", - "UPPER_CHEST", - nullptr - }; - return names; -} - -inline const char *EnumNameSkeletonBone(SkeletonBone e) { - if (flatbuffers::IsOutRange(e, SkeletonBone::NONE, SkeletonBone::UPPER_CHEST)) return ""; - const size_t index = static_cast(e); - return EnumNamesSkeletonBone()[index]; -} - -enum class WifiProvisioningStatus : uint8_t { - NONE = 0, - SERIAL_INIT = 1, - PROVISIONING = 2, - CONNECTING = 3, - CONNECTION_ERROR = 4, - LOOKING_FOR_SERVER = 5, - COULD_NOT_FIND_SERVER = 6, - DONE = 7, - MIN = NONE, - MAX = DONE -}; - -inline const WifiProvisioningStatus (&EnumValuesWifiProvisioningStatus())[8] { - static const WifiProvisioningStatus values[] = { - WifiProvisioningStatus::NONE, - WifiProvisioningStatus::SERIAL_INIT, - WifiProvisioningStatus::PROVISIONING, - WifiProvisioningStatus::CONNECTING, - WifiProvisioningStatus::CONNECTION_ERROR, - WifiProvisioningStatus::LOOKING_FOR_SERVER, - WifiProvisioningStatus::COULD_NOT_FIND_SERVER, - WifiProvisioningStatus::DONE - }; - return values; -} - -inline const char * const *EnumNamesWifiProvisioningStatus() { - static const char * const names[9] = { - "NONE", - "SERIAL_INIT", - "PROVISIONING", - "CONNECTING", - "CONNECTION_ERROR", - "LOOKING_FOR_SERVER", - "COULD_NOT_FIND_SERVER", - "DONE", - nullptr - }; - return names; -} - -inline const char *EnumNameWifiProvisioningStatus(WifiProvisioningStatus e) { - if (flatbuffers::IsOutRange(e, WifiProvisioningStatus::NONE, WifiProvisioningStatus::DONE)) return ""; - const size_t index = static_cast(e); - return EnumNamesWifiProvisioningStatus()[index]; -} - -enum class AutoBoneProcessType : uint8_t { - NONE = 0, - RECORD = 1, - SAVE = 2, - PROCESS = 3, - /// @deprecated - /// Use AutoBoneApplyRequest instead - 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]; -} - -enum class StatusData : uint8_t { - NONE = 0, - StatusTrackerReset = 1, - StatusTrackerError = 2, - StatusSteamVRDisconnected = 3, - StatusUnassignedHMD = 4, - MIN = NONE, - MAX = StatusUnassignedHMD -}; - -inline const StatusData (&EnumValuesStatusData())[5] { - static const StatusData values[] = { - StatusData::NONE, - StatusData::StatusTrackerReset, - StatusData::StatusTrackerError, - StatusData::StatusSteamVRDisconnected, - StatusData::StatusUnassignedHMD - }; - return values; -} - -inline const char * const *EnumNamesStatusData() { - static const char * const names[6] = { - "NONE", - "StatusTrackerReset", - "StatusTrackerError", - "StatusSteamVRDisconnected", - "StatusUnassignedHMD", - nullptr - }; - return names; -} - -inline const char *EnumNameStatusData(StatusData e) { - if (flatbuffers::IsOutRange(e, StatusData::NONE, StatusData::StatusUnassignedHMD)) return ""; - const size_t index = static_cast(e); - return EnumNamesStatusData()[index]; -} - -template struct StatusDataTraits { - static const StatusData enum_value = StatusData::NONE; -}; - -template<> struct StatusDataTraits { - static const StatusData enum_value = StatusData::StatusTrackerReset; -}; - -template<> struct StatusDataTraits { - static const StatusData enum_value = StatusData::StatusTrackerError; -}; - -template<> struct StatusDataTraits { - static const StatusData enum_value = StatusData::StatusSteamVRDisconnected; -}; - -template<> struct StatusDataTraits { - static const StatusData enum_value = StatusData::StatusUnassignedHMD; -}; - -bool VerifyStatusData(flatbuffers::Verifier &verifier, const void *obj, StatusData type); -bool VerifyStatusDataVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); - -/// Common folders often used in computers for storing files -enum class ComputerDirectory : uint8_t { - Documents = 0, - MIN = Documents, - MAX = Documents -}; - -inline const ComputerDirectory (&EnumValuesComputerDirectory())[1] { - static const ComputerDirectory values[] = { - ComputerDirectory::Documents - }; - return values; -} - -inline const char * const *EnumNamesComputerDirectory() { - static const char * const names[2] = { - "Documents", - nullptr - }; - return names; -} - -inline const char *EnumNameComputerDirectory(ComputerDirectory e) { - if (flatbuffers::IsOutRange(e, ComputerDirectory::Documents, ComputerDirectory::Documents)) return ""; - const size_t index = static_cast(e); - return EnumNamesComputerDirectory()[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, - TopicMapping = 4, - MIN = NONE, - MAX = TopicMapping -}; - -inline const PubSubUnion (&EnumValuesPubSubUnion())[5] { - static const PubSubUnion values[] = { - PubSubUnion::NONE, - PubSubUnion::Message, - PubSubUnion::SubscriptionRequest, - PubSubUnion::TopicHandleRequest, - PubSubUnion::TopicMapping - }; - return values; -} - -inline const char * const *EnumNamesPubSubUnion() { - static const char * const names[6] = { - "NONE", - "Message", - "SubscriptionRequest", - "TopicHandleRequest", - "TopicMapping", - nullptr - }; - return names; -} - -inline const char *EnumNamePubSubUnion(PubSubUnion e) { - if (flatbuffers::IsOutRange(e, PubSubUnion::NONE, PubSubUnion::TopicMapping)) 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::TopicMapping; -}; - -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_StringTable = 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_StringTable, - Payload::solarxr_protocol_datatypes_Bytes, - Payload::KeyValues - }; - return values; -} - -inline const char * const *EnumNamesPayload() { - static const char * const names[5] = { - "NONE", - "solarxr_protocol_datatypes_StringTable", - "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_StringTable; -}; - -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 StringTable FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef StringTableBuilder 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 StringTableBuilder { - typedef StringTable Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_s(flatbuffers::Offset s) { - fbb_.AddOffset(StringTable::VT_S, s); - } - explicit StringTableBuilder(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 CreateStringTable( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset s = 0) { - StringTableBuilder builder_(_fbb); - builder_.add_s(s); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateStringTableDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const char *s = nullptr) { - auto s__ = s ? _fbb.CreateString(s) : 0; - return solarxr_protocol::datatypes::CreateStringTable( - _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, - VT_BOARD_TYPE = 20, - VT_HARDWARE_IDENTIFIER = 22, - VT_NETWORK_PROTOCOL_VERSION = 24 - }; - 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); - } - const flatbuffers::String *board_type() const { - return GetPointer(VT_BOARD_TYPE); - } - /// A unique identifier for the device. Depending on the type of device it can be the MAC address, - /// the IP address, or some other unique identifier like what USB device it is. - const flatbuffers::String *hardware_identifier() const { - return GetPointer(VT_HARDWARE_IDENTIFIER); - } - /// The version of the protocol it's using to communicate with server - flatbuffers::Optional network_protocol_version() const { - return GetOptional(VT_NETWORK_PROTOCOL_VERSION); - } - 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) && - VerifyOffset(verifier, VT_BOARD_TYPE) && - verifier.VerifyString(board_type()) && - VerifyOffset(verifier, VT_HARDWARE_IDENTIFIER) && - verifier.VerifyString(hardware_identifier()) && - VerifyField(verifier, VT_NETWORK_PROTOCOL_VERSION, 2) && - 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); - } - void add_board_type(flatbuffers::Offset board_type) { - fbb_.AddOffset(HardwareInfo::VT_BOARD_TYPE, board_type); - } - void add_hardware_identifier(flatbuffers::Offset hardware_identifier) { - fbb_.AddOffset(HardwareInfo::VT_HARDWARE_IDENTIFIER, hardware_identifier); - } - void add_network_protocol_version(uint16_t network_protocol_version) { - fbb_.AddElement(HardwareInfo::VT_NETWORK_PROTOCOL_VERSION, network_protocol_version); - } - 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, - flatbuffers::Offset board_type = 0, - flatbuffers::Offset hardware_identifier = 0, - flatbuffers::Optional network_protocol_version = flatbuffers::nullopt) { - HardwareInfoBuilder builder_(_fbb); - builder_.add_hardware_identifier(hardware_identifier); - builder_.add_board_type(board_type); - 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); - if(network_protocol_version) { builder_.add_network_protocol_version(*network_protocol_version); } - 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, - const char *board_type = nullptr, - const char *hardware_identifier = nullptr, - flatbuffers::Optional network_protocol_version = flatbuffers::nullopt) { - 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; - auto board_type__ = board_type ? _fbb.CreateString(board_type) : 0; - auto hardware_identifier__ = hardware_identifier ? _fbb.CreateString(hardware_identifier) : 0; - return solarxr_protocol::datatypes::hardware_info::CreateHardwareInfo( - _fbb, - mcu_id, - display_name__, - model__, - manufacturer__, - hardware_revision__, - firmware_version__, - hardware_address, - ip_address, - board_type__, - hardware_identifier__, - network_protocol_version); -} - -/// 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_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 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_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_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 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(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_ANGULAR_VELOCITY = 14, - VT_RAW_ACCELERATION = 16, - VT_TEMP = 18, - VT_LINEAR_ACCELERATION = 20, - VT_ROTATION_REFERENCE_ADJUSTED = 22, - VT_ROTATION_IDENTITY_ADJUSTED = 24, - VT_TPS = 26 - }; - 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)); - } - /// Sensor rotation after fusion - 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 angular velocity, in euler angles, rad/s - const solarxr_protocol::datatypes::math::Vec3f *raw_angular_velocity() const { - return GetStruct(VT_RAW_ANGULAR_VELOCITY); - } - /// Raw acceleration, in m/s^2 - const solarxr_protocol::datatypes::math::Vec3f *raw_acceleration() const { - return GetStruct(VT_RAW_ACCELERATION); - } - /// Temperature, in degrees celsius - const solarxr_protocol::datatypes::Temperature *temp() const { - return GetStruct(VT_TEMP); - } - /// Acceleration without gravity, in m/s^2 - const solarxr_protocol::datatypes::math::Vec3f *linear_acceleration() const { - return GetStruct(VT_LINEAR_ACCELERATION); - } - /// Reference-adjusted rotation for IMU-only trackers (VR HMD yaw is used as a reset reference). - /// In other words, a rotation that is aligned to a reliable source of rotation ((0, VR HMD YAW, 0)), - /// triggered after user input (using reset buttons). - /// This is a SlimeVR-specific field and computed exclusively by SlimeVR server. - /// Includes: mounting orientation, full, quick and mounting reset adjustments. - /// This rotation can be used to reconstruct a skeleton pose using forward kinematics. - const solarxr_protocol::datatypes::math::Quat *rotation_reference_adjusted() const { - return GetStruct(VT_ROTATION_REFERENCE_ADJUSTED); - } - /// Zero-reference-adjusted rotation for IMU-only trackers (identity quaternion is used as a reset reference). - /// In other words, a rotation that is aligned to a zero vector ((0, 0, 0)) by - /// inverting the current rotation, triggered after user input (using reset buttons). - /// This is a SlimeVR-specific field and computed exclusively by SlimeVR server. - /// Includes: only full and quick reset adjustments. - /// This rotation can be used in visualizations for IMU debugging. - const solarxr_protocol::datatypes::math::Quat *rotation_identity_adjusted() const { - return GetStruct(VT_ROTATION_IDENTITY_ADJUSTED); - } - /// Data ticks per second, processed by SlimeVR server - flatbuffers::Optional tps() const { - return GetOptional(VT_TPS); - } - 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_ANGULAR_VELOCITY, 4) && - VerifyField(verifier, VT_RAW_ACCELERATION, 4) && - VerifyField(verifier, VT_TEMP, 4) && - VerifyField(verifier, VT_LINEAR_ACCELERATION, 4) && - VerifyField(verifier, VT_ROTATION_REFERENCE_ADJUSTED, 4) && - VerifyField(verifier, VT_ROTATION_IDENTITY_ADJUSTED, 4) && - VerifyField(verifier, VT_TPS, 2) && - 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_angular_velocity(const solarxr_protocol::datatypes::math::Vec3f *raw_angular_velocity) { - fbb_.AddStruct(TrackerData::VT_RAW_ANGULAR_VELOCITY, raw_angular_velocity); - } - void add_raw_acceleration(const solarxr_protocol::datatypes::math::Vec3f *raw_acceleration) { - fbb_.AddStruct(TrackerData::VT_RAW_ACCELERATION, raw_acceleration); - } - void add_temp(const solarxr_protocol::datatypes::Temperature *temp) { - fbb_.AddStruct(TrackerData::VT_TEMP, temp); - } - void add_linear_acceleration(const solarxr_protocol::datatypes::math::Vec3f *linear_acceleration) { - fbb_.AddStruct(TrackerData::VT_LINEAR_ACCELERATION, linear_acceleration); - } - void add_rotation_reference_adjusted(const solarxr_protocol::datatypes::math::Quat *rotation_reference_adjusted) { - fbb_.AddStruct(TrackerData::VT_ROTATION_REFERENCE_ADJUSTED, rotation_reference_adjusted); - } - void add_rotation_identity_adjusted(const solarxr_protocol::datatypes::math::Quat *rotation_identity_adjusted) { - fbb_.AddStruct(TrackerData::VT_ROTATION_IDENTITY_ADJUSTED, rotation_identity_adjusted); - } - void add_tps(uint16_t tps) { - fbb_.AddElement(TrackerData::VT_TPS, tps); - } - 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_angular_velocity = nullptr, - const solarxr_protocol::datatypes::math::Vec3f *raw_acceleration = nullptr, - const solarxr_protocol::datatypes::Temperature *temp = nullptr, - const solarxr_protocol::datatypes::math::Vec3f *linear_acceleration = nullptr, - const solarxr_protocol::datatypes::math::Quat *rotation_reference_adjusted = nullptr, - const solarxr_protocol::datatypes::math::Quat *rotation_identity_adjusted = nullptr, - flatbuffers::Optional tps = flatbuffers::nullopt) { - TrackerDataBuilder builder_(_fbb); - builder_.add_rotation_identity_adjusted(rotation_identity_adjusted); - builder_.add_rotation_reference_adjusted(rotation_reference_adjusted); - builder_.add_linear_acceleration(linear_acceleration); - builder_.add_temp(temp); - builder_.add_raw_acceleration(raw_acceleration); - builder_.add_raw_angular_velocity(raw_angular_velocity); - builder_.add_position(position); - builder_.add_rotation(rotation); - builder_.add_info(info); - builder_.add_tracker_id(tracker_id); - if(tps) { builder_.add_tps(*tps); } - 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_ANGULAR_VELOCITY = 12, - VT_RAW_ACCELERATION = 14, - VT_TEMP = 16, - VT_LINEAR_ACCELERATION = 18, - VT_ROTATION_REFERENCE_ADJUSTED = 20, - VT_ROTATION_IDENTITY_ADJUSTED = 22, - VT_TPS = 24 - }; - 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_angular_velocity() const { - return GetField(VT_RAW_ANGULAR_VELOCITY, 0) != 0; - } - bool raw_acceleration() const { - return GetField(VT_RAW_ACCELERATION, 0) != 0; - } - bool temp() const { - return GetField(VT_TEMP, 0) != 0; - } - bool linear_acceleration() const { - return GetField(VT_LINEAR_ACCELERATION, 0) != 0; - } - bool rotation_reference_adjusted() const { - return GetField(VT_ROTATION_REFERENCE_ADJUSTED, 0) != 0; - } - bool rotation_identity_adjusted() const { - return GetField(VT_ROTATION_IDENTITY_ADJUSTED, 0) != 0; - } - bool tps() const { - return GetField(VT_TPS, 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_ANGULAR_VELOCITY, 1) && - VerifyField(verifier, VT_RAW_ACCELERATION, 1) && - VerifyField(verifier, VT_TEMP, 1) && - VerifyField(verifier, VT_LINEAR_ACCELERATION, 1) && - VerifyField(verifier, VT_ROTATION_REFERENCE_ADJUSTED, 1) && - VerifyField(verifier, VT_ROTATION_IDENTITY_ADJUSTED, 1) && - VerifyField(verifier, VT_TPS, 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_angular_velocity(bool raw_angular_velocity) { - fbb_.AddElement(TrackerDataMask::VT_RAW_ANGULAR_VELOCITY, static_cast(raw_angular_velocity), 0); - } - void add_raw_acceleration(bool raw_acceleration) { - fbb_.AddElement(TrackerDataMask::VT_RAW_ACCELERATION, static_cast(raw_acceleration), 0); - } - void add_temp(bool temp) { - fbb_.AddElement(TrackerDataMask::VT_TEMP, static_cast(temp), 0); - } - void add_linear_acceleration(bool linear_acceleration) { - fbb_.AddElement(TrackerDataMask::VT_LINEAR_ACCELERATION, static_cast(linear_acceleration), 0); - } - void add_rotation_reference_adjusted(bool rotation_reference_adjusted) { - fbb_.AddElement(TrackerDataMask::VT_ROTATION_REFERENCE_ADJUSTED, static_cast(rotation_reference_adjusted), 0); - } - void add_rotation_identity_adjusted(bool rotation_identity_adjusted) { - fbb_.AddElement(TrackerDataMask::VT_ROTATION_IDENTITY_ADJUSTED, static_cast(rotation_identity_adjusted), 0); - } - void add_tps(bool tps) { - fbb_.AddElement(TrackerDataMask::VT_TPS, static_cast(tps), 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_angular_velocity = false, - bool raw_acceleration = false, - bool temp = false, - bool linear_acceleration = false, - bool rotation_reference_adjusted = false, - bool rotation_identity_adjusted = false, - bool tps = false) { - TrackerDataMaskBuilder builder_(_fbb); - builder_.add_tps(tps); - builder_.add_rotation_identity_adjusted(rotation_identity_adjusted); - builder_.add_rotation_reference_adjusted(rotation_reference_adjusted); - builder_.add_linear_acceleration(linear_acceleration); - builder_.add_temp(temp); - builder_.add_raw_acceleration(raw_acceleration); - builder_.add_raw_angular_velocity(raw_angular_velocity); - 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_IS_COMPUTED = 14, - VT_IS_IMU = 16, - VT_DISPLAY_NAME = 18, - VT_CUSTOM_NAME = 20, - VT_ALLOW_DRIFT_COMPENSATION = 22, - VT_MOUNTING_RESET_ORIENTATION = 24, - VT_IS_HMD = 26 - }; - 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); - } - /// Should the tracker's settings be editable by the user - bool editable() const { - return GetField(VT_EDITABLE, 0) != 0; - } - /// Indicates if the tracker is computed (solved position and rotation) - bool is_computed() const { - return GetField(VT_IS_COMPUTED, 0) != 0; - } - /// Indicates if the tracker is using an IMU for its tracking data - bool is_imu() const { - return GetField(VT_IS_IMU, 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); - } - /// Whether to allow yaw drift compensation for this tracker or not. - bool allow_drift_compensation() const { - return GetField(VT_ALLOW_DRIFT_COMPENSATION, 0) != 0; - } - /// Mounting Reset orientation overrides the current `mounting_orientation` of - /// the tracker, this orientation is not saved and needs to be calculated - /// each time the server is ran - const solarxr_protocol::datatypes::math::Quat *mounting_reset_orientation() const { - return GetStruct(VT_MOUNTING_RESET_ORIENTATION); - } - /// Indicates if the tracker is actually an HMD - bool is_hmd() const { - return GetField(VT_IS_HMD, 0) != 0; - } - 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_IS_COMPUTED, 1) && - VerifyField(verifier, VT_IS_IMU, 1) && - VerifyOffset(verifier, VT_DISPLAY_NAME) && - verifier.VerifyString(display_name()) && - VerifyOffset(verifier, VT_CUSTOM_NAME) && - verifier.VerifyString(custom_name()) && - VerifyField(verifier, VT_ALLOW_DRIFT_COMPENSATION, 1) && - VerifyField(verifier, VT_MOUNTING_RESET_ORIENTATION, 4) && - VerifyField(verifier, VT_IS_HMD, 1) && - 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_is_computed(bool is_computed) { - fbb_.AddElement(TrackerInfo::VT_IS_COMPUTED, static_cast(is_computed), 0); - } - void add_is_imu(bool is_imu) { - fbb_.AddElement(TrackerInfo::VT_IS_IMU, static_cast(is_imu), 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); - } - void add_allow_drift_compensation(bool allow_drift_compensation) { - fbb_.AddElement(TrackerInfo::VT_ALLOW_DRIFT_COMPENSATION, static_cast(allow_drift_compensation), 0); - } - void add_mounting_reset_orientation(const solarxr_protocol::datatypes::math::Quat *mounting_reset_orientation) { - fbb_.AddStruct(TrackerInfo::VT_MOUNTING_RESET_ORIENTATION, mounting_reset_orientation); - } - void add_is_hmd(bool is_hmd) { - fbb_.AddElement(TrackerInfo::VT_IS_HMD, static_cast(is_hmd), 0); - } - 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 is_computed = false, - bool is_imu = false, - flatbuffers::Offset display_name = 0, - flatbuffers::Offset custom_name = 0, - bool allow_drift_compensation = false, - const solarxr_protocol::datatypes::math::Quat *mounting_reset_orientation = nullptr, - bool is_hmd = false) { - TrackerInfoBuilder builder_(_fbb); - builder_.add_mounting_reset_orientation(mounting_reset_orientation); - 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_is_hmd(is_hmd); - builder_.add_allow_drift_compensation(allow_drift_compensation); - builder_.add_is_imu(is_imu); - builder_.add_is_computed(is_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 is_computed = false, - bool is_imu = false, - const char *display_name = nullptr, - const char *custom_name = nullptr, - bool allow_drift_compensation = false, - const solarxr_protocol::datatypes::math::Quat *mounting_reset_orientation = nullptr, - bool is_hmd = false) { - 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, - is_computed, - is_imu, - display_name__, - custom_name__, - allow_drift_compensation, - mounting_reset_orientation, - is_hmd); -} - -} // 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, - VT_VIVE_EMULATION = 16, - VT_TOE_SNAP = 18, - VT_FOOT_PLANT = 20, - VT_SELF_LOCALIZATION = 22, - VT_USE_POSITION = 24 - }; - 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); - } - flatbuffers::Optional vive_emulation() const { - return GetOptional(VT_VIVE_EMULATION); - } - flatbuffers::Optional toe_snap() const { - return GetOptional(VT_TOE_SNAP); - } - flatbuffers::Optional foot_plant() const { - return GetOptional(VT_FOOT_PLANT); - } - flatbuffers::Optional self_localization() const { - return GetOptional(VT_SELF_LOCALIZATION); - } - flatbuffers::Optional use_position() const { - return GetOptional(VT_USE_POSITION); - } - 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) && - VerifyField(verifier, VT_VIVE_EMULATION, 1) && - VerifyField(verifier, VT_TOE_SNAP, 1) && - VerifyField(verifier, VT_FOOT_PLANT, 1) && - VerifyField(verifier, VT_SELF_LOCALIZATION, 1) && - VerifyField(verifier, VT_USE_POSITION, 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)); - } - void add_vive_emulation(bool vive_emulation) { - fbb_.AddElement(ModelToggles::VT_VIVE_EMULATION, static_cast(vive_emulation)); - } - void add_toe_snap(bool toe_snap) { - fbb_.AddElement(ModelToggles::VT_TOE_SNAP, static_cast(toe_snap)); - } - void add_foot_plant(bool foot_plant) { - fbb_.AddElement(ModelToggles::VT_FOOT_PLANT, static_cast(foot_plant)); - } - void add_self_localization(bool self_localization) { - fbb_.AddElement(ModelToggles::VT_SELF_LOCALIZATION, static_cast(self_localization)); - } - void add_use_position(bool use_position) { - fbb_.AddElement(ModelToggles::VT_USE_POSITION, static_cast(use_position)); - } - 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, - flatbuffers::Optional vive_emulation = flatbuffers::nullopt, - flatbuffers::Optional toe_snap = flatbuffers::nullopt, - flatbuffers::Optional foot_plant = flatbuffers::nullopt, - flatbuffers::Optional self_localization = flatbuffers::nullopt, - flatbuffers::Optional use_position = flatbuffers::nullopt) { - ModelTogglesBuilder builder_(_fbb); - if(use_position) { builder_.add_use_position(*use_position); } - if(self_localization) { builder_.add_self_localization(*self_localization); } - if(foot_plant) { builder_.add_foot_plant(*foot_plant); } - if(toe_snap) { builder_.add_toe_snap(*toe_snap); } - if(vive_emulation) { builder_.add_vive_emulation(*vive_emulation); } - 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, - VT_INTERP_KNEE_ANKLE = 16 - }; - 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 lower leg's when 1.0 - flatbuffers::Optional interp_knee_tracker_ankle() const { - return GetOptional(VT_INTERP_KNEE_TRACKER_ANKLE); - } - /// Upper leg's yaw and roll is set to the lower leg's when 1.0 - flatbuffers::Optional interp_knee_ankle() const { - return GetOptional(VT_INTERP_KNEE_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) && - VerifyField(verifier, VT_INTERP_KNEE_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); - } - void add_interp_knee_ankle(float interp_knee_ankle) { - fbb_.AddElement(ModelRatios::VT_INTERP_KNEE_ANKLE, interp_knee_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, - flatbuffers::Optional interp_knee_ankle = flatbuffers::nullopt) { - ModelRatiosBuilder builder_(_fbb); - if(interp_knee_ankle) { builder_.add_interp_knee_ankle(*interp_knee_ankle); } - 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(); -} - -struct LegTweaksSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef LegTweaksSettingsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_CORRECTION_STRENGTH = 4 - }; - flatbuffers::Optional correction_strength() const { - return GetOptional(VT_CORRECTION_STRENGTH); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_CORRECTION_STRENGTH, 4) && - verifier.EndTable(); - } -}; - -struct LegTweaksSettingsBuilder { - typedef LegTweaksSettings Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_correction_strength(float correction_strength) { - fbb_.AddElement(LegTweaksSettings::VT_CORRECTION_STRENGTH, correction_strength); - } - explicit LegTweaksSettingsBuilder(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 CreateLegTweaksSettings( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Optional correction_strength = flatbuffers::nullopt) { - LegTweaksSettingsBuilder builder_(_fbb); - if(correction_strength) { builder_.add_correction_strength(*correction_strength); } - 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, - VT_LEG_TWEAKS = 8 - }; - const solarxr_protocol::rpc::settings::ModelToggles *toggles() const { - return GetPointer(VT_TOGGLES); - } - const solarxr_protocol::rpc::settings::ModelRatios *ratios() const { - return GetPointer(VT_RATIOS); - } - const solarxr_protocol::rpc::settings::LegTweaksSettings *leg_tweaks() const { - return GetPointer(VT_LEG_TWEAKS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_TOGGLES) && - verifier.VerifyTable(toggles()) && - VerifyOffset(verifier, VT_RATIOS) && - verifier.VerifyTable(ratios()) && - VerifyOffset(verifier, VT_LEG_TWEAKS) && - verifier.VerifyTable(leg_tweaks()) && - 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); - } - void add_leg_tweaks(flatbuffers::Offset leg_tweaks) { - fbb_.AddOffset(ModelSettings::VT_LEG_TWEAKS, leg_tweaks); - } - 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, - flatbuffers::Offset leg_tweaks = 0) { - ModelSettingsBuilder builder_(_fbb); - builder_.add_leg_tweaks(leg_tweaks); - 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::ResetResponse *message_as_ResetResponse() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::ResetResponse ? 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::ClearDriftCompensationRequest *message_as_ClearDriftCompensationRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::ClearDriftCompensationRequest ? 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; - } - const solarxr_protocol::rpc::SerialDevicesRequest *message_as_SerialDevicesRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::SerialDevicesRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::SerialDevicesResponse *message_as_SerialDevicesResponse() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::SerialDevicesResponse ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::NewSerialDeviceResponse *message_as_NewSerialDeviceResponse() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::NewSerialDeviceResponse ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::StartWifiProvisioningRequest *message_as_StartWifiProvisioningRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::StartWifiProvisioningRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::StopWifiProvisioningRequest *message_as_StopWifiProvisioningRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::StopWifiProvisioningRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::WifiProvisioningStatusResponse *message_as_WifiProvisioningStatusResponse() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::WifiProvisioningStatusResponse ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::ServerInfosRequest *message_as_ServerInfosRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::ServerInfosRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::ServerInfosResponse *message_as_ServerInfosResponse() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::ServerInfosResponse ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::LegTweaksTmpChange *message_as_LegTweaksTmpChange() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::LegTweaksTmpChange ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::LegTweaksTmpClear *message_as_LegTweaksTmpClear() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::LegTweaksTmpClear ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::TapDetectionSetupNotification *message_as_TapDetectionSetupNotification() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::TapDetectionSetupNotification ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::SetPauseTrackingRequest *message_as_SetPauseTrackingRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::SetPauseTrackingRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::StatusSystemRequest *message_as_StatusSystemRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::StatusSystemRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::StatusSystemResponse *message_as_StatusSystemResponse() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::StatusSystemResponse ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::StatusSystemUpdate *message_as_StatusSystemUpdate() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::StatusSystemUpdate ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::StatusSystemFixed *message_as_StatusSystemFixed() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::StatusSystemFixed ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::ClearMountingResetRequest *message_as_ClearMountingResetRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::ClearMountingResetRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::HeightRequest *message_as_HeightRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::HeightRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::HeightResponse *message_as_HeightResponse() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::HeightResponse ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::AutoBoneApplyRequest *message_as_AutoBoneApplyRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::AutoBoneApplyRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::AutoBoneStopRecordingRequest *message_as_AutoBoneStopRecordingRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::AutoBoneStopRecordingRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::AutoBoneCancelRecordingRequest *message_as_AutoBoneCancelRecordingRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::AutoBoneCancelRecordingRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::SaveFileNotification *message_as_SaveFileNotification() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::SaveFileNotification ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::TrackingPauseStateRequest *message_as_TrackingPauseStateRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::TrackingPauseStateRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::TrackingPauseStateResponse *message_as_TrackingPauseStateResponse() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::TrackingPauseStateResponse ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::SerialTrackerGetWifiScanRequest *message_as_SerialTrackerGetWifiScanRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::SerialTrackerGetWifiScanRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::UnknownDeviceHandshakeNotification *message_as_UnknownDeviceHandshakeNotification() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::UnknownDeviceHandshakeNotification ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::AddUnknownDeviceRequest *message_as_AddUnknownDeviceRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::AddUnknownDeviceRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::ForgetDeviceRequest *message_as_ForgetDeviceRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::ForgetDeviceRequest ? static_cast(message()) : nullptr; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_TX_ID, 4) && - 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::ResetResponse *RpcMessageHeader::message_as() const { - return message_as_ResetResponse(); -} - -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::ClearDriftCompensationRequest *RpcMessageHeader::message_as() const { - return message_as_ClearDriftCompensationRequest(); -} - -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(); -} - -template<> inline const solarxr_protocol::rpc::SerialDevicesRequest *RpcMessageHeader::message_as() const { - return message_as_SerialDevicesRequest(); -} - -template<> inline const solarxr_protocol::rpc::SerialDevicesResponse *RpcMessageHeader::message_as() const { - return message_as_SerialDevicesResponse(); -} - -template<> inline const solarxr_protocol::rpc::NewSerialDeviceResponse *RpcMessageHeader::message_as() const { - return message_as_NewSerialDeviceResponse(); -} - -template<> inline const solarxr_protocol::rpc::StartWifiProvisioningRequest *RpcMessageHeader::message_as() const { - return message_as_StartWifiProvisioningRequest(); -} - -template<> inline const solarxr_protocol::rpc::StopWifiProvisioningRequest *RpcMessageHeader::message_as() const { - return message_as_StopWifiProvisioningRequest(); -} - -template<> inline const solarxr_protocol::rpc::WifiProvisioningStatusResponse *RpcMessageHeader::message_as() const { - return message_as_WifiProvisioningStatusResponse(); -} - -template<> inline const solarxr_protocol::rpc::ServerInfosRequest *RpcMessageHeader::message_as() const { - return message_as_ServerInfosRequest(); -} - -template<> inline const solarxr_protocol::rpc::ServerInfosResponse *RpcMessageHeader::message_as() const { - return message_as_ServerInfosResponse(); -} - -template<> inline const solarxr_protocol::rpc::LegTweaksTmpChange *RpcMessageHeader::message_as() const { - return message_as_LegTweaksTmpChange(); -} - -template<> inline const solarxr_protocol::rpc::LegTweaksTmpClear *RpcMessageHeader::message_as() const { - return message_as_LegTweaksTmpClear(); -} - -template<> inline const solarxr_protocol::rpc::TapDetectionSetupNotification *RpcMessageHeader::message_as() const { - return message_as_TapDetectionSetupNotification(); -} - -template<> inline const solarxr_protocol::rpc::SetPauseTrackingRequest *RpcMessageHeader::message_as() const { - return message_as_SetPauseTrackingRequest(); -} - -template<> inline const solarxr_protocol::rpc::StatusSystemRequest *RpcMessageHeader::message_as() const { - return message_as_StatusSystemRequest(); -} - -template<> inline const solarxr_protocol::rpc::StatusSystemResponse *RpcMessageHeader::message_as() const { - return message_as_StatusSystemResponse(); -} - -template<> inline const solarxr_protocol::rpc::StatusSystemUpdate *RpcMessageHeader::message_as() const { - return message_as_StatusSystemUpdate(); -} - -template<> inline const solarxr_protocol::rpc::StatusSystemFixed *RpcMessageHeader::message_as() const { - return message_as_StatusSystemFixed(); -} - -template<> inline const solarxr_protocol::rpc::ClearMountingResetRequest *RpcMessageHeader::message_as() const { - return message_as_ClearMountingResetRequest(); -} - -template<> inline const solarxr_protocol::rpc::HeightRequest *RpcMessageHeader::message_as() const { - return message_as_HeightRequest(); -} - -template<> inline const solarxr_protocol::rpc::HeightResponse *RpcMessageHeader::message_as() const { - return message_as_HeightResponse(); -} - -template<> inline const solarxr_protocol::rpc::AutoBoneApplyRequest *RpcMessageHeader::message_as() const { - return message_as_AutoBoneApplyRequest(); -} - -template<> inline const solarxr_protocol::rpc::AutoBoneStopRecordingRequest *RpcMessageHeader::message_as() const { - return message_as_AutoBoneStopRecordingRequest(); -} - -template<> inline const solarxr_protocol::rpc::AutoBoneCancelRecordingRequest *RpcMessageHeader::message_as() const { - return message_as_AutoBoneCancelRecordingRequest(); -} - -template<> inline const solarxr_protocol::rpc::SaveFileNotification *RpcMessageHeader::message_as() const { - return message_as_SaveFileNotification(); -} - -template<> inline const solarxr_protocol::rpc::TrackingPauseStateRequest *RpcMessageHeader::message_as() const { - return message_as_TrackingPauseStateRequest(); -} - -template<> inline const solarxr_protocol::rpc::TrackingPauseStateResponse *RpcMessageHeader::message_as() const { - return message_as_TrackingPauseStateResponse(); -} - -template<> inline const solarxr_protocol::rpc::SerialTrackerGetWifiScanRequest *RpcMessageHeader::message_as() const { - return message_as_SerialTrackerGetWifiScanRequest(); -} - -template<> inline const solarxr_protocol::rpc::UnknownDeviceHandshakeNotification *RpcMessageHeader::message_as() const { - return message_as_UnknownDeviceHandshakeNotification(); -} - -template<> inline const solarxr_protocol::rpc::AddUnknownDeviceRequest *RpcMessageHeader::message_as() const { - return message_as_AddUnknownDeviceRequest(); -} - -template<> inline const solarxr_protocol::rpc::ForgetDeviceRequest *RpcMessageHeader::message_as() const { - return message_as_ForgetDeviceRequest(); -} - -struct RpcMessageHeaderBuilder { - typedef RpcMessageHeader Table; - flatbuffers::FlatBufferBuilder &fbb_; - 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::Yaw) { - ResetRequestBuilder builder_(_fbb); - builder_.add_reset_type(reset_type); - return builder_.Finish(); -} - -struct ResetResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ResetResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_RESET_TYPE = 4, - VT_STATUS = 6 - }; - solarxr_protocol::rpc::ResetType reset_type() const { - return static_cast(GetField(VT_RESET_TYPE, 0)); - } - solarxr_protocol::rpc::ResetStatus status() const { - return static_cast(GetField(VT_STATUS, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_RESET_TYPE, 1) && - VerifyField(verifier, VT_STATUS, 1) && - verifier.EndTable(); - } -}; - -struct ResetResponseBuilder { - typedef ResetResponse Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_reset_type(solarxr_protocol::rpc::ResetType reset_type) { - fbb_.AddElement(ResetResponse::VT_RESET_TYPE, static_cast(reset_type), 0); - } - void add_status(solarxr_protocol::rpc::ResetStatus status) { - fbb_.AddElement(ResetResponse::VT_STATUS, static_cast(status), 0); - } - 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, - solarxr_protocol::rpc::ResetType reset_type = solarxr_protocol::rpc::ResetType::Yaw, - solarxr_protocol::rpc::ResetStatus status = solarxr_protocol::rpc::ResetStatus::STARTED) { - ResetResponseBuilder builder_(_fbb); - builder_.add_status(status); - builder_.add_reset_type(reset_type); - 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_ORIENTATION = 8, - VT_DISPLAY_NAME = 10, - VT_ALLOW_DRIFT_COMPENSATION = 12 - }; - 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_orientation() const { - return GetStruct(VT_MOUNTING_ORIENTATION); - } - const flatbuffers::String *display_name() const { - return GetPointer(VT_DISPLAY_NAME); - } - bool allow_drift_compensation() const { - return GetField(VT_ALLOW_DRIFT_COMPENSATION, 0) != 0; - } - 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_ORIENTATION, 4) && - VerifyOffset(verifier, VT_DISPLAY_NAME) && - verifier.VerifyString(display_name()) && - VerifyField(verifier, VT_ALLOW_DRIFT_COMPENSATION, 1) && - 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_orientation(const solarxr_protocol::datatypes::math::Quat *mounting_orientation) { - fbb_.AddStruct(AssignTrackerRequest::VT_MOUNTING_ORIENTATION, mounting_orientation); - } - void add_display_name(flatbuffers::Offset display_name) { - fbb_.AddOffset(AssignTrackerRequest::VT_DISPLAY_NAME, display_name); - } - void add_allow_drift_compensation(bool allow_drift_compensation) { - fbb_.AddElement(AssignTrackerRequest::VT_ALLOW_DRIFT_COMPENSATION, static_cast(allow_drift_compensation), 0); - } - 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_orientation = nullptr, - flatbuffers::Offset display_name = 0, - bool allow_drift_compensation = false) { - AssignTrackerRequestBuilder builder_(_fbb); - builder_.add_display_name(display_name); - builder_.add_mounting_orientation(mounting_orientation); - builder_.add_tracker_id(tracker_id); - builder_.add_allow_drift_compensation(allow_drift_compensation); - 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_orientation = nullptr, - const char *display_name = nullptr, - bool allow_drift_compensation = false) { - auto display_name__ = display_name ? _fbb.CreateString(display_name) : 0; - return solarxr_protocol::rpc::CreateAssignTrackerRequest( - _fbb, - tracker_id, - body_position, - mounting_orientation, - display_name__, - allow_drift_compensation); -} - -struct ClearDriftCompensationRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ClearDriftCompensationRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct ClearDriftCompensationRequestBuilder { - typedef ClearDriftCompensationRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit ClearDriftCompensationRequestBuilder(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 CreateClearDriftCompensationRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - ClearDriftCompensationRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -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_DRIFT_COMPENSATION = 8, - VT_OSC_ROUTER = 10, - VT_VRC_OSC = 12, - VT_VMC_OSC = 14, - VT_MODEL_SETTINGS = 16, - VT_TAP_DETECTION_SETTINGS = 18, - VT_AUTO_BONE_SETTINGS = 20, - VT_RESETS_SETTINGS = 22 - }; - 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::DriftCompensationSettings *drift_compensation() const { - return GetPointer(VT_DRIFT_COMPENSATION); - } - const solarxr_protocol::rpc::OSCRouterSettings *osc_router() const { - return GetPointer(VT_OSC_ROUTER); - } - const solarxr_protocol::rpc::VRCOSCSettings *vrc_osc() const { - return GetPointer(VT_VRC_OSC); - } - const solarxr_protocol::rpc::VMCOSCSettings *vmc_osc() const { - return GetPointer(VT_VMC_OSC); - } - const solarxr_protocol::rpc::settings::ModelSettings *model_settings() const { - return GetPointer(VT_MODEL_SETTINGS); - } - const solarxr_protocol::rpc::TapDetectionSettings *tap_detection_settings() const { - return GetPointer(VT_TAP_DETECTION_SETTINGS); - } - const solarxr_protocol::rpc::AutoBoneSettings *auto_bone_settings() const { - return GetPointer(VT_AUTO_BONE_SETTINGS); - } - const solarxr_protocol::rpc::ResetsSettings *resets_settings() const { - return GetPointer(VT_RESETS_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_DRIFT_COMPENSATION) && - verifier.VerifyTable(drift_compensation()) && - VerifyOffset(verifier, VT_OSC_ROUTER) && - verifier.VerifyTable(osc_router()) && - VerifyOffset(verifier, VT_VRC_OSC) && - verifier.VerifyTable(vrc_osc()) && - VerifyOffset(verifier, VT_VMC_OSC) && - verifier.VerifyTable(vmc_osc()) && - VerifyOffset(verifier, VT_MODEL_SETTINGS) && - verifier.VerifyTable(model_settings()) && - VerifyOffset(verifier, VT_TAP_DETECTION_SETTINGS) && - verifier.VerifyTable(tap_detection_settings()) && - VerifyOffset(verifier, VT_AUTO_BONE_SETTINGS) && - verifier.VerifyTable(auto_bone_settings()) && - VerifyOffset(verifier, VT_RESETS_SETTINGS) && - verifier.VerifyTable(resets_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_drift_compensation(flatbuffers::Offset drift_compensation) { - fbb_.AddOffset(SettingsResponse::VT_DRIFT_COMPENSATION, drift_compensation); - } - void add_osc_router(flatbuffers::Offset osc_router) { - fbb_.AddOffset(SettingsResponse::VT_OSC_ROUTER, osc_router); - } - void add_vrc_osc(flatbuffers::Offset vrc_osc) { - fbb_.AddOffset(SettingsResponse::VT_VRC_OSC, vrc_osc); - } - void add_vmc_osc(flatbuffers::Offset vmc_osc) { - fbb_.AddOffset(SettingsResponse::VT_VMC_OSC, vmc_osc); - } - void add_model_settings(flatbuffers::Offset model_settings) { - fbb_.AddOffset(SettingsResponse::VT_MODEL_SETTINGS, model_settings); - } - void add_tap_detection_settings(flatbuffers::Offset tap_detection_settings) { - fbb_.AddOffset(SettingsResponse::VT_TAP_DETECTION_SETTINGS, tap_detection_settings); - } - void add_auto_bone_settings(flatbuffers::Offset auto_bone_settings) { - fbb_.AddOffset(SettingsResponse::VT_AUTO_BONE_SETTINGS, auto_bone_settings); - } - void add_resets_settings(flatbuffers::Offset resets_settings) { - fbb_.AddOffset(SettingsResponse::VT_RESETS_SETTINGS, resets_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 drift_compensation = 0, - flatbuffers::Offset osc_router = 0, - flatbuffers::Offset vrc_osc = 0, - flatbuffers::Offset vmc_osc = 0, - flatbuffers::Offset model_settings = 0, - flatbuffers::Offset tap_detection_settings = 0, - flatbuffers::Offset auto_bone_settings = 0, - flatbuffers::Offset resets_settings = 0) { - SettingsResponseBuilder builder_(_fbb); - builder_.add_resets_settings(resets_settings); - builder_.add_auto_bone_settings(auto_bone_settings); - builder_.add_tap_detection_settings(tap_detection_settings); - builder_.add_model_settings(model_settings); - builder_.add_vmc_osc(vmc_osc); - builder_.add_vrc_osc(vrc_osc); - builder_.add_osc_router(osc_router); - builder_.add_drift_compensation(drift_compensation); - 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_DRIFT_COMPENSATION = 8, - VT_OSC_ROUTER = 10, - VT_VRC_OSC = 12, - VT_VMC_OSC = 14, - VT_MODEL_SETTINGS = 16, - VT_TAP_DETECTION_SETTINGS = 18, - VT_AUTO_BONE_SETTINGS = 20, - VT_RESETS_SETTINGS = 22 - }; - 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::DriftCompensationSettings *drift_compensation() const { - return GetPointer(VT_DRIFT_COMPENSATION); - } - const solarxr_protocol::rpc::OSCRouterSettings *osc_router() const { - return GetPointer(VT_OSC_ROUTER); - } - const solarxr_protocol::rpc::VRCOSCSettings *vrc_osc() const { - return GetPointer(VT_VRC_OSC); - } - const solarxr_protocol::rpc::VMCOSCSettings *vmc_osc() const { - return GetPointer(VT_VMC_OSC); - } - const solarxr_protocol::rpc::settings::ModelSettings *model_settings() const { - return GetPointer(VT_MODEL_SETTINGS); - } - const solarxr_protocol::rpc::TapDetectionSettings *tap_detection_settings() const { - return GetPointer(VT_TAP_DETECTION_SETTINGS); - } - const solarxr_protocol::rpc::AutoBoneSettings *auto_bone_settings() const { - return GetPointer(VT_AUTO_BONE_SETTINGS); - } - const solarxr_protocol::rpc::ResetsSettings *resets_settings() const { - return GetPointer(VT_RESETS_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_DRIFT_COMPENSATION) && - verifier.VerifyTable(drift_compensation()) && - VerifyOffset(verifier, VT_OSC_ROUTER) && - verifier.VerifyTable(osc_router()) && - VerifyOffset(verifier, VT_VRC_OSC) && - verifier.VerifyTable(vrc_osc()) && - VerifyOffset(verifier, VT_VMC_OSC) && - verifier.VerifyTable(vmc_osc()) && - VerifyOffset(verifier, VT_MODEL_SETTINGS) && - verifier.VerifyTable(model_settings()) && - VerifyOffset(verifier, VT_TAP_DETECTION_SETTINGS) && - verifier.VerifyTable(tap_detection_settings()) && - VerifyOffset(verifier, VT_AUTO_BONE_SETTINGS) && - verifier.VerifyTable(auto_bone_settings()) && - VerifyOffset(verifier, VT_RESETS_SETTINGS) && - verifier.VerifyTable(resets_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_drift_compensation(flatbuffers::Offset drift_compensation) { - fbb_.AddOffset(ChangeSettingsRequest::VT_DRIFT_COMPENSATION, drift_compensation); - } - void add_osc_router(flatbuffers::Offset osc_router) { - fbb_.AddOffset(ChangeSettingsRequest::VT_OSC_ROUTER, osc_router); - } - void add_vrc_osc(flatbuffers::Offset vrc_osc) { - fbb_.AddOffset(ChangeSettingsRequest::VT_VRC_OSC, vrc_osc); - } - void add_vmc_osc(flatbuffers::Offset vmc_osc) { - fbb_.AddOffset(ChangeSettingsRequest::VT_VMC_OSC, vmc_osc); - } - void add_model_settings(flatbuffers::Offset model_settings) { - fbb_.AddOffset(ChangeSettingsRequest::VT_MODEL_SETTINGS, model_settings); - } - void add_tap_detection_settings(flatbuffers::Offset tap_detection_settings) { - fbb_.AddOffset(ChangeSettingsRequest::VT_TAP_DETECTION_SETTINGS, tap_detection_settings); - } - void add_auto_bone_settings(flatbuffers::Offset auto_bone_settings) { - fbb_.AddOffset(ChangeSettingsRequest::VT_AUTO_BONE_SETTINGS, auto_bone_settings); - } - void add_resets_settings(flatbuffers::Offset resets_settings) { - fbb_.AddOffset(ChangeSettingsRequest::VT_RESETS_SETTINGS, resets_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 drift_compensation = 0, - flatbuffers::Offset osc_router = 0, - flatbuffers::Offset vrc_osc = 0, - flatbuffers::Offset vmc_osc = 0, - flatbuffers::Offset model_settings = 0, - flatbuffers::Offset tap_detection_settings = 0, - flatbuffers::Offset auto_bone_settings = 0, - flatbuffers::Offset resets_settings = 0) { - ChangeSettingsRequestBuilder builder_(_fbb); - builder_.add_resets_settings(resets_settings); - builder_.add_auto_bone_settings(auto_bone_settings); - builder_.add_tap_detection_settings(tap_detection_settings); - builder_.add_model_settings(model_settings); - builder_.add_vmc_osc(vmc_osc); - builder_.add_vrc_osc(vrc_osc); - builder_.add_osc_router(osc_router); - builder_.add_drift_compensation(drift_compensation); - 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_AUTOMATICTRACKERTOGGLE = 16, - VT_LEFT_FOOT = 18, - VT_RIGHT_FOOT = 20, - VT_LEFT_KNEE = 22, - VT_RIGHT_KNEE = 24, - VT_LEFT_ELBOW = 26, - VT_RIGHT_ELBOW = 28, - VT_LEFT_HAND = 30, - VT_RIGHT_HAND = 32 - }; - bool waist() const { - return GetField(VT_WAIST, 0) != 0; - } - bool chest() const { - return GetField(VT_CHEST, 0) != 0; - } - bool automaticTrackerToggle() const { - return GetField(VT_AUTOMATICTRACKERTOGGLE, 0) != 0; - } - bool left_foot() const { - return GetField(VT_LEFT_FOOT, 0) != 0; - } - bool right_foot() const { - return GetField(VT_RIGHT_FOOT, 0) != 0; - } - bool left_knee() const { - return GetField(VT_LEFT_KNEE, 0) != 0; - } - bool right_knee() const { - return GetField(VT_RIGHT_KNEE, 0) != 0; - } - bool left_elbow() const { - return GetField(VT_LEFT_ELBOW, 0) != 0; - } - bool right_elbow() const { - return GetField(VT_RIGHT_ELBOW, 0) != 0; - } - bool left_hand() const { - return GetField(VT_LEFT_HAND, 0) != 0; - } - bool right_hand() const { - return GetField(VT_RIGHT_HAND, 0) != 0; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_WAIST, 1) && - VerifyField(verifier, VT_CHEST, 1) && - VerifyField(verifier, VT_AUTOMATICTRACKERTOGGLE, 1) && - VerifyField(verifier, VT_LEFT_FOOT, 1) && - VerifyField(verifier, VT_RIGHT_FOOT, 1) && - VerifyField(verifier, VT_LEFT_KNEE, 1) && - VerifyField(verifier, VT_RIGHT_KNEE, 1) && - VerifyField(verifier, VT_LEFT_ELBOW, 1) && - VerifyField(verifier, VT_RIGHT_ELBOW, 1) && - VerifyField(verifier, VT_LEFT_HAND, 1) && - VerifyField(verifier, VT_RIGHT_HAND, 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_automaticTrackerToggle(bool automaticTrackerToggle) { - fbb_.AddElement(SteamVRTrackersSetting::VT_AUTOMATICTRACKERTOGGLE, static_cast(automaticTrackerToggle), 0); - } - void add_left_foot(bool left_foot) { - fbb_.AddElement(SteamVRTrackersSetting::VT_LEFT_FOOT, static_cast(left_foot), 0); - } - void add_right_foot(bool right_foot) { - fbb_.AddElement(SteamVRTrackersSetting::VT_RIGHT_FOOT, static_cast(right_foot), 0); - } - void add_left_knee(bool left_knee) { - fbb_.AddElement(SteamVRTrackersSetting::VT_LEFT_KNEE, static_cast(left_knee), 0); - } - void add_right_knee(bool right_knee) { - fbb_.AddElement(SteamVRTrackersSetting::VT_RIGHT_KNEE, static_cast(right_knee), 0); - } - void add_left_elbow(bool left_elbow) { - fbb_.AddElement(SteamVRTrackersSetting::VT_LEFT_ELBOW, static_cast(left_elbow), 0); - } - void add_right_elbow(bool right_elbow) { - fbb_.AddElement(SteamVRTrackersSetting::VT_RIGHT_ELBOW, static_cast(right_elbow), 0); - } - void add_left_hand(bool left_hand) { - fbb_.AddElement(SteamVRTrackersSetting::VT_LEFT_HAND, static_cast(left_hand), 0); - } - void add_right_hand(bool right_hand) { - fbb_.AddElement(SteamVRTrackersSetting::VT_RIGHT_HAND, static_cast(right_hand), 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 automaticTrackerToggle = false, - bool left_foot = false, - bool right_foot = false, - bool left_knee = false, - bool right_knee = false, - bool left_elbow = false, - bool right_elbow = false, - bool left_hand = false, - bool right_hand = false) { - SteamVRTrackersSettingBuilder builder_(_fbb); - builder_.add_right_hand(right_hand); - builder_.add_left_hand(left_hand); - builder_.add_right_elbow(right_elbow); - builder_.add_left_elbow(left_elbow); - builder_.add_right_knee(right_knee); - builder_.add_left_knee(left_knee); - builder_.add_right_foot(right_foot); - builder_.add_left_foot(left_foot); - builder_.add_automaticTrackerToggle(automaticTrackerToggle); - 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(); -} - -/// Settings related to IMU yaw drift compensation -struct DriftCompensationSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef DriftCompensationSettingsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ENABLED = 4, - VT_AMOUNT = 6, - VT_MAX_RESETS = 8 - }; - bool enabled() const { - return GetField(VT_ENABLED, 0) != 0; - } - /// 0 to 1. A higher value results in more yaw drift compensation - float amount() const { - return GetField(VT_AMOUNT, 0.0f); - } - /// Number of previous resets to take into account when calculating yaw drift - uint16_t max_resets() const { - return GetField(VT_MAX_RESETS, 0); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_ENABLED, 1) && - VerifyField(verifier, VT_AMOUNT, 4) && - VerifyField(verifier, VT_MAX_RESETS, 2) && - verifier.EndTable(); - } -}; - -struct DriftCompensationSettingsBuilder { - typedef DriftCompensationSettings Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_enabled(bool enabled) { - fbb_.AddElement(DriftCompensationSettings::VT_ENABLED, static_cast(enabled), 0); - } - void add_amount(float amount) { - fbb_.AddElement(DriftCompensationSettings::VT_AMOUNT, amount, 0.0f); - } - void add_max_resets(uint16_t max_resets) { - fbb_.AddElement(DriftCompensationSettings::VT_MAX_RESETS, max_resets, 0); - } - explicit DriftCompensationSettingsBuilder(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 CreateDriftCompensationSettings( - flatbuffers::FlatBufferBuilder &_fbb, - bool enabled = false, - float amount = 0.0f, - uint16_t max_resets = 0) { - DriftCompensationSettingsBuilder builder_(_fbb); - builder_.add_amount(amount); - builder_.add_max_resets(max_resets); - builder_.add_enabled(enabled); - return builder_.Finish(); -} - -/// OSC router forwards messages it receives, to allow the usage of multiple OSC programs for the same app. -struct OSCRouterSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef OSCRouterSettingsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_OSC_SETTINGS = 4 - }; - const solarxr_protocol::rpc::OSCSettings *osc_settings() const { - return GetPointer(VT_OSC_SETTINGS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_OSC_SETTINGS) && - verifier.VerifyTable(osc_settings()) && - verifier.EndTable(); - } -}; - -struct OSCRouterSettingsBuilder { - typedef OSCRouterSettings Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_osc_settings(flatbuffers::Offset osc_settings) { - fbb_.AddOffset(OSCRouterSettings::VT_OSC_SETTINGS, osc_settings); - } - explicit OSCRouterSettingsBuilder(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 CreateOSCRouterSettings( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset osc_settings = 0) { - OSCRouterSettingsBuilder builder_(_fbb); - builder_.add_osc_settings(osc_settings); - return builder_.Finish(); -} - -/// OSC Settings specific to VRChat -struct VRCOSCSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef VRCOSCSettingsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_OSC_SETTINGS = 4, - VT_TRACKERS = 6 - }; - const solarxr_protocol::rpc::OSCSettings *osc_settings() const { - return GetPointer(VT_OSC_SETTINGS); - } - const solarxr_protocol::rpc::OSCTrackersSetting *trackers() const { - return GetPointer(VT_TRACKERS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_OSC_SETTINGS) && - verifier.VerifyTable(osc_settings()) && - VerifyOffset(verifier, VT_TRACKERS) && - verifier.VerifyTable(trackers()) && - verifier.EndTable(); - } -}; - -struct VRCOSCSettingsBuilder { - typedef VRCOSCSettings Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_osc_settings(flatbuffers::Offset osc_settings) { - fbb_.AddOffset(VRCOSCSettings::VT_OSC_SETTINGS, osc_settings); - } - void add_trackers(flatbuffers::Offset trackers) { - fbb_.AddOffset(VRCOSCSettings::VT_TRACKERS, trackers); - } - explicit VRCOSCSettingsBuilder(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 CreateVRCOSCSettings( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset osc_settings = 0, - flatbuffers::Offset trackers = 0) { - VRCOSCSettingsBuilder builder_(_fbb); - builder_.add_trackers(trackers); - builder_.add_osc_settings(osc_settings); - return builder_.Finish(); -} - -/// OSC Settings specific to VMC -struct VMCOSCSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef VMCOSCSettingsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_OSC_SETTINGS = 4, - VT_VRM_JSON = 6, - VT_ANCHOR_HIP = 8, - VT_MIRROR_TRACKING = 10 - }; - const solarxr_protocol::rpc::OSCSettings *osc_settings() const { - return GetPointer(VT_OSC_SETTINGS); - } - const flatbuffers::String *vrm_json() const { - return GetPointer(VT_VRM_JSON); - } - bool anchor_hip() const { - return GetField(VT_ANCHOR_HIP, 0) != 0; - } - bool mirror_tracking() const { - return GetField(VT_MIRROR_TRACKING, 0) != 0; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_OSC_SETTINGS) && - verifier.VerifyTable(osc_settings()) && - VerifyOffset(verifier, VT_VRM_JSON) && - verifier.VerifyString(vrm_json()) && - VerifyField(verifier, VT_ANCHOR_HIP, 1) && - VerifyField(verifier, VT_MIRROR_TRACKING, 1) && - verifier.EndTable(); - } -}; - -struct VMCOSCSettingsBuilder { - typedef VMCOSCSettings Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_osc_settings(flatbuffers::Offset osc_settings) { - fbb_.AddOffset(VMCOSCSettings::VT_OSC_SETTINGS, osc_settings); - } - void add_vrm_json(flatbuffers::Offset vrm_json) { - fbb_.AddOffset(VMCOSCSettings::VT_VRM_JSON, vrm_json); - } - void add_anchor_hip(bool anchor_hip) { - fbb_.AddElement(VMCOSCSettings::VT_ANCHOR_HIP, static_cast(anchor_hip), 0); - } - void add_mirror_tracking(bool mirror_tracking) { - fbb_.AddElement(VMCOSCSettings::VT_MIRROR_TRACKING, static_cast(mirror_tracking), 0); - } - explicit VMCOSCSettingsBuilder(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 CreateVMCOSCSettings( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset osc_settings = 0, - flatbuffers::Offset vrm_json = 0, - bool anchor_hip = false, - bool mirror_tracking = false) { - VMCOSCSettingsBuilder builder_(_fbb); - builder_.add_vrm_json(vrm_json); - builder_.add_osc_settings(osc_settings); - builder_.add_mirror_tracking(mirror_tracking); - builder_.add_anchor_hip(anchor_hip); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateVMCOSCSettingsDirect( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset osc_settings = 0, - const char *vrm_json = nullptr, - bool anchor_hip = false, - bool mirror_tracking = false) { - auto vrm_json__ = vrm_json ? _fbb.CreateString(vrm_json) : 0; - return solarxr_protocol::rpc::CreateVMCOSCSettings( - _fbb, - osc_settings, - vrm_json__, - anchor_hip, - mirror_tracking); -} - -/// OSC Settings that are used in *any* osc application. -struct OSCSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef OSCSettingsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ENABLED = 4, - VT_PORT_IN = 6, - VT_PORT_OUT = 8, - VT_ADDRESS = 10 - }; - bool enabled() const { - return GetField(VT_ENABLED, 0) != 0; - } - uint16_t port_in() const { - return GetField(VT_PORT_IN, 0); - } - uint16_t port_out() const { - return GetField(VT_PORT_OUT, 0); - } - const flatbuffers::String *address() const { - return GetPointer(VT_ADDRESS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_ENABLED, 1) && - VerifyField(verifier, VT_PORT_IN, 2) && - VerifyField(verifier, VT_PORT_OUT, 2) && - VerifyOffset(verifier, VT_ADDRESS) && - verifier.VerifyString(address()) && - verifier.EndTable(); - } -}; - -struct OSCSettingsBuilder { - typedef OSCSettings Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_enabled(bool enabled) { - fbb_.AddElement(OSCSettings::VT_ENABLED, static_cast(enabled), 0); - } - void add_port_in(uint16_t port_in) { - fbb_.AddElement(OSCSettings::VT_PORT_IN, port_in, 0); - } - void add_port_out(uint16_t port_out) { - fbb_.AddElement(OSCSettings::VT_PORT_OUT, port_out, 0); - } - void add_address(flatbuffers::Offset address) { - fbb_.AddOffset(OSCSettings::VT_ADDRESS, address); - } - explicit OSCSettingsBuilder(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 CreateOSCSettings( - flatbuffers::FlatBufferBuilder &_fbb, - bool enabled = false, - uint16_t port_in = 0, - uint16_t port_out = 0, - flatbuffers::Offset address = 0) { - OSCSettingsBuilder builder_(_fbb); - builder_.add_address(address); - builder_.add_port_out(port_out); - builder_.add_port_in(port_in); - builder_.add_enabled(enabled); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateOSCSettingsDirect( - flatbuffers::FlatBufferBuilder &_fbb, - bool enabled = false, - uint16_t port_in = 0, - uint16_t port_out = 0, - const char *address = nullptr) { - auto address__ = address ? _fbb.CreateString(address) : 0; - return solarxr_protocol::rpc::CreateOSCSettings( - _fbb, - enabled, - port_in, - port_out, - address__); -} - -struct OSCTrackersSetting FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef OSCTrackersSettingBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_HEAD = 4, - VT_CHEST = 6, - VT_WAIST = 8, - VT_KNEES = 10, - VT_FEET = 12, - VT_ELBOWS = 14, - VT_HANDS = 16 - }; - bool head() const { - return GetField(VT_HEAD, 0) != 0; - } - bool chest() const { - return GetField(VT_CHEST, 0) != 0; - } - bool waist() const { - return GetField(VT_WAIST, 0) != 0; - } - bool knees() const { - return GetField(VT_KNEES, 0) != 0; - } - bool feet() const { - return GetField(VT_FEET, 0) != 0; - } - bool elbows() const { - return GetField(VT_ELBOWS, 0) != 0; - } - bool hands() const { - return GetField(VT_HANDS, 0) != 0; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_HEAD, 1) && - VerifyField(verifier, VT_CHEST, 1) && - VerifyField(verifier, VT_WAIST, 1) && - VerifyField(verifier, VT_KNEES, 1) && - VerifyField(verifier, VT_FEET, 1) && - VerifyField(verifier, VT_ELBOWS, 1) && - VerifyField(verifier, VT_HANDS, 1) && - verifier.EndTable(); - } -}; - -struct OSCTrackersSettingBuilder { - typedef OSCTrackersSetting Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_head(bool head) { - fbb_.AddElement(OSCTrackersSetting::VT_HEAD, static_cast(head), 0); - } - void add_chest(bool chest) { - fbb_.AddElement(OSCTrackersSetting::VT_CHEST, static_cast(chest), 0); - } - void add_waist(bool waist) { - fbb_.AddElement(OSCTrackersSetting::VT_WAIST, static_cast(waist), 0); - } - void add_knees(bool knees) { - fbb_.AddElement(OSCTrackersSetting::VT_KNEES, static_cast(knees), 0); - } - void add_feet(bool feet) { - fbb_.AddElement(OSCTrackersSetting::VT_FEET, static_cast(feet), 0); - } - void add_elbows(bool elbows) { - fbb_.AddElement(OSCTrackersSetting::VT_ELBOWS, static_cast(elbows), 0); - } - void add_hands(bool hands) { - fbb_.AddElement(OSCTrackersSetting::VT_HANDS, static_cast(hands), 0); - } - explicit OSCTrackersSettingBuilder(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 CreateOSCTrackersSetting( - flatbuffers::FlatBufferBuilder &_fbb, - bool head = false, - bool chest = false, - bool waist = false, - bool knees = false, - bool feet = false, - bool elbows = false, - bool hands = false) { - OSCTrackersSettingBuilder builder_(_fbb); - builder_.add_hands(hands); - builder_.add_elbows(elbows); - builder_.add_feet(feet); - builder_.add_knees(knees); - builder_.add_waist(waist); - builder_.add_chest(chest); - builder_.add_head(head); - return builder_.Finish(); -} - -struct TapDetectionSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef TapDetectionSettingsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_FULL_RESET_DELAY = 4, - VT_FULL_RESET_ENABLED = 6, - VT_FULL_RESET_TAPS = 8, - VT_YAW_RESET_DELAY = 10, - VT_YAW_RESET_ENABLED = 12, - VT_YAW_RESET_TAPS = 14, - VT_MOUNTING_RESET_DELAY = 16, - VT_MOUNTING_RESET_ENABLED = 18, - VT_MOUNTING_RESET_TAPS = 20, - VT_SETUP_MODE = 22, - VT_NUMBER_TRACKERS_OVER_THRESHOLD = 24 - }; - flatbuffers::Optional full_reset_delay() const { - return GetOptional(VT_FULL_RESET_DELAY); - } - flatbuffers::Optional full_reset_enabled() const { - return GetOptional(VT_FULL_RESET_ENABLED); - } - flatbuffers::Optional full_reset_taps() const { - return GetOptional(VT_FULL_RESET_TAPS); - } - flatbuffers::Optional yaw_reset_delay() const { - return GetOptional(VT_YAW_RESET_DELAY); - } - flatbuffers::Optional yaw_reset_enabled() const { - return GetOptional(VT_YAW_RESET_ENABLED); - } - flatbuffers::Optional yaw_reset_taps() const { - return GetOptional(VT_YAW_RESET_TAPS); - } - flatbuffers::Optional mounting_reset_delay() const { - return GetOptional(VT_MOUNTING_RESET_DELAY); - } - flatbuffers::Optional mounting_reset_enabled() const { - return GetOptional(VT_MOUNTING_RESET_ENABLED); - } - flatbuffers::Optional mounting_reset_taps() const { - return GetOptional(VT_MOUNTING_RESET_TAPS); - } - /// If true, disables reset behavior of tap detection and sends a - /// TapDetectionSetupNotification, each time 2 taps are detected on any tracker - flatbuffers::Optional setup_mode() const { - return GetOptional(VT_SETUP_MODE); - } - flatbuffers::Optional number_trackers_over_threshold() const { - return GetOptional(VT_NUMBER_TRACKERS_OVER_THRESHOLD); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_FULL_RESET_DELAY, 4) && - VerifyField(verifier, VT_FULL_RESET_ENABLED, 1) && - VerifyField(verifier, VT_FULL_RESET_TAPS, 1) && - VerifyField(verifier, VT_YAW_RESET_DELAY, 4) && - VerifyField(verifier, VT_YAW_RESET_ENABLED, 1) && - VerifyField(verifier, VT_YAW_RESET_TAPS, 1) && - VerifyField(verifier, VT_MOUNTING_RESET_DELAY, 4) && - VerifyField(verifier, VT_MOUNTING_RESET_ENABLED, 1) && - VerifyField(verifier, VT_MOUNTING_RESET_TAPS, 1) && - VerifyField(verifier, VT_SETUP_MODE, 1) && - VerifyField(verifier, VT_NUMBER_TRACKERS_OVER_THRESHOLD, 1) && - verifier.EndTable(); - } -}; - -struct TapDetectionSettingsBuilder { - typedef TapDetectionSettings Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_full_reset_delay(float full_reset_delay) { - fbb_.AddElement(TapDetectionSettings::VT_FULL_RESET_DELAY, full_reset_delay); - } - void add_full_reset_enabled(bool full_reset_enabled) { - fbb_.AddElement(TapDetectionSettings::VT_FULL_RESET_ENABLED, static_cast(full_reset_enabled)); - } - void add_full_reset_taps(uint8_t full_reset_taps) { - fbb_.AddElement(TapDetectionSettings::VT_FULL_RESET_TAPS, full_reset_taps); - } - void add_yaw_reset_delay(float yaw_reset_delay) { - fbb_.AddElement(TapDetectionSettings::VT_YAW_RESET_DELAY, yaw_reset_delay); - } - void add_yaw_reset_enabled(bool yaw_reset_enabled) { - fbb_.AddElement(TapDetectionSettings::VT_YAW_RESET_ENABLED, static_cast(yaw_reset_enabled)); - } - void add_yaw_reset_taps(uint8_t yaw_reset_taps) { - fbb_.AddElement(TapDetectionSettings::VT_YAW_RESET_TAPS, yaw_reset_taps); - } - void add_mounting_reset_delay(float mounting_reset_delay) { - fbb_.AddElement(TapDetectionSettings::VT_MOUNTING_RESET_DELAY, mounting_reset_delay); - } - void add_mounting_reset_enabled(bool mounting_reset_enabled) { - fbb_.AddElement(TapDetectionSettings::VT_MOUNTING_RESET_ENABLED, static_cast(mounting_reset_enabled)); - } - void add_mounting_reset_taps(uint8_t mounting_reset_taps) { - fbb_.AddElement(TapDetectionSettings::VT_MOUNTING_RESET_TAPS, mounting_reset_taps); - } - void add_setup_mode(bool setup_mode) { - fbb_.AddElement(TapDetectionSettings::VT_SETUP_MODE, static_cast(setup_mode)); - } - void add_number_trackers_over_threshold(uint8_t number_trackers_over_threshold) { - fbb_.AddElement(TapDetectionSettings::VT_NUMBER_TRACKERS_OVER_THRESHOLD, number_trackers_over_threshold); - } - explicit TapDetectionSettingsBuilder(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 CreateTapDetectionSettings( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Optional full_reset_delay = flatbuffers::nullopt, - flatbuffers::Optional full_reset_enabled = flatbuffers::nullopt, - flatbuffers::Optional full_reset_taps = flatbuffers::nullopt, - flatbuffers::Optional yaw_reset_delay = flatbuffers::nullopt, - flatbuffers::Optional yaw_reset_enabled = flatbuffers::nullopt, - flatbuffers::Optional yaw_reset_taps = flatbuffers::nullopt, - flatbuffers::Optional mounting_reset_delay = flatbuffers::nullopt, - flatbuffers::Optional mounting_reset_enabled = flatbuffers::nullopt, - flatbuffers::Optional mounting_reset_taps = flatbuffers::nullopt, - flatbuffers::Optional setup_mode = flatbuffers::nullopt, - flatbuffers::Optional number_trackers_over_threshold = flatbuffers::nullopt) { - TapDetectionSettingsBuilder builder_(_fbb); - if(mounting_reset_delay) { builder_.add_mounting_reset_delay(*mounting_reset_delay); } - if(yaw_reset_delay) { builder_.add_yaw_reset_delay(*yaw_reset_delay); } - if(full_reset_delay) { builder_.add_full_reset_delay(*full_reset_delay); } - if(number_trackers_over_threshold) { builder_.add_number_trackers_over_threshold(*number_trackers_over_threshold); } - if(setup_mode) { builder_.add_setup_mode(*setup_mode); } - if(mounting_reset_taps) { builder_.add_mounting_reset_taps(*mounting_reset_taps); } - if(mounting_reset_enabled) { builder_.add_mounting_reset_enabled(*mounting_reset_enabled); } - if(yaw_reset_taps) { builder_.add_yaw_reset_taps(*yaw_reset_taps); } - if(yaw_reset_enabled) { builder_.add_yaw_reset_enabled(*yaw_reset_enabled); } - if(full_reset_taps) { builder_.add_full_reset_taps(*full_reset_taps); } - if(full_reset_enabled) { builder_.add_full_reset_enabled(*full_reset_enabled); } - return builder_.Finish(); -} - -struct ResetsSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ResetsSettingsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_RESET_MOUNTING_FEET = 4, - VT_ARMS_MOUNTING_RESET_MODE = 6, - VT_YAW_RESET_SMOOTH_TIME = 8, - VT_SAVE_MOUNTING_RESET = 10, - VT_RESET_HMD_PITCH = 12 - }; - bool reset_mounting_feet() const { - return GetField(VT_RESET_MOUNTING_FEET, 0) != 0; - } - solarxr_protocol::rpc::ArmsMountingResetMode arms_mounting_reset_mode() const { - return static_cast(GetField(VT_ARMS_MOUNTING_RESET_MODE, 0)); - } - float yaw_reset_smooth_time() const { - return GetField(VT_YAW_RESET_SMOOTH_TIME, 0.0f); - } - bool save_mounting_reset() const { - return GetField(VT_SAVE_MOUNTING_RESET, 0) != 0; - } - bool reset_hmd_pitch() const { - return GetField(VT_RESET_HMD_PITCH, 0) != 0; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_RESET_MOUNTING_FEET, 1) && - VerifyField(verifier, VT_ARMS_MOUNTING_RESET_MODE, 1) && - VerifyField(verifier, VT_YAW_RESET_SMOOTH_TIME, 4) && - VerifyField(verifier, VT_SAVE_MOUNTING_RESET, 1) && - VerifyField(verifier, VT_RESET_HMD_PITCH, 1) && - verifier.EndTable(); - } -}; - -struct ResetsSettingsBuilder { - typedef ResetsSettings Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_reset_mounting_feet(bool reset_mounting_feet) { - fbb_.AddElement(ResetsSettings::VT_RESET_MOUNTING_FEET, static_cast(reset_mounting_feet), 0); - } - void add_arms_mounting_reset_mode(solarxr_protocol::rpc::ArmsMountingResetMode arms_mounting_reset_mode) { - fbb_.AddElement(ResetsSettings::VT_ARMS_MOUNTING_RESET_MODE, static_cast(arms_mounting_reset_mode), 0); - } - void add_yaw_reset_smooth_time(float yaw_reset_smooth_time) { - fbb_.AddElement(ResetsSettings::VT_YAW_RESET_SMOOTH_TIME, yaw_reset_smooth_time, 0.0f); - } - void add_save_mounting_reset(bool save_mounting_reset) { - fbb_.AddElement(ResetsSettings::VT_SAVE_MOUNTING_RESET, static_cast(save_mounting_reset), 0); - } - void add_reset_hmd_pitch(bool reset_hmd_pitch) { - fbb_.AddElement(ResetsSettings::VT_RESET_HMD_PITCH, static_cast(reset_hmd_pitch), 0); - } - explicit ResetsSettingsBuilder(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 CreateResetsSettings( - flatbuffers::FlatBufferBuilder &_fbb, - bool reset_mounting_feet = false, - solarxr_protocol::rpc::ArmsMountingResetMode arms_mounting_reset_mode = solarxr_protocol::rpc::ArmsMountingResetMode::BACK, - float yaw_reset_smooth_time = 0.0f, - bool save_mounting_reset = false, - bool reset_hmd_pitch = false) { - ResetsSettingsBuilder builder_(_fbb); - builder_.add_yaw_reset_smooth_time(yaw_reset_smooth_time); - builder_.add_reset_hmd_pitch(reset_hmd_pitch); - builder_.add_save_mounting_reset(save_mounting_reset); - builder_.add_arms_mounting_reset_mode(arms_mounting_reset_mode); - builder_.add_reset_mounting_feet(reset_mounting_feet); - return builder_.Finish(); -} - -/// See TapDetectionSettings::setup_mode -struct TapDetectionSetupNotification FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef TapDetectionSetupNotificationBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_TRACKER_ID = 4 - }; - const solarxr_protocol::datatypes::TrackerId *tracker_id() const { - return GetPointer(VT_TRACKER_ID); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_TRACKER_ID) && - verifier.VerifyTable(tracker_id()) && - verifier.EndTable(); - } -}; - -struct TapDetectionSetupNotificationBuilder { - typedef TapDetectionSetupNotification Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_tracker_id(flatbuffers::Offset tracker_id) { - fbb_.AddOffset(TapDetectionSetupNotification::VT_TRACKER_ID, tracker_id); - } - explicit TapDetectionSetupNotificationBuilder(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 CreateTapDetectionSetupNotification( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset tracker_id = 0) { - TapDetectionSetupNotificationBuilder builder_(_fbb); - builder_.add_tracker_id(tracker_id); - 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 SerialDevice FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SerialDeviceBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_PORT = 4, - VT_NAME = 6 - }; - const flatbuffers::String *port() const { - return GetPointer(VT_PORT); - } - const flatbuffers::String *name() const { - return GetPointer(VT_NAME); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_PORT) && - verifier.VerifyString(port()) && - VerifyOffset(verifier, VT_NAME) && - verifier.VerifyString(name()) && - verifier.EndTable(); - } -}; - -struct SerialDeviceBuilder { - typedef SerialDevice Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_port(flatbuffers::Offset port) { - fbb_.AddOffset(SerialDevice::VT_PORT, port); - } - void add_name(flatbuffers::Offset name) { - fbb_.AddOffset(SerialDevice::VT_NAME, name); - } - explicit SerialDeviceBuilder(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 CreateSerialDevice( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset port = 0, - flatbuffers::Offset name = 0) { - SerialDeviceBuilder builder_(_fbb); - builder_.add_name(name); - builder_.add_port(port); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateSerialDeviceDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const char *port = nullptr, - const char *name = nullptr) { - auto port__ = port ? _fbb.CreateString(port) : 0; - auto name__ = name ? _fbb.CreateString(name) : 0; - return solarxr_protocol::rpc::CreateSerialDevice( - _fbb, - port__, - name__); -} - -struct OpenSerialRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef OpenSerialRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_AUTO_ = 4, - VT_PORT = 6 - }; - /// Automaticaly pick the first serial device available - bool auto_() const { - return GetField(VT_AUTO_, 0) != 0; - } - const flatbuffers::String *port() const { - return GetPointer(VT_PORT); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_AUTO_, 1) && - VerifyOffset(verifier, VT_PORT) && - verifier.VerifyString(port()) && - verifier.EndTable(); - } -}; - -struct OpenSerialRequestBuilder { - typedef OpenSerialRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_auto_(bool auto_) { - fbb_.AddElement(OpenSerialRequest::VT_AUTO_, static_cast(auto_), 0); - } - void add_port(flatbuffers::Offset port) { - fbb_.AddOffset(OpenSerialRequest::VT_PORT, port); - } - 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, - bool auto_ = false, - flatbuffers::Offset port = 0) { - OpenSerialRequestBuilder builder_(_fbb); - builder_.add_port(port); - builder_.add_auto_(auto_); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateOpenSerialRequestDirect( - flatbuffers::FlatBufferBuilder &_fbb, - bool auto_ = false, - const char *port = nullptr) { - auto port__ = port ? _fbb.CreateString(port) : 0; - return solarxr_protocol::rpc::CreateOpenSerialRequest( - _fbb, - auto_, - port__); -} - -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 SerialDevicesRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SerialDevicesRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct SerialDevicesRequestBuilder { - typedef SerialDevicesRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit SerialDevicesRequestBuilder(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 CreateSerialDevicesRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - SerialDevicesRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -struct SerialDevicesResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SerialDevicesResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_DEVICES = 4 - }; - const flatbuffers::Vector> *devices() const { - return GetPointer> *>(VT_DEVICES); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_DEVICES) && - verifier.VerifyVector(devices()) && - verifier.VerifyVectorOfTables(devices()) && - verifier.EndTable(); - } -}; - -struct SerialDevicesResponseBuilder { - typedef SerialDevicesResponse Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_devices(flatbuffers::Offset>> devices) { - fbb_.AddOffset(SerialDevicesResponse::VT_DEVICES, devices); - } - explicit SerialDevicesResponseBuilder(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 CreateSerialDevicesResponse( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset>> devices = 0) { - SerialDevicesResponseBuilder builder_(_fbb); - builder_.add_devices(devices); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateSerialDevicesResponseDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const std::vector> *devices = nullptr) { - auto devices__ = devices ? _fbb.CreateVector>(*devices) : 0; - return solarxr_protocol::rpc::CreateSerialDevicesResponse( - _fbb, - devices__); -} - -struct NewSerialDeviceResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef NewSerialDeviceResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_DEVICE = 4 - }; - const solarxr_protocol::rpc::SerialDevice *device() const { - return GetPointer(VT_DEVICE); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_DEVICE) && - verifier.VerifyTable(device()) && - verifier.EndTable(); - } -}; - -struct NewSerialDeviceResponseBuilder { - typedef NewSerialDeviceResponse Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_device(flatbuffers::Offset device) { - fbb_.AddOffset(NewSerialDeviceResponse::VT_DEVICE, device); - } - explicit NewSerialDeviceResponseBuilder(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 CreateNewSerialDeviceResponse( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset device = 0) { - NewSerialDeviceResponseBuilder builder_(_fbb); - builder_.add_device(device); - return builder_.Finish(); -} - -struct StartWifiProvisioningRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef StartWifiProvisioningRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_SSID = 4, - VT_PASSWORD = 6, - VT_PORT = 8 - }; - const flatbuffers::String *ssid() const { - return GetPointer(VT_SSID); - } - const flatbuffers::String *password() const { - return GetPointer(VT_PASSWORD); - } - const flatbuffers::String *port() const { - return GetPointer(VT_PORT); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_SSID) && - verifier.VerifyString(ssid()) && - VerifyOffset(verifier, VT_PASSWORD) && - verifier.VerifyString(password()) && - VerifyOffset(verifier, VT_PORT) && - verifier.VerifyString(port()) && - verifier.EndTable(); - } -}; - -struct StartWifiProvisioningRequestBuilder { - typedef StartWifiProvisioningRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_ssid(flatbuffers::Offset ssid) { - fbb_.AddOffset(StartWifiProvisioningRequest::VT_SSID, ssid); - } - void add_password(flatbuffers::Offset password) { - fbb_.AddOffset(StartWifiProvisioningRequest::VT_PASSWORD, password); - } - void add_port(flatbuffers::Offset port) { - fbb_.AddOffset(StartWifiProvisioningRequest::VT_PORT, port); - } - explicit StartWifiProvisioningRequestBuilder(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 CreateStartWifiProvisioningRequest( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset ssid = 0, - flatbuffers::Offset password = 0, - flatbuffers::Offset port = 0) { - StartWifiProvisioningRequestBuilder builder_(_fbb); - builder_.add_port(port); - builder_.add_password(password); - builder_.add_ssid(ssid); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateStartWifiProvisioningRequestDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const char *ssid = nullptr, - const char *password = nullptr, - const char *port = nullptr) { - auto ssid__ = ssid ? _fbb.CreateString(ssid) : 0; - auto password__ = password ? _fbb.CreateString(password) : 0; - auto port__ = port ? _fbb.CreateString(port) : 0; - return solarxr_protocol::rpc::CreateStartWifiProvisioningRequest( - _fbb, - ssid__, - password__, - port__); -} - -struct StopWifiProvisioningRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef StopWifiProvisioningRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct StopWifiProvisioningRequestBuilder { - typedef StopWifiProvisioningRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit StopWifiProvisioningRequestBuilder(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 CreateStopWifiProvisioningRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - StopWifiProvisioningRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -struct WifiProvisioningStatusResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef WifiProvisioningStatusResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_STATUS = 4 - }; - solarxr_protocol::rpc::WifiProvisioningStatus status() const { - return static_cast(GetField(VT_STATUS, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_STATUS, 1) && - verifier.EndTable(); - } -}; - -struct WifiProvisioningStatusResponseBuilder { - typedef WifiProvisioningStatusResponse Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_status(solarxr_protocol::rpc::WifiProvisioningStatus status) { - fbb_.AddElement(WifiProvisioningStatusResponse::VT_STATUS, static_cast(status), 0); - } - explicit WifiProvisioningStatusResponseBuilder(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 CreateWifiProvisioningStatusResponse( - flatbuffers::FlatBufferBuilder &_fbb, - solarxr_protocol::rpc::WifiProvisioningStatus status = solarxr_protocol::rpc::WifiProvisioningStatus::NONE) { - WifiProvisioningStatusResponseBuilder builder_(_fbb); - builder_.add_status(status); - 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_CURRENT = 8, - VT_TOTAL = 10, - VT_COMPLETED = 12, - VT_SUCCESS = 14, - VT_ETA = 16 - }; - solarxr_protocol::rpc::AutoBoneProcessType process_type() const { - return static_cast(GetField(VT_PROCESS_TYPE, 0)); - } - /// The current count. This value is -1 if there is nothing to report. - uint32_t current() const { - return GetField(VT_CURRENT, 0); - } - /// The total count. This value is -1 if there is nothing to report. - uint32_t total() const { - return GetField(VT_TOTAL, 0); - } - /// True if the operation has completed with any result, successful or not. - bool completed() const { - return GetField(VT_COMPLETED, 0) != 0; - } - /// True if the completed operation was successful, only observe if `completed` is true. - bool success() const { - return GetField(VT_SUCCESS, 0) != 0; - } - /// The time remaining in seconds. This value is -1 if there is nothing to report. - float eta() const { - return GetField(VT_ETA, 0.0f); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_PROCESS_TYPE, 1) && - VerifyField(verifier, VT_CURRENT, 4) && - VerifyField(verifier, VT_TOTAL, 4) && - VerifyField(verifier, VT_COMPLETED, 1) && - VerifyField(verifier, VT_SUCCESS, 1) && - VerifyField(verifier, VT_ETA, 4) && - 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_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); - } - void add_eta(float eta) { - fbb_.AddElement(AutoBoneProcessStatusResponse::VT_ETA, eta, 0.0f); - } - 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, - uint32_t current = 0, - uint32_t total = 0, - bool completed = false, - bool success = false, - float eta = 0.0f) { - AutoBoneProcessStatusResponseBuilder builder_(_fbb); - builder_.add_eta(eta); - builder_.add_total(total); - builder_.add_current(current); - builder_.add_success(success); - builder_.add_completed(completed); - builder_.add_process_type(process_type); - return builder_.Finish(); -} - -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); - } - /// The current error value. This can be any positive number, where lower is better. - float epoch_error() const { - return GetField(VT_EPOCH_ERROR, 0.0f); - } - /// A list of the current estimated body proportions. - 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__); -} - -/// https://github.com/SlimeVR/SlimeVR-Server/blob/v0.8.3/server/src/main/java/dev/slimevr/config/AutoBoneConfig.kt -struct AutoBoneSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef AutoBoneSettingsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_CURSOR_INCREMENT = 4, - VT_MIN_DATA_DISTANCE = 6, - VT_MAX_DATA_DISTANCE = 8, - VT_NUM_EPOCHS = 10, - VT_PRINT_EVERY_NUM_EPOCHS = 12, - VT_INITIAL_ADJUST_RATE = 14, - VT_ADJUST_RATE_DECAY = 16, - VT_SLIDE_ERROR_FACTOR = 18, - VT_OFFSET_SLIDE_ERROR_FACTOR = 20, - VT_FOOT_HEIGHT_OFFSET_ERROR_FACTOR = 22, - VT_BODY_PROPORTION_ERROR_FACTOR = 24, - VT_HEIGHT_ERROR_FACTOR = 26, - VT_POSITION_ERROR_FACTOR = 28, - VT_POSITION_OFFSET_ERROR_FACTOR = 30, - VT_CALC_INIT_ERROR = 32, - VT_TARGET_HMD_HEIGHT = 34, - VT_TARGET_FULL_HEIGHT = 36, - VT_RANDOMIZE_FRAME_ORDER = 38, - VT_SCALE_EACH_STEP = 40, - VT_SAMPLE_COUNT = 42, - VT_SAMPLE_RATE_MS = 44, - VT_SAVE_RECORDINGS = 46, - VT_USE_SKELETON_HEIGHT = 48, - VT_RAND_SEED = 50 - }; - flatbuffers::Optional cursor_increment() const { - return GetOptional(VT_CURSOR_INCREMENT); - } - flatbuffers::Optional min_data_distance() const { - return GetOptional(VT_MIN_DATA_DISTANCE); - } - flatbuffers::Optional max_data_distance() const { - return GetOptional(VT_MAX_DATA_DISTANCE); - } - flatbuffers::Optional num_epochs() const { - return GetOptional(VT_NUM_EPOCHS); - } - flatbuffers::Optional print_every_num_epochs() const { - return GetOptional(VT_PRINT_EVERY_NUM_EPOCHS); - } - flatbuffers::Optional initial_adjust_rate() const { - return GetOptional(VT_INITIAL_ADJUST_RATE); - } - flatbuffers::Optional adjust_rate_decay() const { - return GetOptional(VT_ADJUST_RATE_DECAY); - } - flatbuffers::Optional slide_error_factor() const { - return GetOptional(VT_SLIDE_ERROR_FACTOR); - } - flatbuffers::Optional offset_slide_error_factor() const { - return GetOptional(VT_OFFSET_SLIDE_ERROR_FACTOR); - } - flatbuffers::Optional foot_height_offset_error_factor() const { - return GetOptional(VT_FOOT_HEIGHT_OFFSET_ERROR_FACTOR); - } - flatbuffers::Optional body_proportion_error_factor() const { - return GetOptional(VT_BODY_PROPORTION_ERROR_FACTOR); - } - flatbuffers::Optional height_error_factor() const { - return GetOptional(VT_HEIGHT_ERROR_FACTOR); - } - flatbuffers::Optional position_error_factor() const { - return GetOptional(VT_POSITION_ERROR_FACTOR); - } - flatbuffers::Optional position_offset_error_factor() const { - return GetOptional(VT_POSITION_OFFSET_ERROR_FACTOR); - } - flatbuffers::Optional calc_init_error() const { - return GetOptional(VT_CALC_INIT_ERROR); - } - flatbuffers::Optional target_hmd_height() const { - return GetOptional(VT_TARGET_HMD_HEIGHT); - } - flatbuffers::Optional target_full_height() const { - return GetOptional(VT_TARGET_FULL_HEIGHT); - } - flatbuffers::Optional randomize_frame_order() const { - return GetOptional(VT_RANDOMIZE_FRAME_ORDER); - } - flatbuffers::Optional scale_each_step() const { - return GetOptional(VT_SCALE_EACH_STEP); - } - flatbuffers::Optional sample_count() const { - return GetOptional(VT_SAMPLE_COUNT); - } - flatbuffers::Optional sample_rate_ms() const { - return GetOptional(VT_SAMPLE_RATE_MS); - } - flatbuffers::Optional save_recordings() const { - return GetOptional(VT_SAVE_RECORDINGS); - } - flatbuffers::Optional use_skeleton_height() const { - return GetOptional(VT_USE_SKELETON_HEIGHT); - } - flatbuffers::Optional rand_seed() const { - return GetOptional(VT_RAND_SEED); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_CURSOR_INCREMENT, 4) && - VerifyField(verifier, VT_MIN_DATA_DISTANCE, 4) && - VerifyField(verifier, VT_MAX_DATA_DISTANCE, 4) && - VerifyField(verifier, VT_NUM_EPOCHS, 4) && - VerifyField(verifier, VT_PRINT_EVERY_NUM_EPOCHS, 4) && - VerifyField(verifier, VT_INITIAL_ADJUST_RATE, 4) && - VerifyField(verifier, VT_ADJUST_RATE_DECAY, 4) && - VerifyField(verifier, VT_SLIDE_ERROR_FACTOR, 4) && - VerifyField(verifier, VT_OFFSET_SLIDE_ERROR_FACTOR, 4) && - VerifyField(verifier, VT_FOOT_HEIGHT_OFFSET_ERROR_FACTOR, 4) && - VerifyField(verifier, VT_BODY_PROPORTION_ERROR_FACTOR, 4) && - VerifyField(verifier, VT_HEIGHT_ERROR_FACTOR, 4) && - VerifyField(verifier, VT_POSITION_ERROR_FACTOR, 4) && - VerifyField(verifier, VT_POSITION_OFFSET_ERROR_FACTOR, 4) && - VerifyField(verifier, VT_CALC_INIT_ERROR, 1) && - VerifyField(verifier, VT_TARGET_HMD_HEIGHT, 4) && - VerifyField(verifier, VT_TARGET_FULL_HEIGHT, 4) && - VerifyField(verifier, VT_RANDOMIZE_FRAME_ORDER, 1) && - VerifyField(verifier, VT_SCALE_EACH_STEP, 1) && - VerifyField(verifier, VT_SAMPLE_COUNT, 4) && - VerifyField(verifier, VT_SAMPLE_RATE_MS, 8) && - VerifyField(verifier, VT_SAVE_RECORDINGS, 1) && - VerifyField(verifier, VT_USE_SKELETON_HEIGHT, 1) && - VerifyField(verifier, VT_RAND_SEED, 8) && - verifier.EndTable(); - } -}; - -struct AutoBoneSettingsBuilder { - typedef AutoBoneSettings Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_cursor_increment(int32_t cursor_increment) { - fbb_.AddElement(AutoBoneSettings::VT_CURSOR_INCREMENT, cursor_increment); - } - void add_min_data_distance(int32_t min_data_distance) { - fbb_.AddElement(AutoBoneSettings::VT_MIN_DATA_DISTANCE, min_data_distance); - } - void add_max_data_distance(int32_t max_data_distance) { - fbb_.AddElement(AutoBoneSettings::VT_MAX_DATA_DISTANCE, max_data_distance); - } - void add_num_epochs(int32_t num_epochs) { - fbb_.AddElement(AutoBoneSettings::VT_NUM_EPOCHS, num_epochs); - } - void add_print_every_num_epochs(int32_t print_every_num_epochs) { - fbb_.AddElement(AutoBoneSettings::VT_PRINT_EVERY_NUM_EPOCHS, print_every_num_epochs); - } - void add_initial_adjust_rate(float initial_adjust_rate) { - fbb_.AddElement(AutoBoneSettings::VT_INITIAL_ADJUST_RATE, initial_adjust_rate); - } - void add_adjust_rate_decay(float adjust_rate_decay) { - fbb_.AddElement(AutoBoneSettings::VT_ADJUST_RATE_DECAY, adjust_rate_decay); - } - void add_slide_error_factor(float slide_error_factor) { - fbb_.AddElement(AutoBoneSettings::VT_SLIDE_ERROR_FACTOR, slide_error_factor); - } - void add_offset_slide_error_factor(float offset_slide_error_factor) { - fbb_.AddElement(AutoBoneSettings::VT_OFFSET_SLIDE_ERROR_FACTOR, offset_slide_error_factor); - } - void add_foot_height_offset_error_factor(float foot_height_offset_error_factor) { - fbb_.AddElement(AutoBoneSettings::VT_FOOT_HEIGHT_OFFSET_ERROR_FACTOR, foot_height_offset_error_factor); - } - void add_body_proportion_error_factor(float body_proportion_error_factor) { - fbb_.AddElement(AutoBoneSettings::VT_BODY_PROPORTION_ERROR_FACTOR, body_proportion_error_factor); - } - void add_height_error_factor(float height_error_factor) { - fbb_.AddElement(AutoBoneSettings::VT_HEIGHT_ERROR_FACTOR, height_error_factor); - } - void add_position_error_factor(float position_error_factor) { - fbb_.AddElement(AutoBoneSettings::VT_POSITION_ERROR_FACTOR, position_error_factor); - } - void add_position_offset_error_factor(float position_offset_error_factor) { - fbb_.AddElement(AutoBoneSettings::VT_POSITION_OFFSET_ERROR_FACTOR, position_offset_error_factor); - } - void add_calc_init_error(bool calc_init_error) { - fbb_.AddElement(AutoBoneSettings::VT_CALC_INIT_ERROR, static_cast(calc_init_error)); - } - void add_target_hmd_height(float target_hmd_height) { - fbb_.AddElement(AutoBoneSettings::VT_TARGET_HMD_HEIGHT, target_hmd_height); - } - void add_target_full_height(float target_full_height) { - fbb_.AddElement(AutoBoneSettings::VT_TARGET_FULL_HEIGHT, target_full_height); - } - void add_randomize_frame_order(bool randomize_frame_order) { - fbb_.AddElement(AutoBoneSettings::VT_RANDOMIZE_FRAME_ORDER, static_cast(randomize_frame_order)); - } - void add_scale_each_step(bool scale_each_step) { - fbb_.AddElement(AutoBoneSettings::VT_SCALE_EACH_STEP, static_cast(scale_each_step)); - } - void add_sample_count(int32_t sample_count) { - fbb_.AddElement(AutoBoneSettings::VT_SAMPLE_COUNT, sample_count); - } - void add_sample_rate_ms(int64_t sample_rate_ms) { - fbb_.AddElement(AutoBoneSettings::VT_SAMPLE_RATE_MS, sample_rate_ms); - } - void add_save_recordings(bool save_recordings) { - fbb_.AddElement(AutoBoneSettings::VT_SAVE_RECORDINGS, static_cast(save_recordings)); - } - void add_use_skeleton_height(bool use_skeleton_height) { - fbb_.AddElement(AutoBoneSettings::VT_USE_SKELETON_HEIGHT, static_cast(use_skeleton_height)); - } - void add_rand_seed(int64_t rand_seed) { - fbb_.AddElement(AutoBoneSettings::VT_RAND_SEED, rand_seed); - } - explicit AutoBoneSettingsBuilder(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 CreateAutoBoneSettings( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Optional cursor_increment = flatbuffers::nullopt, - flatbuffers::Optional min_data_distance = flatbuffers::nullopt, - flatbuffers::Optional max_data_distance = flatbuffers::nullopt, - flatbuffers::Optional num_epochs = flatbuffers::nullopt, - flatbuffers::Optional print_every_num_epochs = flatbuffers::nullopt, - flatbuffers::Optional initial_adjust_rate = flatbuffers::nullopt, - flatbuffers::Optional adjust_rate_decay = flatbuffers::nullopt, - flatbuffers::Optional slide_error_factor = flatbuffers::nullopt, - flatbuffers::Optional offset_slide_error_factor = flatbuffers::nullopt, - flatbuffers::Optional foot_height_offset_error_factor = flatbuffers::nullopt, - flatbuffers::Optional body_proportion_error_factor = flatbuffers::nullopt, - flatbuffers::Optional height_error_factor = flatbuffers::nullopt, - flatbuffers::Optional position_error_factor = flatbuffers::nullopt, - flatbuffers::Optional position_offset_error_factor = flatbuffers::nullopt, - flatbuffers::Optional calc_init_error = flatbuffers::nullopt, - flatbuffers::Optional target_hmd_height = flatbuffers::nullopt, - flatbuffers::Optional target_full_height = flatbuffers::nullopt, - flatbuffers::Optional randomize_frame_order = flatbuffers::nullopt, - flatbuffers::Optional scale_each_step = flatbuffers::nullopt, - flatbuffers::Optional sample_count = flatbuffers::nullopt, - flatbuffers::Optional sample_rate_ms = flatbuffers::nullopt, - flatbuffers::Optional save_recordings = flatbuffers::nullopt, - flatbuffers::Optional use_skeleton_height = flatbuffers::nullopt, - flatbuffers::Optional rand_seed = flatbuffers::nullopt) { - AutoBoneSettingsBuilder builder_(_fbb); - if(rand_seed) { builder_.add_rand_seed(*rand_seed); } - if(sample_rate_ms) { builder_.add_sample_rate_ms(*sample_rate_ms); } - if(sample_count) { builder_.add_sample_count(*sample_count); } - if(target_full_height) { builder_.add_target_full_height(*target_full_height); } - if(target_hmd_height) { builder_.add_target_hmd_height(*target_hmd_height); } - if(position_offset_error_factor) { builder_.add_position_offset_error_factor(*position_offset_error_factor); } - if(position_error_factor) { builder_.add_position_error_factor(*position_error_factor); } - if(height_error_factor) { builder_.add_height_error_factor(*height_error_factor); } - if(body_proportion_error_factor) { builder_.add_body_proportion_error_factor(*body_proportion_error_factor); } - if(foot_height_offset_error_factor) { builder_.add_foot_height_offset_error_factor(*foot_height_offset_error_factor); } - if(offset_slide_error_factor) { builder_.add_offset_slide_error_factor(*offset_slide_error_factor); } - if(slide_error_factor) { builder_.add_slide_error_factor(*slide_error_factor); } - if(adjust_rate_decay) { builder_.add_adjust_rate_decay(*adjust_rate_decay); } - if(initial_adjust_rate) { builder_.add_initial_adjust_rate(*initial_adjust_rate); } - if(print_every_num_epochs) { builder_.add_print_every_num_epochs(*print_every_num_epochs); } - if(num_epochs) { builder_.add_num_epochs(*num_epochs); } - if(max_data_distance) { builder_.add_max_data_distance(*max_data_distance); } - if(min_data_distance) { builder_.add_min_data_distance(*min_data_distance); } - if(cursor_increment) { builder_.add_cursor_increment(*cursor_increment); } - if(use_skeleton_height) { builder_.add_use_skeleton_height(*use_skeleton_height); } - if(save_recordings) { builder_.add_save_recordings(*save_recordings); } - if(scale_each_step) { builder_.add_scale_each_step(*scale_each_step); } - if(randomize_frame_order) { builder_.add_randomize_frame_order(*randomize_frame_order); } - if(calc_init_error) { builder_.add_calc_init_error(*calc_init_error); } - return builder_.Finish(); -} - -struct HeightRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef HeightRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct HeightRequestBuilder { - typedef HeightRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit HeightRequestBuilder(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 CreateHeightRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - HeightRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -/// Returns the current HMD height and returns an estimated full height (user height) -struct HeightResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef HeightResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_HMD_HEIGHT = 4, - VT_ESTIMATED_FULL_HEIGHT = 6 - }; - float hmd_height() const { - return GetField(VT_HMD_HEIGHT, 0.0f); - } - float estimated_full_height() const { - return GetField(VT_ESTIMATED_FULL_HEIGHT, 0.0f); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_HMD_HEIGHT, 4) && - VerifyField(verifier, VT_ESTIMATED_FULL_HEIGHT, 4) && - verifier.EndTable(); - } -}; - -struct HeightResponseBuilder { - typedef HeightResponse Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_hmd_height(float hmd_height) { - fbb_.AddElement(HeightResponse::VT_HMD_HEIGHT, hmd_height, 0.0f); - } - void add_estimated_full_height(float estimated_full_height) { - fbb_.AddElement(HeightResponse::VT_ESTIMATED_FULL_HEIGHT, estimated_full_height, 0.0f); - } - explicit HeightResponseBuilder(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 CreateHeightResponse( - flatbuffers::FlatBufferBuilder &_fbb, - float hmd_height = 0.0f, - float estimated_full_height = 0.0f) { - HeightResponseBuilder builder_(_fbb); - builder_.add_estimated_full_height(estimated_full_height); - builder_.add_hmd_height(hmd_height); - return builder_.Finish(); -} - -/// Applies the estimated proportions -struct AutoBoneApplyRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef AutoBoneApplyRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct AutoBoneApplyRequestBuilder { - typedef AutoBoneApplyRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit AutoBoneApplyRequestBuilder(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 CreateAutoBoneApplyRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - AutoBoneApplyRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -/// Stops the current recording, using it as far as it has been recorded -struct AutoBoneStopRecordingRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef AutoBoneStopRecordingRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct AutoBoneStopRecordingRequestBuilder { - typedef AutoBoneStopRecordingRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit AutoBoneStopRecordingRequestBuilder(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 CreateAutoBoneStopRecordingRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - AutoBoneStopRecordingRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -/// Cancels the current recording, aborting the process and discarding the data -struct AutoBoneCancelRecordingRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef AutoBoneCancelRecordingRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct AutoBoneCancelRecordingRequestBuilder { - typedef AutoBoneCancelRecordingRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit AutoBoneCancelRecordingRequestBuilder(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 CreateAutoBoneCancelRecordingRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - AutoBoneCancelRecordingRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -/// 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(); -} - -/// Allows to ask generic infos about the server, -/// like the local ip address, the version of the server, the java version, -/// the current working dir and other informations we might want to show in the gui -/// for information/debug purposes -struct ServerInfosRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ServerInfosRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct ServerInfosRequestBuilder { - typedef ServerInfosRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit ServerInfosRequestBuilder(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 CreateServerInfosRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - ServerInfosRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -/// Holds the Server informations, this is a basic table holding various informations about the currently running server -/// like its local ip address (usefull for standalone users so they can specify the ip of the server more easilly) and any more -/// infos we might want to add in the future. (like java version, working dir, server version ....) -/// This only holds the local ip for now. But there will be other informations added as we chose to display them on the gui for instance -struct ServerInfosResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ServerInfosResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_LOCALIP = 4 - }; - const flatbuffers::String *localIp() const { - return GetPointer(VT_LOCALIP); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_LOCALIP) && - verifier.VerifyString(localIp()) && - verifier.EndTable(); - } -}; - -struct ServerInfosResponseBuilder { - typedef ServerInfosResponse Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_localIp(flatbuffers::Offset localIp) { - fbb_.AddOffset(ServerInfosResponse::VT_LOCALIP, localIp); - } - explicit ServerInfosResponseBuilder(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 CreateServerInfosResponse( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset localIp = 0) { - ServerInfosResponseBuilder builder_(_fbb); - builder_.add_localIp(localIp); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateServerInfosResponseDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const char *localIp = nullptr) { - auto localIp__ = localIp ? _fbb.CreateString(localIp) : 0; - return solarxr_protocol::rpc::CreateServerInfosResponse( - _fbb, - localIp__); -} - -/// Makes a temporary change to legtweaks. This is not saved to disk, and can be -/// cleared with `LegTweaksTmpClear` -struct LegTweaksTmpChange FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef LegTweaksTmpChangeBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_FLOOR_CLIP = 4, - VT_SKATING_CORRECTION = 6, - VT_TOE_SNAP = 8, - VT_FOOT_PLANT = 10 - }; - flatbuffers::Optional floor_clip() const { - return GetOptional(VT_FLOOR_CLIP); - } - flatbuffers::Optional skating_correction() const { - return GetOptional(VT_SKATING_CORRECTION); - } - flatbuffers::Optional toe_snap() const { - return GetOptional(VT_TOE_SNAP); - } - flatbuffers::Optional foot_plant() const { - return GetOptional(VT_FOOT_PLANT); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_FLOOR_CLIP, 1) && - VerifyField(verifier, VT_SKATING_CORRECTION, 1) && - VerifyField(verifier, VT_TOE_SNAP, 1) && - VerifyField(verifier, VT_FOOT_PLANT, 1) && - verifier.EndTable(); - } -}; - -struct LegTweaksTmpChangeBuilder { - typedef LegTweaksTmpChange Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_floor_clip(bool floor_clip) { - fbb_.AddElement(LegTweaksTmpChange::VT_FLOOR_CLIP, static_cast(floor_clip)); - } - void add_skating_correction(bool skating_correction) { - fbb_.AddElement(LegTweaksTmpChange::VT_SKATING_CORRECTION, static_cast(skating_correction)); - } - void add_toe_snap(bool toe_snap) { - fbb_.AddElement(LegTweaksTmpChange::VT_TOE_SNAP, static_cast(toe_snap)); - } - void add_foot_plant(bool foot_plant) { - fbb_.AddElement(LegTweaksTmpChange::VT_FOOT_PLANT, static_cast(foot_plant)); - } - explicit LegTweaksTmpChangeBuilder(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 CreateLegTweaksTmpChange( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Optional floor_clip = flatbuffers::nullopt, - flatbuffers::Optional skating_correction = flatbuffers::nullopt, - flatbuffers::Optional toe_snap = flatbuffers::nullopt, - flatbuffers::Optional foot_plant = flatbuffers::nullopt) { - LegTweaksTmpChangeBuilder builder_(_fbb); - if(foot_plant) { builder_.add_foot_plant(*foot_plant); } - if(toe_snap) { builder_.add_toe_snap(*toe_snap); } - if(skating_correction) { builder_.add_skating_correction(*skating_correction); } - if(floor_clip) { builder_.add_floor_clip(*floor_clip); } - return builder_.Finish(); -} - -/// Clears the legtweaks temprorary state back to what the config has. -/// Setting a field to `true` will reset that field. -struct LegTweaksTmpClear FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef LegTweaksTmpClearBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_FLOOR_CLIP = 4, - VT_SKATING_CORRECTION = 6, - VT_TOE_SNAP = 8, - VT_FOOT_PLANT = 10 - }; - bool floor_clip() const { - return GetField(VT_FLOOR_CLIP, 0) != 0; - } - bool skating_correction() const { - return GetField(VT_SKATING_CORRECTION, 0) != 0; - } - bool toe_snap() const { - return GetField(VT_TOE_SNAP, 0) != 0; - } - bool foot_plant() const { - return GetField(VT_FOOT_PLANT, 0) != 0; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_FLOOR_CLIP, 1) && - VerifyField(verifier, VT_SKATING_CORRECTION, 1) && - VerifyField(verifier, VT_TOE_SNAP, 1) && - VerifyField(verifier, VT_FOOT_PLANT, 1) && - verifier.EndTable(); - } -}; - -struct LegTweaksTmpClearBuilder { - typedef LegTweaksTmpClear Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_floor_clip(bool floor_clip) { - fbb_.AddElement(LegTweaksTmpClear::VT_FLOOR_CLIP, static_cast(floor_clip), 0); - } - void add_skating_correction(bool skating_correction) { - fbb_.AddElement(LegTweaksTmpClear::VT_SKATING_CORRECTION, static_cast(skating_correction), 0); - } - void add_toe_snap(bool toe_snap) { - fbb_.AddElement(LegTweaksTmpClear::VT_TOE_SNAP, static_cast(toe_snap), 0); - } - void add_foot_plant(bool foot_plant) { - fbb_.AddElement(LegTweaksTmpClear::VT_FOOT_PLANT, static_cast(foot_plant), 0); - } - explicit LegTweaksTmpClearBuilder(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 CreateLegTweaksTmpClear( - flatbuffers::FlatBufferBuilder &_fbb, - bool floor_clip = false, - bool skating_correction = false, - bool toe_snap = false, - bool foot_plant = false) { - LegTweaksTmpClearBuilder builder_(_fbb); - builder_.add_foot_plant(foot_plant); - builder_.add_toe_snap(toe_snap); - builder_.add_skating_correction(skating_correction); - builder_.add_floor_clip(floor_clip); - return builder_.Finish(); -} - -/// Tracker requires full reset -struct StatusTrackerReset FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef StatusTrackerResetBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_TRACKER_ID = 4 - }; - const solarxr_protocol::datatypes::TrackerId *tracker_id() const { - return GetPointer(VT_TRACKER_ID); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_TRACKER_ID) && - verifier.VerifyTable(tracker_id()) && - verifier.EndTable(); - } -}; - -struct StatusTrackerResetBuilder { - typedef StatusTrackerReset Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_tracker_id(flatbuffers::Offset tracker_id) { - fbb_.AddOffset(StatusTrackerReset::VT_TRACKER_ID, tracker_id); - } - explicit StatusTrackerResetBuilder(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 CreateStatusTrackerReset( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset tracker_id = 0) { - StatusTrackerResetBuilder builder_(_fbb); - builder_.add_tracker_id(tracker_id); - return builder_.Finish(); -} - -/// Tracker has error state -struct StatusTrackerError FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef StatusTrackerErrorBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_TRACKER_ID = 4 - }; - const solarxr_protocol::datatypes::TrackerId *tracker_id() const { - return GetPointer(VT_TRACKER_ID); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_TRACKER_ID) && - verifier.VerifyTable(tracker_id()) && - verifier.EndTable(); - } -}; - -struct StatusTrackerErrorBuilder { - typedef StatusTrackerError Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_tracker_id(flatbuffers::Offset tracker_id) { - fbb_.AddOffset(StatusTrackerError::VT_TRACKER_ID, tracker_id); - } - explicit StatusTrackerErrorBuilder(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 CreateStatusTrackerError( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset tracker_id = 0) { - StatusTrackerErrorBuilder builder_(_fbb); - builder_.add_tracker_id(tracker_id); - return builder_.Finish(); -} - -/// SteamVR bridge is disconnected -struct StatusSteamVRDisconnected FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef StatusSteamVRDisconnectedBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_BRIDGE_SETTINGS_NAME = 4 - }; - /// Name of bridge in the server's config - const flatbuffers::String *bridge_settings_name() const { - return GetPointer(VT_BRIDGE_SETTINGS_NAME); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_BRIDGE_SETTINGS_NAME) && - verifier.VerifyString(bridge_settings_name()) && - verifier.EndTable(); - } -}; - -struct StatusSteamVRDisconnectedBuilder { - typedef StatusSteamVRDisconnected Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_bridge_settings_name(flatbuffers::Offset bridge_settings_name) { - fbb_.AddOffset(StatusSteamVRDisconnected::VT_BRIDGE_SETTINGS_NAME, bridge_settings_name); - } - explicit StatusSteamVRDisconnectedBuilder(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 CreateStatusSteamVRDisconnected( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset bridge_settings_name = 0) { - StatusSteamVRDisconnectedBuilder builder_(_fbb); - builder_.add_bridge_settings_name(bridge_settings_name); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateStatusSteamVRDisconnectedDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const char *bridge_settings_name = nullptr) { - auto bridge_settings_name__ = bridge_settings_name ? _fbb.CreateString(bridge_settings_name) : 0; - return solarxr_protocol::rpc::CreateStatusSteamVRDisconnected( - _fbb, - bridge_settings_name__); -} - -/// There is an available HMD tracker and it's not assigned to head -struct StatusUnassignedHMD FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef StatusUnassignedHMDBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_TRACKER_ID = 4 - }; - const solarxr_protocol::datatypes::TrackerId *tracker_id() const { - return GetPointer(VT_TRACKER_ID); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_TRACKER_ID) && - verifier.VerifyTable(tracker_id()) && - verifier.EndTable(); - } -}; - -struct StatusUnassignedHMDBuilder { - typedef StatusUnassignedHMD Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_tracker_id(flatbuffers::Offset tracker_id) { - fbb_.AddOffset(StatusUnassignedHMD::VT_TRACKER_ID, tracker_id); - } - explicit StatusUnassignedHMDBuilder(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 CreateStatusUnassignedHMD( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset tracker_id = 0) { - StatusUnassignedHMDBuilder builder_(_fbb); - builder_.add_tracker_id(tracker_id); - return builder_.Finish(); -} - -/// Request current statuses that we have -struct StatusSystemRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef StatusSystemRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct StatusSystemRequestBuilder { - typedef StatusSystemRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit StatusSystemRequestBuilder(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 CreateStatusSystemRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - StatusSystemRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -/// Response containing all current valid statuses -struct StatusSystemResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef StatusSystemResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_CURRENT_STATUSES = 4 - }; - const flatbuffers::Vector> *current_statuses() const { - return GetPointer> *>(VT_CURRENT_STATUSES); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_CURRENT_STATUSES) && - verifier.VerifyVector(current_statuses()) && - verifier.VerifyVectorOfTables(current_statuses()) && - verifier.EndTable(); - } -}; - -struct StatusSystemResponseBuilder { - typedef StatusSystemResponse Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_current_statuses(flatbuffers::Offset>> current_statuses) { - fbb_.AddOffset(StatusSystemResponse::VT_CURRENT_STATUSES, current_statuses); - } - explicit StatusSystemResponseBuilder(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 CreateStatusSystemResponse( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset>> current_statuses = 0) { - StatusSystemResponseBuilder builder_(_fbb); - builder_.add_current_statuses(current_statuses); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateStatusSystemResponseDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const std::vector> *current_statuses = nullptr) { - auto current_statuses__ = current_statuses ? _fbb.CreateVector>(*current_statuses) : 0; - return solarxr_protocol::rpc::CreateStatusSystemResponse( - _fbb, - current_statuses__); -} - -/// When a new status appears, it's sent alone -struct StatusSystemUpdate FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef StatusSystemUpdateBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_NEW_STATUS = 4 - }; - const solarxr_protocol::rpc::StatusMessage *new_status() const { - return GetPointer(VT_NEW_STATUS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_NEW_STATUS) && - verifier.VerifyTable(new_status()) && - verifier.EndTable(); - } -}; - -struct StatusSystemUpdateBuilder { - typedef StatusSystemUpdate Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_new_status(flatbuffers::Offset new_status) { - fbb_.AddOffset(StatusSystemUpdate::VT_NEW_STATUS, new_status); - } - explicit StatusSystemUpdateBuilder(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 CreateStatusSystemUpdate( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset new_status = 0) { - StatusSystemUpdateBuilder builder_(_fbb); - builder_.add_new_status(new_status); - return builder_.Finish(); -} - -/// When an status is fixed and it's removed, it's ID is sent -struct StatusSystemFixed FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef StatusSystemFixedBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_FIXED_STATUS_ID = 4 - }; - uint32_t fixed_status_id() const { - return GetField(VT_FIXED_STATUS_ID, 0); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_FIXED_STATUS_ID, 4) && - verifier.EndTable(); - } -}; - -struct StatusSystemFixedBuilder { - typedef StatusSystemFixed Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_fixed_status_id(uint32_t fixed_status_id) { - fbb_.AddElement(StatusSystemFixed::VT_FIXED_STATUS_ID, fixed_status_id, 0); - } - explicit StatusSystemFixedBuilder(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 CreateStatusSystemFixed( - flatbuffers::FlatBufferBuilder &_fbb, - uint32_t fixed_status_id = 0) { - StatusSystemFixedBuilder builder_(_fbb); - builder_.add_fixed_status_id(fixed_status_id); - return builder_.Finish(); -} - -/// An status is some kind of warning sent by the server, it's mainly made for -/// showing problems with the server and need attention from the user. -struct StatusMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef StatusMessageBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ID = 4, - VT_PRIORITIZED = 6, - VT_DATA_TYPE = 8, - VT_DATA = 10 - }; - /// The status ID - uint32_t id() const { - return GetField(VT_ID, 0); - } - /// This should be prioritized in the GUI in some way if true - bool prioritized() const { - return GetField(VT_PRIORITIZED, 0) != 0; - } - solarxr_protocol::rpc::StatusData data_type() const { - return static_cast(GetField(VT_DATA_TYPE, 0)); - } - const void *data() const { - return GetPointer(VT_DATA); - } - template const T *data_as() const; - const solarxr_protocol::rpc::StatusTrackerReset *data_as_StatusTrackerReset() const { - return data_type() == solarxr_protocol::rpc::StatusData::StatusTrackerReset ? static_cast(data()) : nullptr; - } - const solarxr_protocol::rpc::StatusTrackerError *data_as_StatusTrackerError() const { - return data_type() == solarxr_protocol::rpc::StatusData::StatusTrackerError ? static_cast(data()) : nullptr; - } - const solarxr_protocol::rpc::StatusSteamVRDisconnected *data_as_StatusSteamVRDisconnected() const { - return data_type() == solarxr_protocol::rpc::StatusData::StatusSteamVRDisconnected ? static_cast(data()) : nullptr; - } - const solarxr_protocol::rpc::StatusUnassignedHMD *data_as_StatusUnassignedHMD() const { - return data_type() == solarxr_protocol::rpc::StatusData::StatusUnassignedHMD ? static_cast(data()) : nullptr; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_ID, 4) && - VerifyField(verifier, VT_PRIORITIZED, 1) && - VerifyField(verifier, VT_DATA_TYPE, 1) && - VerifyOffset(verifier, VT_DATA) && - VerifyStatusData(verifier, data(), data_type()) && - verifier.EndTable(); - } -}; - -template<> inline const solarxr_protocol::rpc::StatusTrackerReset *StatusMessage::data_as() const { - return data_as_StatusTrackerReset(); -} - -template<> inline const solarxr_protocol::rpc::StatusTrackerError *StatusMessage::data_as() const { - return data_as_StatusTrackerError(); -} - -template<> inline const solarxr_protocol::rpc::StatusSteamVRDisconnected *StatusMessage::data_as() const { - return data_as_StatusSteamVRDisconnected(); -} - -template<> inline const solarxr_protocol::rpc::StatusUnassignedHMD *StatusMessage::data_as() const { - return data_as_StatusUnassignedHMD(); -} - -struct StatusMessageBuilder { - typedef StatusMessage Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_id(uint32_t id) { - fbb_.AddElement(StatusMessage::VT_ID, id, 0); - } - void add_prioritized(bool prioritized) { - fbb_.AddElement(StatusMessage::VT_PRIORITIZED, static_cast(prioritized), 0); - } - void add_data_type(solarxr_protocol::rpc::StatusData data_type) { - fbb_.AddElement(StatusMessage::VT_DATA_TYPE, static_cast(data_type), 0); - } - void add_data(flatbuffers::Offset data) { - fbb_.AddOffset(StatusMessage::VT_DATA, data); - } - explicit StatusMessageBuilder(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 CreateStatusMessage( - flatbuffers::FlatBufferBuilder &_fbb, - uint32_t id = 0, - bool prioritized = false, - solarxr_protocol::rpc::StatusData data_type = solarxr_protocol::rpc::StatusData::NONE, - flatbuffers::Offset data = 0) { - StatusMessageBuilder builder_(_fbb); - builder_.add_data(data); - builder_.add_id(id); - builder_.add_data_type(data_type); - builder_.add_prioritized(prioritized); - return builder_.Finish(); -} - -struct SetPauseTrackingRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SetPauseTrackingRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_PAUSETRACKING = 4 - }; - /// Pauses skeleton tracking if true, resumes skeleton tracking if false. - bool pauseTracking() const { - return GetField(VT_PAUSETRACKING, 0) != 0; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_PAUSETRACKING, 1) && - verifier.EndTable(); - } -}; - -struct SetPauseTrackingRequestBuilder { - typedef SetPauseTrackingRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_pauseTracking(bool pauseTracking) { - fbb_.AddElement(SetPauseTrackingRequest::VT_PAUSETRACKING, static_cast(pauseTracking), 0); - } - explicit SetPauseTrackingRequestBuilder(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 CreateSetPauseTrackingRequest( - flatbuffers::FlatBufferBuilder &_fbb, - bool pauseTracking = false) { - SetPauseTrackingRequestBuilder builder_(_fbb); - builder_.add_pauseTracking(pauseTracking); - return builder_.Finish(); -} - -/// Clears mounting reset data, defaulting to the manually set mounting orientations -struct ClearMountingResetRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ClearMountingResetRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct ClearMountingResetRequestBuilder { - typedef ClearMountingResetRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit ClearMountingResetRequestBuilder(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 CreateClearMountingResetRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - ClearMountingResetRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -/// Used for the server to save a file and have it prompt in the user side -struct SaveFileNotification FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SaveFileNotificationBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_DATA = 4, - VT_MIME_TYPE = 6, - VT_FILE_EXTENSION = 8, - VT_EXPECTED_DIR = 10, - VT_EXPECTED_FILENAME = 12 - }; - /// Binary data of the file - const flatbuffers::Vector *data() const { - return GetPointer *>(VT_DATA); - } - /// MIME type of file if one exists, use `file_extension` otherwise - const flatbuffers::String *mime_type() const { - return GetPointer(VT_MIME_TYPE); - } - /// Use MIME type preferably if one exists - const flatbuffers::String *file_extension() const { - return GetPointer(VT_FILE_EXTENSION); - } - /// Directory recommended to save the file on - flatbuffers::Optional expected_dir() const { - return GetOptional(VT_EXPECTED_DIR); - } - /// Recommended filename - const flatbuffers::String *expected_filename() const { - return GetPointer(VT_EXPECTED_FILENAME); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_DATA) && - verifier.VerifyVector(data()) && - VerifyOffset(verifier, VT_MIME_TYPE) && - verifier.VerifyString(mime_type()) && - VerifyOffset(verifier, VT_FILE_EXTENSION) && - verifier.VerifyString(file_extension()) && - VerifyField(verifier, VT_EXPECTED_DIR, 1) && - VerifyOffset(verifier, VT_EXPECTED_FILENAME) && - verifier.VerifyString(expected_filename()) && - verifier.EndTable(); - } -}; - -struct SaveFileNotificationBuilder { - typedef SaveFileNotification Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_data(flatbuffers::Offset> data) { - fbb_.AddOffset(SaveFileNotification::VT_DATA, data); - } - void add_mime_type(flatbuffers::Offset mime_type) { - fbb_.AddOffset(SaveFileNotification::VT_MIME_TYPE, mime_type); - } - void add_file_extension(flatbuffers::Offset file_extension) { - fbb_.AddOffset(SaveFileNotification::VT_FILE_EXTENSION, file_extension); - } - void add_expected_dir(solarxr_protocol::rpc::ComputerDirectory expected_dir) { - fbb_.AddElement(SaveFileNotification::VT_EXPECTED_DIR, static_cast(expected_dir)); - } - void add_expected_filename(flatbuffers::Offset expected_filename) { - fbb_.AddOffset(SaveFileNotification::VT_EXPECTED_FILENAME, expected_filename); - } - explicit SaveFileNotificationBuilder(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 CreateSaveFileNotification( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset> data = 0, - flatbuffers::Offset mime_type = 0, - flatbuffers::Offset file_extension = 0, - flatbuffers::Optional expected_dir = flatbuffers::nullopt, - flatbuffers::Offset expected_filename = 0) { - SaveFileNotificationBuilder builder_(_fbb); - builder_.add_expected_filename(expected_filename); - builder_.add_file_extension(file_extension); - builder_.add_mime_type(mime_type); - builder_.add_data(data); - if(expected_dir) { builder_.add_expected_dir(*expected_dir); } - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateSaveFileNotificationDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *data = nullptr, - const char *mime_type = nullptr, - const char *file_extension = nullptr, - flatbuffers::Optional expected_dir = flatbuffers::nullopt, - const char *expected_filename = nullptr) { - auto data__ = data ? _fbb.CreateVector(*data) : 0; - auto mime_type__ = mime_type ? _fbb.CreateString(mime_type) : 0; - auto file_extension__ = file_extension ? _fbb.CreateString(file_extension) : 0; - auto expected_filename__ = expected_filename ? _fbb.CreateString(expected_filename) : 0; - return solarxr_protocol::rpc::CreateSaveFileNotification( - _fbb, - data__, - mime_type__, - file_extension__, - expected_dir, - expected_filename__); -} - -/// Requests the current state of tracking pause -struct TrackingPauseStateRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef TrackingPauseStateRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct TrackingPauseStateRequestBuilder { - typedef TrackingPauseStateRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit TrackingPauseStateRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } -}; - -inline flatbuffers::Offset CreateTrackingPauseStateRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - TrackingPauseStateRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -struct TrackingPauseStateResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef TrackingPauseStateResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_TRACKINGPAUSED = 4 - }; - /// Skeleton tracking is paused if true, skeleton tracking is unpaused if false. - bool trackingPaused() const { - return GetField(VT_TRACKINGPAUSED, 0) != 0; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_TRACKINGPAUSED, 1) && - verifier.EndTable(); - } -}; - -struct TrackingPauseStateResponseBuilder { - typedef TrackingPauseStateResponse Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_trackingPaused(bool trackingPaused) { - fbb_.AddElement(TrackingPauseStateResponse::VT_TRACKINGPAUSED, static_cast(trackingPaused), 0); - } - explicit TrackingPauseStateResponseBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } -}; - -inline flatbuffers::Offset CreateTrackingPauseStateResponse( - flatbuffers::FlatBufferBuilder &_fbb, - bool trackingPaused = false) { - TrackingPauseStateResponseBuilder builder_(_fbb); - builder_.add_trackingPaused(trackingPaused); - return builder_.Finish(); -} - -/// Sends the GET WIFISCAN cmd to the current tracker on the serial monitor -struct SerialTrackerGetWifiScanRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SerialTrackerGetWifiScanRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct SerialTrackerGetWifiScanRequestBuilder { - typedef SerialTrackerGetWifiScanRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit SerialTrackerGetWifiScanRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } -}; - -inline flatbuffers::Offset CreateSerialTrackerGetWifiScanRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - SerialTrackerGetWifiScanRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -/// Server notifies connection of an unknown device. -/// If the notification is no longer sent, it means the device connected to another -/// server, got connected to this server or it was turned off. -struct UnknownDeviceHandshakeNotification FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef UnknownDeviceHandshakeNotificationBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_MAC_ADDRESS = 4 - }; - const flatbuffers::String *mac_address() const { - return GetPointer(VT_MAC_ADDRESS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_MAC_ADDRESS) && - verifier.VerifyString(mac_address()) && - verifier.EndTable(); - } -}; - -struct UnknownDeviceHandshakeNotificationBuilder { - typedef UnknownDeviceHandshakeNotification Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_mac_address(flatbuffers::Offset mac_address) { - fbb_.AddOffset(UnknownDeviceHandshakeNotification::VT_MAC_ADDRESS, mac_address); - } - explicit UnknownDeviceHandshakeNotificationBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } -}; - -inline flatbuffers::Offset CreateUnknownDeviceHandshakeNotification( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset mac_address = 0) { - UnknownDeviceHandshakeNotificationBuilder builder_(_fbb); - builder_.add_mac_address(mac_address); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateUnknownDeviceHandshakeNotificationDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const char *mac_address = nullptr) { - auto mac_address__ = mac_address ? _fbb.CreateString(mac_address) : 0; - return solarxr_protocol::rpc::CreateUnknownDeviceHandshakeNotification( - _fbb, - mac_address__); -} - -struct AddUnknownDeviceRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef AddUnknownDeviceRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_MAC_ADDRESS = 4 - }; - const flatbuffers::String *mac_address() const { - return GetPointer(VT_MAC_ADDRESS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_MAC_ADDRESS) && - verifier.VerifyString(mac_address()) && - verifier.EndTable(); - } -}; - -struct AddUnknownDeviceRequestBuilder { - typedef AddUnknownDeviceRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_mac_address(flatbuffers::Offset mac_address) { - fbb_.AddOffset(AddUnknownDeviceRequest::VT_MAC_ADDRESS, mac_address); - } - explicit AddUnknownDeviceRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } -}; - -inline flatbuffers::Offset CreateAddUnknownDeviceRequest( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset mac_address = 0) { - AddUnknownDeviceRequestBuilder builder_(_fbb); - builder_.add_mac_address(mac_address); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateAddUnknownDeviceRequestDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const char *mac_address = nullptr) { - auto mac_address__ = mac_address ? _fbb.CreateString(mac_address) : 0; - return solarxr_protocol::rpc::CreateAddUnknownDeviceRequest( - _fbb, - mac_address__); -} - -struct ForgetDeviceRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ForgetDeviceRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_MAC_ADDRESS = 4 - }; - const flatbuffers::String *mac_address() const { - return GetPointer(VT_MAC_ADDRESS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_MAC_ADDRESS) && - verifier.VerifyString(mac_address()) && - verifier.EndTable(); - } -}; - -struct ForgetDeviceRequestBuilder { - typedef ForgetDeviceRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_mac_address(flatbuffers::Offset mac_address) { - fbb_.AddOffset(ForgetDeviceRequest::VT_MAC_ADDRESS, mac_address); - } - explicit ForgetDeviceRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } -}; - -inline flatbuffers::Offset CreateForgetDeviceRequest( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset mac_address = 0) { - ForgetDeviceRequestBuilder builder_(_fbb); - builder_.add_mac_address(mac_address); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateForgetDeviceRequestDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const char *mac_address = nullptr) { - auto mac_address__ = mac_address ? _fbb.CreateString(mac_address) : 0; - return solarxr_protocol::rpc::CreateForgetDeviceRequest( - _fbb, - mac_address__); -} - -} // namespace rpc - -namespace pub_sub { - -/// 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(); -} - -/// 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 { - 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(); -} - -/// 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_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 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::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) && - 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::TopicMapping *PubSubHeader::u_as() const { - return u_as_TopicMapping(); -} - -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::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; - } - 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::StringTable *Message::payload_as() const { - return payload_as_solarxr_protocol_datatypes_StringTable(); -} - -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(); -} - -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::ResetResponse: { - 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::ClearDriftCompensationRequest: { - 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); - } - case RpcMessage::SerialDevicesRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::SerialDevicesResponse: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::NewSerialDeviceResponse: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::StartWifiProvisioningRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::StopWifiProvisioningRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::WifiProvisioningStatusResponse: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::ServerInfosRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::ServerInfosResponse: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::LegTweaksTmpChange: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::LegTweaksTmpClear: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::TapDetectionSetupNotification: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::SetPauseTrackingRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::StatusSystemRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::StatusSystemResponse: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::StatusSystemUpdate: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::StatusSystemFixed: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::ClearMountingResetRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::HeightRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::HeightResponse: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::AutoBoneApplyRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::AutoBoneStopRecordingRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::AutoBoneCancelRecordingRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::SaveFileNotification: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::TrackingPauseStateRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::TrackingPauseStateResponse: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::SerialTrackerGetWifiScanRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::UnknownDeviceHandshakeNotification: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::AddUnknownDeviceRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::ForgetDeviceRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - default: return true; - } -} - -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; -} - -inline bool VerifyStatusData(flatbuffers::Verifier &verifier, const void *obj, StatusData type) { - switch (type) { - case StatusData::NONE: { - return true; - } - case StatusData::StatusTrackerReset: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case StatusData::StatusTrackerError: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case StatusData::StatusSteamVRDisconnected: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case StatusData::StatusUnassignedHMD: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - default: return true; - } -} - -inline bool VerifyStatusDataVector(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 (!VerifyStatusData( - 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::TopicMapping: { - 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_StringTable: { - 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_ +// 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 == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, + "Non-compatible flatbuffers version included"); + +namespace solarxr_protocol { +namespace datatypes { + +struct HzF32; + +struct TransactionId; + +struct DeviceId; + +struct DeviceIdTable; +struct DeviceIdTableBuilder; + +struct TrackerId; +struct TrackerIdBuilder; + +struct LogData; +struct LogDataBuilder; + +struct Temperature; + +struct Ipv4Address; + +struct Bytes; +struct BytesBuilder; + +struct StringTable; +struct StringTableBuilder; + +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 LegTweaksSettings; +struct LegTweaksSettingsBuilder; + +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 ClearDriftCompensationRequest; +struct ClearDriftCompensationRequestBuilder; + +struct SettingsRequest; +struct SettingsRequestBuilder; + +struct SettingsResponse; +struct SettingsResponseBuilder; + +struct ChangeSettingsRequest; +struct ChangeSettingsRequestBuilder; + +struct SteamVRTrackersSetting; +struct SteamVRTrackersSettingBuilder; + +struct FilteringSettings; +struct FilteringSettingsBuilder; + +struct DriftCompensationSettings; +struct DriftCompensationSettingsBuilder; + +struct OSCRouterSettings; +struct OSCRouterSettingsBuilder; + +struct VRCOSCSettings; +struct VRCOSCSettingsBuilder; + +struct VMCOSCSettings; +struct VMCOSCSettingsBuilder; + +struct OSCSettings; +struct OSCSettingsBuilder; + +struct OSCTrackersSetting; +struct OSCTrackersSettingBuilder; + +struct TapDetectionSettings; +struct TapDetectionSettingsBuilder; + +struct ResetsSettings; +struct ResetsSettingsBuilder; + +struct TapDetectionSetupNotification; +struct TapDetectionSetupNotificationBuilder; + +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 SerialDevice; +struct SerialDeviceBuilder; + +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 SerialDevicesRequest; +struct SerialDevicesRequestBuilder; + +struct SerialDevicesResponse; +struct SerialDevicesResponseBuilder; + +struct NewSerialDeviceResponse; +struct NewSerialDeviceResponseBuilder; + +struct StartWifiProvisioningRequest; +struct StartWifiProvisioningRequestBuilder; + +struct StopWifiProvisioningRequest; +struct StopWifiProvisioningRequestBuilder; + +struct WifiProvisioningStatusResponse; +struct WifiProvisioningStatusResponseBuilder; + +struct AutoBoneProcessRequest; +struct AutoBoneProcessRequestBuilder; + +struct AutoBoneProcessStatusResponse; +struct AutoBoneProcessStatusResponseBuilder; + +struct AutoBoneEpochResponse; +struct AutoBoneEpochResponseBuilder; + +struct AutoBoneSettings; +struct AutoBoneSettingsBuilder; + +struct HeightRequest; +struct HeightRequestBuilder; + +struct HeightResponse; +struct HeightResponseBuilder; + +struct AutoBoneApplyRequest; +struct AutoBoneApplyRequestBuilder; + +struct AutoBoneStopRecordingRequest; +struct AutoBoneStopRecordingRequestBuilder; + +struct AutoBoneCancelRecordingRequest; +struct AutoBoneCancelRecordingRequestBuilder; + +struct OverlayDisplayModeRequest; +struct OverlayDisplayModeRequestBuilder; + +struct OverlayDisplayModeChangeRequest; +struct OverlayDisplayModeChangeRequestBuilder; + +struct OverlayDisplayModeResponse; +struct OverlayDisplayModeResponseBuilder; + +struct ServerInfosRequest; +struct ServerInfosRequestBuilder; + +struct ServerInfosResponse; +struct ServerInfosResponseBuilder; + +struct LegTweaksTmpChange; +struct LegTweaksTmpChangeBuilder; + +struct LegTweaksTmpClear; +struct LegTweaksTmpClearBuilder; + +struct StatusTrackerReset; +struct StatusTrackerResetBuilder; + +struct StatusTrackerError; +struct StatusTrackerErrorBuilder; + +struct StatusSteamVRDisconnected; +struct StatusSteamVRDisconnectedBuilder; + +struct StatusUnassignedHMD; +struct StatusUnassignedHMDBuilder; + +struct StatusSystemRequest; +struct StatusSystemRequestBuilder; + +struct StatusSystemResponse; +struct StatusSystemResponseBuilder; + +struct StatusSystemUpdate; +struct StatusSystemUpdateBuilder; + +struct StatusSystemFixed; +struct StatusSystemFixedBuilder; + +struct StatusMessage; +struct StatusMessageBuilder; + +struct SetPauseTrackingRequest; +struct SetPauseTrackingRequestBuilder; + +struct ClearMountingResetRequest; +struct ClearMountingResetRequestBuilder; + +struct SaveFileNotification; +struct SaveFileNotificationBuilder; + +struct SerialDevicePort; +struct SerialDevicePortBuilder; + +struct FirmwarePart; +struct FirmwarePartBuilder; + +struct FirmwareUpdateRequest; +struct FirmwareUpdateRequestBuilder; + +struct OTAFirmwareUpdate; +struct OTAFirmwareUpdateBuilder; + +struct SerialFirmwareUpdate; +struct SerialFirmwareUpdateBuilder; + +struct FirmwareUpdateStatusResponse; +struct FirmwareUpdateStatusResponseBuilder; + +struct FirmwareUpdateStopQueuesRequest; +struct FirmwareUpdateStopQueuesRequestBuilder; + +struct TrackingPauseStateRequest; +struct TrackingPauseStateRequestBuilder; + +struct TrackingPauseStateResponse; +struct TrackingPauseStateResponseBuilder; + +struct SerialTrackerGetWifiScanRequest; +struct SerialTrackerGetWifiScanRequestBuilder; + +struct UnknownDeviceHandshakeNotification; +struct UnknownDeviceHandshakeNotificationBuilder; + +struct AddUnknownDeviceRequest; +struct AddUnknownDeviceRequestBuilder; + +struct ForgetDeviceRequest; +struct ForgetDeviceRequestBuilder; + +} // namespace rpc + +namespace pub_sub { + +struct TopicId; +struct TopicIdBuilder; + +struct TopicHandle; +struct TopicHandleBuilder; + +struct TopicMapping; +struct TopicMappingBuilder; + +struct TopicHandleRequest; +struct TopicHandleRequestBuilder; + +struct SubscriptionRequest; +struct SubscriptionRequestBuilder; + +struct PubSubHeader; +struct PubSubHeaderBuilder; + +struct Message; +struct MessageBuilder; + +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. Maps to each possible non-tracker 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_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, + UPPER_CHEST = 22, + LEFT_HIP = 23, + RIGHT_HIP = 24, + MIN = NONE, + MAX = RIGHT_HIP +}; + +inline const BodyPart (&EnumValuesBodyPart())[23] { + 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_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, + BodyPart::UPPER_CHEST, + BodyPart::LEFT_HIP, + BodyPart::RIGHT_HIP + }; + return values; +} + +inline const char * const *EnumNamesBodyPart() { + static const char * const names[26] = { + "NONE", + "HEAD", + "NECK", + "CHEST", + "WAIST", + "HIP", + "LEFT_UPPER_LEG", + "RIGHT_UPPER_LEG", + "LEFT_LOWER_LEG", + "RIGHT_LOWER_LEG", + "LEFT_FOOT", + "RIGHT_FOOT", + "", + "", + "LEFT_LOWER_ARM", + "RIGHT_LOWER_ARM", + "LEFT_UPPER_ARM", + "RIGHT_UPPER_ARM", + "LEFT_HAND", + "RIGHT_HAND", + "LEFT_SHOULDER", + "RIGHT_SHOULDER", + "UPPER_CHEST", + "LEFT_HIP", + "RIGHT_HIP", + nullptr + }; + return names; +} + +inline const char *EnumNameBodyPart(BodyPart e) { + if (flatbuffers::IsOutRange(e, BodyPart::NONE, BodyPart::RIGHT_HIP)) 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, + TIMED_OUT = 6, + MIN = NONE, + MAX = TIMED_OUT +}; + +inline const TrackerStatus (&EnumValuesTrackerStatus())[7] { + static const TrackerStatus values[] = { + TrackerStatus::NONE, + TrackerStatus::DISCONNECTED, + TrackerStatus::OK, + TrackerStatus::BUSY, + TrackerStatus::ERROR, + TrackerStatus::OCCLUDED, + TrackerStatus::TIMED_OUT + }; + return values; +} + +inline const char * const *EnumNamesTrackerStatus() { + static const char * const names[8] = { + "NONE", + "DISCONNECTED", + "OK", + "BUSY", + "ERROR", + "OCCLUDED", + "TIMED_OUT", + nullptr + }; + return names; +} + +inline const char *EnumNameTrackerStatus(TrackerStatus e) { + if (flatbuffers::IsOutRange(e, TrackerStatus::NONE, TrackerStatus::TIMED_OUT)) return ""; + const size_t index = static_cast(e); + return EnumNamesTrackerStatus()[index]; +} + +namespace hardware_info { + +enum class McuType : uint16_t { + Other = 0, + ESP8266 = 1, + ESP32 = 2, + OWOTRACK_ANDROID = 3, + WRANGLER = 4, + OWOTRACK_IOS = 5, + ESP32_C3 = 6, + MOCOPI = 7, + DEV_RESERVED = 250, + MIN = Other, + MAX = DEV_RESERVED +}; + +inline const McuType (&EnumValuesMcuType())[9] { + static const McuType values[] = { + McuType::Other, + McuType::ESP8266, + McuType::ESP32, + McuType::OWOTRACK_ANDROID, + McuType::WRANGLER, + McuType::OWOTRACK_IOS, + McuType::ESP32_C3, + McuType::MOCOPI, + McuType::DEV_RESERVED + }; + return values; +} + +inline const char *EnumNameMcuType(McuType e) { + switch (e) { + case McuType::Other: return "Other"; + case McuType::ESP8266: return "ESP8266"; + case McuType::ESP32: return "ESP32"; + case McuType::OWOTRACK_ANDROID: return "OWOTRACK_ANDROID"; + case McuType::WRANGLER: return "WRANGLER"; + case McuType::OWOTRACK_IOS: return "OWOTRACK_IOS"; + case McuType::ESP32_C3: return "ESP32_C3"; + case McuType::MOCOPI: return "MOCOPI"; + case McuType::DEV_RESERVED: return "DEV_RESERVED"; + default: return ""; + } +} + +enum class ImuType : uint16_t { + Other = 0, + MPU9250 = 1, + MPU6500 = 2, + BNO080 = 3, + BNO085 = 4, + BNO055 = 5, + MPU6050 = 6, + BNO086 = 7, + BMI160 = 8, + ICM20948 = 9, + ICM42688 = 10, + MIN = Other, + MAX = ICM42688 +}; + +inline const ImuType (&EnumValuesImuType())[11] { + static const ImuType values[] = { + ImuType::Other, + ImuType::MPU9250, + ImuType::MPU6500, + ImuType::BNO080, + ImuType::BNO085, + ImuType::BNO055, + ImuType::MPU6050, + ImuType::BNO086, + ImuType::BMI160, + ImuType::ICM20948, + ImuType::ICM42688 + }; + return values; +} + +inline const char * const *EnumNamesImuType() { + static const char * const names[12] = { + "Other", + "MPU9250", + "MPU6500", + "BNO080", + "BNO085", + "BNO055", + "MPU6050", + "BNO086", + "BMI160", + "ICM20948", + "ICM42688", + nullptr + }; + return names; +} + +inline const char *EnumNameImuType(ImuType e) { + if (flatbuffers::IsOutRange(e, ImuType::Other, ImuType::ICM42688)) return ""; + const size_t index = static_cast(e); + return EnumNamesImuType()[index]; +} + +enum class BoardType : uint16_t { + UNKNOWN = 0, + SLIMEVR_LEGACY = 1, + SLIMEVR_DEV = 2, + NODEMCU = 3, + CUSTOM = 4, + WROOM32 = 5, + WEMOSD1MINI = 6, + TTGO_TBASE = 7, + ESP01 = 8, + SLIMEVR = 9, + LOLIN_C3_MINI = 10, + BEETLE32C3 = 11, + ES32C3DEVKITM1 = 12, + MIN = UNKNOWN, + MAX = ES32C3DEVKITM1 +}; + +inline const BoardType (&EnumValuesBoardType())[13] { + static const BoardType values[] = { + BoardType::UNKNOWN, + BoardType::SLIMEVR_LEGACY, + BoardType::SLIMEVR_DEV, + BoardType::NODEMCU, + BoardType::CUSTOM, + BoardType::WROOM32, + BoardType::WEMOSD1MINI, + BoardType::TTGO_TBASE, + BoardType::ESP01, + BoardType::SLIMEVR, + BoardType::LOLIN_C3_MINI, + BoardType::BEETLE32C3, + BoardType::ES32C3DEVKITM1 + }; + return values; +} + +inline const char * const *EnumNamesBoardType() { + static const char * const names[14] = { + "UNKNOWN", + "SLIMEVR_LEGACY", + "SLIMEVR_DEV", + "NODEMCU", + "CUSTOM", + "WROOM32", + "WEMOSD1MINI", + "TTGO_TBASE", + "ESP01", + "SLIMEVR", + "LOLIN_C3_MINI", + "BEETLE32C3", + "ES32C3DEVKITM1", + nullptr + }; + return names; +} + +inline const char *EnumNameBoardType(BoardType e) { + if (flatbuffers::IsOutRange(e, BoardType::UNKNOWN, BoardType::ES32C3DEVKITM1)) return ""; + const size_t index = static_cast(e); + return EnumNamesBoardType()[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, + ResetResponse = 4, + AssignTrackerRequest = 5, + SettingsRequest = 6, + SettingsResponse = 7, + ChangeSettingsRequest = 8, + ClearDriftCompensationRequest = 9, + RecordBVHRequest = 10, + RecordBVHStatus = 11, + SkeletonConfigRequest = 12, + ChangeSkeletonConfigRequest = 13, + SkeletonResetAllRequest = 14, + SkeletonConfigResponse = 15, + OpenSerialRequest = 16, + CloseSerialRequest = 17, + SetWifiRequest = 18, + SerialUpdateResponse = 19, + AutoBoneProcessRequest = 20, + AutoBoneProcessStatusResponse = 21, + AutoBoneEpochResponse = 22, + OverlayDisplayModeRequest = 23, + OverlayDisplayModeChangeRequest = 24, + OverlayDisplayModeResponse = 25, + SerialTrackerRebootRequest = 26, + SerialTrackerGetInfoRequest = 27, + SerialTrackerFactoryResetRequest = 28, + SerialDevicesRequest = 29, + SerialDevicesResponse = 30, + NewSerialDeviceResponse = 31, + StartWifiProvisioningRequest = 32, + StopWifiProvisioningRequest = 33, + WifiProvisioningStatusResponse = 34, + ServerInfosRequest = 35, + ServerInfosResponse = 36, + LegTweaksTmpChange = 37, + LegTweaksTmpClear = 38, + TapDetectionSetupNotification = 39, + SetPauseTrackingRequest = 40, + StatusSystemRequest = 41, + StatusSystemResponse = 42, + StatusSystemUpdate = 43, + StatusSystemFixed = 44, + ClearMountingResetRequest = 45, + HeightRequest = 46, + HeightResponse = 47, + AutoBoneApplyRequest = 48, + AutoBoneStopRecordingRequest = 49, + AutoBoneCancelRecordingRequest = 50, + SaveFileNotification = 51, + TrackingPauseStateRequest = 52, + TrackingPauseStateResponse = 53, + SerialTrackerGetWifiScanRequest = 54, + UnknownDeviceHandshakeNotification = 55, + AddUnknownDeviceRequest = 56, + ForgetDeviceRequest = 57, + FirmwareUpdateRequest = 58, + FirmwareUpdateStatusResponse = 59, + FirmwareUpdateStopQueuesRequest = 60, + MIN = NONE, + MAX = FirmwareUpdateStopQueuesRequest +}; + +inline const RpcMessage (&EnumValuesRpcMessage())[61] { + static const RpcMessage values[] = { + RpcMessage::NONE, + RpcMessage::HeartbeatRequest, + RpcMessage::HeartbeatResponse, + RpcMessage::ResetRequest, + RpcMessage::ResetResponse, + RpcMessage::AssignTrackerRequest, + RpcMessage::SettingsRequest, + RpcMessage::SettingsResponse, + RpcMessage::ChangeSettingsRequest, + RpcMessage::ClearDriftCompensationRequest, + 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, + RpcMessage::SerialDevicesRequest, + RpcMessage::SerialDevicesResponse, + RpcMessage::NewSerialDeviceResponse, + RpcMessage::StartWifiProvisioningRequest, + RpcMessage::StopWifiProvisioningRequest, + RpcMessage::WifiProvisioningStatusResponse, + RpcMessage::ServerInfosRequest, + RpcMessage::ServerInfosResponse, + RpcMessage::LegTweaksTmpChange, + RpcMessage::LegTweaksTmpClear, + RpcMessage::TapDetectionSetupNotification, + RpcMessage::SetPauseTrackingRequest, + RpcMessage::StatusSystemRequest, + RpcMessage::StatusSystemResponse, + RpcMessage::StatusSystemUpdate, + RpcMessage::StatusSystemFixed, + RpcMessage::ClearMountingResetRequest, + RpcMessage::HeightRequest, + RpcMessage::HeightResponse, + RpcMessage::AutoBoneApplyRequest, + RpcMessage::AutoBoneStopRecordingRequest, + RpcMessage::AutoBoneCancelRecordingRequest, + RpcMessage::SaveFileNotification, + RpcMessage::TrackingPauseStateRequest, + RpcMessage::TrackingPauseStateResponse, + RpcMessage::SerialTrackerGetWifiScanRequest, + RpcMessage::UnknownDeviceHandshakeNotification, + RpcMessage::AddUnknownDeviceRequest, + RpcMessage::ForgetDeviceRequest, + RpcMessage::FirmwareUpdateRequest, + RpcMessage::FirmwareUpdateStatusResponse, + RpcMessage::FirmwareUpdateStopQueuesRequest + }; + return values; +} + +inline const char * const *EnumNamesRpcMessage() { + static const char * const names[62] = { + "NONE", + "HeartbeatRequest", + "HeartbeatResponse", + "ResetRequest", + "ResetResponse", + "AssignTrackerRequest", + "SettingsRequest", + "SettingsResponse", + "ChangeSettingsRequest", + "ClearDriftCompensationRequest", + "RecordBVHRequest", + "RecordBVHStatus", + "SkeletonConfigRequest", + "ChangeSkeletonConfigRequest", + "SkeletonResetAllRequest", + "SkeletonConfigResponse", + "OpenSerialRequest", + "CloseSerialRequest", + "SetWifiRequest", + "SerialUpdateResponse", + "AutoBoneProcessRequest", + "AutoBoneProcessStatusResponse", + "AutoBoneEpochResponse", + "OverlayDisplayModeRequest", + "OverlayDisplayModeChangeRequest", + "OverlayDisplayModeResponse", + "SerialTrackerRebootRequest", + "SerialTrackerGetInfoRequest", + "SerialTrackerFactoryResetRequest", + "SerialDevicesRequest", + "SerialDevicesResponse", + "NewSerialDeviceResponse", + "StartWifiProvisioningRequest", + "StopWifiProvisioningRequest", + "WifiProvisioningStatusResponse", + "ServerInfosRequest", + "ServerInfosResponse", + "LegTweaksTmpChange", + "LegTweaksTmpClear", + "TapDetectionSetupNotification", + "SetPauseTrackingRequest", + "StatusSystemRequest", + "StatusSystemResponse", + "StatusSystemUpdate", + "StatusSystemFixed", + "ClearMountingResetRequest", + "HeightRequest", + "HeightResponse", + "AutoBoneApplyRequest", + "AutoBoneStopRecordingRequest", + "AutoBoneCancelRecordingRequest", + "SaveFileNotification", + "TrackingPauseStateRequest", + "TrackingPauseStateResponse", + "SerialTrackerGetWifiScanRequest", + "UnknownDeviceHandshakeNotification", + "AddUnknownDeviceRequest", + "ForgetDeviceRequest", + "FirmwareUpdateRequest", + "FirmwareUpdateStatusResponse", + "FirmwareUpdateStopQueuesRequest", + nullptr + }; + return names; +} + +inline const char *EnumNameRpcMessage(RpcMessage e) { + if (flatbuffers::IsOutRange(e, RpcMessage::NONE, RpcMessage::FirmwareUpdateStopQueuesRequest)) 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::ResetResponse; +}; + +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::ClearDriftCompensationRequest; +}; + +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; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::SerialDevicesRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::SerialDevicesResponse; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::NewSerialDeviceResponse; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::StartWifiProvisioningRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::StopWifiProvisioningRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::WifiProvisioningStatusResponse; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::ServerInfosRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::ServerInfosResponse; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::LegTweaksTmpChange; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::LegTweaksTmpClear; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::TapDetectionSetupNotification; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::SetPauseTrackingRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::StatusSystemRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::StatusSystemResponse; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::StatusSystemUpdate; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::StatusSystemFixed; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::ClearMountingResetRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::HeightRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::HeightResponse; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::AutoBoneApplyRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::AutoBoneStopRecordingRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::AutoBoneCancelRecordingRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::SaveFileNotification; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::TrackingPauseStateRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::TrackingPauseStateResponse; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::SerialTrackerGetWifiScanRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::UnknownDeviceHandshakeNotification; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::AddUnknownDeviceRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::ForgetDeviceRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::FirmwareUpdateRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::FirmwareUpdateStatusResponse; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::FirmwareUpdateStopQueuesRequest; +}; + +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 { + Yaw = 0, + Full = 1, + /// Second pose for calibrating mounting rotation + Mounting = 2, + MIN = Yaw, + MAX = Mounting +}; + +inline const ResetType (&EnumValuesResetType())[3] { + static const ResetType values[] = { + ResetType::Yaw, + ResetType::Full, + ResetType::Mounting + }; + return values; +} + +inline const char * const *EnumNamesResetType() { + static const char * const names[4] = { + "Yaw", + "Full", + "Mounting", + nullptr + }; + return names; +} + +inline const char *EnumNameResetType(ResetType e) { + if (flatbuffers::IsOutRange(e, ResetType::Yaw, ResetType::Mounting)) return ""; + const size_t index = static_cast(e); + return EnumNamesResetType()[index]; +} + +enum class ResetStatus : uint8_t { + STARTED = 0, + FINISHED = 1, + MIN = STARTED, + MAX = FINISHED +}; + +inline const ResetStatus (&EnumValuesResetStatus())[2] { + static const ResetStatus values[] = { + ResetStatus::STARTED, + ResetStatus::FINISHED + }; + return values; +} + +inline const char * const *EnumNamesResetStatus() { + static const char * const names[3] = { + "STARTED", + "FINISHED", + nullptr + }; + return names; +} + +inline const char *EnumNameResetStatus(ResetStatus e) { + if (flatbuffers::IsOutRange(e, ResetStatus::STARTED, ResetStatus::FINISHED)) return ""; + const size_t index = static_cast(e); + return EnumNamesResetStatus()[index]; +} + +enum class ArmsMountingResetMode : uint8_t { + /// Upper arm going back and forearm going forward + BACK = 0, + /// Arms going forward + FORWARD = 1, + /// Arms going up to the sides into a tpose + TPOSE_UP = 2, + /// Arms going down to the sides from a tpose + TPOSE_DOWN = 3, + MIN = BACK, + MAX = TPOSE_DOWN +}; + +inline const ArmsMountingResetMode (&EnumValuesArmsMountingResetMode())[4] { + static const ArmsMountingResetMode values[] = { + ArmsMountingResetMode::BACK, + ArmsMountingResetMode::FORWARD, + ArmsMountingResetMode::TPOSE_UP, + ArmsMountingResetMode::TPOSE_DOWN + }; + return values; +} + +inline const char * const *EnumNamesArmsMountingResetMode() { + static const char * const names[5] = { + "BACK", + "FORWARD", + "TPOSE_UP", + "TPOSE_DOWN", + nullptr + }; + return names; +} + +inline const char *EnumNameArmsMountingResetMode(ArmsMountingResetMode e) { + if (flatbuffers::IsOutRange(e, ArmsMountingResetMode::BACK, ArmsMountingResetMode::TPOSE_DOWN)) return ""; + const size_t index = static_cast(e); + return EnumNamesArmsMountingResetMode()[index]; +} + +enum class SkeletonBone : uint8_t { + NONE = 0, + HEAD = 1, + NECK = 2, + CHEST = 3, + CHEST_OFFSET = 4, + WAIST = 5, + HIP = 6, + HIP_OFFSET = 7, + HIPS_WIDTH = 8, + UPPER_LEG = 9, + LOWER_LEG = 10, + FOOT_LENGTH = 11, + FOOT_SHIFT = 12, + SKELETON_OFFSET = 13, + SHOULDERS_DISTANCE = 14, + SHOULDERS_WIDTH = 15, + UPPER_ARM = 16, + LOWER_ARM = 17, + HAND_Y = 18, + HAND_Z = 19, + ELBOW_OFFSET = 20, + UPPER_CHEST = 21, + MIN = NONE, + MAX = UPPER_CHEST +}; + +inline const SkeletonBone (&EnumValuesSkeletonBone())[22] { + static const SkeletonBone values[] = { + SkeletonBone::NONE, + SkeletonBone::HEAD, + SkeletonBone::NECK, + SkeletonBone::CHEST, + SkeletonBone::CHEST_OFFSET, + SkeletonBone::WAIST, + SkeletonBone::HIP, + SkeletonBone::HIP_OFFSET, + SkeletonBone::HIPS_WIDTH, + SkeletonBone::UPPER_LEG, + SkeletonBone::LOWER_LEG, + SkeletonBone::FOOT_LENGTH, + SkeletonBone::FOOT_SHIFT, + SkeletonBone::SKELETON_OFFSET, + SkeletonBone::SHOULDERS_DISTANCE, + SkeletonBone::SHOULDERS_WIDTH, + SkeletonBone::UPPER_ARM, + SkeletonBone::LOWER_ARM, + SkeletonBone::HAND_Y, + SkeletonBone::HAND_Z, + SkeletonBone::ELBOW_OFFSET, + SkeletonBone::UPPER_CHEST + }; + return values; +} + +inline const char * const *EnumNamesSkeletonBone() { + static const char * const names[23] = { + "NONE", + "HEAD", + "NECK", + "CHEST", + "CHEST_OFFSET", + "WAIST", + "HIP", + "HIP_OFFSET", + "HIPS_WIDTH", + "UPPER_LEG", + "LOWER_LEG", + "FOOT_LENGTH", + "FOOT_SHIFT", + "SKELETON_OFFSET", + "SHOULDERS_DISTANCE", + "SHOULDERS_WIDTH", + "UPPER_ARM", + "LOWER_ARM", + "HAND_Y", + "HAND_Z", + "ELBOW_OFFSET", + "UPPER_CHEST", + nullptr + }; + return names; +} + +inline const char *EnumNameSkeletonBone(SkeletonBone e) { + if (flatbuffers::IsOutRange(e, SkeletonBone::NONE, SkeletonBone::UPPER_CHEST)) return ""; + const size_t index = static_cast(e); + return EnumNamesSkeletonBone()[index]; +} + +enum class WifiProvisioningStatus : uint8_t { + NONE = 0, + SERIAL_INIT = 1, + PROVISIONING = 2, + OPTAINING_MAC_ADDRESS = 3, + CONNECTING = 4, + CONNECTION_ERROR = 5, + LOOKING_FOR_SERVER = 6, + COULD_NOT_FIND_SERVER = 7, + DONE = 8, + MIN = NONE, + MAX = DONE +}; + +inline const WifiProvisioningStatus (&EnumValuesWifiProvisioningStatus())[9] { + static const WifiProvisioningStatus values[] = { + WifiProvisioningStatus::NONE, + WifiProvisioningStatus::SERIAL_INIT, + WifiProvisioningStatus::PROVISIONING, + WifiProvisioningStatus::OPTAINING_MAC_ADDRESS, + WifiProvisioningStatus::CONNECTING, + WifiProvisioningStatus::CONNECTION_ERROR, + WifiProvisioningStatus::LOOKING_FOR_SERVER, + WifiProvisioningStatus::COULD_NOT_FIND_SERVER, + WifiProvisioningStatus::DONE + }; + return values; +} + +inline const char * const *EnumNamesWifiProvisioningStatus() { + static const char * const names[10] = { + "NONE", + "SERIAL_INIT", + "PROVISIONING", + "OPTAINING_MAC_ADDRESS", + "CONNECTING", + "CONNECTION_ERROR", + "LOOKING_FOR_SERVER", + "COULD_NOT_FIND_SERVER", + "DONE", + nullptr + }; + return names; +} + +inline const char *EnumNameWifiProvisioningStatus(WifiProvisioningStatus e) { + if (flatbuffers::IsOutRange(e, WifiProvisioningStatus::NONE, WifiProvisioningStatus::DONE)) return ""; + const size_t index = static_cast(e); + return EnumNamesWifiProvisioningStatus()[index]; +} + +enum class AutoBoneProcessType : uint8_t { + NONE = 0, + RECORD = 1, + SAVE = 2, + PROCESS = 3, + /// @deprecated + /// Use AutoBoneApplyRequest instead + 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]; +} + +enum class StatusData : uint8_t { + NONE = 0, + StatusTrackerReset = 1, + StatusTrackerError = 2, + StatusSteamVRDisconnected = 3, + StatusUnassignedHMD = 4, + MIN = NONE, + MAX = StatusUnassignedHMD +}; + +inline const StatusData (&EnumValuesStatusData())[5] { + static const StatusData values[] = { + StatusData::NONE, + StatusData::StatusTrackerReset, + StatusData::StatusTrackerError, + StatusData::StatusSteamVRDisconnected, + StatusData::StatusUnassignedHMD + }; + return values; +} + +inline const char * const *EnumNamesStatusData() { + static const char * const names[6] = { + "NONE", + "StatusTrackerReset", + "StatusTrackerError", + "StatusSteamVRDisconnected", + "StatusUnassignedHMD", + nullptr + }; + return names; +} + +inline const char *EnumNameStatusData(StatusData e) { + if (flatbuffers::IsOutRange(e, StatusData::NONE, StatusData::StatusUnassignedHMD)) return ""; + const size_t index = static_cast(e); + return EnumNamesStatusData()[index]; +} + +template struct StatusDataTraits { + static const StatusData enum_value = StatusData::NONE; +}; + +template<> struct StatusDataTraits { + static const StatusData enum_value = StatusData::StatusTrackerReset; +}; + +template<> struct StatusDataTraits { + static const StatusData enum_value = StatusData::StatusTrackerError; +}; + +template<> struct StatusDataTraits { + static const StatusData enum_value = StatusData::StatusSteamVRDisconnected; +}; + +template<> struct StatusDataTraits { + static const StatusData enum_value = StatusData::StatusUnassignedHMD; +}; + +bool VerifyStatusData(flatbuffers::Verifier &verifier, const void *obj, StatusData type); +bool VerifyStatusDataVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); + +/// Common folders often used in computers for storing files +enum class ComputerDirectory : uint8_t { + Documents = 0, + MIN = Documents, + MAX = Documents +}; + +inline const ComputerDirectory (&EnumValuesComputerDirectory())[1] { + static const ComputerDirectory values[] = { + ComputerDirectory::Documents + }; + return values; +} + +inline const char * const *EnumNamesComputerDirectory() { + static const char * const names[2] = { + "Documents", + nullptr + }; + return names; +} + +inline const char *EnumNameComputerDirectory(ComputerDirectory e) { + if (flatbuffers::IsOutRange(e, ComputerDirectory::Documents, ComputerDirectory::Documents)) return ""; + const size_t index = static_cast(e); + return EnumNamesComputerDirectory()[index]; +} + +enum class FirmwareUpdateStatus : uint8_t { + /// The server is downloading the firmware + DOWNLOADING = 0, + /// The server is waiting for the tracker to be rebooted by the user + /// Note that is is not the same as REBOOTING + NEED_MANUAL_REBOOT = 1, + /// The server tries to authenticate with the MCU + AUTHENTICATING = 2, + /// The server is uploading the firmware to the Device + UPLOADING = 3, + /// The serial flasher tries to sync with the MCU + /// You can use this event to prompt the user to press the boot btn + SYNCING_WITH_MCU = 4, + /// The MCU is rebooting + REBOOTING = 5, + /// The server is provisioning the tracker + PROVISIONING = 6, + DONE = 7, + /// Could not find the device + ERROR_DEVICE_NOT_FOUND = 8, + /// The operation timed out, > 1min + ERROR_TIMEOUT = 9, + /// The firmware download failed + ERROR_DOWNLOAD_FAILED = 10, + /// The server could not authenticate with the MCU + ERROR_AUTHENTICATION_FAILED = 11, + /// Could not upload the firmware to the MUC + ERROR_UPLOAD_FAILED = 12, + /// The provision of the tracker failed, usually wifi credentials + ERROR_PROVISIONING_FAILED = 13, + /// An unsupported Flashing method was used + ERROR_UNSUPPORTED_METHOD = 14, + ERROR_UNKNOWN = 15, + MIN = DOWNLOADING, + MAX = ERROR_UNKNOWN +}; + +inline const FirmwareUpdateStatus (&EnumValuesFirmwareUpdateStatus())[16] { + static const FirmwareUpdateStatus values[] = { + FirmwareUpdateStatus::DOWNLOADING, + FirmwareUpdateStatus::NEED_MANUAL_REBOOT, + FirmwareUpdateStatus::AUTHENTICATING, + FirmwareUpdateStatus::UPLOADING, + FirmwareUpdateStatus::SYNCING_WITH_MCU, + FirmwareUpdateStatus::REBOOTING, + FirmwareUpdateStatus::PROVISIONING, + FirmwareUpdateStatus::DONE, + FirmwareUpdateStatus::ERROR_DEVICE_NOT_FOUND, + FirmwareUpdateStatus::ERROR_TIMEOUT, + FirmwareUpdateStatus::ERROR_DOWNLOAD_FAILED, + FirmwareUpdateStatus::ERROR_AUTHENTICATION_FAILED, + FirmwareUpdateStatus::ERROR_UPLOAD_FAILED, + FirmwareUpdateStatus::ERROR_PROVISIONING_FAILED, + FirmwareUpdateStatus::ERROR_UNSUPPORTED_METHOD, + FirmwareUpdateStatus::ERROR_UNKNOWN + }; + return values; +} + +inline const char * const *EnumNamesFirmwareUpdateStatus() { + static const char * const names[17] = { + "DOWNLOADING", + "NEED_MANUAL_REBOOT", + "AUTHENTICATING", + "UPLOADING", + "SYNCING_WITH_MCU", + "REBOOTING", + "PROVISIONING", + "DONE", + "ERROR_DEVICE_NOT_FOUND", + "ERROR_TIMEOUT", + "ERROR_DOWNLOAD_FAILED", + "ERROR_AUTHENTICATION_FAILED", + "ERROR_UPLOAD_FAILED", + "ERROR_PROVISIONING_FAILED", + "ERROR_UNSUPPORTED_METHOD", + "ERROR_UNKNOWN", + nullptr + }; + return names; +} + +inline const char *EnumNameFirmwareUpdateStatus(FirmwareUpdateStatus e) { + if (flatbuffers::IsOutRange(e, FirmwareUpdateStatus::DOWNLOADING, FirmwareUpdateStatus::ERROR_UNKNOWN)) return ""; + const size_t index = static_cast(e); + return EnumNamesFirmwareUpdateStatus()[index]; +} + +enum class FirmwareUpdateDeviceId : uint8_t { + NONE = 0, + solarxr_protocol_datatypes_DeviceIdTable = 1, + SerialDevicePort = 2, + MIN = NONE, + MAX = SerialDevicePort +}; + +inline const FirmwareUpdateDeviceId (&EnumValuesFirmwareUpdateDeviceId())[3] { + static const FirmwareUpdateDeviceId values[] = { + FirmwareUpdateDeviceId::NONE, + FirmwareUpdateDeviceId::solarxr_protocol_datatypes_DeviceIdTable, + FirmwareUpdateDeviceId::SerialDevicePort + }; + return values; +} + +inline const char * const *EnumNamesFirmwareUpdateDeviceId() { + static const char * const names[4] = { + "NONE", + "solarxr_protocol_datatypes_DeviceIdTable", + "SerialDevicePort", + nullptr + }; + return names; +} + +inline const char *EnumNameFirmwareUpdateDeviceId(FirmwareUpdateDeviceId e) { + if (flatbuffers::IsOutRange(e, FirmwareUpdateDeviceId::NONE, FirmwareUpdateDeviceId::SerialDevicePort)) return ""; + const size_t index = static_cast(e); + return EnumNamesFirmwareUpdateDeviceId()[index]; +} + +template struct FirmwareUpdateDeviceIdTraits { + static const FirmwareUpdateDeviceId enum_value = FirmwareUpdateDeviceId::NONE; +}; + +template<> struct FirmwareUpdateDeviceIdTraits { + static const FirmwareUpdateDeviceId enum_value = FirmwareUpdateDeviceId::solarxr_protocol_datatypes_DeviceIdTable; +}; + +template<> struct FirmwareUpdateDeviceIdTraits { + static const FirmwareUpdateDeviceId enum_value = FirmwareUpdateDeviceId::SerialDevicePort; +}; + +bool VerifyFirmwareUpdateDeviceId(flatbuffers::Verifier &verifier, const void *obj, FirmwareUpdateDeviceId type); +bool VerifyFirmwareUpdateDeviceIdVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); + +enum class FirmwareUpdateMethod : uint8_t { + NONE = 0, + OTAFirmwareUpdate = 1, + SerialFirmwareUpdate = 2, + MIN = NONE, + MAX = SerialFirmwareUpdate +}; + +inline const FirmwareUpdateMethod (&EnumValuesFirmwareUpdateMethod())[3] { + static const FirmwareUpdateMethod values[] = { + FirmwareUpdateMethod::NONE, + FirmwareUpdateMethod::OTAFirmwareUpdate, + FirmwareUpdateMethod::SerialFirmwareUpdate + }; + return values; +} + +inline const char * const *EnumNamesFirmwareUpdateMethod() { + static const char * const names[4] = { + "NONE", + "OTAFirmwareUpdate", + "SerialFirmwareUpdate", + nullptr + }; + return names; +} + +inline const char *EnumNameFirmwareUpdateMethod(FirmwareUpdateMethod e) { + if (flatbuffers::IsOutRange(e, FirmwareUpdateMethod::NONE, FirmwareUpdateMethod::SerialFirmwareUpdate)) return ""; + const size_t index = static_cast(e); + return EnumNamesFirmwareUpdateMethod()[index]; +} + +template struct FirmwareUpdateMethodTraits { + static const FirmwareUpdateMethod enum_value = FirmwareUpdateMethod::NONE; +}; + +template<> struct FirmwareUpdateMethodTraits { + static const FirmwareUpdateMethod enum_value = FirmwareUpdateMethod::OTAFirmwareUpdate; +}; + +template<> struct FirmwareUpdateMethodTraits { + static const FirmwareUpdateMethod enum_value = FirmwareUpdateMethod::SerialFirmwareUpdate; +}; + +bool VerifyFirmwareUpdateMethod(flatbuffers::Verifier &verifier, const void *obj, FirmwareUpdateMethod type); +bool VerifyFirmwareUpdateMethodVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); + +} // 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, + TopicMapping = 4, + MIN = NONE, + MAX = TopicMapping +}; + +inline const PubSubUnion (&EnumValuesPubSubUnion())[5] { + static const PubSubUnion values[] = { + PubSubUnion::NONE, + PubSubUnion::Message, + PubSubUnion::SubscriptionRequest, + PubSubUnion::TopicHandleRequest, + PubSubUnion::TopicMapping + }; + return values; +} + +inline const char * const *EnumNamesPubSubUnion() { + static const char * const names[6] = { + "NONE", + "Message", + "SubscriptionRequest", + "TopicHandleRequest", + "TopicMapping", + nullptr + }; + return names; +} + +inline const char *EnumNamePubSubUnion(PubSubUnion e) { + if (flatbuffers::IsOutRange(e, PubSubUnion::NONE, PubSubUnion::TopicMapping)) 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::TopicMapping; +}; + +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_StringTable = 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_StringTable, + Payload::solarxr_protocol_datatypes_Bytes, + Payload::KeyValues + }; + return values; +} + +inline const char * const *EnumNamesPayload() { + static const char * const names[5] = { + "NONE", + "solarxr_protocol_datatypes_StringTable", + "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_StringTable; +}; + +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 + +/// To be used inside unions +struct DeviceIdTable FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DeviceIdTableBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ID = 4 + }; + const solarxr_protocol::datatypes::DeviceId *id() const { + return GetStruct(VT_ID); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ID, 1) && + verifier.EndTable(); + } +}; + +struct DeviceIdTableBuilder { + typedef DeviceIdTable Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_id(const solarxr_protocol::datatypes::DeviceId *id) { + fbb_.AddStruct(DeviceIdTable::VT_ID, id); + } + explicit DeviceIdTableBuilder(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 CreateDeviceIdTable( + flatbuffers::FlatBufferBuilder &_fbb, + const solarxr_protocol::datatypes::DeviceId *id = nullptr) { + DeviceIdTableBuilder builder_(_fbb); + builder_.add_id(id); + return builder_.Finish(); +} + +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 StringTable FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StringTableBuilder 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 StringTableBuilder { + typedef StringTable Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_s(flatbuffers::Offset s) { + fbb_.AddOffset(StringTable::VT_S, s); + } + explicit StringTableBuilder(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 CreateStringTable( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset s = 0) { + StringTableBuilder builder_(_fbb); + builder_.add_s(s); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateStringTableDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *s = nullptr) { + auto s__ = s ? _fbb.CreateString(s) : 0; + return solarxr_protocol::datatypes::CreateStringTable( + _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, + VT_BOARD_TYPE = 20, + VT_OFFICIAL_BOARD_TYPE = 22, + VT_HARDWARE_IDENTIFIER = 24, + VT_NETWORK_PROTOCOL_VERSION = 26 + }; + 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); + } + /// A board type string that can be used to name a board. if possible you should use official board type + const flatbuffers::String *board_type() const { + return GetPointer(VT_BOARD_TYPE); + } + /// An enum listing all the board types supported by the firmware + solarxr_protocol::datatypes::hardware_info::BoardType official_board_type() const { + return static_cast(GetField(VT_OFFICIAL_BOARD_TYPE, 0)); + } + /// A unique identifier for the device. Depending on the type of device it can be the MAC address, + /// the IP address, or some other unique identifier like what USB device it is. + const flatbuffers::String *hardware_identifier() const { + return GetPointer(VT_HARDWARE_IDENTIFIER); + } + /// The version of the protocol it's using to communicate with server + flatbuffers::Optional network_protocol_version() const { + return GetOptional(VT_NETWORK_PROTOCOL_VERSION); + } + 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) && + VerifyOffset(verifier, VT_BOARD_TYPE) && + verifier.VerifyString(board_type()) && + VerifyField(verifier, VT_OFFICIAL_BOARD_TYPE, 2) && + VerifyOffset(verifier, VT_HARDWARE_IDENTIFIER) && + verifier.VerifyString(hardware_identifier()) && + VerifyField(verifier, VT_NETWORK_PROTOCOL_VERSION, 2) && + 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); + } + void add_board_type(flatbuffers::Offset board_type) { + fbb_.AddOffset(HardwareInfo::VT_BOARD_TYPE, board_type); + } + void add_official_board_type(solarxr_protocol::datatypes::hardware_info::BoardType official_board_type) { + fbb_.AddElement(HardwareInfo::VT_OFFICIAL_BOARD_TYPE, static_cast(official_board_type), 0); + } + void add_hardware_identifier(flatbuffers::Offset hardware_identifier) { + fbb_.AddOffset(HardwareInfo::VT_HARDWARE_IDENTIFIER, hardware_identifier); + } + void add_network_protocol_version(uint16_t network_protocol_version) { + fbb_.AddElement(HardwareInfo::VT_NETWORK_PROTOCOL_VERSION, network_protocol_version); + } + 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, + flatbuffers::Offset board_type = 0, + solarxr_protocol::datatypes::hardware_info::BoardType official_board_type = solarxr_protocol::datatypes::hardware_info::BoardType::UNKNOWN, + flatbuffers::Offset hardware_identifier = 0, + flatbuffers::Optional network_protocol_version = flatbuffers::nullopt) { + HardwareInfoBuilder builder_(_fbb); + builder_.add_hardware_identifier(hardware_identifier); + builder_.add_board_type(board_type); + 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); + if(network_protocol_version) { builder_.add_network_protocol_version(*network_protocol_version); } + builder_.add_official_board_type(official_board_type); + 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, + const char *board_type = nullptr, + solarxr_protocol::datatypes::hardware_info::BoardType official_board_type = solarxr_protocol::datatypes::hardware_info::BoardType::UNKNOWN, + const char *hardware_identifier = nullptr, + flatbuffers::Optional network_protocol_version = flatbuffers::nullopt) { + 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; + auto board_type__ = board_type ? _fbb.CreateString(board_type) : 0; + auto hardware_identifier__ = hardware_identifier ? _fbb.CreateString(hardware_identifier) : 0; + return solarxr_protocol::datatypes::hardware_info::CreateHardwareInfo( + _fbb, + mcu_id, + display_name__, + model__, + manufacturer__, + hardware_revision__, + firmware_version__, + hardware_address, + ip_address, + board_type__, + official_board_type, + hardware_identifier__, + network_protocol_version); +} + +/// 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_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 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_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_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 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(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_ANGULAR_VELOCITY = 14, + VT_RAW_ACCELERATION = 16, + VT_TEMP = 18, + VT_LINEAR_ACCELERATION = 20, + VT_ROTATION_REFERENCE_ADJUSTED = 22, + VT_ROTATION_IDENTITY_ADJUSTED = 24, + VT_TPS = 26 + }; + 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)); + } + /// Sensor rotation after fusion + 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 angular velocity, in euler angles, rad/s + const solarxr_protocol::datatypes::math::Vec3f *raw_angular_velocity() const { + return GetStruct(VT_RAW_ANGULAR_VELOCITY); + } + /// Raw acceleration, in m/s^2 + const solarxr_protocol::datatypes::math::Vec3f *raw_acceleration() const { + return GetStruct(VT_RAW_ACCELERATION); + } + /// Temperature, in degrees celsius + const solarxr_protocol::datatypes::Temperature *temp() const { + return GetStruct(VT_TEMP); + } + /// Acceleration without gravity, in m/s^2 + const solarxr_protocol::datatypes::math::Vec3f *linear_acceleration() const { + return GetStruct(VT_LINEAR_ACCELERATION); + } + /// Reference-adjusted rotation for IMU-only trackers (VR HMD yaw is used as a reset reference). + /// In other words, a rotation that is aligned to a reliable source of rotation ((0, VR HMD YAW, 0)), + /// triggered after user input (using reset buttons). + /// This is a SlimeVR-specific field and computed exclusively by SlimeVR server. + /// Includes: mounting orientation, full, quick and mounting reset adjustments. + /// This rotation can be used to reconstruct a skeleton pose using forward kinematics. + const solarxr_protocol::datatypes::math::Quat *rotation_reference_adjusted() const { + return GetStruct(VT_ROTATION_REFERENCE_ADJUSTED); + } + /// Zero-reference-adjusted rotation for IMU-only trackers (identity quaternion is used as a reset reference). + /// In other words, a rotation that is aligned to a zero vector ((0, 0, 0)) by + /// inverting the current rotation, triggered after user input (using reset buttons). + /// This is a SlimeVR-specific field and computed exclusively by SlimeVR server. + /// Includes: only full and quick reset adjustments. + /// This rotation can be used in visualizations for IMU debugging. + const solarxr_protocol::datatypes::math::Quat *rotation_identity_adjusted() const { + return GetStruct(VT_ROTATION_IDENTITY_ADJUSTED); + } + /// Data ticks per second, processed by SlimeVR server + flatbuffers::Optional tps() const { + return GetOptional(VT_TPS); + } + 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_ANGULAR_VELOCITY, 4) && + VerifyField(verifier, VT_RAW_ACCELERATION, 4) && + VerifyField(verifier, VT_TEMP, 4) && + VerifyField(verifier, VT_LINEAR_ACCELERATION, 4) && + VerifyField(verifier, VT_ROTATION_REFERENCE_ADJUSTED, 4) && + VerifyField(verifier, VT_ROTATION_IDENTITY_ADJUSTED, 4) && + VerifyField(verifier, VT_TPS, 2) && + 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_angular_velocity(const solarxr_protocol::datatypes::math::Vec3f *raw_angular_velocity) { + fbb_.AddStruct(TrackerData::VT_RAW_ANGULAR_VELOCITY, raw_angular_velocity); + } + void add_raw_acceleration(const solarxr_protocol::datatypes::math::Vec3f *raw_acceleration) { + fbb_.AddStruct(TrackerData::VT_RAW_ACCELERATION, raw_acceleration); + } + void add_temp(const solarxr_protocol::datatypes::Temperature *temp) { + fbb_.AddStruct(TrackerData::VT_TEMP, temp); + } + void add_linear_acceleration(const solarxr_protocol::datatypes::math::Vec3f *linear_acceleration) { + fbb_.AddStruct(TrackerData::VT_LINEAR_ACCELERATION, linear_acceleration); + } + void add_rotation_reference_adjusted(const solarxr_protocol::datatypes::math::Quat *rotation_reference_adjusted) { + fbb_.AddStruct(TrackerData::VT_ROTATION_REFERENCE_ADJUSTED, rotation_reference_adjusted); + } + void add_rotation_identity_adjusted(const solarxr_protocol::datatypes::math::Quat *rotation_identity_adjusted) { + fbb_.AddStruct(TrackerData::VT_ROTATION_IDENTITY_ADJUSTED, rotation_identity_adjusted); + } + void add_tps(uint16_t tps) { + fbb_.AddElement(TrackerData::VT_TPS, tps); + } + 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_angular_velocity = nullptr, + const solarxr_protocol::datatypes::math::Vec3f *raw_acceleration = nullptr, + const solarxr_protocol::datatypes::Temperature *temp = nullptr, + const solarxr_protocol::datatypes::math::Vec3f *linear_acceleration = nullptr, + const solarxr_protocol::datatypes::math::Quat *rotation_reference_adjusted = nullptr, + const solarxr_protocol::datatypes::math::Quat *rotation_identity_adjusted = nullptr, + flatbuffers::Optional tps = flatbuffers::nullopt) { + TrackerDataBuilder builder_(_fbb); + builder_.add_rotation_identity_adjusted(rotation_identity_adjusted); + builder_.add_rotation_reference_adjusted(rotation_reference_adjusted); + builder_.add_linear_acceleration(linear_acceleration); + builder_.add_temp(temp); + builder_.add_raw_acceleration(raw_acceleration); + builder_.add_raw_angular_velocity(raw_angular_velocity); + builder_.add_position(position); + builder_.add_rotation(rotation); + builder_.add_info(info); + builder_.add_tracker_id(tracker_id); + if(tps) { builder_.add_tps(*tps); } + 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_ANGULAR_VELOCITY = 12, + VT_RAW_ACCELERATION = 14, + VT_TEMP = 16, + VT_LINEAR_ACCELERATION = 18, + VT_ROTATION_REFERENCE_ADJUSTED = 20, + VT_ROTATION_IDENTITY_ADJUSTED = 22, + VT_TPS = 24 + }; + 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_angular_velocity() const { + return GetField(VT_RAW_ANGULAR_VELOCITY, 0) != 0; + } + bool raw_acceleration() const { + return GetField(VT_RAW_ACCELERATION, 0) != 0; + } + bool temp() const { + return GetField(VT_TEMP, 0) != 0; + } + bool linear_acceleration() const { + return GetField(VT_LINEAR_ACCELERATION, 0) != 0; + } + bool rotation_reference_adjusted() const { + return GetField(VT_ROTATION_REFERENCE_ADJUSTED, 0) != 0; + } + bool rotation_identity_adjusted() const { + return GetField(VT_ROTATION_IDENTITY_ADJUSTED, 0) != 0; + } + bool tps() const { + return GetField(VT_TPS, 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_ANGULAR_VELOCITY, 1) && + VerifyField(verifier, VT_RAW_ACCELERATION, 1) && + VerifyField(verifier, VT_TEMP, 1) && + VerifyField(verifier, VT_LINEAR_ACCELERATION, 1) && + VerifyField(verifier, VT_ROTATION_REFERENCE_ADJUSTED, 1) && + VerifyField(verifier, VT_ROTATION_IDENTITY_ADJUSTED, 1) && + VerifyField(verifier, VT_TPS, 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_angular_velocity(bool raw_angular_velocity) { + fbb_.AddElement(TrackerDataMask::VT_RAW_ANGULAR_VELOCITY, static_cast(raw_angular_velocity), 0); + } + void add_raw_acceleration(bool raw_acceleration) { + fbb_.AddElement(TrackerDataMask::VT_RAW_ACCELERATION, static_cast(raw_acceleration), 0); + } + void add_temp(bool temp) { + fbb_.AddElement(TrackerDataMask::VT_TEMP, static_cast(temp), 0); + } + void add_linear_acceleration(bool linear_acceleration) { + fbb_.AddElement(TrackerDataMask::VT_LINEAR_ACCELERATION, static_cast(linear_acceleration), 0); + } + void add_rotation_reference_adjusted(bool rotation_reference_adjusted) { + fbb_.AddElement(TrackerDataMask::VT_ROTATION_REFERENCE_ADJUSTED, static_cast(rotation_reference_adjusted), 0); + } + void add_rotation_identity_adjusted(bool rotation_identity_adjusted) { + fbb_.AddElement(TrackerDataMask::VT_ROTATION_IDENTITY_ADJUSTED, static_cast(rotation_identity_adjusted), 0); + } + void add_tps(bool tps) { + fbb_.AddElement(TrackerDataMask::VT_TPS, static_cast(tps), 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_angular_velocity = false, + bool raw_acceleration = false, + bool temp = false, + bool linear_acceleration = false, + bool rotation_reference_adjusted = false, + bool rotation_identity_adjusted = false, + bool tps = false) { + TrackerDataMaskBuilder builder_(_fbb); + builder_.add_tps(tps); + builder_.add_rotation_identity_adjusted(rotation_identity_adjusted); + builder_.add_rotation_reference_adjusted(rotation_reference_adjusted); + builder_.add_linear_acceleration(linear_acceleration); + builder_.add_temp(temp); + builder_.add_raw_acceleration(raw_acceleration); + builder_.add_raw_angular_velocity(raw_angular_velocity); + 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_IS_COMPUTED = 14, + VT_IS_IMU = 16, + VT_DISPLAY_NAME = 18, + VT_CUSTOM_NAME = 20, + VT_ALLOW_DRIFT_COMPENSATION = 22, + VT_MOUNTING_RESET_ORIENTATION = 24, + VT_IS_HMD = 26 + }; + 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); + } + /// Should the tracker's settings be editable by the user + bool editable() const { + return GetField(VT_EDITABLE, 0) != 0; + } + /// Indicates if the tracker is computed (solved position and rotation) + bool is_computed() const { + return GetField(VT_IS_COMPUTED, 0) != 0; + } + /// Indicates if the tracker is using an IMU for its tracking data + bool is_imu() const { + return GetField(VT_IS_IMU, 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); + } + /// Whether to allow yaw drift compensation for this tracker or not. + bool allow_drift_compensation() const { + return GetField(VT_ALLOW_DRIFT_COMPENSATION, 0) != 0; + } + /// Mounting Reset orientation overrides the current `mounting_orientation` of + /// the tracker, this orientation is not saved and needs to be calculated + /// each time the server is ran + const solarxr_protocol::datatypes::math::Quat *mounting_reset_orientation() const { + return GetStruct(VT_MOUNTING_RESET_ORIENTATION); + } + /// Indicates if the tracker is actually an HMD + bool is_hmd() const { + return GetField(VT_IS_HMD, 0) != 0; + } + 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_IS_COMPUTED, 1) && + VerifyField(verifier, VT_IS_IMU, 1) && + VerifyOffset(verifier, VT_DISPLAY_NAME) && + verifier.VerifyString(display_name()) && + VerifyOffset(verifier, VT_CUSTOM_NAME) && + verifier.VerifyString(custom_name()) && + VerifyField(verifier, VT_ALLOW_DRIFT_COMPENSATION, 1) && + VerifyField(verifier, VT_MOUNTING_RESET_ORIENTATION, 4) && + VerifyField(verifier, VT_IS_HMD, 1) && + 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_is_computed(bool is_computed) { + fbb_.AddElement(TrackerInfo::VT_IS_COMPUTED, static_cast(is_computed), 0); + } + void add_is_imu(bool is_imu) { + fbb_.AddElement(TrackerInfo::VT_IS_IMU, static_cast(is_imu), 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); + } + void add_allow_drift_compensation(bool allow_drift_compensation) { + fbb_.AddElement(TrackerInfo::VT_ALLOW_DRIFT_COMPENSATION, static_cast(allow_drift_compensation), 0); + } + void add_mounting_reset_orientation(const solarxr_protocol::datatypes::math::Quat *mounting_reset_orientation) { + fbb_.AddStruct(TrackerInfo::VT_MOUNTING_RESET_ORIENTATION, mounting_reset_orientation); + } + void add_is_hmd(bool is_hmd) { + fbb_.AddElement(TrackerInfo::VT_IS_HMD, static_cast(is_hmd), 0); + } + 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 is_computed = false, + bool is_imu = false, + flatbuffers::Offset display_name = 0, + flatbuffers::Offset custom_name = 0, + bool allow_drift_compensation = false, + const solarxr_protocol::datatypes::math::Quat *mounting_reset_orientation = nullptr, + bool is_hmd = false) { + TrackerInfoBuilder builder_(_fbb); + builder_.add_mounting_reset_orientation(mounting_reset_orientation); + 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_is_hmd(is_hmd); + builder_.add_allow_drift_compensation(allow_drift_compensation); + builder_.add_is_imu(is_imu); + builder_.add_is_computed(is_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 is_computed = false, + bool is_imu = false, + const char *display_name = nullptr, + const char *custom_name = nullptr, + bool allow_drift_compensation = false, + const solarxr_protocol::datatypes::math::Quat *mounting_reset_orientation = nullptr, + bool is_hmd = false) { + 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, + is_computed, + is_imu, + display_name__, + custom_name__, + allow_drift_compensation, + mounting_reset_orientation, + is_hmd); +} + +} // 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, + VT_VIVE_EMULATION = 16, + VT_TOE_SNAP = 18, + VT_FOOT_PLANT = 20, + VT_SELF_LOCALIZATION = 22, + VT_USE_POSITION = 24 + }; + 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); + } + flatbuffers::Optional vive_emulation() const { + return GetOptional(VT_VIVE_EMULATION); + } + flatbuffers::Optional toe_snap() const { + return GetOptional(VT_TOE_SNAP); + } + flatbuffers::Optional foot_plant() const { + return GetOptional(VT_FOOT_PLANT); + } + flatbuffers::Optional self_localization() const { + return GetOptional(VT_SELF_LOCALIZATION); + } + flatbuffers::Optional use_position() const { + return GetOptional(VT_USE_POSITION); + } + 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) && + VerifyField(verifier, VT_VIVE_EMULATION, 1) && + VerifyField(verifier, VT_TOE_SNAP, 1) && + VerifyField(verifier, VT_FOOT_PLANT, 1) && + VerifyField(verifier, VT_SELF_LOCALIZATION, 1) && + VerifyField(verifier, VT_USE_POSITION, 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)); + } + void add_vive_emulation(bool vive_emulation) { + fbb_.AddElement(ModelToggles::VT_VIVE_EMULATION, static_cast(vive_emulation)); + } + void add_toe_snap(bool toe_snap) { + fbb_.AddElement(ModelToggles::VT_TOE_SNAP, static_cast(toe_snap)); + } + void add_foot_plant(bool foot_plant) { + fbb_.AddElement(ModelToggles::VT_FOOT_PLANT, static_cast(foot_plant)); + } + void add_self_localization(bool self_localization) { + fbb_.AddElement(ModelToggles::VT_SELF_LOCALIZATION, static_cast(self_localization)); + } + void add_use_position(bool use_position) { + fbb_.AddElement(ModelToggles::VT_USE_POSITION, static_cast(use_position)); + } + 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, + flatbuffers::Optional vive_emulation = flatbuffers::nullopt, + flatbuffers::Optional toe_snap = flatbuffers::nullopt, + flatbuffers::Optional foot_plant = flatbuffers::nullopt, + flatbuffers::Optional self_localization = flatbuffers::nullopt, + flatbuffers::Optional use_position = flatbuffers::nullopt) { + ModelTogglesBuilder builder_(_fbb); + if(use_position) { builder_.add_use_position(*use_position); } + if(self_localization) { builder_.add_self_localization(*self_localization); } + if(foot_plant) { builder_.add_foot_plant(*foot_plant); } + if(toe_snap) { builder_.add_toe_snap(*toe_snap); } + if(vive_emulation) { builder_.add_vive_emulation(*vive_emulation); } + 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, + VT_INTERP_KNEE_ANKLE = 16 + }; + 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 lower leg's when 1.0 + flatbuffers::Optional interp_knee_tracker_ankle() const { + return GetOptional(VT_INTERP_KNEE_TRACKER_ANKLE); + } + /// Upper leg's yaw and roll is set to the lower leg's when 1.0 + flatbuffers::Optional interp_knee_ankle() const { + return GetOptional(VT_INTERP_KNEE_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) && + VerifyField(verifier, VT_INTERP_KNEE_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); + } + void add_interp_knee_ankle(float interp_knee_ankle) { + fbb_.AddElement(ModelRatios::VT_INTERP_KNEE_ANKLE, interp_knee_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, + flatbuffers::Optional interp_knee_ankle = flatbuffers::nullopt) { + ModelRatiosBuilder builder_(_fbb); + if(interp_knee_ankle) { builder_.add_interp_knee_ankle(*interp_knee_ankle); } + 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(); +} + +struct LegTweaksSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LegTweaksSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_CORRECTION_STRENGTH = 4 + }; + flatbuffers::Optional correction_strength() const { + return GetOptional(VT_CORRECTION_STRENGTH); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_CORRECTION_STRENGTH, 4) && + verifier.EndTable(); + } +}; + +struct LegTweaksSettingsBuilder { + typedef LegTweaksSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_correction_strength(float correction_strength) { + fbb_.AddElement(LegTweaksSettings::VT_CORRECTION_STRENGTH, correction_strength); + } + explicit LegTweaksSettingsBuilder(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 CreateLegTweaksSettings( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Optional correction_strength = flatbuffers::nullopt) { + LegTweaksSettingsBuilder builder_(_fbb); + if(correction_strength) { builder_.add_correction_strength(*correction_strength); } + 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, + VT_LEG_TWEAKS = 8 + }; + const solarxr_protocol::rpc::settings::ModelToggles *toggles() const { + return GetPointer(VT_TOGGLES); + } + const solarxr_protocol::rpc::settings::ModelRatios *ratios() const { + return GetPointer(VT_RATIOS); + } + const solarxr_protocol::rpc::settings::LegTweaksSettings *leg_tweaks() const { + return GetPointer(VT_LEG_TWEAKS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_TOGGLES) && + verifier.VerifyTable(toggles()) && + VerifyOffset(verifier, VT_RATIOS) && + verifier.VerifyTable(ratios()) && + VerifyOffset(verifier, VT_LEG_TWEAKS) && + verifier.VerifyTable(leg_tweaks()) && + 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); + } + void add_leg_tweaks(flatbuffers::Offset leg_tweaks) { + fbb_.AddOffset(ModelSettings::VT_LEG_TWEAKS, leg_tweaks); + } + 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, + flatbuffers::Offset leg_tweaks = 0) { + ModelSettingsBuilder builder_(_fbb); + builder_.add_leg_tweaks(leg_tweaks); + 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::ResetResponse *message_as_ResetResponse() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::ResetResponse ? 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::ClearDriftCompensationRequest *message_as_ClearDriftCompensationRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::ClearDriftCompensationRequest ? 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; + } + const solarxr_protocol::rpc::SerialDevicesRequest *message_as_SerialDevicesRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::SerialDevicesRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::SerialDevicesResponse *message_as_SerialDevicesResponse() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::SerialDevicesResponse ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::NewSerialDeviceResponse *message_as_NewSerialDeviceResponse() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::NewSerialDeviceResponse ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::StartWifiProvisioningRequest *message_as_StartWifiProvisioningRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::StartWifiProvisioningRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::StopWifiProvisioningRequest *message_as_StopWifiProvisioningRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::StopWifiProvisioningRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::WifiProvisioningStatusResponse *message_as_WifiProvisioningStatusResponse() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::WifiProvisioningStatusResponse ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::ServerInfosRequest *message_as_ServerInfosRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::ServerInfosRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::ServerInfosResponse *message_as_ServerInfosResponse() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::ServerInfosResponse ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::LegTweaksTmpChange *message_as_LegTweaksTmpChange() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::LegTweaksTmpChange ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::LegTweaksTmpClear *message_as_LegTweaksTmpClear() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::LegTweaksTmpClear ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::TapDetectionSetupNotification *message_as_TapDetectionSetupNotification() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::TapDetectionSetupNotification ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::SetPauseTrackingRequest *message_as_SetPauseTrackingRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::SetPauseTrackingRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::StatusSystemRequest *message_as_StatusSystemRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::StatusSystemRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::StatusSystemResponse *message_as_StatusSystemResponse() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::StatusSystemResponse ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::StatusSystemUpdate *message_as_StatusSystemUpdate() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::StatusSystemUpdate ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::StatusSystemFixed *message_as_StatusSystemFixed() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::StatusSystemFixed ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::ClearMountingResetRequest *message_as_ClearMountingResetRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::ClearMountingResetRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::HeightRequest *message_as_HeightRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::HeightRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::HeightResponse *message_as_HeightResponse() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::HeightResponse ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::AutoBoneApplyRequest *message_as_AutoBoneApplyRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::AutoBoneApplyRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::AutoBoneStopRecordingRequest *message_as_AutoBoneStopRecordingRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::AutoBoneStopRecordingRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::AutoBoneCancelRecordingRequest *message_as_AutoBoneCancelRecordingRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::AutoBoneCancelRecordingRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::SaveFileNotification *message_as_SaveFileNotification() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::SaveFileNotification ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::TrackingPauseStateRequest *message_as_TrackingPauseStateRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::TrackingPauseStateRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::TrackingPauseStateResponse *message_as_TrackingPauseStateResponse() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::TrackingPauseStateResponse ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::SerialTrackerGetWifiScanRequest *message_as_SerialTrackerGetWifiScanRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::SerialTrackerGetWifiScanRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::UnknownDeviceHandshakeNotification *message_as_UnknownDeviceHandshakeNotification() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::UnknownDeviceHandshakeNotification ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::AddUnknownDeviceRequest *message_as_AddUnknownDeviceRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::AddUnknownDeviceRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::ForgetDeviceRequest *message_as_ForgetDeviceRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::ForgetDeviceRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::FirmwareUpdateRequest *message_as_FirmwareUpdateRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::FirmwareUpdateRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::FirmwareUpdateStatusResponse *message_as_FirmwareUpdateStatusResponse() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::FirmwareUpdateStatusResponse ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::FirmwareUpdateStopQueuesRequest *message_as_FirmwareUpdateStopQueuesRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::FirmwareUpdateStopQueuesRequest ? 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::ResetResponse *RpcMessageHeader::message_as() const { + return message_as_ResetResponse(); +} + +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::ClearDriftCompensationRequest *RpcMessageHeader::message_as() const { + return message_as_ClearDriftCompensationRequest(); +} + +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(); +} + +template<> inline const solarxr_protocol::rpc::SerialDevicesRequest *RpcMessageHeader::message_as() const { + return message_as_SerialDevicesRequest(); +} + +template<> inline const solarxr_protocol::rpc::SerialDevicesResponse *RpcMessageHeader::message_as() const { + return message_as_SerialDevicesResponse(); +} + +template<> inline const solarxr_protocol::rpc::NewSerialDeviceResponse *RpcMessageHeader::message_as() const { + return message_as_NewSerialDeviceResponse(); +} + +template<> inline const solarxr_protocol::rpc::StartWifiProvisioningRequest *RpcMessageHeader::message_as() const { + return message_as_StartWifiProvisioningRequest(); +} + +template<> inline const solarxr_protocol::rpc::StopWifiProvisioningRequest *RpcMessageHeader::message_as() const { + return message_as_StopWifiProvisioningRequest(); +} + +template<> inline const solarxr_protocol::rpc::WifiProvisioningStatusResponse *RpcMessageHeader::message_as() const { + return message_as_WifiProvisioningStatusResponse(); +} + +template<> inline const solarxr_protocol::rpc::ServerInfosRequest *RpcMessageHeader::message_as() const { + return message_as_ServerInfosRequest(); +} + +template<> inline const solarxr_protocol::rpc::ServerInfosResponse *RpcMessageHeader::message_as() const { + return message_as_ServerInfosResponse(); +} + +template<> inline const solarxr_protocol::rpc::LegTweaksTmpChange *RpcMessageHeader::message_as() const { + return message_as_LegTweaksTmpChange(); +} + +template<> inline const solarxr_protocol::rpc::LegTweaksTmpClear *RpcMessageHeader::message_as() const { + return message_as_LegTweaksTmpClear(); +} + +template<> inline const solarxr_protocol::rpc::TapDetectionSetupNotification *RpcMessageHeader::message_as() const { + return message_as_TapDetectionSetupNotification(); +} + +template<> inline const solarxr_protocol::rpc::SetPauseTrackingRequest *RpcMessageHeader::message_as() const { + return message_as_SetPauseTrackingRequest(); +} + +template<> inline const solarxr_protocol::rpc::StatusSystemRequest *RpcMessageHeader::message_as() const { + return message_as_StatusSystemRequest(); +} + +template<> inline const solarxr_protocol::rpc::StatusSystemResponse *RpcMessageHeader::message_as() const { + return message_as_StatusSystemResponse(); +} + +template<> inline const solarxr_protocol::rpc::StatusSystemUpdate *RpcMessageHeader::message_as() const { + return message_as_StatusSystemUpdate(); +} + +template<> inline const solarxr_protocol::rpc::StatusSystemFixed *RpcMessageHeader::message_as() const { + return message_as_StatusSystemFixed(); +} + +template<> inline const solarxr_protocol::rpc::ClearMountingResetRequest *RpcMessageHeader::message_as() const { + return message_as_ClearMountingResetRequest(); +} + +template<> inline const solarxr_protocol::rpc::HeightRequest *RpcMessageHeader::message_as() const { + return message_as_HeightRequest(); +} + +template<> inline const solarxr_protocol::rpc::HeightResponse *RpcMessageHeader::message_as() const { + return message_as_HeightResponse(); +} + +template<> inline const solarxr_protocol::rpc::AutoBoneApplyRequest *RpcMessageHeader::message_as() const { + return message_as_AutoBoneApplyRequest(); +} + +template<> inline const solarxr_protocol::rpc::AutoBoneStopRecordingRequest *RpcMessageHeader::message_as() const { + return message_as_AutoBoneStopRecordingRequest(); +} + +template<> inline const solarxr_protocol::rpc::AutoBoneCancelRecordingRequest *RpcMessageHeader::message_as() const { + return message_as_AutoBoneCancelRecordingRequest(); +} + +template<> inline const solarxr_protocol::rpc::SaveFileNotification *RpcMessageHeader::message_as() const { + return message_as_SaveFileNotification(); +} + +template<> inline const solarxr_protocol::rpc::TrackingPauseStateRequest *RpcMessageHeader::message_as() const { + return message_as_TrackingPauseStateRequest(); +} + +template<> inline const solarxr_protocol::rpc::TrackingPauseStateResponse *RpcMessageHeader::message_as() const { + return message_as_TrackingPauseStateResponse(); +} + +template<> inline const solarxr_protocol::rpc::SerialTrackerGetWifiScanRequest *RpcMessageHeader::message_as() const { + return message_as_SerialTrackerGetWifiScanRequest(); +} + +template<> inline const solarxr_protocol::rpc::UnknownDeviceHandshakeNotification *RpcMessageHeader::message_as() const { + return message_as_UnknownDeviceHandshakeNotification(); +} + +template<> inline const solarxr_protocol::rpc::AddUnknownDeviceRequest *RpcMessageHeader::message_as() const { + return message_as_AddUnknownDeviceRequest(); +} + +template<> inline const solarxr_protocol::rpc::ForgetDeviceRequest *RpcMessageHeader::message_as() const { + return message_as_ForgetDeviceRequest(); +} + +template<> inline const solarxr_protocol::rpc::FirmwareUpdateRequest *RpcMessageHeader::message_as() const { + return message_as_FirmwareUpdateRequest(); +} + +template<> inline const solarxr_protocol::rpc::FirmwareUpdateStatusResponse *RpcMessageHeader::message_as() const { + return message_as_FirmwareUpdateStatusResponse(); +} + +template<> inline const solarxr_protocol::rpc::FirmwareUpdateStopQueuesRequest *RpcMessageHeader::message_as() const { + return message_as_FirmwareUpdateStopQueuesRequest(); +} + +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::Yaw) { + ResetRequestBuilder builder_(_fbb); + builder_.add_reset_type(reset_type); + return builder_.Finish(); +} + +struct ResetResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ResetResponseBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_RESET_TYPE = 4, + VT_STATUS = 6 + }; + solarxr_protocol::rpc::ResetType reset_type() const { + return static_cast(GetField(VT_RESET_TYPE, 0)); + } + solarxr_protocol::rpc::ResetStatus status() const { + return static_cast(GetField(VT_STATUS, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_RESET_TYPE, 1) && + VerifyField(verifier, VT_STATUS, 1) && + verifier.EndTable(); + } +}; + +struct ResetResponseBuilder { + typedef ResetResponse Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_reset_type(solarxr_protocol::rpc::ResetType reset_type) { + fbb_.AddElement(ResetResponse::VT_RESET_TYPE, static_cast(reset_type), 0); + } + void add_status(solarxr_protocol::rpc::ResetStatus status) { + fbb_.AddElement(ResetResponse::VT_STATUS, static_cast(status), 0); + } + 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, + solarxr_protocol::rpc::ResetType reset_type = solarxr_protocol::rpc::ResetType::Yaw, + solarxr_protocol::rpc::ResetStatus status = solarxr_protocol::rpc::ResetStatus::STARTED) { + ResetResponseBuilder builder_(_fbb); + builder_.add_status(status); + builder_.add_reset_type(reset_type); + 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_ORIENTATION = 8, + VT_DISPLAY_NAME = 10, + VT_ALLOW_DRIFT_COMPENSATION = 12 + }; + 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_orientation() const { + return GetStruct(VT_MOUNTING_ORIENTATION); + } + const flatbuffers::String *display_name() const { + return GetPointer(VT_DISPLAY_NAME); + } + bool allow_drift_compensation() const { + return GetField(VT_ALLOW_DRIFT_COMPENSATION, 0) != 0; + } + 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_ORIENTATION, 4) && + VerifyOffset(verifier, VT_DISPLAY_NAME) && + verifier.VerifyString(display_name()) && + VerifyField(verifier, VT_ALLOW_DRIFT_COMPENSATION, 1) && + 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_orientation(const solarxr_protocol::datatypes::math::Quat *mounting_orientation) { + fbb_.AddStruct(AssignTrackerRequest::VT_MOUNTING_ORIENTATION, mounting_orientation); + } + void add_display_name(flatbuffers::Offset display_name) { + fbb_.AddOffset(AssignTrackerRequest::VT_DISPLAY_NAME, display_name); + } + void add_allow_drift_compensation(bool allow_drift_compensation) { + fbb_.AddElement(AssignTrackerRequest::VT_ALLOW_DRIFT_COMPENSATION, static_cast(allow_drift_compensation), 0); + } + 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_orientation = nullptr, + flatbuffers::Offset display_name = 0, + bool allow_drift_compensation = false) { + AssignTrackerRequestBuilder builder_(_fbb); + builder_.add_display_name(display_name); + builder_.add_mounting_orientation(mounting_orientation); + builder_.add_tracker_id(tracker_id); + builder_.add_allow_drift_compensation(allow_drift_compensation); + 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_orientation = nullptr, + const char *display_name = nullptr, + bool allow_drift_compensation = false) { + auto display_name__ = display_name ? _fbb.CreateString(display_name) : 0; + return solarxr_protocol::rpc::CreateAssignTrackerRequest( + _fbb, + tracker_id, + body_position, + mounting_orientation, + display_name__, + allow_drift_compensation); +} + +struct ClearDriftCompensationRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ClearDriftCompensationRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct ClearDriftCompensationRequestBuilder { + typedef ClearDriftCompensationRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit ClearDriftCompensationRequestBuilder(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 CreateClearDriftCompensationRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + ClearDriftCompensationRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +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_DRIFT_COMPENSATION = 8, + VT_OSC_ROUTER = 10, + VT_VRC_OSC = 12, + VT_VMC_OSC = 14, + VT_MODEL_SETTINGS = 16, + VT_TAP_DETECTION_SETTINGS = 18, + VT_AUTO_BONE_SETTINGS = 20, + VT_RESETS_SETTINGS = 22 + }; + 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::DriftCompensationSettings *drift_compensation() const { + return GetPointer(VT_DRIFT_COMPENSATION); + } + const solarxr_protocol::rpc::OSCRouterSettings *osc_router() const { + return GetPointer(VT_OSC_ROUTER); + } + const solarxr_protocol::rpc::VRCOSCSettings *vrc_osc() const { + return GetPointer(VT_VRC_OSC); + } + const solarxr_protocol::rpc::VMCOSCSettings *vmc_osc() const { + return GetPointer(VT_VMC_OSC); + } + const solarxr_protocol::rpc::settings::ModelSettings *model_settings() const { + return GetPointer(VT_MODEL_SETTINGS); + } + const solarxr_protocol::rpc::TapDetectionSettings *tap_detection_settings() const { + return GetPointer(VT_TAP_DETECTION_SETTINGS); + } + const solarxr_protocol::rpc::AutoBoneSettings *auto_bone_settings() const { + return GetPointer(VT_AUTO_BONE_SETTINGS); + } + const solarxr_protocol::rpc::ResetsSettings *resets_settings() const { + return GetPointer(VT_RESETS_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_DRIFT_COMPENSATION) && + verifier.VerifyTable(drift_compensation()) && + VerifyOffset(verifier, VT_OSC_ROUTER) && + verifier.VerifyTable(osc_router()) && + VerifyOffset(verifier, VT_VRC_OSC) && + verifier.VerifyTable(vrc_osc()) && + VerifyOffset(verifier, VT_VMC_OSC) && + verifier.VerifyTable(vmc_osc()) && + VerifyOffset(verifier, VT_MODEL_SETTINGS) && + verifier.VerifyTable(model_settings()) && + VerifyOffset(verifier, VT_TAP_DETECTION_SETTINGS) && + verifier.VerifyTable(tap_detection_settings()) && + VerifyOffset(verifier, VT_AUTO_BONE_SETTINGS) && + verifier.VerifyTable(auto_bone_settings()) && + VerifyOffset(verifier, VT_RESETS_SETTINGS) && + verifier.VerifyTable(resets_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_drift_compensation(flatbuffers::Offset drift_compensation) { + fbb_.AddOffset(SettingsResponse::VT_DRIFT_COMPENSATION, drift_compensation); + } + void add_osc_router(flatbuffers::Offset osc_router) { + fbb_.AddOffset(SettingsResponse::VT_OSC_ROUTER, osc_router); + } + void add_vrc_osc(flatbuffers::Offset vrc_osc) { + fbb_.AddOffset(SettingsResponse::VT_VRC_OSC, vrc_osc); + } + void add_vmc_osc(flatbuffers::Offset vmc_osc) { + fbb_.AddOffset(SettingsResponse::VT_VMC_OSC, vmc_osc); + } + void add_model_settings(flatbuffers::Offset model_settings) { + fbb_.AddOffset(SettingsResponse::VT_MODEL_SETTINGS, model_settings); + } + void add_tap_detection_settings(flatbuffers::Offset tap_detection_settings) { + fbb_.AddOffset(SettingsResponse::VT_TAP_DETECTION_SETTINGS, tap_detection_settings); + } + void add_auto_bone_settings(flatbuffers::Offset auto_bone_settings) { + fbb_.AddOffset(SettingsResponse::VT_AUTO_BONE_SETTINGS, auto_bone_settings); + } + void add_resets_settings(flatbuffers::Offset resets_settings) { + fbb_.AddOffset(SettingsResponse::VT_RESETS_SETTINGS, resets_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 drift_compensation = 0, + flatbuffers::Offset osc_router = 0, + flatbuffers::Offset vrc_osc = 0, + flatbuffers::Offset vmc_osc = 0, + flatbuffers::Offset model_settings = 0, + flatbuffers::Offset tap_detection_settings = 0, + flatbuffers::Offset auto_bone_settings = 0, + flatbuffers::Offset resets_settings = 0) { + SettingsResponseBuilder builder_(_fbb); + builder_.add_resets_settings(resets_settings); + builder_.add_auto_bone_settings(auto_bone_settings); + builder_.add_tap_detection_settings(tap_detection_settings); + builder_.add_model_settings(model_settings); + builder_.add_vmc_osc(vmc_osc); + builder_.add_vrc_osc(vrc_osc); + builder_.add_osc_router(osc_router); + builder_.add_drift_compensation(drift_compensation); + 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_DRIFT_COMPENSATION = 8, + VT_OSC_ROUTER = 10, + VT_VRC_OSC = 12, + VT_VMC_OSC = 14, + VT_MODEL_SETTINGS = 16, + VT_TAP_DETECTION_SETTINGS = 18, + VT_AUTO_BONE_SETTINGS = 20, + VT_RESETS_SETTINGS = 22 + }; + 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::DriftCompensationSettings *drift_compensation() const { + return GetPointer(VT_DRIFT_COMPENSATION); + } + const solarxr_protocol::rpc::OSCRouterSettings *osc_router() const { + return GetPointer(VT_OSC_ROUTER); + } + const solarxr_protocol::rpc::VRCOSCSettings *vrc_osc() const { + return GetPointer(VT_VRC_OSC); + } + const solarxr_protocol::rpc::VMCOSCSettings *vmc_osc() const { + return GetPointer(VT_VMC_OSC); + } + const solarxr_protocol::rpc::settings::ModelSettings *model_settings() const { + return GetPointer(VT_MODEL_SETTINGS); + } + const solarxr_protocol::rpc::TapDetectionSettings *tap_detection_settings() const { + return GetPointer(VT_TAP_DETECTION_SETTINGS); + } + const solarxr_protocol::rpc::AutoBoneSettings *auto_bone_settings() const { + return GetPointer(VT_AUTO_BONE_SETTINGS); + } + const solarxr_protocol::rpc::ResetsSettings *resets_settings() const { + return GetPointer(VT_RESETS_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_DRIFT_COMPENSATION) && + verifier.VerifyTable(drift_compensation()) && + VerifyOffset(verifier, VT_OSC_ROUTER) && + verifier.VerifyTable(osc_router()) && + VerifyOffset(verifier, VT_VRC_OSC) && + verifier.VerifyTable(vrc_osc()) && + VerifyOffset(verifier, VT_VMC_OSC) && + verifier.VerifyTable(vmc_osc()) && + VerifyOffset(verifier, VT_MODEL_SETTINGS) && + verifier.VerifyTable(model_settings()) && + VerifyOffset(verifier, VT_TAP_DETECTION_SETTINGS) && + verifier.VerifyTable(tap_detection_settings()) && + VerifyOffset(verifier, VT_AUTO_BONE_SETTINGS) && + verifier.VerifyTable(auto_bone_settings()) && + VerifyOffset(verifier, VT_RESETS_SETTINGS) && + verifier.VerifyTable(resets_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_drift_compensation(flatbuffers::Offset drift_compensation) { + fbb_.AddOffset(ChangeSettingsRequest::VT_DRIFT_COMPENSATION, drift_compensation); + } + void add_osc_router(flatbuffers::Offset osc_router) { + fbb_.AddOffset(ChangeSettingsRequest::VT_OSC_ROUTER, osc_router); + } + void add_vrc_osc(flatbuffers::Offset vrc_osc) { + fbb_.AddOffset(ChangeSettingsRequest::VT_VRC_OSC, vrc_osc); + } + void add_vmc_osc(flatbuffers::Offset vmc_osc) { + fbb_.AddOffset(ChangeSettingsRequest::VT_VMC_OSC, vmc_osc); + } + void add_model_settings(flatbuffers::Offset model_settings) { + fbb_.AddOffset(ChangeSettingsRequest::VT_MODEL_SETTINGS, model_settings); + } + void add_tap_detection_settings(flatbuffers::Offset tap_detection_settings) { + fbb_.AddOffset(ChangeSettingsRequest::VT_TAP_DETECTION_SETTINGS, tap_detection_settings); + } + void add_auto_bone_settings(flatbuffers::Offset auto_bone_settings) { + fbb_.AddOffset(ChangeSettingsRequest::VT_AUTO_BONE_SETTINGS, auto_bone_settings); + } + void add_resets_settings(flatbuffers::Offset resets_settings) { + fbb_.AddOffset(ChangeSettingsRequest::VT_RESETS_SETTINGS, resets_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 drift_compensation = 0, + flatbuffers::Offset osc_router = 0, + flatbuffers::Offset vrc_osc = 0, + flatbuffers::Offset vmc_osc = 0, + flatbuffers::Offset model_settings = 0, + flatbuffers::Offset tap_detection_settings = 0, + flatbuffers::Offset auto_bone_settings = 0, + flatbuffers::Offset resets_settings = 0) { + ChangeSettingsRequestBuilder builder_(_fbb); + builder_.add_resets_settings(resets_settings); + builder_.add_auto_bone_settings(auto_bone_settings); + builder_.add_tap_detection_settings(tap_detection_settings); + builder_.add_model_settings(model_settings); + builder_.add_vmc_osc(vmc_osc); + builder_.add_vrc_osc(vrc_osc); + builder_.add_osc_router(osc_router); + builder_.add_drift_compensation(drift_compensation); + 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_AUTOMATICTRACKERTOGGLE = 16, + VT_LEFT_FOOT = 18, + VT_RIGHT_FOOT = 20, + VT_LEFT_KNEE = 22, + VT_RIGHT_KNEE = 24, + VT_LEFT_ELBOW = 26, + VT_RIGHT_ELBOW = 28, + VT_LEFT_HAND = 30, + VT_RIGHT_HAND = 32 + }; + bool waist() const { + return GetField(VT_WAIST, 0) != 0; + } + bool chest() const { + return GetField(VT_CHEST, 0) != 0; + } + bool automaticTrackerToggle() const { + return GetField(VT_AUTOMATICTRACKERTOGGLE, 0) != 0; + } + bool left_foot() const { + return GetField(VT_LEFT_FOOT, 0) != 0; + } + bool right_foot() const { + return GetField(VT_RIGHT_FOOT, 0) != 0; + } + bool left_knee() const { + return GetField(VT_LEFT_KNEE, 0) != 0; + } + bool right_knee() const { + return GetField(VT_RIGHT_KNEE, 0) != 0; + } + bool left_elbow() const { + return GetField(VT_LEFT_ELBOW, 0) != 0; + } + bool right_elbow() const { + return GetField(VT_RIGHT_ELBOW, 0) != 0; + } + bool left_hand() const { + return GetField(VT_LEFT_HAND, 0) != 0; + } + bool right_hand() const { + return GetField(VT_RIGHT_HAND, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_WAIST, 1) && + VerifyField(verifier, VT_CHEST, 1) && + VerifyField(verifier, VT_AUTOMATICTRACKERTOGGLE, 1) && + VerifyField(verifier, VT_LEFT_FOOT, 1) && + VerifyField(verifier, VT_RIGHT_FOOT, 1) && + VerifyField(verifier, VT_LEFT_KNEE, 1) && + VerifyField(verifier, VT_RIGHT_KNEE, 1) && + VerifyField(verifier, VT_LEFT_ELBOW, 1) && + VerifyField(verifier, VT_RIGHT_ELBOW, 1) && + VerifyField(verifier, VT_LEFT_HAND, 1) && + VerifyField(verifier, VT_RIGHT_HAND, 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_automaticTrackerToggle(bool automaticTrackerToggle) { + fbb_.AddElement(SteamVRTrackersSetting::VT_AUTOMATICTRACKERTOGGLE, static_cast(automaticTrackerToggle), 0); + } + void add_left_foot(bool left_foot) { + fbb_.AddElement(SteamVRTrackersSetting::VT_LEFT_FOOT, static_cast(left_foot), 0); + } + void add_right_foot(bool right_foot) { + fbb_.AddElement(SteamVRTrackersSetting::VT_RIGHT_FOOT, static_cast(right_foot), 0); + } + void add_left_knee(bool left_knee) { + fbb_.AddElement(SteamVRTrackersSetting::VT_LEFT_KNEE, static_cast(left_knee), 0); + } + void add_right_knee(bool right_knee) { + fbb_.AddElement(SteamVRTrackersSetting::VT_RIGHT_KNEE, static_cast(right_knee), 0); + } + void add_left_elbow(bool left_elbow) { + fbb_.AddElement(SteamVRTrackersSetting::VT_LEFT_ELBOW, static_cast(left_elbow), 0); + } + void add_right_elbow(bool right_elbow) { + fbb_.AddElement(SteamVRTrackersSetting::VT_RIGHT_ELBOW, static_cast(right_elbow), 0); + } + void add_left_hand(bool left_hand) { + fbb_.AddElement(SteamVRTrackersSetting::VT_LEFT_HAND, static_cast(left_hand), 0); + } + void add_right_hand(bool right_hand) { + fbb_.AddElement(SteamVRTrackersSetting::VT_RIGHT_HAND, static_cast(right_hand), 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 automaticTrackerToggle = false, + bool left_foot = false, + bool right_foot = false, + bool left_knee = false, + bool right_knee = false, + bool left_elbow = false, + bool right_elbow = false, + bool left_hand = false, + bool right_hand = false) { + SteamVRTrackersSettingBuilder builder_(_fbb); + builder_.add_right_hand(right_hand); + builder_.add_left_hand(left_hand); + builder_.add_right_elbow(right_elbow); + builder_.add_left_elbow(left_elbow); + builder_.add_right_knee(right_knee); + builder_.add_left_knee(left_knee); + builder_.add_right_foot(right_foot); + builder_.add_left_foot(left_foot); + builder_.add_automaticTrackerToggle(automaticTrackerToggle); + 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(); +} + +/// Settings related to IMU yaw drift compensation +struct DriftCompensationSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DriftCompensationSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ENABLED = 4, + VT_AMOUNT = 6, + VT_MAX_RESETS = 8 + }; + bool enabled() const { + return GetField(VT_ENABLED, 0) != 0; + } + /// 0 to 1. A higher value results in more yaw drift compensation + float amount() const { + return GetField(VT_AMOUNT, 0.0f); + } + /// Number of previous resets to take into account when calculating yaw drift + uint16_t max_resets() const { + return GetField(VT_MAX_RESETS, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ENABLED, 1) && + VerifyField(verifier, VT_AMOUNT, 4) && + VerifyField(verifier, VT_MAX_RESETS, 2) && + verifier.EndTable(); + } +}; + +struct DriftCompensationSettingsBuilder { + typedef DriftCompensationSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_enabled(bool enabled) { + fbb_.AddElement(DriftCompensationSettings::VT_ENABLED, static_cast(enabled), 0); + } + void add_amount(float amount) { + fbb_.AddElement(DriftCompensationSettings::VT_AMOUNT, amount, 0.0f); + } + void add_max_resets(uint16_t max_resets) { + fbb_.AddElement(DriftCompensationSettings::VT_MAX_RESETS, max_resets, 0); + } + explicit DriftCompensationSettingsBuilder(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 CreateDriftCompensationSettings( + flatbuffers::FlatBufferBuilder &_fbb, + bool enabled = false, + float amount = 0.0f, + uint16_t max_resets = 0) { + DriftCompensationSettingsBuilder builder_(_fbb); + builder_.add_amount(amount); + builder_.add_max_resets(max_resets); + builder_.add_enabled(enabled); + return builder_.Finish(); +} + +/// OSC router forwards messages it receives, to allow the usage of multiple OSC programs for the same app. +struct OSCRouterSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef OSCRouterSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_OSC_SETTINGS = 4 + }; + const solarxr_protocol::rpc::OSCSettings *osc_settings() const { + return GetPointer(VT_OSC_SETTINGS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_OSC_SETTINGS) && + verifier.VerifyTable(osc_settings()) && + verifier.EndTable(); + } +}; + +struct OSCRouterSettingsBuilder { + typedef OSCRouterSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_osc_settings(flatbuffers::Offset osc_settings) { + fbb_.AddOffset(OSCRouterSettings::VT_OSC_SETTINGS, osc_settings); + } + explicit OSCRouterSettingsBuilder(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 CreateOSCRouterSettings( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset osc_settings = 0) { + OSCRouterSettingsBuilder builder_(_fbb); + builder_.add_osc_settings(osc_settings); + return builder_.Finish(); +} + +/// OSC Settings specific to VRChat +struct VRCOSCSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef VRCOSCSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_OSC_SETTINGS = 4, + VT_TRACKERS = 6 + }; + const solarxr_protocol::rpc::OSCSettings *osc_settings() const { + return GetPointer(VT_OSC_SETTINGS); + } + const solarxr_protocol::rpc::OSCTrackersSetting *trackers() const { + return GetPointer(VT_TRACKERS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_OSC_SETTINGS) && + verifier.VerifyTable(osc_settings()) && + VerifyOffset(verifier, VT_TRACKERS) && + verifier.VerifyTable(trackers()) && + verifier.EndTable(); + } +}; + +struct VRCOSCSettingsBuilder { + typedef VRCOSCSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_osc_settings(flatbuffers::Offset osc_settings) { + fbb_.AddOffset(VRCOSCSettings::VT_OSC_SETTINGS, osc_settings); + } + void add_trackers(flatbuffers::Offset trackers) { + fbb_.AddOffset(VRCOSCSettings::VT_TRACKERS, trackers); + } + explicit VRCOSCSettingsBuilder(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 CreateVRCOSCSettings( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset osc_settings = 0, + flatbuffers::Offset trackers = 0) { + VRCOSCSettingsBuilder builder_(_fbb); + builder_.add_trackers(trackers); + builder_.add_osc_settings(osc_settings); + return builder_.Finish(); +} + +/// OSC Settings specific to VMC +struct VMCOSCSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef VMCOSCSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_OSC_SETTINGS = 4, + VT_VRM_JSON = 6, + VT_ANCHOR_HIP = 8, + VT_MIRROR_TRACKING = 10 + }; + const solarxr_protocol::rpc::OSCSettings *osc_settings() const { + return GetPointer(VT_OSC_SETTINGS); + } + const flatbuffers::String *vrm_json() const { + return GetPointer(VT_VRM_JSON); + } + bool anchor_hip() const { + return GetField(VT_ANCHOR_HIP, 0) != 0; + } + bool mirror_tracking() const { + return GetField(VT_MIRROR_TRACKING, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_OSC_SETTINGS) && + verifier.VerifyTable(osc_settings()) && + VerifyOffset(verifier, VT_VRM_JSON) && + verifier.VerifyString(vrm_json()) && + VerifyField(verifier, VT_ANCHOR_HIP, 1) && + VerifyField(verifier, VT_MIRROR_TRACKING, 1) && + verifier.EndTable(); + } +}; + +struct VMCOSCSettingsBuilder { + typedef VMCOSCSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_osc_settings(flatbuffers::Offset osc_settings) { + fbb_.AddOffset(VMCOSCSettings::VT_OSC_SETTINGS, osc_settings); + } + void add_vrm_json(flatbuffers::Offset vrm_json) { + fbb_.AddOffset(VMCOSCSettings::VT_VRM_JSON, vrm_json); + } + void add_anchor_hip(bool anchor_hip) { + fbb_.AddElement(VMCOSCSettings::VT_ANCHOR_HIP, static_cast(anchor_hip), 0); + } + void add_mirror_tracking(bool mirror_tracking) { + fbb_.AddElement(VMCOSCSettings::VT_MIRROR_TRACKING, static_cast(mirror_tracking), 0); + } + explicit VMCOSCSettingsBuilder(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 CreateVMCOSCSettings( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset osc_settings = 0, + flatbuffers::Offset vrm_json = 0, + bool anchor_hip = false, + bool mirror_tracking = false) { + VMCOSCSettingsBuilder builder_(_fbb); + builder_.add_vrm_json(vrm_json); + builder_.add_osc_settings(osc_settings); + builder_.add_mirror_tracking(mirror_tracking); + builder_.add_anchor_hip(anchor_hip); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateVMCOSCSettingsDirect( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset osc_settings = 0, + const char *vrm_json = nullptr, + bool anchor_hip = false, + bool mirror_tracking = false) { + auto vrm_json__ = vrm_json ? _fbb.CreateString(vrm_json) : 0; + return solarxr_protocol::rpc::CreateVMCOSCSettings( + _fbb, + osc_settings, + vrm_json__, + anchor_hip, + mirror_tracking); +} + +/// OSC Settings that are used in *any* osc application. +struct OSCSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef OSCSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ENABLED = 4, + VT_PORT_IN = 6, + VT_PORT_OUT = 8, + VT_ADDRESS = 10 + }; + bool enabled() const { + return GetField(VT_ENABLED, 0) != 0; + } + uint16_t port_in() const { + return GetField(VT_PORT_IN, 0); + } + uint16_t port_out() const { + return GetField(VT_PORT_OUT, 0); + } + const flatbuffers::String *address() const { + return GetPointer(VT_ADDRESS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ENABLED, 1) && + VerifyField(verifier, VT_PORT_IN, 2) && + VerifyField(verifier, VT_PORT_OUT, 2) && + VerifyOffset(verifier, VT_ADDRESS) && + verifier.VerifyString(address()) && + verifier.EndTable(); + } +}; + +struct OSCSettingsBuilder { + typedef OSCSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_enabled(bool enabled) { + fbb_.AddElement(OSCSettings::VT_ENABLED, static_cast(enabled), 0); + } + void add_port_in(uint16_t port_in) { + fbb_.AddElement(OSCSettings::VT_PORT_IN, port_in, 0); + } + void add_port_out(uint16_t port_out) { + fbb_.AddElement(OSCSettings::VT_PORT_OUT, port_out, 0); + } + void add_address(flatbuffers::Offset address) { + fbb_.AddOffset(OSCSettings::VT_ADDRESS, address); + } + explicit OSCSettingsBuilder(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 CreateOSCSettings( + flatbuffers::FlatBufferBuilder &_fbb, + bool enabled = false, + uint16_t port_in = 0, + uint16_t port_out = 0, + flatbuffers::Offset address = 0) { + OSCSettingsBuilder builder_(_fbb); + builder_.add_address(address); + builder_.add_port_out(port_out); + builder_.add_port_in(port_in); + builder_.add_enabled(enabled); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateOSCSettingsDirect( + flatbuffers::FlatBufferBuilder &_fbb, + bool enabled = false, + uint16_t port_in = 0, + uint16_t port_out = 0, + const char *address = nullptr) { + auto address__ = address ? _fbb.CreateString(address) : 0; + return solarxr_protocol::rpc::CreateOSCSettings( + _fbb, + enabled, + port_in, + port_out, + address__); +} + +struct OSCTrackersSetting FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef OSCTrackersSettingBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_HEAD = 4, + VT_CHEST = 6, + VT_WAIST = 8, + VT_KNEES = 10, + VT_FEET = 12, + VT_ELBOWS = 14, + VT_HANDS = 16 + }; + bool head() const { + return GetField(VT_HEAD, 0) != 0; + } + bool chest() const { + return GetField(VT_CHEST, 0) != 0; + } + bool waist() const { + return GetField(VT_WAIST, 0) != 0; + } + bool knees() const { + return GetField(VT_KNEES, 0) != 0; + } + bool feet() const { + return GetField(VT_FEET, 0) != 0; + } + bool elbows() const { + return GetField(VT_ELBOWS, 0) != 0; + } + bool hands() const { + return GetField(VT_HANDS, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_HEAD, 1) && + VerifyField(verifier, VT_CHEST, 1) && + VerifyField(verifier, VT_WAIST, 1) && + VerifyField(verifier, VT_KNEES, 1) && + VerifyField(verifier, VT_FEET, 1) && + VerifyField(verifier, VT_ELBOWS, 1) && + VerifyField(verifier, VT_HANDS, 1) && + verifier.EndTable(); + } +}; + +struct OSCTrackersSettingBuilder { + typedef OSCTrackersSetting Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_head(bool head) { + fbb_.AddElement(OSCTrackersSetting::VT_HEAD, static_cast(head), 0); + } + void add_chest(bool chest) { + fbb_.AddElement(OSCTrackersSetting::VT_CHEST, static_cast(chest), 0); + } + void add_waist(bool waist) { + fbb_.AddElement(OSCTrackersSetting::VT_WAIST, static_cast(waist), 0); + } + void add_knees(bool knees) { + fbb_.AddElement(OSCTrackersSetting::VT_KNEES, static_cast(knees), 0); + } + void add_feet(bool feet) { + fbb_.AddElement(OSCTrackersSetting::VT_FEET, static_cast(feet), 0); + } + void add_elbows(bool elbows) { + fbb_.AddElement(OSCTrackersSetting::VT_ELBOWS, static_cast(elbows), 0); + } + void add_hands(bool hands) { + fbb_.AddElement(OSCTrackersSetting::VT_HANDS, static_cast(hands), 0); + } + explicit OSCTrackersSettingBuilder(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 CreateOSCTrackersSetting( + flatbuffers::FlatBufferBuilder &_fbb, + bool head = false, + bool chest = false, + bool waist = false, + bool knees = false, + bool feet = false, + bool elbows = false, + bool hands = false) { + OSCTrackersSettingBuilder builder_(_fbb); + builder_.add_hands(hands); + builder_.add_elbows(elbows); + builder_.add_feet(feet); + builder_.add_knees(knees); + builder_.add_waist(waist); + builder_.add_chest(chest); + builder_.add_head(head); + return builder_.Finish(); +} + +struct TapDetectionSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TapDetectionSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FULL_RESET_DELAY = 4, + VT_FULL_RESET_ENABLED = 6, + VT_FULL_RESET_TAPS = 8, + VT_YAW_RESET_DELAY = 10, + VT_YAW_RESET_ENABLED = 12, + VT_YAW_RESET_TAPS = 14, + VT_MOUNTING_RESET_DELAY = 16, + VT_MOUNTING_RESET_ENABLED = 18, + VT_MOUNTING_RESET_TAPS = 20, + VT_SETUP_MODE = 22, + VT_NUMBER_TRACKERS_OVER_THRESHOLD = 24 + }; + flatbuffers::Optional full_reset_delay() const { + return GetOptional(VT_FULL_RESET_DELAY); + } + flatbuffers::Optional full_reset_enabled() const { + return GetOptional(VT_FULL_RESET_ENABLED); + } + flatbuffers::Optional full_reset_taps() const { + return GetOptional(VT_FULL_RESET_TAPS); + } + flatbuffers::Optional yaw_reset_delay() const { + return GetOptional(VT_YAW_RESET_DELAY); + } + flatbuffers::Optional yaw_reset_enabled() const { + return GetOptional(VT_YAW_RESET_ENABLED); + } + flatbuffers::Optional yaw_reset_taps() const { + return GetOptional(VT_YAW_RESET_TAPS); + } + flatbuffers::Optional mounting_reset_delay() const { + return GetOptional(VT_MOUNTING_RESET_DELAY); + } + flatbuffers::Optional mounting_reset_enabled() const { + return GetOptional(VT_MOUNTING_RESET_ENABLED); + } + flatbuffers::Optional mounting_reset_taps() const { + return GetOptional(VT_MOUNTING_RESET_TAPS); + } + /// If true, disables reset behavior of tap detection and sends a + /// TapDetectionSetupNotification, each time 2 taps are detected on any tracker + flatbuffers::Optional setup_mode() const { + return GetOptional(VT_SETUP_MODE); + } + flatbuffers::Optional number_trackers_over_threshold() const { + return GetOptional(VT_NUMBER_TRACKERS_OVER_THRESHOLD); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_FULL_RESET_DELAY, 4) && + VerifyField(verifier, VT_FULL_RESET_ENABLED, 1) && + VerifyField(verifier, VT_FULL_RESET_TAPS, 1) && + VerifyField(verifier, VT_YAW_RESET_DELAY, 4) && + VerifyField(verifier, VT_YAW_RESET_ENABLED, 1) && + VerifyField(verifier, VT_YAW_RESET_TAPS, 1) && + VerifyField(verifier, VT_MOUNTING_RESET_DELAY, 4) && + VerifyField(verifier, VT_MOUNTING_RESET_ENABLED, 1) && + VerifyField(verifier, VT_MOUNTING_RESET_TAPS, 1) && + VerifyField(verifier, VT_SETUP_MODE, 1) && + VerifyField(verifier, VT_NUMBER_TRACKERS_OVER_THRESHOLD, 1) && + verifier.EndTable(); + } +}; + +struct TapDetectionSettingsBuilder { + typedef TapDetectionSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_full_reset_delay(float full_reset_delay) { + fbb_.AddElement(TapDetectionSettings::VT_FULL_RESET_DELAY, full_reset_delay); + } + void add_full_reset_enabled(bool full_reset_enabled) { + fbb_.AddElement(TapDetectionSettings::VT_FULL_RESET_ENABLED, static_cast(full_reset_enabled)); + } + void add_full_reset_taps(uint8_t full_reset_taps) { + fbb_.AddElement(TapDetectionSettings::VT_FULL_RESET_TAPS, full_reset_taps); + } + void add_yaw_reset_delay(float yaw_reset_delay) { + fbb_.AddElement(TapDetectionSettings::VT_YAW_RESET_DELAY, yaw_reset_delay); + } + void add_yaw_reset_enabled(bool yaw_reset_enabled) { + fbb_.AddElement(TapDetectionSettings::VT_YAW_RESET_ENABLED, static_cast(yaw_reset_enabled)); + } + void add_yaw_reset_taps(uint8_t yaw_reset_taps) { + fbb_.AddElement(TapDetectionSettings::VT_YAW_RESET_TAPS, yaw_reset_taps); + } + void add_mounting_reset_delay(float mounting_reset_delay) { + fbb_.AddElement(TapDetectionSettings::VT_MOUNTING_RESET_DELAY, mounting_reset_delay); + } + void add_mounting_reset_enabled(bool mounting_reset_enabled) { + fbb_.AddElement(TapDetectionSettings::VT_MOUNTING_RESET_ENABLED, static_cast(mounting_reset_enabled)); + } + void add_mounting_reset_taps(uint8_t mounting_reset_taps) { + fbb_.AddElement(TapDetectionSettings::VT_MOUNTING_RESET_TAPS, mounting_reset_taps); + } + void add_setup_mode(bool setup_mode) { + fbb_.AddElement(TapDetectionSettings::VT_SETUP_MODE, static_cast(setup_mode)); + } + void add_number_trackers_over_threshold(uint8_t number_trackers_over_threshold) { + fbb_.AddElement(TapDetectionSettings::VT_NUMBER_TRACKERS_OVER_THRESHOLD, number_trackers_over_threshold); + } + explicit TapDetectionSettingsBuilder(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 CreateTapDetectionSettings( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Optional full_reset_delay = flatbuffers::nullopt, + flatbuffers::Optional full_reset_enabled = flatbuffers::nullopt, + flatbuffers::Optional full_reset_taps = flatbuffers::nullopt, + flatbuffers::Optional yaw_reset_delay = flatbuffers::nullopt, + flatbuffers::Optional yaw_reset_enabled = flatbuffers::nullopt, + flatbuffers::Optional yaw_reset_taps = flatbuffers::nullopt, + flatbuffers::Optional mounting_reset_delay = flatbuffers::nullopt, + flatbuffers::Optional mounting_reset_enabled = flatbuffers::nullopt, + flatbuffers::Optional mounting_reset_taps = flatbuffers::nullopt, + flatbuffers::Optional setup_mode = flatbuffers::nullopt, + flatbuffers::Optional number_trackers_over_threshold = flatbuffers::nullopt) { + TapDetectionSettingsBuilder builder_(_fbb); + if(mounting_reset_delay) { builder_.add_mounting_reset_delay(*mounting_reset_delay); } + if(yaw_reset_delay) { builder_.add_yaw_reset_delay(*yaw_reset_delay); } + if(full_reset_delay) { builder_.add_full_reset_delay(*full_reset_delay); } + if(number_trackers_over_threshold) { builder_.add_number_trackers_over_threshold(*number_trackers_over_threshold); } + if(setup_mode) { builder_.add_setup_mode(*setup_mode); } + if(mounting_reset_taps) { builder_.add_mounting_reset_taps(*mounting_reset_taps); } + if(mounting_reset_enabled) { builder_.add_mounting_reset_enabled(*mounting_reset_enabled); } + if(yaw_reset_taps) { builder_.add_yaw_reset_taps(*yaw_reset_taps); } + if(yaw_reset_enabled) { builder_.add_yaw_reset_enabled(*yaw_reset_enabled); } + if(full_reset_taps) { builder_.add_full_reset_taps(*full_reset_taps); } + if(full_reset_enabled) { builder_.add_full_reset_enabled(*full_reset_enabled); } + return builder_.Finish(); +} + +struct ResetsSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ResetsSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_RESET_MOUNTING_FEET = 4, + VT_ARMS_MOUNTING_RESET_MODE = 6, + VT_YAW_RESET_SMOOTH_TIME = 8, + VT_SAVE_MOUNTING_RESET = 10, + VT_RESET_HMD_PITCH = 12 + }; + bool reset_mounting_feet() const { + return GetField(VT_RESET_MOUNTING_FEET, 0) != 0; + } + solarxr_protocol::rpc::ArmsMountingResetMode arms_mounting_reset_mode() const { + return static_cast(GetField(VT_ARMS_MOUNTING_RESET_MODE, 0)); + } + float yaw_reset_smooth_time() const { + return GetField(VT_YAW_RESET_SMOOTH_TIME, 0.0f); + } + bool save_mounting_reset() const { + return GetField(VT_SAVE_MOUNTING_RESET, 0) != 0; + } + bool reset_hmd_pitch() const { + return GetField(VT_RESET_HMD_PITCH, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_RESET_MOUNTING_FEET, 1) && + VerifyField(verifier, VT_ARMS_MOUNTING_RESET_MODE, 1) && + VerifyField(verifier, VT_YAW_RESET_SMOOTH_TIME, 4) && + VerifyField(verifier, VT_SAVE_MOUNTING_RESET, 1) && + VerifyField(verifier, VT_RESET_HMD_PITCH, 1) && + verifier.EndTable(); + } +}; + +struct ResetsSettingsBuilder { + typedef ResetsSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_reset_mounting_feet(bool reset_mounting_feet) { + fbb_.AddElement(ResetsSettings::VT_RESET_MOUNTING_FEET, static_cast(reset_mounting_feet), 0); + } + void add_arms_mounting_reset_mode(solarxr_protocol::rpc::ArmsMountingResetMode arms_mounting_reset_mode) { + fbb_.AddElement(ResetsSettings::VT_ARMS_MOUNTING_RESET_MODE, static_cast(arms_mounting_reset_mode), 0); + } + void add_yaw_reset_smooth_time(float yaw_reset_smooth_time) { + fbb_.AddElement(ResetsSettings::VT_YAW_RESET_SMOOTH_TIME, yaw_reset_smooth_time, 0.0f); + } + void add_save_mounting_reset(bool save_mounting_reset) { + fbb_.AddElement(ResetsSettings::VT_SAVE_MOUNTING_RESET, static_cast(save_mounting_reset), 0); + } + void add_reset_hmd_pitch(bool reset_hmd_pitch) { + fbb_.AddElement(ResetsSettings::VT_RESET_HMD_PITCH, static_cast(reset_hmd_pitch), 0); + } + explicit ResetsSettingsBuilder(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 CreateResetsSettings( + flatbuffers::FlatBufferBuilder &_fbb, + bool reset_mounting_feet = false, + solarxr_protocol::rpc::ArmsMountingResetMode arms_mounting_reset_mode = solarxr_protocol::rpc::ArmsMountingResetMode::BACK, + float yaw_reset_smooth_time = 0.0f, + bool save_mounting_reset = false, + bool reset_hmd_pitch = false) { + ResetsSettingsBuilder builder_(_fbb); + builder_.add_yaw_reset_smooth_time(yaw_reset_smooth_time); + builder_.add_reset_hmd_pitch(reset_hmd_pitch); + builder_.add_save_mounting_reset(save_mounting_reset); + builder_.add_arms_mounting_reset_mode(arms_mounting_reset_mode); + builder_.add_reset_mounting_feet(reset_mounting_feet); + return builder_.Finish(); +} + +/// See TapDetectionSettings::setup_mode +struct TapDetectionSetupNotification FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TapDetectionSetupNotificationBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TRACKER_ID = 4 + }; + const solarxr_protocol::datatypes::TrackerId *tracker_id() const { + return GetPointer(VT_TRACKER_ID); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_TRACKER_ID) && + verifier.VerifyTable(tracker_id()) && + verifier.EndTable(); + } +}; + +struct TapDetectionSetupNotificationBuilder { + typedef TapDetectionSetupNotification Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_tracker_id(flatbuffers::Offset tracker_id) { + fbb_.AddOffset(TapDetectionSetupNotification::VT_TRACKER_ID, tracker_id); + } + explicit TapDetectionSetupNotificationBuilder(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 CreateTapDetectionSetupNotification( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset tracker_id = 0) { + TapDetectionSetupNotificationBuilder builder_(_fbb); + builder_.add_tracker_id(tracker_id); + 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 SerialDevice FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SerialDeviceBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_PORT = 4, + VT_NAME = 6 + }; + const flatbuffers::String *port() const { + return GetPointer(VT_PORT); + } + const flatbuffers::String *name() const { + return GetPointer(VT_NAME); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_PORT) && + verifier.VerifyString(port()) && + VerifyOffset(verifier, VT_NAME) && + verifier.VerifyString(name()) && + verifier.EndTable(); + } +}; + +struct SerialDeviceBuilder { + typedef SerialDevice Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_port(flatbuffers::Offset port) { + fbb_.AddOffset(SerialDevice::VT_PORT, port); + } + void add_name(flatbuffers::Offset name) { + fbb_.AddOffset(SerialDevice::VT_NAME, name); + } + explicit SerialDeviceBuilder(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 CreateSerialDevice( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset port = 0, + flatbuffers::Offset name = 0) { + SerialDeviceBuilder builder_(_fbb); + builder_.add_name(name); + builder_.add_port(port); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateSerialDeviceDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *port = nullptr, + const char *name = nullptr) { + auto port__ = port ? _fbb.CreateString(port) : 0; + auto name__ = name ? _fbb.CreateString(name) : 0; + return solarxr_protocol::rpc::CreateSerialDevice( + _fbb, + port__, + name__); +} + +struct OpenSerialRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef OpenSerialRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_AUTO_ = 4, + VT_PORT = 6 + }; + /// Automaticaly pick the first serial device available + bool auto_() const { + return GetField(VT_AUTO_, 0) != 0; + } + const flatbuffers::String *port() const { + return GetPointer(VT_PORT); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_AUTO_, 1) && + VerifyOffset(verifier, VT_PORT) && + verifier.VerifyString(port()) && + verifier.EndTable(); + } +}; + +struct OpenSerialRequestBuilder { + typedef OpenSerialRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_auto_(bool auto_) { + fbb_.AddElement(OpenSerialRequest::VT_AUTO_, static_cast(auto_), 0); + } + void add_port(flatbuffers::Offset port) { + fbb_.AddOffset(OpenSerialRequest::VT_PORT, port); + } + 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, + bool auto_ = false, + flatbuffers::Offset port = 0) { + OpenSerialRequestBuilder builder_(_fbb); + builder_.add_port(port); + builder_.add_auto_(auto_); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateOpenSerialRequestDirect( + flatbuffers::FlatBufferBuilder &_fbb, + bool auto_ = false, + const char *port = nullptr) { + auto port__ = port ? _fbb.CreateString(port) : 0; + return solarxr_protocol::rpc::CreateOpenSerialRequest( + _fbb, + auto_, + port__); +} + +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 SerialDevicesRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SerialDevicesRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct SerialDevicesRequestBuilder { + typedef SerialDevicesRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SerialDevicesRequestBuilder(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 CreateSerialDevicesRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + SerialDevicesRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +struct SerialDevicesResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SerialDevicesResponseBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DEVICES = 4 + }; + const flatbuffers::Vector> *devices() const { + return GetPointer> *>(VT_DEVICES); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_DEVICES) && + verifier.VerifyVector(devices()) && + verifier.VerifyVectorOfTables(devices()) && + verifier.EndTable(); + } +}; + +struct SerialDevicesResponseBuilder { + typedef SerialDevicesResponse Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_devices(flatbuffers::Offset>> devices) { + fbb_.AddOffset(SerialDevicesResponse::VT_DEVICES, devices); + } + explicit SerialDevicesResponseBuilder(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 CreateSerialDevicesResponse( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset>> devices = 0) { + SerialDevicesResponseBuilder builder_(_fbb); + builder_.add_devices(devices); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateSerialDevicesResponseDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector> *devices = nullptr) { + auto devices__ = devices ? _fbb.CreateVector>(*devices) : 0; + return solarxr_protocol::rpc::CreateSerialDevicesResponse( + _fbb, + devices__); +} + +struct NewSerialDeviceResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef NewSerialDeviceResponseBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DEVICE = 4 + }; + const solarxr_protocol::rpc::SerialDevice *device() const { + return GetPointer(VT_DEVICE); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_DEVICE) && + verifier.VerifyTable(device()) && + verifier.EndTable(); + } +}; + +struct NewSerialDeviceResponseBuilder { + typedef NewSerialDeviceResponse Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_device(flatbuffers::Offset device) { + fbb_.AddOffset(NewSerialDeviceResponse::VT_DEVICE, device); + } + explicit NewSerialDeviceResponseBuilder(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 CreateNewSerialDeviceResponse( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset device = 0) { + NewSerialDeviceResponseBuilder builder_(_fbb); + builder_.add_device(device); + return builder_.Finish(); +} + +struct StartWifiProvisioningRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StartWifiProvisioningRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_SSID = 4, + VT_PASSWORD = 6, + VT_PORT = 8 + }; + const flatbuffers::String *ssid() const { + return GetPointer(VT_SSID); + } + const flatbuffers::String *password() const { + return GetPointer(VT_PASSWORD); + } + const flatbuffers::String *port() const { + return GetPointer(VT_PORT); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_SSID) && + verifier.VerifyString(ssid()) && + VerifyOffset(verifier, VT_PASSWORD) && + verifier.VerifyString(password()) && + VerifyOffset(verifier, VT_PORT) && + verifier.VerifyString(port()) && + verifier.EndTable(); + } +}; + +struct StartWifiProvisioningRequestBuilder { + typedef StartWifiProvisioningRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_ssid(flatbuffers::Offset ssid) { + fbb_.AddOffset(StartWifiProvisioningRequest::VT_SSID, ssid); + } + void add_password(flatbuffers::Offset password) { + fbb_.AddOffset(StartWifiProvisioningRequest::VT_PASSWORD, password); + } + void add_port(flatbuffers::Offset port) { + fbb_.AddOffset(StartWifiProvisioningRequest::VT_PORT, port); + } + explicit StartWifiProvisioningRequestBuilder(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 CreateStartWifiProvisioningRequest( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset ssid = 0, + flatbuffers::Offset password = 0, + flatbuffers::Offset port = 0) { + StartWifiProvisioningRequestBuilder builder_(_fbb); + builder_.add_port(port); + builder_.add_password(password); + builder_.add_ssid(ssid); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateStartWifiProvisioningRequestDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *ssid = nullptr, + const char *password = nullptr, + const char *port = nullptr) { + auto ssid__ = ssid ? _fbb.CreateString(ssid) : 0; + auto password__ = password ? _fbb.CreateString(password) : 0; + auto port__ = port ? _fbb.CreateString(port) : 0; + return solarxr_protocol::rpc::CreateStartWifiProvisioningRequest( + _fbb, + ssid__, + password__, + port__); +} + +struct StopWifiProvisioningRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StopWifiProvisioningRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct StopWifiProvisioningRequestBuilder { + typedef StopWifiProvisioningRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit StopWifiProvisioningRequestBuilder(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 CreateStopWifiProvisioningRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + StopWifiProvisioningRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +struct WifiProvisioningStatusResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef WifiProvisioningStatusResponseBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_STATUS = 4 + }; + solarxr_protocol::rpc::WifiProvisioningStatus status() const { + return static_cast(GetField(VT_STATUS, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_STATUS, 1) && + verifier.EndTable(); + } +}; + +struct WifiProvisioningStatusResponseBuilder { + typedef WifiProvisioningStatusResponse Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_status(solarxr_protocol::rpc::WifiProvisioningStatus status) { + fbb_.AddElement(WifiProvisioningStatusResponse::VT_STATUS, static_cast(status), 0); + } + explicit WifiProvisioningStatusResponseBuilder(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 CreateWifiProvisioningStatusResponse( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::rpc::WifiProvisioningStatus status = solarxr_protocol::rpc::WifiProvisioningStatus::NONE) { + WifiProvisioningStatusResponseBuilder builder_(_fbb); + builder_.add_status(status); + 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_CURRENT = 8, + VT_TOTAL = 10, + VT_COMPLETED = 12, + VT_SUCCESS = 14, + VT_ETA = 16 + }; + solarxr_protocol::rpc::AutoBoneProcessType process_type() const { + return static_cast(GetField(VT_PROCESS_TYPE, 0)); + } + /// The current count. This value is -1 if there is nothing to report. + uint32_t current() const { + return GetField(VT_CURRENT, 0); + } + /// The total count. This value is -1 if there is nothing to report. + uint32_t total() const { + return GetField(VT_TOTAL, 0); + } + /// True if the operation has completed with any result, successful or not. + bool completed() const { + return GetField(VT_COMPLETED, 0) != 0; + } + /// True if the completed operation was successful, only observe if `completed` is true. + bool success() const { + return GetField(VT_SUCCESS, 0) != 0; + } + /// The time remaining in seconds. This value is -1 if there is nothing to report. + float eta() const { + return GetField(VT_ETA, 0.0f); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_PROCESS_TYPE, 1) && + VerifyField(verifier, VT_CURRENT, 4) && + VerifyField(verifier, VT_TOTAL, 4) && + VerifyField(verifier, VT_COMPLETED, 1) && + VerifyField(verifier, VT_SUCCESS, 1) && + VerifyField(verifier, VT_ETA, 4) && + 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_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); + } + void add_eta(float eta) { + fbb_.AddElement(AutoBoneProcessStatusResponse::VT_ETA, eta, 0.0f); + } + 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, + uint32_t current = 0, + uint32_t total = 0, + bool completed = false, + bool success = false, + float eta = 0.0f) { + AutoBoneProcessStatusResponseBuilder builder_(_fbb); + builder_.add_eta(eta); + builder_.add_total(total); + builder_.add_current(current); + builder_.add_success(success); + builder_.add_completed(completed); + builder_.add_process_type(process_type); + return builder_.Finish(); +} + +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); + } + /// The current error value. This can be any positive number, where lower is better. + float epoch_error() const { + return GetField(VT_EPOCH_ERROR, 0.0f); + } + /// A list of the current estimated body proportions. + 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__); +} + +/// https://github.com/SlimeVR/SlimeVR-Server/blob/v0.8.3/server/src/main/java/dev/slimevr/config/AutoBoneConfig.kt +struct AutoBoneSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AutoBoneSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_CURSOR_INCREMENT = 4, + VT_MIN_DATA_DISTANCE = 6, + VT_MAX_DATA_DISTANCE = 8, + VT_NUM_EPOCHS = 10, + VT_PRINT_EVERY_NUM_EPOCHS = 12, + VT_INITIAL_ADJUST_RATE = 14, + VT_ADJUST_RATE_DECAY = 16, + VT_SLIDE_ERROR_FACTOR = 18, + VT_OFFSET_SLIDE_ERROR_FACTOR = 20, + VT_FOOT_HEIGHT_OFFSET_ERROR_FACTOR = 22, + VT_BODY_PROPORTION_ERROR_FACTOR = 24, + VT_HEIGHT_ERROR_FACTOR = 26, + VT_POSITION_ERROR_FACTOR = 28, + VT_POSITION_OFFSET_ERROR_FACTOR = 30, + VT_CALC_INIT_ERROR = 32, + VT_TARGET_HMD_HEIGHT = 34, + VT_TARGET_FULL_HEIGHT = 36, + VT_RANDOMIZE_FRAME_ORDER = 38, + VT_SCALE_EACH_STEP = 40, + VT_SAMPLE_COUNT = 42, + VT_SAMPLE_RATE_MS = 44, + VT_SAVE_RECORDINGS = 46, + VT_USE_SKELETON_HEIGHT = 48, + VT_RAND_SEED = 50 + }; + flatbuffers::Optional cursor_increment() const { + return GetOptional(VT_CURSOR_INCREMENT); + } + flatbuffers::Optional min_data_distance() const { + return GetOptional(VT_MIN_DATA_DISTANCE); + } + flatbuffers::Optional max_data_distance() const { + return GetOptional(VT_MAX_DATA_DISTANCE); + } + flatbuffers::Optional num_epochs() const { + return GetOptional(VT_NUM_EPOCHS); + } + flatbuffers::Optional print_every_num_epochs() const { + return GetOptional(VT_PRINT_EVERY_NUM_EPOCHS); + } + flatbuffers::Optional initial_adjust_rate() const { + return GetOptional(VT_INITIAL_ADJUST_RATE); + } + flatbuffers::Optional adjust_rate_decay() const { + return GetOptional(VT_ADJUST_RATE_DECAY); + } + flatbuffers::Optional slide_error_factor() const { + return GetOptional(VT_SLIDE_ERROR_FACTOR); + } + flatbuffers::Optional offset_slide_error_factor() const { + return GetOptional(VT_OFFSET_SLIDE_ERROR_FACTOR); + } + flatbuffers::Optional foot_height_offset_error_factor() const { + return GetOptional(VT_FOOT_HEIGHT_OFFSET_ERROR_FACTOR); + } + flatbuffers::Optional body_proportion_error_factor() const { + return GetOptional(VT_BODY_PROPORTION_ERROR_FACTOR); + } + flatbuffers::Optional height_error_factor() const { + return GetOptional(VT_HEIGHT_ERROR_FACTOR); + } + flatbuffers::Optional position_error_factor() const { + return GetOptional(VT_POSITION_ERROR_FACTOR); + } + flatbuffers::Optional position_offset_error_factor() const { + return GetOptional(VT_POSITION_OFFSET_ERROR_FACTOR); + } + flatbuffers::Optional calc_init_error() const { + return GetOptional(VT_CALC_INIT_ERROR); + } + flatbuffers::Optional target_hmd_height() const { + return GetOptional(VT_TARGET_HMD_HEIGHT); + } + flatbuffers::Optional target_full_height() const { + return GetOptional(VT_TARGET_FULL_HEIGHT); + } + flatbuffers::Optional randomize_frame_order() const { + return GetOptional(VT_RANDOMIZE_FRAME_ORDER); + } + flatbuffers::Optional scale_each_step() const { + return GetOptional(VT_SCALE_EACH_STEP); + } + flatbuffers::Optional sample_count() const { + return GetOptional(VT_SAMPLE_COUNT); + } + flatbuffers::Optional sample_rate_ms() const { + return GetOptional(VT_SAMPLE_RATE_MS); + } + flatbuffers::Optional save_recordings() const { + return GetOptional(VT_SAVE_RECORDINGS); + } + flatbuffers::Optional use_skeleton_height() const { + return GetOptional(VT_USE_SKELETON_HEIGHT); + } + flatbuffers::Optional rand_seed() const { + return GetOptional(VT_RAND_SEED); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_CURSOR_INCREMENT, 4) && + VerifyField(verifier, VT_MIN_DATA_DISTANCE, 4) && + VerifyField(verifier, VT_MAX_DATA_DISTANCE, 4) && + VerifyField(verifier, VT_NUM_EPOCHS, 4) && + VerifyField(verifier, VT_PRINT_EVERY_NUM_EPOCHS, 4) && + VerifyField(verifier, VT_INITIAL_ADJUST_RATE, 4) && + VerifyField(verifier, VT_ADJUST_RATE_DECAY, 4) && + VerifyField(verifier, VT_SLIDE_ERROR_FACTOR, 4) && + VerifyField(verifier, VT_OFFSET_SLIDE_ERROR_FACTOR, 4) && + VerifyField(verifier, VT_FOOT_HEIGHT_OFFSET_ERROR_FACTOR, 4) && + VerifyField(verifier, VT_BODY_PROPORTION_ERROR_FACTOR, 4) && + VerifyField(verifier, VT_HEIGHT_ERROR_FACTOR, 4) && + VerifyField(verifier, VT_POSITION_ERROR_FACTOR, 4) && + VerifyField(verifier, VT_POSITION_OFFSET_ERROR_FACTOR, 4) && + VerifyField(verifier, VT_CALC_INIT_ERROR, 1) && + VerifyField(verifier, VT_TARGET_HMD_HEIGHT, 4) && + VerifyField(verifier, VT_TARGET_FULL_HEIGHT, 4) && + VerifyField(verifier, VT_RANDOMIZE_FRAME_ORDER, 1) && + VerifyField(verifier, VT_SCALE_EACH_STEP, 1) && + VerifyField(verifier, VT_SAMPLE_COUNT, 4) && + VerifyField(verifier, VT_SAMPLE_RATE_MS, 8) && + VerifyField(verifier, VT_SAVE_RECORDINGS, 1) && + VerifyField(verifier, VT_USE_SKELETON_HEIGHT, 1) && + VerifyField(verifier, VT_RAND_SEED, 8) && + verifier.EndTable(); + } +}; + +struct AutoBoneSettingsBuilder { + typedef AutoBoneSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_cursor_increment(int32_t cursor_increment) { + fbb_.AddElement(AutoBoneSettings::VT_CURSOR_INCREMENT, cursor_increment); + } + void add_min_data_distance(int32_t min_data_distance) { + fbb_.AddElement(AutoBoneSettings::VT_MIN_DATA_DISTANCE, min_data_distance); + } + void add_max_data_distance(int32_t max_data_distance) { + fbb_.AddElement(AutoBoneSettings::VT_MAX_DATA_DISTANCE, max_data_distance); + } + void add_num_epochs(int32_t num_epochs) { + fbb_.AddElement(AutoBoneSettings::VT_NUM_EPOCHS, num_epochs); + } + void add_print_every_num_epochs(int32_t print_every_num_epochs) { + fbb_.AddElement(AutoBoneSettings::VT_PRINT_EVERY_NUM_EPOCHS, print_every_num_epochs); + } + void add_initial_adjust_rate(float initial_adjust_rate) { + fbb_.AddElement(AutoBoneSettings::VT_INITIAL_ADJUST_RATE, initial_adjust_rate); + } + void add_adjust_rate_decay(float adjust_rate_decay) { + fbb_.AddElement(AutoBoneSettings::VT_ADJUST_RATE_DECAY, adjust_rate_decay); + } + void add_slide_error_factor(float slide_error_factor) { + fbb_.AddElement(AutoBoneSettings::VT_SLIDE_ERROR_FACTOR, slide_error_factor); + } + void add_offset_slide_error_factor(float offset_slide_error_factor) { + fbb_.AddElement(AutoBoneSettings::VT_OFFSET_SLIDE_ERROR_FACTOR, offset_slide_error_factor); + } + void add_foot_height_offset_error_factor(float foot_height_offset_error_factor) { + fbb_.AddElement(AutoBoneSettings::VT_FOOT_HEIGHT_OFFSET_ERROR_FACTOR, foot_height_offset_error_factor); + } + void add_body_proportion_error_factor(float body_proportion_error_factor) { + fbb_.AddElement(AutoBoneSettings::VT_BODY_PROPORTION_ERROR_FACTOR, body_proportion_error_factor); + } + void add_height_error_factor(float height_error_factor) { + fbb_.AddElement(AutoBoneSettings::VT_HEIGHT_ERROR_FACTOR, height_error_factor); + } + void add_position_error_factor(float position_error_factor) { + fbb_.AddElement(AutoBoneSettings::VT_POSITION_ERROR_FACTOR, position_error_factor); + } + void add_position_offset_error_factor(float position_offset_error_factor) { + fbb_.AddElement(AutoBoneSettings::VT_POSITION_OFFSET_ERROR_FACTOR, position_offset_error_factor); + } + void add_calc_init_error(bool calc_init_error) { + fbb_.AddElement(AutoBoneSettings::VT_CALC_INIT_ERROR, static_cast(calc_init_error)); + } + void add_target_hmd_height(float target_hmd_height) { + fbb_.AddElement(AutoBoneSettings::VT_TARGET_HMD_HEIGHT, target_hmd_height); + } + void add_target_full_height(float target_full_height) { + fbb_.AddElement(AutoBoneSettings::VT_TARGET_FULL_HEIGHT, target_full_height); + } + void add_randomize_frame_order(bool randomize_frame_order) { + fbb_.AddElement(AutoBoneSettings::VT_RANDOMIZE_FRAME_ORDER, static_cast(randomize_frame_order)); + } + void add_scale_each_step(bool scale_each_step) { + fbb_.AddElement(AutoBoneSettings::VT_SCALE_EACH_STEP, static_cast(scale_each_step)); + } + void add_sample_count(int32_t sample_count) { + fbb_.AddElement(AutoBoneSettings::VT_SAMPLE_COUNT, sample_count); + } + void add_sample_rate_ms(int64_t sample_rate_ms) { + fbb_.AddElement(AutoBoneSettings::VT_SAMPLE_RATE_MS, sample_rate_ms); + } + void add_save_recordings(bool save_recordings) { + fbb_.AddElement(AutoBoneSettings::VT_SAVE_RECORDINGS, static_cast(save_recordings)); + } + void add_use_skeleton_height(bool use_skeleton_height) { + fbb_.AddElement(AutoBoneSettings::VT_USE_SKELETON_HEIGHT, static_cast(use_skeleton_height)); + } + void add_rand_seed(int64_t rand_seed) { + fbb_.AddElement(AutoBoneSettings::VT_RAND_SEED, rand_seed); + } + explicit AutoBoneSettingsBuilder(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 CreateAutoBoneSettings( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Optional cursor_increment = flatbuffers::nullopt, + flatbuffers::Optional min_data_distance = flatbuffers::nullopt, + flatbuffers::Optional max_data_distance = flatbuffers::nullopt, + flatbuffers::Optional num_epochs = flatbuffers::nullopt, + flatbuffers::Optional print_every_num_epochs = flatbuffers::nullopt, + flatbuffers::Optional initial_adjust_rate = flatbuffers::nullopt, + flatbuffers::Optional adjust_rate_decay = flatbuffers::nullopt, + flatbuffers::Optional slide_error_factor = flatbuffers::nullopt, + flatbuffers::Optional offset_slide_error_factor = flatbuffers::nullopt, + flatbuffers::Optional foot_height_offset_error_factor = flatbuffers::nullopt, + flatbuffers::Optional body_proportion_error_factor = flatbuffers::nullopt, + flatbuffers::Optional height_error_factor = flatbuffers::nullopt, + flatbuffers::Optional position_error_factor = flatbuffers::nullopt, + flatbuffers::Optional position_offset_error_factor = flatbuffers::nullopt, + flatbuffers::Optional calc_init_error = flatbuffers::nullopt, + flatbuffers::Optional target_hmd_height = flatbuffers::nullopt, + flatbuffers::Optional target_full_height = flatbuffers::nullopt, + flatbuffers::Optional randomize_frame_order = flatbuffers::nullopt, + flatbuffers::Optional scale_each_step = flatbuffers::nullopt, + flatbuffers::Optional sample_count = flatbuffers::nullopt, + flatbuffers::Optional sample_rate_ms = flatbuffers::nullopt, + flatbuffers::Optional save_recordings = flatbuffers::nullopt, + flatbuffers::Optional use_skeleton_height = flatbuffers::nullopt, + flatbuffers::Optional rand_seed = flatbuffers::nullopt) { + AutoBoneSettingsBuilder builder_(_fbb); + if(rand_seed) { builder_.add_rand_seed(*rand_seed); } + if(sample_rate_ms) { builder_.add_sample_rate_ms(*sample_rate_ms); } + if(sample_count) { builder_.add_sample_count(*sample_count); } + if(target_full_height) { builder_.add_target_full_height(*target_full_height); } + if(target_hmd_height) { builder_.add_target_hmd_height(*target_hmd_height); } + if(position_offset_error_factor) { builder_.add_position_offset_error_factor(*position_offset_error_factor); } + if(position_error_factor) { builder_.add_position_error_factor(*position_error_factor); } + if(height_error_factor) { builder_.add_height_error_factor(*height_error_factor); } + if(body_proportion_error_factor) { builder_.add_body_proportion_error_factor(*body_proportion_error_factor); } + if(foot_height_offset_error_factor) { builder_.add_foot_height_offset_error_factor(*foot_height_offset_error_factor); } + if(offset_slide_error_factor) { builder_.add_offset_slide_error_factor(*offset_slide_error_factor); } + if(slide_error_factor) { builder_.add_slide_error_factor(*slide_error_factor); } + if(adjust_rate_decay) { builder_.add_adjust_rate_decay(*adjust_rate_decay); } + if(initial_adjust_rate) { builder_.add_initial_adjust_rate(*initial_adjust_rate); } + if(print_every_num_epochs) { builder_.add_print_every_num_epochs(*print_every_num_epochs); } + if(num_epochs) { builder_.add_num_epochs(*num_epochs); } + if(max_data_distance) { builder_.add_max_data_distance(*max_data_distance); } + if(min_data_distance) { builder_.add_min_data_distance(*min_data_distance); } + if(cursor_increment) { builder_.add_cursor_increment(*cursor_increment); } + if(use_skeleton_height) { builder_.add_use_skeleton_height(*use_skeleton_height); } + if(save_recordings) { builder_.add_save_recordings(*save_recordings); } + if(scale_each_step) { builder_.add_scale_each_step(*scale_each_step); } + if(randomize_frame_order) { builder_.add_randomize_frame_order(*randomize_frame_order); } + if(calc_init_error) { builder_.add_calc_init_error(*calc_init_error); } + return builder_.Finish(); +} + +struct HeightRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef HeightRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct HeightRequestBuilder { + typedef HeightRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit HeightRequestBuilder(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 CreateHeightRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + HeightRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +/// Returns the current HMD height and returns an estimated full height (user height) +struct HeightResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef HeightResponseBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_HMD_HEIGHT = 4, + VT_ESTIMATED_FULL_HEIGHT = 6 + }; + float hmd_height() const { + return GetField(VT_HMD_HEIGHT, 0.0f); + } + float estimated_full_height() const { + return GetField(VT_ESTIMATED_FULL_HEIGHT, 0.0f); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_HMD_HEIGHT, 4) && + VerifyField(verifier, VT_ESTIMATED_FULL_HEIGHT, 4) && + verifier.EndTable(); + } +}; + +struct HeightResponseBuilder { + typedef HeightResponse Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_hmd_height(float hmd_height) { + fbb_.AddElement(HeightResponse::VT_HMD_HEIGHT, hmd_height, 0.0f); + } + void add_estimated_full_height(float estimated_full_height) { + fbb_.AddElement(HeightResponse::VT_ESTIMATED_FULL_HEIGHT, estimated_full_height, 0.0f); + } + explicit HeightResponseBuilder(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 CreateHeightResponse( + flatbuffers::FlatBufferBuilder &_fbb, + float hmd_height = 0.0f, + float estimated_full_height = 0.0f) { + HeightResponseBuilder builder_(_fbb); + builder_.add_estimated_full_height(estimated_full_height); + builder_.add_hmd_height(hmd_height); + return builder_.Finish(); +} + +/// Applies the estimated proportions +struct AutoBoneApplyRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AutoBoneApplyRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct AutoBoneApplyRequestBuilder { + typedef AutoBoneApplyRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit AutoBoneApplyRequestBuilder(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 CreateAutoBoneApplyRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + AutoBoneApplyRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +/// Stops the current recording, using it as far as it has been recorded +struct AutoBoneStopRecordingRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AutoBoneStopRecordingRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct AutoBoneStopRecordingRequestBuilder { + typedef AutoBoneStopRecordingRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit AutoBoneStopRecordingRequestBuilder(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 CreateAutoBoneStopRecordingRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + AutoBoneStopRecordingRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +/// Cancels the current recording, aborting the process and discarding the data +struct AutoBoneCancelRecordingRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AutoBoneCancelRecordingRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct AutoBoneCancelRecordingRequestBuilder { + typedef AutoBoneCancelRecordingRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit AutoBoneCancelRecordingRequestBuilder(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 CreateAutoBoneCancelRecordingRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + AutoBoneCancelRecordingRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +/// 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(); +} + +/// Allows to ask generic infos about the server, +/// like the local ip address, the version of the server, the java version, +/// the current working dir and other informations we might want to show in the gui +/// for information/debug purposes +struct ServerInfosRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ServerInfosRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct ServerInfosRequestBuilder { + typedef ServerInfosRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit ServerInfosRequestBuilder(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 CreateServerInfosRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + ServerInfosRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +/// Holds the Server informations, this is a basic table holding various informations about the currently running server +/// like its local ip address (usefull for standalone users so they can specify the ip of the server more easilly) and any more +/// infos we might want to add in the future. (like java version, working dir, server version ....) +/// This only holds the local ip for now. But there will be other informations added as we chose to display them on the gui for instance +struct ServerInfosResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ServerInfosResponseBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_LOCALIP = 4 + }; + const flatbuffers::String *localIp() const { + return GetPointer(VT_LOCALIP); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_LOCALIP) && + verifier.VerifyString(localIp()) && + verifier.EndTable(); + } +}; + +struct ServerInfosResponseBuilder { + typedef ServerInfosResponse Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_localIp(flatbuffers::Offset localIp) { + fbb_.AddOffset(ServerInfosResponse::VT_LOCALIP, localIp); + } + explicit ServerInfosResponseBuilder(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 CreateServerInfosResponse( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset localIp = 0) { + ServerInfosResponseBuilder builder_(_fbb); + builder_.add_localIp(localIp); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateServerInfosResponseDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *localIp = nullptr) { + auto localIp__ = localIp ? _fbb.CreateString(localIp) : 0; + return solarxr_protocol::rpc::CreateServerInfosResponse( + _fbb, + localIp__); +} + +/// Makes a temporary change to legtweaks. This is not saved to disk, and can be +/// cleared with `LegTweaksTmpClear` +struct LegTweaksTmpChange FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LegTweaksTmpChangeBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FLOOR_CLIP = 4, + VT_SKATING_CORRECTION = 6, + VT_TOE_SNAP = 8, + VT_FOOT_PLANT = 10 + }; + flatbuffers::Optional floor_clip() const { + return GetOptional(VT_FLOOR_CLIP); + } + flatbuffers::Optional skating_correction() const { + return GetOptional(VT_SKATING_CORRECTION); + } + flatbuffers::Optional toe_snap() const { + return GetOptional(VT_TOE_SNAP); + } + flatbuffers::Optional foot_plant() const { + return GetOptional(VT_FOOT_PLANT); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_FLOOR_CLIP, 1) && + VerifyField(verifier, VT_SKATING_CORRECTION, 1) && + VerifyField(verifier, VT_TOE_SNAP, 1) && + VerifyField(verifier, VT_FOOT_PLANT, 1) && + verifier.EndTable(); + } +}; + +struct LegTweaksTmpChangeBuilder { + typedef LegTweaksTmpChange Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_floor_clip(bool floor_clip) { + fbb_.AddElement(LegTweaksTmpChange::VT_FLOOR_CLIP, static_cast(floor_clip)); + } + void add_skating_correction(bool skating_correction) { + fbb_.AddElement(LegTweaksTmpChange::VT_SKATING_CORRECTION, static_cast(skating_correction)); + } + void add_toe_snap(bool toe_snap) { + fbb_.AddElement(LegTweaksTmpChange::VT_TOE_SNAP, static_cast(toe_snap)); + } + void add_foot_plant(bool foot_plant) { + fbb_.AddElement(LegTweaksTmpChange::VT_FOOT_PLANT, static_cast(foot_plant)); + } + explicit LegTweaksTmpChangeBuilder(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 CreateLegTweaksTmpChange( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Optional floor_clip = flatbuffers::nullopt, + flatbuffers::Optional skating_correction = flatbuffers::nullopt, + flatbuffers::Optional toe_snap = flatbuffers::nullopt, + flatbuffers::Optional foot_plant = flatbuffers::nullopt) { + LegTweaksTmpChangeBuilder builder_(_fbb); + if(foot_plant) { builder_.add_foot_plant(*foot_plant); } + if(toe_snap) { builder_.add_toe_snap(*toe_snap); } + if(skating_correction) { builder_.add_skating_correction(*skating_correction); } + if(floor_clip) { builder_.add_floor_clip(*floor_clip); } + return builder_.Finish(); +} + +/// Clears the legtweaks temprorary state back to what the config has. +/// Setting a field to `true` will reset that field. +struct LegTweaksTmpClear FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LegTweaksTmpClearBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FLOOR_CLIP = 4, + VT_SKATING_CORRECTION = 6, + VT_TOE_SNAP = 8, + VT_FOOT_PLANT = 10 + }; + bool floor_clip() const { + return GetField(VT_FLOOR_CLIP, 0) != 0; + } + bool skating_correction() const { + return GetField(VT_SKATING_CORRECTION, 0) != 0; + } + bool toe_snap() const { + return GetField(VT_TOE_SNAP, 0) != 0; + } + bool foot_plant() const { + return GetField(VT_FOOT_PLANT, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_FLOOR_CLIP, 1) && + VerifyField(verifier, VT_SKATING_CORRECTION, 1) && + VerifyField(verifier, VT_TOE_SNAP, 1) && + VerifyField(verifier, VT_FOOT_PLANT, 1) && + verifier.EndTable(); + } +}; + +struct LegTweaksTmpClearBuilder { + typedef LegTweaksTmpClear Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_floor_clip(bool floor_clip) { + fbb_.AddElement(LegTweaksTmpClear::VT_FLOOR_CLIP, static_cast(floor_clip), 0); + } + void add_skating_correction(bool skating_correction) { + fbb_.AddElement(LegTweaksTmpClear::VT_SKATING_CORRECTION, static_cast(skating_correction), 0); + } + void add_toe_snap(bool toe_snap) { + fbb_.AddElement(LegTweaksTmpClear::VT_TOE_SNAP, static_cast(toe_snap), 0); + } + void add_foot_plant(bool foot_plant) { + fbb_.AddElement(LegTweaksTmpClear::VT_FOOT_PLANT, static_cast(foot_plant), 0); + } + explicit LegTweaksTmpClearBuilder(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 CreateLegTweaksTmpClear( + flatbuffers::FlatBufferBuilder &_fbb, + bool floor_clip = false, + bool skating_correction = false, + bool toe_snap = false, + bool foot_plant = false) { + LegTweaksTmpClearBuilder builder_(_fbb); + builder_.add_foot_plant(foot_plant); + builder_.add_toe_snap(toe_snap); + builder_.add_skating_correction(skating_correction); + builder_.add_floor_clip(floor_clip); + return builder_.Finish(); +} + +/// Tracker requires full reset +struct StatusTrackerReset FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StatusTrackerResetBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TRACKER_ID = 4 + }; + const solarxr_protocol::datatypes::TrackerId *tracker_id() const { + return GetPointer(VT_TRACKER_ID); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_TRACKER_ID) && + verifier.VerifyTable(tracker_id()) && + verifier.EndTable(); + } +}; + +struct StatusTrackerResetBuilder { + typedef StatusTrackerReset Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_tracker_id(flatbuffers::Offset tracker_id) { + fbb_.AddOffset(StatusTrackerReset::VT_TRACKER_ID, tracker_id); + } + explicit StatusTrackerResetBuilder(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 CreateStatusTrackerReset( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset tracker_id = 0) { + StatusTrackerResetBuilder builder_(_fbb); + builder_.add_tracker_id(tracker_id); + return builder_.Finish(); +} + +/// Tracker has error state +struct StatusTrackerError FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StatusTrackerErrorBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TRACKER_ID = 4 + }; + const solarxr_protocol::datatypes::TrackerId *tracker_id() const { + return GetPointer(VT_TRACKER_ID); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_TRACKER_ID) && + verifier.VerifyTable(tracker_id()) && + verifier.EndTable(); + } +}; + +struct StatusTrackerErrorBuilder { + typedef StatusTrackerError Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_tracker_id(flatbuffers::Offset tracker_id) { + fbb_.AddOffset(StatusTrackerError::VT_TRACKER_ID, tracker_id); + } + explicit StatusTrackerErrorBuilder(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 CreateStatusTrackerError( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset tracker_id = 0) { + StatusTrackerErrorBuilder builder_(_fbb); + builder_.add_tracker_id(tracker_id); + return builder_.Finish(); +} + +/// SteamVR bridge is disconnected +struct StatusSteamVRDisconnected FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StatusSteamVRDisconnectedBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_BRIDGE_SETTINGS_NAME = 4 + }; + /// Name of bridge in the server's config + const flatbuffers::String *bridge_settings_name() const { + return GetPointer(VT_BRIDGE_SETTINGS_NAME); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_BRIDGE_SETTINGS_NAME) && + verifier.VerifyString(bridge_settings_name()) && + verifier.EndTable(); + } +}; + +struct StatusSteamVRDisconnectedBuilder { + typedef StatusSteamVRDisconnected Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_bridge_settings_name(flatbuffers::Offset bridge_settings_name) { + fbb_.AddOffset(StatusSteamVRDisconnected::VT_BRIDGE_SETTINGS_NAME, bridge_settings_name); + } + explicit StatusSteamVRDisconnectedBuilder(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 CreateStatusSteamVRDisconnected( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset bridge_settings_name = 0) { + StatusSteamVRDisconnectedBuilder builder_(_fbb); + builder_.add_bridge_settings_name(bridge_settings_name); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateStatusSteamVRDisconnectedDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *bridge_settings_name = nullptr) { + auto bridge_settings_name__ = bridge_settings_name ? _fbb.CreateString(bridge_settings_name) : 0; + return solarxr_protocol::rpc::CreateStatusSteamVRDisconnected( + _fbb, + bridge_settings_name__); +} + +/// There is an available HMD tracker and it's not assigned to head +struct StatusUnassignedHMD FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StatusUnassignedHMDBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TRACKER_ID = 4 + }; + const solarxr_protocol::datatypes::TrackerId *tracker_id() const { + return GetPointer(VT_TRACKER_ID); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_TRACKER_ID) && + verifier.VerifyTable(tracker_id()) && + verifier.EndTable(); + } +}; + +struct StatusUnassignedHMDBuilder { + typedef StatusUnassignedHMD Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_tracker_id(flatbuffers::Offset tracker_id) { + fbb_.AddOffset(StatusUnassignedHMD::VT_TRACKER_ID, tracker_id); + } + explicit StatusUnassignedHMDBuilder(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 CreateStatusUnassignedHMD( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset tracker_id = 0) { + StatusUnassignedHMDBuilder builder_(_fbb); + builder_.add_tracker_id(tracker_id); + return builder_.Finish(); +} + +/// Request current statuses that we have +struct StatusSystemRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StatusSystemRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct StatusSystemRequestBuilder { + typedef StatusSystemRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit StatusSystemRequestBuilder(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 CreateStatusSystemRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + StatusSystemRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +/// Response containing all current valid statuses +struct StatusSystemResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StatusSystemResponseBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_CURRENT_STATUSES = 4 + }; + const flatbuffers::Vector> *current_statuses() const { + return GetPointer> *>(VT_CURRENT_STATUSES); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_CURRENT_STATUSES) && + verifier.VerifyVector(current_statuses()) && + verifier.VerifyVectorOfTables(current_statuses()) && + verifier.EndTable(); + } +}; + +struct StatusSystemResponseBuilder { + typedef StatusSystemResponse Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_current_statuses(flatbuffers::Offset>> current_statuses) { + fbb_.AddOffset(StatusSystemResponse::VT_CURRENT_STATUSES, current_statuses); + } + explicit StatusSystemResponseBuilder(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 CreateStatusSystemResponse( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset>> current_statuses = 0) { + StatusSystemResponseBuilder builder_(_fbb); + builder_.add_current_statuses(current_statuses); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateStatusSystemResponseDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector> *current_statuses = nullptr) { + auto current_statuses__ = current_statuses ? _fbb.CreateVector>(*current_statuses) : 0; + return solarxr_protocol::rpc::CreateStatusSystemResponse( + _fbb, + current_statuses__); +} + +/// When a new status appears, it's sent alone +struct StatusSystemUpdate FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StatusSystemUpdateBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NEW_STATUS = 4 + }; + const solarxr_protocol::rpc::StatusMessage *new_status() const { + return GetPointer(VT_NEW_STATUS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_NEW_STATUS) && + verifier.VerifyTable(new_status()) && + verifier.EndTable(); + } +}; + +struct StatusSystemUpdateBuilder { + typedef StatusSystemUpdate Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_new_status(flatbuffers::Offset new_status) { + fbb_.AddOffset(StatusSystemUpdate::VT_NEW_STATUS, new_status); + } + explicit StatusSystemUpdateBuilder(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 CreateStatusSystemUpdate( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset new_status = 0) { + StatusSystemUpdateBuilder builder_(_fbb); + builder_.add_new_status(new_status); + return builder_.Finish(); +} + +/// When an status is fixed and it's removed, it's ID is sent +struct StatusSystemFixed FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StatusSystemFixedBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FIXED_STATUS_ID = 4 + }; + uint32_t fixed_status_id() const { + return GetField(VT_FIXED_STATUS_ID, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_FIXED_STATUS_ID, 4) && + verifier.EndTable(); + } +}; + +struct StatusSystemFixedBuilder { + typedef StatusSystemFixed Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_fixed_status_id(uint32_t fixed_status_id) { + fbb_.AddElement(StatusSystemFixed::VT_FIXED_STATUS_ID, fixed_status_id, 0); + } + explicit StatusSystemFixedBuilder(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 CreateStatusSystemFixed( + flatbuffers::FlatBufferBuilder &_fbb, + uint32_t fixed_status_id = 0) { + StatusSystemFixedBuilder builder_(_fbb); + builder_.add_fixed_status_id(fixed_status_id); + return builder_.Finish(); +} + +/// An status is some kind of warning sent by the server, it's mainly made for +/// showing problems with the server and need attention from the user. +struct StatusMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StatusMessageBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ID = 4, + VT_PRIORITIZED = 6, + VT_DATA_TYPE = 8, + VT_DATA = 10 + }; + /// The status ID + uint32_t id() const { + return GetField(VT_ID, 0); + } + /// This should be prioritized in the GUI in some way if true + bool prioritized() const { + return GetField(VT_PRIORITIZED, 0) != 0; + } + solarxr_protocol::rpc::StatusData data_type() const { + return static_cast(GetField(VT_DATA_TYPE, 0)); + } + const void *data() const { + return GetPointer(VT_DATA); + } + template const T *data_as() const; + const solarxr_protocol::rpc::StatusTrackerReset *data_as_StatusTrackerReset() const { + return data_type() == solarxr_protocol::rpc::StatusData::StatusTrackerReset ? static_cast(data()) : nullptr; + } + const solarxr_protocol::rpc::StatusTrackerError *data_as_StatusTrackerError() const { + return data_type() == solarxr_protocol::rpc::StatusData::StatusTrackerError ? static_cast(data()) : nullptr; + } + const solarxr_protocol::rpc::StatusSteamVRDisconnected *data_as_StatusSteamVRDisconnected() const { + return data_type() == solarxr_protocol::rpc::StatusData::StatusSteamVRDisconnected ? static_cast(data()) : nullptr; + } + const solarxr_protocol::rpc::StatusUnassignedHMD *data_as_StatusUnassignedHMD() const { + return data_type() == solarxr_protocol::rpc::StatusData::StatusUnassignedHMD ? static_cast(data()) : nullptr; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ID, 4) && + VerifyField(verifier, VT_PRIORITIZED, 1) && + VerifyField(verifier, VT_DATA_TYPE, 1) && + VerifyOffset(verifier, VT_DATA) && + VerifyStatusData(verifier, data(), data_type()) && + verifier.EndTable(); + } +}; + +template<> inline const solarxr_protocol::rpc::StatusTrackerReset *StatusMessage::data_as() const { + return data_as_StatusTrackerReset(); +} + +template<> inline const solarxr_protocol::rpc::StatusTrackerError *StatusMessage::data_as() const { + return data_as_StatusTrackerError(); +} + +template<> inline const solarxr_protocol::rpc::StatusSteamVRDisconnected *StatusMessage::data_as() const { + return data_as_StatusSteamVRDisconnected(); +} + +template<> inline const solarxr_protocol::rpc::StatusUnassignedHMD *StatusMessage::data_as() const { + return data_as_StatusUnassignedHMD(); +} + +struct StatusMessageBuilder { + typedef StatusMessage Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_id(uint32_t id) { + fbb_.AddElement(StatusMessage::VT_ID, id, 0); + } + void add_prioritized(bool prioritized) { + fbb_.AddElement(StatusMessage::VT_PRIORITIZED, static_cast(prioritized), 0); + } + void add_data_type(solarxr_protocol::rpc::StatusData data_type) { + fbb_.AddElement(StatusMessage::VT_DATA_TYPE, static_cast(data_type), 0); + } + void add_data(flatbuffers::Offset data) { + fbb_.AddOffset(StatusMessage::VT_DATA, data); + } + explicit StatusMessageBuilder(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 CreateStatusMessage( + flatbuffers::FlatBufferBuilder &_fbb, + uint32_t id = 0, + bool prioritized = false, + solarxr_protocol::rpc::StatusData data_type = solarxr_protocol::rpc::StatusData::NONE, + flatbuffers::Offset data = 0) { + StatusMessageBuilder builder_(_fbb); + builder_.add_data(data); + builder_.add_id(id); + builder_.add_data_type(data_type); + builder_.add_prioritized(prioritized); + return builder_.Finish(); +} + +struct SetPauseTrackingRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SetPauseTrackingRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_PAUSETRACKING = 4 + }; + /// Pauses skeleton tracking if true, resumes skeleton tracking if false. + bool pauseTracking() const { + return GetField(VT_PAUSETRACKING, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_PAUSETRACKING, 1) && + verifier.EndTable(); + } +}; + +struct SetPauseTrackingRequestBuilder { + typedef SetPauseTrackingRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_pauseTracking(bool pauseTracking) { + fbb_.AddElement(SetPauseTrackingRequest::VT_PAUSETRACKING, static_cast(pauseTracking), 0); + } + explicit SetPauseTrackingRequestBuilder(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 CreateSetPauseTrackingRequest( + flatbuffers::FlatBufferBuilder &_fbb, + bool pauseTracking = false) { + SetPauseTrackingRequestBuilder builder_(_fbb); + builder_.add_pauseTracking(pauseTracking); + return builder_.Finish(); +} + +/// Clears mounting reset data, defaulting to the manually set mounting orientations +struct ClearMountingResetRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ClearMountingResetRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct ClearMountingResetRequestBuilder { + typedef ClearMountingResetRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit ClearMountingResetRequestBuilder(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 CreateClearMountingResetRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + ClearMountingResetRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +/// Used for the server to save a file and have it prompt in the user side +struct SaveFileNotification FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SaveFileNotificationBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DATA = 4, + VT_MIME_TYPE = 6, + VT_FILE_EXTENSION = 8, + VT_EXPECTED_DIR = 10, + VT_EXPECTED_FILENAME = 12 + }; + /// Binary data of the file + const flatbuffers::Vector *data() const { + return GetPointer *>(VT_DATA); + } + /// MIME type of file if one exists, use `file_extension` otherwise + const flatbuffers::String *mime_type() const { + return GetPointer(VT_MIME_TYPE); + } + /// Use MIME type preferably if one exists + const flatbuffers::String *file_extension() const { + return GetPointer(VT_FILE_EXTENSION); + } + /// Directory recommended to save the file on + flatbuffers::Optional expected_dir() const { + return GetOptional(VT_EXPECTED_DIR); + } + /// Recommended filename + const flatbuffers::String *expected_filename() const { + return GetPointer(VT_EXPECTED_FILENAME); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_DATA) && + verifier.VerifyVector(data()) && + VerifyOffset(verifier, VT_MIME_TYPE) && + verifier.VerifyString(mime_type()) && + VerifyOffset(verifier, VT_FILE_EXTENSION) && + verifier.VerifyString(file_extension()) && + VerifyField(verifier, VT_EXPECTED_DIR, 1) && + VerifyOffset(verifier, VT_EXPECTED_FILENAME) && + verifier.VerifyString(expected_filename()) && + verifier.EndTable(); + } +}; + +struct SaveFileNotificationBuilder { + typedef SaveFileNotification Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_data(flatbuffers::Offset> data) { + fbb_.AddOffset(SaveFileNotification::VT_DATA, data); + } + void add_mime_type(flatbuffers::Offset mime_type) { + fbb_.AddOffset(SaveFileNotification::VT_MIME_TYPE, mime_type); + } + void add_file_extension(flatbuffers::Offset file_extension) { + fbb_.AddOffset(SaveFileNotification::VT_FILE_EXTENSION, file_extension); + } + void add_expected_dir(solarxr_protocol::rpc::ComputerDirectory expected_dir) { + fbb_.AddElement(SaveFileNotification::VT_EXPECTED_DIR, static_cast(expected_dir)); + } + void add_expected_filename(flatbuffers::Offset expected_filename) { + fbb_.AddOffset(SaveFileNotification::VT_EXPECTED_FILENAME, expected_filename); + } + explicit SaveFileNotificationBuilder(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 CreateSaveFileNotification( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> data = 0, + flatbuffers::Offset mime_type = 0, + flatbuffers::Offset file_extension = 0, + flatbuffers::Optional expected_dir = flatbuffers::nullopt, + flatbuffers::Offset expected_filename = 0) { + SaveFileNotificationBuilder builder_(_fbb); + builder_.add_expected_filename(expected_filename); + builder_.add_file_extension(file_extension); + builder_.add_mime_type(mime_type); + builder_.add_data(data); + if(expected_dir) { builder_.add_expected_dir(*expected_dir); } + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateSaveFileNotificationDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *data = nullptr, + const char *mime_type = nullptr, + const char *file_extension = nullptr, + flatbuffers::Optional expected_dir = flatbuffers::nullopt, + const char *expected_filename = nullptr) { + auto data__ = data ? _fbb.CreateVector(*data) : 0; + auto mime_type__ = mime_type ? _fbb.CreateString(mime_type) : 0; + auto file_extension__ = file_extension ? _fbb.CreateString(file_extension) : 0; + auto expected_filename__ = expected_filename ? _fbb.CreateString(expected_filename) : 0; + return solarxr_protocol::rpc::CreateSaveFileNotification( + _fbb, + data__, + mime_type__, + file_extension__, + expected_dir, + expected_filename__); +} + +struct SerialDevicePort FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SerialDevicePortBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_PORT = 4 + }; + const flatbuffers::String *port() const { + return GetPointer(VT_PORT); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_PORT) && + verifier.VerifyString(port()) && + verifier.EndTable(); + } +}; + +struct SerialDevicePortBuilder { + typedef SerialDevicePort Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_port(flatbuffers::Offset port) { + fbb_.AddOffset(SerialDevicePort::VT_PORT, port); + } + explicit SerialDevicePortBuilder(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 CreateSerialDevicePort( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset port = 0) { + SerialDevicePortBuilder builder_(_fbb); + builder_.add_port(port); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateSerialDevicePortDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *port = nullptr) { + auto port__ = port ? _fbb.CreateString(port) : 0; + return solarxr_protocol::rpc::CreateSerialDevicePort( + _fbb, + port__); +} + +struct FirmwarePart FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef FirmwarePartBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_URL = 4, + VT_OFFSET = 6 + }; + /// Url of the firmware bin to download + const flatbuffers::String *url() const { + return GetPointer(VT_URL); + } + /// Offset of the firmware, used when flashing to the mcu, it indicates where to write this file in memory + /// Will be ignored in the case of OTA flashing + uint32_t offset() const { + return GetField(VT_OFFSET, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_URL) && + verifier.VerifyString(url()) && + VerifyField(verifier, VT_OFFSET, 4) && + verifier.EndTable(); + } +}; + +struct FirmwarePartBuilder { + typedef FirmwarePart Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_url(flatbuffers::Offset url) { + fbb_.AddOffset(FirmwarePart::VT_URL, url); + } + void add_offset(uint32_t offset) { + fbb_.AddElement(FirmwarePart::VT_OFFSET, offset, 0); + } + explicit FirmwarePartBuilder(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 CreateFirmwarePart( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset url = 0, + uint32_t offset = 0) { + FirmwarePartBuilder builder_(_fbb); + builder_.add_offset(offset); + builder_.add_url(url); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateFirmwarePartDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *url = nullptr, + uint32_t offset = 0) { + auto url__ = url ? _fbb.CreateString(url) : 0; + return solarxr_protocol::rpc::CreateFirmwarePart( + _fbb, + url__, + offset); +} + +struct FirmwareUpdateRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef FirmwareUpdateRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_METHOD_TYPE = 4, + VT_METHOD = 6 + }; + solarxr_protocol::rpc::FirmwareUpdateMethod method_type() const { + return static_cast(GetField(VT_METHOD_TYPE, 0)); + } + const void *method() const { + return GetPointer(VT_METHOD); + } + template const T *method_as() const; + const solarxr_protocol::rpc::OTAFirmwareUpdate *method_as_OTAFirmwareUpdate() const { + return method_type() == solarxr_protocol::rpc::FirmwareUpdateMethod::OTAFirmwareUpdate ? static_cast(method()) : nullptr; + } + const solarxr_protocol::rpc::SerialFirmwareUpdate *method_as_SerialFirmwareUpdate() const { + return method_type() == solarxr_protocol::rpc::FirmwareUpdateMethod::SerialFirmwareUpdate ? static_cast(method()) : nullptr; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_METHOD_TYPE, 1) && + VerifyOffset(verifier, VT_METHOD) && + VerifyFirmwareUpdateMethod(verifier, method(), method_type()) && + verifier.EndTable(); + } +}; + +template<> inline const solarxr_protocol::rpc::OTAFirmwareUpdate *FirmwareUpdateRequest::method_as() const { + return method_as_OTAFirmwareUpdate(); +} + +template<> inline const solarxr_protocol::rpc::SerialFirmwareUpdate *FirmwareUpdateRequest::method_as() const { + return method_as_SerialFirmwareUpdate(); +} + +struct FirmwareUpdateRequestBuilder { + typedef FirmwareUpdateRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_method_type(solarxr_protocol::rpc::FirmwareUpdateMethod method_type) { + fbb_.AddElement(FirmwareUpdateRequest::VT_METHOD_TYPE, static_cast(method_type), 0); + } + void add_method(flatbuffers::Offset method) { + fbb_.AddOffset(FirmwareUpdateRequest::VT_METHOD, method); + } + explicit FirmwareUpdateRequestBuilder(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 CreateFirmwareUpdateRequest( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::rpc::FirmwareUpdateMethod method_type = solarxr_protocol::rpc::FirmwareUpdateMethod::NONE, + flatbuffers::Offset method = 0) { + FirmwareUpdateRequestBuilder builder_(_fbb); + builder_.add_method(method); + builder_.add_method_type(method_type); + return builder_.Finish(); +} + +struct OTAFirmwareUpdate FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef OTAFirmwareUpdateBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DEVICE_ID = 4, + VT_FIRMWARE_PART = 6 + }; + /// id of the device, this refer to the actual DeviceId from the protocol + const solarxr_protocol::datatypes::DeviceId *device_id() const { + return GetStruct(VT_DEVICE_ID); + } + /// A table containing the url and offset of the firmware bin file + const solarxr_protocol::rpc::FirmwarePart *firmware_part() const { + return GetPointer(VT_FIRMWARE_PART); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_DEVICE_ID, 1) && + VerifyOffset(verifier, VT_FIRMWARE_PART) && + verifier.VerifyTable(firmware_part()) && + verifier.EndTable(); + } +}; + +struct OTAFirmwareUpdateBuilder { + typedef OTAFirmwareUpdate Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_device_id(const solarxr_protocol::datatypes::DeviceId *device_id) { + fbb_.AddStruct(OTAFirmwareUpdate::VT_DEVICE_ID, device_id); + } + void add_firmware_part(flatbuffers::Offset firmware_part) { + fbb_.AddOffset(OTAFirmwareUpdate::VT_FIRMWARE_PART, firmware_part); + } + explicit OTAFirmwareUpdateBuilder(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 CreateOTAFirmwareUpdate( + flatbuffers::FlatBufferBuilder &_fbb, + const solarxr_protocol::datatypes::DeviceId *device_id = nullptr, + flatbuffers::Offset firmware_part = 0) { + OTAFirmwareUpdateBuilder builder_(_fbb); + builder_.add_firmware_part(firmware_part); + builder_.add_device_id(device_id); + return builder_.Finish(); +} + +struct SerialFirmwareUpdate FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SerialFirmwareUpdateBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DEVICE_ID = 4, + VT_NEEDMANUALREBOOT = 6, + VT_SSID = 8, + VT_PASSWORD = 10, + VT_FIRMWARE_PART = 12 + }; + /// id of the device, this refer to a serial port id + const solarxr_protocol::rpc::SerialDevicePort *device_id() const { + return GetPointer(VT_DEVICE_ID); + } + /// Will make the server ask for the tracker to be manually rebooted by the user + /// after the tracker is done flashing + bool needManualReboot() const { + return GetField(VT_NEEDMANUALREBOOT, 0) != 0; + } + /// Credentials to provision after the flashing + /// Only used with Serial flashing, because OTA is already connected to the wifi + const flatbuffers::String *ssid() const { + return GetPointer(VT_SSID); + } + const flatbuffers::String *password() const { + return GetPointer(VT_PASSWORD); + } + /// A list of urls and offsets of the different firmware files to flash + const flatbuffers::Vector> *firmware_part() const { + return GetPointer> *>(VT_FIRMWARE_PART); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_DEVICE_ID) && + verifier.VerifyTable(device_id()) && + VerifyField(verifier, VT_NEEDMANUALREBOOT, 1) && + VerifyOffset(verifier, VT_SSID) && + verifier.VerifyString(ssid()) && + VerifyOffset(verifier, VT_PASSWORD) && + verifier.VerifyString(password()) && + VerifyOffset(verifier, VT_FIRMWARE_PART) && + verifier.VerifyVector(firmware_part()) && + verifier.VerifyVectorOfTables(firmware_part()) && + verifier.EndTable(); + } +}; + +struct SerialFirmwareUpdateBuilder { + typedef SerialFirmwareUpdate Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_device_id(flatbuffers::Offset device_id) { + fbb_.AddOffset(SerialFirmwareUpdate::VT_DEVICE_ID, device_id); + } + void add_needManualReboot(bool needManualReboot) { + fbb_.AddElement(SerialFirmwareUpdate::VT_NEEDMANUALREBOOT, static_cast(needManualReboot), 0); + } + void add_ssid(flatbuffers::Offset ssid) { + fbb_.AddOffset(SerialFirmwareUpdate::VT_SSID, ssid); + } + void add_password(flatbuffers::Offset password) { + fbb_.AddOffset(SerialFirmwareUpdate::VT_PASSWORD, password); + } + void add_firmware_part(flatbuffers::Offset>> firmware_part) { + fbb_.AddOffset(SerialFirmwareUpdate::VT_FIRMWARE_PART, firmware_part); + } + explicit SerialFirmwareUpdateBuilder(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 CreateSerialFirmwareUpdate( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset device_id = 0, + bool needManualReboot = false, + flatbuffers::Offset ssid = 0, + flatbuffers::Offset password = 0, + flatbuffers::Offset>> firmware_part = 0) { + SerialFirmwareUpdateBuilder builder_(_fbb); + builder_.add_firmware_part(firmware_part); + builder_.add_password(password); + builder_.add_ssid(ssid); + builder_.add_device_id(device_id); + builder_.add_needManualReboot(needManualReboot); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateSerialFirmwareUpdateDirect( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset device_id = 0, + bool needManualReboot = false, + const char *ssid = nullptr, + const char *password = nullptr, + const std::vector> *firmware_part = nullptr) { + auto ssid__ = ssid ? _fbb.CreateString(ssid) : 0; + auto password__ = password ? _fbb.CreateString(password) : 0; + auto firmware_part__ = firmware_part ? _fbb.CreateVector>(*firmware_part) : 0; + return solarxr_protocol::rpc::CreateSerialFirmwareUpdate( + _fbb, + device_id, + needManualReboot, + ssid__, + password__, + firmware_part__); +} + +struct FirmwareUpdateStatusResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef FirmwareUpdateStatusResponseBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DEVICE_ID_TYPE = 4, + VT_DEVICE_ID = 6, + VT_STATUS = 8, + VT_PROGRESS = 10 + }; + solarxr_protocol::rpc::FirmwareUpdateDeviceId device_id_type() const { + return static_cast(GetField(VT_DEVICE_ID_TYPE, 0)); + } + const void *device_id() const { + return GetPointer(VT_DEVICE_ID); + } + template const T *device_id_as() const; + const solarxr_protocol::datatypes::DeviceIdTable *device_id_as_solarxr_protocol_datatypes_DeviceIdTable() const { + return device_id_type() == solarxr_protocol::rpc::FirmwareUpdateDeviceId::solarxr_protocol_datatypes_DeviceIdTable ? static_cast(device_id()) : nullptr; + } + const solarxr_protocol::rpc::SerialDevicePort *device_id_as_SerialDevicePort() const { + return device_id_type() == solarxr_protocol::rpc::FirmwareUpdateDeviceId::SerialDevicePort ? static_cast(device_id()) : nullptr; + } + solarxr_protocol::rpc::FirmwareUpdateStatus status() const { + return static_cast(GetField(VT_STATUS, 0)); + } + /// from 0 to 100 + int8_t progress() const { + return GetField(VT_PROGRESS, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_DEVICE_ID_TYPE, 1) && + VerifyOffset(verifier, VT_DEVICE_ID) && + VerifyFirmwareUpdateDeviceId(verifier, device_id(), device_id_type()) && + VerifyField(verifier, VT_STATUS, 1) && + VerifyField(verifier, VT_PROGRESS, 1) && + verifier.EndTable(); + } +}; + +template<> inline const solarxr_protocol::datatypes::DeviceIdTable *FirmwareUpdateStatusResponse::device_id_as() const { + return device_id_as_solarxr_protocol_datatypes_DeviceIdTable(); +} + +template<> inline const solarxr_protocol::rpc::SerialDevicePort *FirmwareUpdateStatusResponse::device_id_as() const { + return device_id_as_SerialDevicePort(); +} + +struct FirmwareUpdateStatusResponseBuilder { + typedef FirmwareUpdateStatusResponse Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_device_id_type(solarxr_protocol::rpc::FirmwareUpdateDeviceId device_id_type) { + fbb_.AddElement(FirmwareUpdateStatusResponse::VT_DEVICE_ID_TYPE, static_cast(device_id_type), 0); + } + void add_device_id(flatbuffers::Offset device_id) { + fbb_.AddOffset(FirmwareUpdateStatusResponse::VT_DEVICE_ID, device_id); + } + void add_status(solarxr_protocol::rpc::FirmwareUpdateStatus status) { + fbb_.AddElement(FirmwareUpdateStatusResponse::VT_STATUS, static_cast(status), 0); + } + void add_progress(int8_t progress) { + fbb_.AddElement(FirmwareUpdateStatusResponse::VT_PROGRESS, progress, 0); + } + explicit FirmwareUpdateStatusResponseBuilder(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 CreateFirmwareUpdateStatusResponse( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::rpc::FirmwareUpdateDeviceId device_id_type = solarxr_protocol::rpc::FirmwareUpdateDeviceId::NONE, + flatbuffers::Offset device_id = 0, + solarxr_protocol::rpc::FirmwareUpdateStatus status = solarxr_protocol::rpc::FirmwareUpdateStatus::DOWNLOADING, + int8_t progress = 0) { + FirmwareUpdateStatusResponseBuilder builder_(_fbb); + builder_.add_device_id(device_id); + builder_.add_progress(progress); + builder_.add_status(status); + builder_.add_device_id_type(device_id_type); + return builder_.Finish(); +} + +struct FirmwareUpdateStopQueuesRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef FirmwareUpdateStopQueuesRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct FirmwareUpdateStopQueuesRequestBuilder { + typedef FirmwareUpdateStopQueuesRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit FirmwareUpdateStopQueuesRequestBuilder(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 CreateFirmwareUpdateStopQueuesRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + FirmwareUpdateStopQueuesRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +/// Requests the current state of tracking pause +struct TrackingPauseStateRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TrackingPauseStateRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct TrackingPauseStateRequestBuilder { + typedef TrackingPauseStateRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit TrackingPauseStateRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateTrackingPauseStateRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + TrackingPauseStateRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +struct TrackingPauseStateResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TrackingPauseStateResponseBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TRACKINGPAUSED = 4 + }; + /// Skeleton tracking is paused if true, skeleton tracking is unpaused if false. + bool trackingPaused() const { + return GetField(VT_TRACKINGPAUSED, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_TRACKINGPAUSED, 1) && + verifier.EndTable(); + } +}; + +struct TrackingPauseStateResponseBuilder { + typedef TrackingPauseStateResponse Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_trackingPaused(bool trackingPaused) { + fbb_.AddElement(TrackingPauseStateResponse::VT_TRACKINGPAUSED, static_cast(trackingPaused), 0); + } + explicit TrackingPauseStateResponseBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateTrackingPauseStateResponse( + flatbuffers::FlatBufferBuilder &_fbb, + bool trackingPaused = false) { + TrackingPauseStateResponseBuilder builder_(_fbb); + builder_.add_trackingPaused(trackingPaused); + return builder_.Finish(); +} + +/// Sends the GET WIFISCAN cmd to the current tracker on the serial monitor +struct SerialTrackerGetWifiScanRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SerialTrackerGetWifiScanRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct SerialTrackerGetWifiScanRequestBuilder { + typedef SerialTrackerGetWifiScanRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SerialTrackerGetWifiScanRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateSerialTrackerGetWifiScanRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + SerialTrackerGetWifiScanRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +/// Server notifies connection of an unknown device. +/// If the notification is no longer sent, it means the device connected to another +/// server, got connected to this server or it was turned off. +struct UnknownDeviceHandshakeNotification FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef UnknownDeviceHandshakeNotificationBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_MAC_ADDRESS = 4 + }; + const flatbuffers::String *mac_address() const { + return GetPointer(VT_MAC_ADDRESS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_MAC_ADDRESS) && + verifier.VerifyString(mac_address()) && + verifier.EndTable(); + } +}; + +struct UnknownDeviceHandshakeNotificationBuilder { + typedef UnknownDeviceHandshakeNotification Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_mac_address(flatbuffers::Offset mac_address) { + fbb_.AddOffset(UnknownDeviceHandshakeNotification::VT_MAC_ADDRESS, mac_address); + } + explicit UnknownDeviceHandshakeNotificationBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateUnknownDeviceHandshakeNotification( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset mac_address = 0) { + UnknownDeviceHandshakeNotificationBuilder builder_(_fbb); + builder_.add_mac_address(mac_address); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateUnknownDeviceHandshakeNotificationDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *mac_address = nullptr) { + auto mac_address__ = mac_address ? _fbb.CreateString(mac_address) : 0; + return solarxr_protocol::rpc::CreateUnknownDeviceHandshakeNotification( + _fbb, + mac_address__); +} + +struct AddUnknownDeviceRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AddUnknownDeviceRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_MAC_ADDRESS = 4 + }; + const flatbuffers::String *mac_address() const { + return GetPointer(VT_MAC_ADDRESS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_MAC_ADDRESS) && + verifier.VerifyString(mac_address()) && + verifier.EndTable(); + } +}; + +struct AddUnknownDeviceRequestBuilder { + typedef AddUnknownDeviceRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_mac_address(flatbuffers::Offset mac_address) { + fbb_.AddOffset(AddUnknownDeviceRequest::VT_MAC_ADDRESS, mac_address); + } + explicit AddUnknownDeviceRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateAddUnknownDeviceRequest( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset mac_address = 0) { + AddUnknownDeviceRequestBuilder builder_(_fbb); + builder_.add_mac_address(mac_address); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateAddUnknownDeviceRequestDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *mac_address = nullptr) { + auto mac_address__ = mac_address ? _fbb.CreateString(mac_address) : 0; + return solarxr_protocol::rpc::CreateAddUnknownDeviceRequest( + _fbb, + mac_address__); +} + +struct ForgetDeviceRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ForgetDeviceRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_MAC_ADDRESS = 4 + }; + const flatbuffers::String *mac_address() const { + return GetPointer(VT_MAC_ADDRESS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_MAC_ADDRESS) && + verifier.VerifyString(mac_address()) && + verifier.EndTable(); + } +}; + +struct ForgetDeviceRequestBuilder { + typedef ForgetDeviceRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_mac_address(flatbuffers::Offset mac_address) { + fbb_.AddOffset(ForgetDeviceRequest::VT_MAC_ADDRESS, mac_address); + } + explicit ForgetDeviceRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateForgetDeviceRequest( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset mac_address = 0) { + ForgetDeviceRequestBuilder builder_(_fbb); + builder_.add_mac_address(mac_address); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateForgetDeviceRequestDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *mac_address = nullptr) { + auto mac_address__ = mac_address ? _fbb.CreateString(mac_address) : 0; + return solarxr_protocol::rpc::CreateForgetDeviceRequest( + _fbb, + mac_address__); +} + +} // namespace rpc + +namespace pub_sub { + +/// 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(); +} + +/// 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 { + 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(); +} + +/// 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_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 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::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) && + 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::TopicMapping *PubSubHeader::u_as() const { + return u_as_TopicMapping(); +} + +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::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; + } + 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::StringTable *Message::payload_as() const { + return payload_as_solarxr_protocol_datatypes_StringTable(); +} + +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(); +} + +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::ResetResponse: { + 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::ClearDriftCompensationRequest: { + 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); + } + case RpcMessage::SerialDevicesRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::SerialDevicesResponse: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::NewSerialDeviceResponse: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::StartWifiProvisioningRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::StopWifiProvisioningRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::WifiProvisioningStatusResponse: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::ServerInfosRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::ServerInfosResponse: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::LegTweaksTmpChange: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::LegTweaksTmpClear: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::TapDetectionSetupNotification: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::SetPauseTrackingRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::StatusSystemRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::StatusSystemResponse: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::StatusSystemUpdate: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::StatusSystemFixed: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::ClearMountingResetRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::HeightRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::HeightResponse: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::AutoBoneApplyRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::AutoBoneStopRecordingRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::AutoBoneCancelRecordingRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::SaveFileNotification: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::TrackingPauseStateRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::TrackingPauseStateResponse: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::SerialTrackerGetWifiScanRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::UnknownDeviceHandshakeNotification: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::AddUnknownDeviceRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::ForgetDeviceRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::FirmwareUpdateRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::FirmwareUpdateStatusResponse: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::FirmwareUpdateStopQueuesRequest: { + 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; +} + +inline bool VerifyStatusData(flatbuffers::Verifier &verifier, const void *obj, StatusData type) { + switch (type) { + case StatusData::NONE: { + return true; + } + case StatusData::StatusTrackerReset: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case StatusData::StatusTrackerError: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case StatusData::StatusSteamVRDisconnected: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case StatusData::StatusUnassignedHMD: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + default: return true; + } +} + +inline bool VerifyStatusDataVector(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 (!VerifyStatusData( + verifier, values->Get(i), types->GetEnum(i))) { + return false; + } + } + return true; +} + +inline bool VerifyFirmwareUpdateDeviceId(flatbuffers::Verifier &verifier, const void *obj, FirmwareUpdateDeviceId type) { + switch (type) { + case FirmwareUpdateDeviceId::NONE: { + return true; + } + case FirmwareUpdateDeviceId::solarxr_protocol_datatypes_DeviceIdTable: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case FirmwareUpdateDeviceId::SerialDevicePort: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + default: return true; + } +} + +inline bool VerifyFirmwareUpdateDeviceIdVector(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 (!VerifyFirmwareUpdateDeviceId( + verifier, values->Get(i), types->GetEnum(i))) { + return false; + } + } + return true; +} + +inline bool VerifyFirmwareUpdateMethod(flatbuffers::Verifier &verifier, const void *obj, FirmwareUpdateMethod type) { + switch (type) { + case FirmwareUpdateMethod::NONE: { + return true; + } + case FirmwareUpdateMethod::OTAFirmwareUpdate: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case FirmwareUpdateMethod::SerialFirmwareUpdate: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + default: return true; + } +} + +inline bool VerifyFirmwareUpdateMethodVector(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 (!VerifyFirmwareUpdateMethod( + 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::TopicMapping: { + 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_StringTable: { + 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 052e1d86..777feb3a 100644 --- a/protocol/java/src/solarxr_protocol/MessageBundle.java +++ b/protocol/java/src/solarxr_protocol/MessageBundle.java @@ -1,116 +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_22_10_26(); } - 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); - } -} - +// 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_22_10_26(); } + 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 00805f50..1f456d67 100644 --- a/protocol/java/src/solarxr_protocol/MessageBundleT.java +++ b/protocol/java/src/solarxr_protocol/MessageBundleT.java @@ -1,34 +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; - 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; - } -} - +// 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 50ce5072..44d027b6 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_22_10_26(); } - 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_22_10_26(); } + 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 a175e794..9955c284 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 d68c27a6..ab050765 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_22_10_26(); } - 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_22_10_26(); } + 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()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfigT.java b/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfigT.java index ee6db767..12f3ec55 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 229b3a64..70633f5f 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 29078571..8573fb85 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_22_10_26(); } - 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_22_10_26(); } + 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 39d954f5..c94a3600 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 9fb58f3a..73ba956f 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 6d47a5b6..016d85d3 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_22_10_26(); } - 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_22_10_26(); } + 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 0f1eca25..e52c7b1c 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 b008a7eb..e45188a1 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_22_10_26(); } - 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_22_10_26(); } + 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 607aefe2..bfb21c9f 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 e03423c8..8b15f353 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_22_10_26(); } - 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_22_10_26(); } + 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 0e169ac7..c3cfa585 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 bcdd6cef..e18e7b95 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_22_10_26(); } - 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_22_10_26(); } + 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); + } +} + 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 637c0be2..c8619605 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_22_10_26(); } - 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_22_10_26(); } + 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()); + } +} + 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 3e8f8e68..94bfac28 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 071bc66a..20c1c573 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 7ecce00d..359f6192 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerData.java +++ b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerData.java @@ -1,161 +1,161 @@ -// 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_22_10_26(); } - 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; } - /** - * Sensor rotation after fusion - */ - 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 angular velocity, in euler angles, rad/s - */ - public solarxr_protocol.datatypes.math.Vec3f rawAngularVelocity() { return rawAngularVelocity(new solarxr_protocol.datatypes.math.Vec3f()); } - public solarxr_protocol.datatypes.math.Vec3f rawAngularVelocity(solarxr_protocol.datatypes.math.Vec3f obj) { int o = __offset(14); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - /** - * Raw acceleration, in m/s^2 - */ - public solarxr_protocol.datatypes.math.Vec3f rawAcceleration() { return rawAcceleration(new solarxr_protocol.datatypes.math.Vec3f()); } - public solarxr_protocol.datatypes.math.Vec3f rawAcceleration(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; } - /** - * Acceleration without gravity, in m/s^2 - */ - public solarxr_protocol.datatypes.math.Vec3f linearAcceleration() { return linearAcceleration(new solarxr_protocol.datatypes.math.Vec3f()); } - public solarxr_protocol.datatypes.math.Vec3f linearAcceleration(solarxr_protocol.datatypes.math.Vec3f obj) { int o = __offset(20); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - /** - * Reference-adjusted rotation for IMU-only trackers (VR HMD yaw is used as a reset reference). - * In other words, a rotation that is aligned to a reliable source of rotation ((0, VR HMD YAW, 0)), - * triggered after user input (using reset buttons). - * This is a SlimeVR-specific field and computed exclusively by SlimeVR server. - * Includes: mounting orientation, full, quick and mounting reset adjustments. - * This rotation can be used to reconstruct a skeleton pose using forward kinematics. - */ - public solarxr_protocol.datatypes.math.Quat rotationReferenceAdjusted() { return rotationReferenceAdjusted(new solarxr_protocol.datatypes.math.Quat()); } - public solarxr_protocol.datatypes.math.Quat rotationReferenceAdjusted(solarxr_protocol.datatypes.math.Quat obj) { int o = __offset(22); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - /** - * Zero-reference-adjusted rotation for IMU-only trackers (identity quaternion is used as a reset reference). - * In other words, a rotation that is aligned to a zero vector ((0, 0, 0)) by - * inverting the current rotation, triggered after user input (using reset buttons). - * This is a SlimeVR-specific field and computed exclusively by SlimeVR server. - * Includes: only full and quick reset adjustments. - * This rotation can be used in visualizations for IMU debugging. - */ - public solarxr_protocol.datatypes.math.Quat rotationIdentityAdjusted() { return rotationIdentityAdjusted(new solarxr_protocol.datatypes.math.Quat()); } - public solarxr_protocol.datatypes.math.Quat rotationIdentityAdjusted(solarxr_protocol.datatypes.math.Quat obj) { int o = __offset(24); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - /** - * Data ticks per second, processed by SlimeVR server - */ - public boolean hasTps() { return 0 != __offset(26); } - public int tps() { int o = __offset(26); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } - - public static void startTrackerData(FlatBufferBuilder builder) { builder.startTable(12); } - 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 addRawAngularVelocity(FlatBufferBuilder builder, int rawAngularVelocityOffset) { builder.addStruct(5, rawAngularVelocityOffset, 0); } - public static void addRawAcceleration(FlatBufferBuilder builder, int rawAccelerationOffset) { builder.addStruct(6, rawAccelerationOffset, 0); } - public static void addTemp(FlatBufferBuilder builder, int tempOffset) { builder.addStruct(7, tempOffset, 0); } - public static void addLinearAcceleration(FlatBufferBuilder builder, int linearAccelerationOffset) { builder.addStruct(8, linearAccelerationOffset, 0); } - public static void addRotationReferenceAdjusted(FlatBufferBuilder builder, int rotationReferenceAdjustedOffset) { builder.addStruct(9, rotationReferenceAdjustedOffset, 0); } - public static void addRotationIdentityAdjusted(FlatBufferBuilder builder, int rotationIdentityAdjustedOffset) { builder.addStruct(10, rotationIdentityAdjustedOffset, 0); } - public static void addTps(FlatBufferBuilder builder, int tps) { builder.addShort(11, (short) tps, (short) 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 (rawAngularVelocity() != null) rawAngularVelocity().unpackTo(_o.getRawAngularVelocity()); - else _o.setRawAngularVelocity(null); - if (rawAcceleration() != null) rawAcceleration().unpackTo(_o.getRawAcceleration()); - else _o.setRawAcceleration(null); - if (temp() != null) temp().unpackTo(_o.getTemp()); - else _o.setTemp(null); - if (linearAcceleration() != null) linearAcceleration().unpackTo(_o.getLinearAcceleration()); - else _o.setLinearAcceleration(null); - if (rotationReferenceAdjusted() != null) rotationReferenceAdjusted().unpackTo(_o.getRotationReferenceAdjusted()); - else _o.setRotationReferenceAdjusted(null); - if (rotationIdentityAdjusted() != null) rotationIdentityAdjusted().unpackTo(_o.getRotationIdentityAdjusted()); - else _o.setRotationIdentityAdjusted(null); - Integer _oTps = hasTps() ? tps() : null; - _o.setTps(_oTps); - } - 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())); - addRawAngularVelocity(builder, solarxr_protocol.datatypes.math.Vec3f.pack(builder, _o.getRawAngularVelocity())); - addRawAcceleration(builder, solarxr_protocol.datatypes.math.Vec3f.pack(builder, _o.getRawAcceleration())); - addTemp(builder, solarxr_protocol.datatypes.Temperature.pack(builder, _o.getTemp())); - addLinearAcceleration(builder, solarxr_protocol.datatypes.math.Vec3f.pack(builder, _o.getLinearAcceleration())); - addRotationReferenceAdjusted(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getRotationReferenceAdjusted())); - addRotationIdentityAdjusted(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getRotationIdentityAdjusted())); - if (_o.getTps() != null) { addTps(builder, _o.getTps()); } - 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_22_10_26(); } + 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; } + /** + * Sensor rotation after fusion + */ + 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 angular velocity, in euler angles, rad/s + */ + public solarxr_protocol.datatypes.math.Vec3f rawAngularVelocity() { return rawAngularVelocity(new solarxr_protocol.datatypes.math.Vec3f()); } + public solarxr_protocol.datatypes.math.Vec3f rawAngularVelocity(solarxr_protocol.datatypes.math.Vec3f obj) { int o = __offset(14); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + /** + * Raw acceleration, in m/s^2 + */ + public solarxr_protocol.datatypes.math.Vec3f rawAcceleration() { return rawAcceleration(new solarxr_protocol.datatypes.math.Vec3f()); } + public solarxr_protocol.datatypes.math.Vec3f rawAcceleration(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; } + /** + * Acceleration without gravity, in m/s^2 + */ + public solarxr_protocol.datatypes.math.Vec3f linearAcceleration() { return linearAcceleration(new solarxr_protocol.datatypes.math.Vec3f()); } + public solarxr_protocol.datatypes.math.Vec3f linearAcceleration(solarxr_protocol.datatypes.math.Vec3f obj) { int o = __offset(20); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + /** + * Reference-adjusted rotation for IMU-only trackers (VR HMD yaw is used as a reset reference). + * In other words, a rotation that is aligned to a reliable source of rotation ((0, VR HMD YAW, 0)), + * triggered after user input (using reset buttons). + * This is a SlimeVR-specific field and computed exclusively by SlimeVR server. + * Includes: mounting orientation, full, quick and mounting reset adjustments. + * This rotation can be used to reconstruct a skeleton pose using forward kinematics. + */ + public solarxr_protocol.datatypes.math.Quat rotationReferenceAdjusted() { return rotationReferenceAdjusted(new solarxr_protocol.datatypes.math.Quat()); } + public solarxr_protocol.datatypes.math.Quat rotationReferenceAdjusted(solarxr_protocol.datatypes.math.Quat obj) { int o = __offset(22); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + /** + * Zero-reference-adjusted rotation for IMU-only trackers (identity quaternion is used as a reset reference). + * In other words, a rotation that is aligned to a zero vector ((0, 0, 0)) by + * inverting the current rotation, triggered after user input (using reset buttons). + * This is a SlimeVR-specific field and computed exclusively by SlimeVR server. + * Includes: only full and quick reset adjustments. + * This rotation can be used in visualizations for IMU debugging. + */ + public solarxr_protocol.datatypes.math.Quat rotationIdentityAdjusted() { return rotationIdentityAdjusted(new solarxr_protocol.datatypes.math.Quat()); } + public solarxr_protocol.datatypes.math.Quat rotationIdentityAdjusted(solarxr_protocol.datatypes.math.Quat obj) { int o = __offset(24); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + /** + * Data ticks per second, processed by SlimeVR server + */ + public boolean hasTps() { return 0 != __offset(26); } + public int tps() { int o = __offset(26); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } + + public static void startTrackerData(FlatBufferBuilder builder) { builder.startTable(12); } + 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 addRawAngularVelocity(FlatBufferBuilder builder, int rawAngularVelocityOffset) { builder.addStruct(5, rawAngularVelocityOffset, 0); } + public static void addRawAcceleration(FlatBufferBuilder builder, int rawAccelerationOffset) { builder.addStruct(6, rawAccelerationOffset, 0); } + public static void addTemp(FlatBufferBuilder builder, int tempOffset) { builder.addStruct(7, tempOffset, 0); } + public static void addLinearAcceleration(FlatBufferBuilder builder, int linearAccelerationOffset) { builder.addStruct(8, linearAccelerationOffset, 0); } + public static void addRotationReferenceAdjusted(FlatBufferBuilder builder, int rotationReferenceAdjustedOffset) { builder.addStruct(9, rotationReferenceAdjustedOffset, 0); } + public static void addRotationIdentityAdjusted(FlatBufferBuilder builder, int rotationIdentityAdjustedOffset) { builder.addStruct(10, rotationIdentityAdjustedOffset, 0); } + public static void addTps(FlatBufferBuilder builder, int tps) { builder.addShort(11, (short) tps, (short) 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 (rawAngularVelocity() != null) rawAngularVelocity().unpackTo(_o.getRawAngularVelocity()); + else _o.setRawAngularVelocity(null); + if (rawAcceleration() != null) rawAcceleration().unpackTo(_o.getRawAcceleration()); + else _o.setRawAcceleration(null); + if (temp() != null) temp().unpackTo(_o.getTemp()); + else _o.setTemp(null); + if (linearAcceleration() != null) linearAcceleration().unpackTo(_o.getLinearAcceleration()); + else _o.setLinearAcceleration(null); + if (rotationReferenceAdjusted() != null) rotationReferenceAdjusted().unpackTo(_o.getRotationReferenceAdjusted()); + else _o.setRotationReferenceAdjusted(null); + if (rotationIdentityAdjusted() != null) rotationIdentityAdjusted().unpackTo(_o.getRotationIdentityAdjusted()); + else _o.setRotationIdentityAdjusted(null); + Integer _oTps = hasTps() ? tps() : null; + _o.setTps(_oTps); + } + 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())); + addRawAngularVelocity(builder, solarxr_protocol.datatypes.math.Vec3f.pack(builder, _o.getRawAngularVelocity())); + addRawAcceleration(builder, solarxr_protocol.datatypes.math.Vec3f.pack(builder, _o.getRawAcceleration())); + addTemp(builder, solarxr_protocol.datatypes.Temperature.pack(builder, _o.getTemp())); + addLinearAcceleration(builder, solarxr_protocol.datatypes.math.Vec3f.pack(builder, _o.getLinearAcceleration())); + addRotationReferenceAdjusted(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getRotationReferenceAdjusted())); + addRotationIdentityAdjusted(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getRotationIdentityAdjusted())); + if (_o.getTps() != null) { addTps(builder, _o.getTps()); } + 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 847157f4..cd9c19d7 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataMask.java +++ b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataMask.java @@ -1,129 +1,129 @@ -// 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_22_10_26(); } - 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 rawAngularVelocity() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean rawAcceleration() { 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 boolean linearAcceleration() { int o = __offset(18); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean rotationReferenceAdjusted() { int o = __offset(20); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean rotationIdentityAdjusted() { int o = __offset(22); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean tps() { int o = __offset(24); 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 rawAngularVelocity, - boolean rawAcceleration, - boolean temp, - boolean linearAcceleration, - boolean rotationReferenceAdjusted, - boolean rotationIdentityAdjusted, - boolean tps) { - builder.startTable(11); - TrackerDataMask.addTps(builder, tps); - TrackerDataMask.addRotationIdentityAdjusted(builder, rotationIdentityAdjusted); - TrackerDataMask.addRotationReferenceAdjusted(builder, rotationReferenceAdjusted); - TrackerDataMask.addLinearAcceleration(builder, linearAcceleration); - TrackerDataMask.addTemp(builder, temp); - TrackerDataMask.addRawAcceleration(builder, rawAcceleration); - TrackerDataMask.addRawAngularVelocity(builder, rawAngularVelocity); - 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(11); } - 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 addRawAngularVelocity(FlatBufferBuilder builder, boolean rawAngularVelocity) { builder.addBoolean(4, rawAngularVelocity, false); } - public static void addRawAcceleration(FlatBufferBuilder builder, boolean rawAcceleration) { builder.addBoolean(5, rawAcceleration, false); } - public static void addTemp(FlatBufferBuilder builder, boolean temp) { builder.addBoolean(6, temp, false); } - public static void addLinearAcceleration(FlatBufferBuilder builder, boolean linearAcceleration) { builder.addBoolean(7, linearAcceleration, false); } - public static void addRotationReferenceAdjusted(FlatBufferBuilder builder, boolean rotationReferenceAdjusted) { builder.addBoolean(8, rotationReferenceAdjusted, false); } - public static void addRotationIdentityAdjusted(FlatBufferBuilder builder, boolean rotationIdentityAdjusted) { builder.addBoolean(9, rotationIdentityAdjusted, false); } - public static void addTps(FlatBufferBuilder builder, boolean tps) { builder.addBoolean(10, tps, 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 _oRawAngularVelocity = rawAngularVelocity(); - _o.setRawAngularVelocity(_oRawAngularVelocity); - boolean _oRawAcceleration = rawAcceleration(); - _o.setRawAcceleration(_oRawAcceleration); - boolean _oTemp = temp(); - _o.setTemp(_oTemp); - boolean _oLinearAcceleration = linearAcceleration(); - _o.setLinearAcceleration(_oLinearAcceleration); - boolean _oRotationReferenceAdjusted = rotationReferenceAdjusted(); - _o.setRotationReferenceAdjusted(_oRotationReferenceAdjusted); - boolean _oRotationIdentityAdjusted = rotationIdentityAdjusted(); - _o.setRotationIdentityAdjusted(_oRotationIdentityAdjusted); - boolean _oTps = tps(); - _o.setTps(_oTps); - } - 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.getRawAngularVelocity(), - _o.getRawAcceleration(), - _o.getTemp(), - _o.getLinearAcceleration(), - _o.getRotationReferenceAdjusted(), - _o.getRotationIdentityAdjusted(), - _o.getTps()); - } -} - +// 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_22_10_26(); } + 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 rawAngularVelocity() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean rawAcceleration() { 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 boolean linearAcceleration() { int o = __offset(18); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean rotationReferenceAdjusted() { int o = __offset(20); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean rotationIdentityAdjusted() { int o = __offset(22); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean tps() { int o = __offset(24); 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 rawAngularVelocity, + boolean rawAcceleration, + boolean temp, + boolean linearAcceleration, + boolean rotationReferenceAdjusted, + boolean rotationIdentityAdjusted, + boolean tps) { + builder.startTable(11); + TrackerDataMask.addTps(builder, tps); + TrackerDataMask.addRotationIdentityAdjusted(builder, rotationIdentityAdjusted); + TrackerDataMask.addRotationReferenceAdjusted(builder, rotationReferenceAdjusted); + TrackerDataMask.addLinearAcceleration(builder, linearAcceleration); + TrackerDataMask.addTemp(builder, temp); + TrackerDataMask.addRawAcceleration(builder, rawAcceleration); + TrackerDataMask.addRawAngularVelocity(builder, rawAngularVelocity); + 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(11); } + 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 addRawAngularVelocity(FlatBufferBuilder builder, boolean rawAngularVelocity) { builder.addBoolean(4, rawAngularVelocity, false); } + public static void addRawAcceleration(FlatBufferBuilder builder, boolean rawAcceleration) { builder.addBoolean(5, rawAcceleration, false); } + public static void addTemp(FlatBufferBuilder builder, boolean temp) { builder.addBoolean(6, temp, false); } + public static void addLinearAcceleration(FlatBufferBuilder builder, boolean linearAcceleration) { builder.addBoolean(7, linearAcceleration, false); } + public static void addRotationReferenceAdjusted(FlatBufferBuilder builder, boolean rotationReferenceAdjusted) { builder.addBoolean(8, rotationReferenceAdjusted, false); } + public static void addRotationIdentityAdjusted(FlatBufferBuilder builder, boolean rotationIdentityAdjusted) { builder.addBoolean(9, rotationIdentityAdjusted, false); } + public static void addTps(FlatBufferBuilder builder, boolean tps) { builder.addBoolean(10, tps, 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 _oRawAngularVelocity = rawAngularVelocity(); + _o.setRawAngularVelocity(_oRawAngularVelocity); + boolean _oRawAcceleration = rawAcceleration(); + _o.setRawAcceleration(_oRawAcceleration); + boolean _oTemp = temp(); + _o.setTemp(_oTemp); + boolean _oLinearAcceleration = linearAcceleration(); + _o.setLinearAcceleration(_oLinearAcceleration); + boolean _oRotationReferenceAdjusted = rotationReferenceAdjusted(); + _o.setRotationReferenceAdjusted(_oRotationReferenceAdjusted); + boolean _oRotationIdentityAdjusted = rotationIdentityAdjusted(); + _o.setRotationIdentityAdjusted(_oRotationIdentityAdjusted); + boolean _oTps = tps(); + _o.setTps(_oTps); + } + 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.getRawAngularVelocity(), + _o.getRawAcceleration(), + _o.getTemp(), + _o.getLinearAcceleration(), + _o.getRotationReferenceAdjusted(), + _o.getRotationIdentityAdjusted(), + _o.getTps()); + } +} + 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 40ab9ecf..8d052288 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataMaskT.java +++ b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataMaskT.java @@ -1,82 +1,82 @@ -// 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 rawAngularVelocity; - private boolean rawAcceleration; - private boolean temp; - private boolean linearAcceleration; - private boolean rotationReferenceAdjusted; - private boolean rotationIdentityAdjusted; - private boolean tps; - - 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 getRawAngularVelocity() { return rawAngularVelocity; } - - public void setRawAngularVelocity(boolean rawAngularVelocity) { this.rawAngularVelocity = rawAngularVelocity; } - - public boolean getRawAcceleration() { return rawAcceleration; } - - public void setRawAcceleration(boolean rawAcceleration) { this.rawAcceleration = rawAcceleration; } - - public boolean getTemp() { return temp; } - - public void setTemp(boolean temp) { this.temp = temp; } - - public boolean getLinearAcceleration() { return linearAcceleration; } - - public void setLinearAcceleration(boolean linearAcceleration) { this.linearAcceleration = linearAcceleration; } - - public boolean getRotationReferenceAdjusted() { return rotationReferenceAdjusted; } - - public void setRotationReferenceAdjusted(boolean rotationReferenceAdjusted) { this.rotationReferenceAdjusted = rotationReferenceAdjusted; } - - public boolean getRotationIdentityAdjusted() { return rotationIdentityAdjusted; } - - public void setRotationIdentityAdjusted(boolean rotationIdentityAdjusted) { this.rotationIdentityAdjusted = rotationIdentityAdjusted; } - - public boolean getTps() { return tps; } - - public void setTps(boolean tps) { this.tps = tps; } - - - public TrackerDataMaskT() { - this.info = false; - this.status = false; - this.rotation = false; - this.position = false; - this.rawAngularVelocity = false; - this.rawAcceleration = false; - this.temp = false; - this.linearAcceleration = false; - this.rotationReferenceAdjusted = false; - this.rotationIdentityAdjusted = false; - this.tps = 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 rawAngularVelocity; + private boolean rawAcceleration; + private boolean temp; + private boolean linearAcceleration; + private boolean rotationReferenceAdjusted; + private boolean rotationIdentityAdjusted; + private boolean tps; + + 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 getRawAngularVelocity() { return rawAngularVelocity; } + + public void setRawAngularVelocity(boolean rawAngularVelocity) { this.rawAngularVelocity = rawAngularVelocity; } + + public boolean getRawAcceleration() { return rawAcceleration; } + + public void setRawAcceleration(boolean rawAcceleration) { this.rawAcceleration = rawAcceleration; } + + public boolean getTemp() { return temp; } + + public void setTemp(boolean temp) { this.temp = temp; } + + public boolean getLinearAcceleration() { return linearAcceleration; } + + public void setLinearAcceleration(boolean linearAcceleration) { this.linearAcceleration = linearAcceleration; } + + public boolean getRotationReferenceAdjusted() { return rotationReferenceAdjusted; } + + public void setRotationReferenceAdjusted(boolean rotationReferenceAdjusted) { this.rotationReferenceAdjusted = rotationReferenceAdjusted; } + + public boolean getRotationIdentityAdjusted() { return rotationIdentityAdjusted; } + + public void setRotationIdentityAdjusted(boolean rotationIdentityAdjusted) { this.rotationIdentityAdjusted = rotationIdentityAdjusted; } + + public boolean getTps() { return tps; } + + public void setTps(boolean tps) { this.tps = tps; } + + + public TrackerDataMaskT() { + this.info = false; + this.status = false; + this.rotation = false; + this.position = false; + this.rawAngularVelocity = false; + this.rawAcceleration = false; + this.temp = false; + this.linearAcceleration = false; + this.rotationReferenceAdjusted = false; + this.rotationIdentityAdjusted = false; + this.tps = 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 b37813c8..fe0d83b6 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataT.java +++ b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataT.java @@ -1,88 +1,88 @@ -// 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 rawAngularVelocity; - private solarxr_protocol.datatypes.math.Vec3fT rawAcceleration; - private solarxr_protocol.datatypes.TemperatureT temp; - private solarxr_protocol.datatypes.math.Vec3fT linearAcceleration; - private solarxr_protocol.datatypes.math.QuatT rotationReferenceAdjusted; - private solarxr_protocol.datatypes.math.QuatT rotationIdentityAdjusted; - private Integer tps; - - 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 getRawAngularVelocity() { return rawAngularVelocity; } - - public void setRawAngularVelocity(solarxr_protocol.datatypes.math.Vec3fT rawAngularVelocity) { this.rawAngularVelocity = rawAngularVelocity; } - - public solarxr_protocol.datatypes.math.Vec3fT getRawAcceleration() { return rawAcceleration; } - - public void setRawAcceleration(solarxr_protocol.datatypes.math.Vec3fT rawAcceleration) { this.rawAcceleration = rawAcceleration; } - - public solarxr_protocol.datatypes.TemperatureT getTemp() { return temp; } - - public void setTemp(solarxr_protocol.datatypes.TemperatureT temp) { this.temp = temp; } - - public solarxr_protocol.datatypes.math.Vec3fT getLinearAcceleration() { return linearAcceleration; } - - public void setLinearAcceleration(solarxr_protocol.datatypes.math.Vec3fT linearAcceleration) { this.linearAcceleration = linearAcceleration; } - - public solarxr_protocol.datatypes.math.QuatT getRotationReferenceAdjusted() { return rotationReferenceAdjusted; } - - public void setRotationReferenceAdjusted(solarxr_protocol.datatypes.math.QuatT rotationReferenceAdjusted) { this.rotationReferenceAdjusted = rotationReferenceAdjusted; } - - public solarxr_protocol.datatypes.math.QuatT getRotationIdentityAdjusted() { return rotationIdentityAdjusted; } - - public void setRotationIdentityAdjusted(solarxr_protocol.datatypes.math.QuatT rotationIdentityAdjusted) { this.rotationIdentityAdjusted = rotationIdentityAdjusted; } - - public Integer getTps() { return tps; } - - public void setTps(Integer tps) { this.tps = tps; } - - - 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.rawAngularVelocity = new solarxr_protocol.datatypes.math.Vec3fT(); - this.rawAcceleration = new solarxr_protocol.datatypes.math.Vec3fT(); - this.temp = new solarxr_protocol.datatypes.TemperatureT(); - this.linearAcceleration = new solarxr_protocol.datatypes.math.Vec3fT(); - this.rotationReferenceAdjusted = new solarxr_protocol.datatypes.math.QuatT(); - this.rotationIdentityAdjusted = new solarxr_protocol.datatypes.math.QuatT(); - this.tps = 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 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 rawAngularVelocity; + private solarxr_protocol.datatypes.math.Vec3fT rawAcceleration; + private solarxr_protocol.datatypes.TemperatureT temp; + private solarxr_protocol.datatypes.math.Vec3fT linearAcceleration; + private solarxr_protocol.datatypes.math.QuatT rotationReferenceAdjusted; + private solarxr_protocol.datatypes.math.QuatT rotationIdentityAdjusted; + private Integer tps; + + 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 getRawAngularVelocity() { return rawAngularVelocity; } + + public void setRawAngularVelocity(solarxr_protocol.datatypes.math.Vec3fT rawAngularVelocity) { this.rawAngularVelocity = rawAngularVelocity; } + + public solarxr_protocol.datatypes.math.Vec3fT getRawAcceleration() { return rawAcceleration; } + + public void setRawAcceleration(solarxr_protocol.datatypes.math.Vec3fT rawAcceleration) { this.rawAcceleration = rawAcceleration; } + + public solarxr_protocol.datatypes.TemperatureT getTemp() { return temp; } + + public void setTemp(solarxr_protocol.datatypes.TemperatureT temp) { this.temp = temp; } + + public solarxr_protocol.datatypes.math.Vec3fT getLinearAcceleration() { return linearAcceleration; } + + public void setLinearAcceleration(solarxr_protocol.datatypes.math.Vec3fT linearAcceleration) { this.linearAcceleration = linearAcceleration; } + + public solarxr_protocol.datatypes.math.QuatT getRotationReferenceAdjusted() { return rotationReferenceAdjusted; } + + public void setRotationReferenceAdjusted(solarxr_protocol.datatypes.math.QuatT rotationReferenceAdjusted) { this.rotationReferenceAdjusted = rotationReferenceAdjusted; } + + public solarxr_protocol.datatypes.math.QuatT getRotationIdentityAdjusted() { return rotationIdentityAdjusted; } + + public void setRotationIdentityAdjusted(solarxr_protocol.datatypes.math.QuatT rotationIdentityAdjusted) { this.rotationIdentityAdjusted = rotationIdentityAdjusted; } + + public Integer getTps() { return tps; } + + public void setTps(Integer tps) { this.tps = tps; } + + + 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.rawAngularVelocity = new solarxr_protocol.datatypes.math.Vec3fT(); + this.rawAcceleration = new solarxr_protocol.datatypes.math.Vec3fT(); + this.temp = new solarxr_protocol.datatypes.TemperatureT(); + this.linearAcceleration = new solarxr_protocol.datatypes.math.Vec3fT(); + this.rotationReferenceAdjusted = new solarxr_protocol.datatypes.math.QuatT(); + this.rotationIdentityAdjusted = new solarxr_protocol.datatypes.math.QuatT(); + this.tps = null; + } +} + 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 ab41655d..8e82346d 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerInfo.java +++ b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerInfo.java @@ -1,151 +1,151 @@ -// 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_22_10_26(); } - 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; } - /** - * Should the tracker's settings be editable by the user - */ - public boolean editable() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - /** - * Indicates if the tracker is computed (solved position and rotation) - */ - public boolean isComputed() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - /** - * Indicates if the tracker is using an IMU for its tracking data - */ - public boolean isImu() { int o = __offset(16); 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(18); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer displayNameAsByteBuffer() { return __vector_as_bytebuffer(18, 1); } - public ByteBuffer displayNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 18, 1); } - /** - * name to display as the name of the tracker set by the user - */ - public String customName() { int o = __offset(20); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer customNameAsByteBuffer() { return __vector_as_bytebuffer(20, 1); } - public ByteBuffer customNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 20, 1); } - /** - * Whether to allow yaw drift compensation for this tracker or not. - */ - public boolean allowDriftCompensation() { int o = __offset(22); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - /** - * Mounting Reset orientation overrides the current `mounting_orientation` of - * the tracker, this orientation is not saved and needs to be calculated - * each time the server is ran - */ - public solarxr_protocol.datatypes.math.Quat mountingResetOrientation() { return mountingResetOrientation(new solarxr_protocol.datatypes.math.Quat()); } - public solarxr_protocol.datatypes.math.Quat mountingResetOrientation(solarxr_protocol.datatypes.math.Quat obj) { int o = __offset(24); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - /** - * Indicates if the tracker is actually an HMD - */ - public boolean isHmd() { int o = __offset(26); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static void startTrackerInfo(FlatBufferBuilder builder) { builder.startTable(12); } - 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 addIsComputed(FlatBufferBuilder builder, boolean isComputed) { builder.addBoolean(5, isComputed, false); } - public static void addIsImu(FlatBufferBuilder builder, boolean isImu) { builder.addBoolean(6, isImu, false); } - public static void addDisplayName(FlatBufferBuilder builder, int displayNameOffset) { builder.addOffset(7, displayNameOffset, 0); } - public static void addCustomName(FlatBufferBuilder builder, int customNameOffset) { builder.addOffset(8, customNameOffset, 0); } - public static void addAllowDriftCompensation(FlatBufferBuilder builder, boolean allowDriftCompensation) { builder.addBoolean(9, allowDriftCompensation, false); } - public static void addMountingResetOrientation(FlatBufferBuilder builder, int mountingResetOrientationOffset) { builder.addStruct(10, mountingResetOrientationOffset, 0); } - public static void addIsHmd(FlatBufferBuilder builder, boolean isHmd) { builder.addBoolean(11, isHmd, false); } - 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 _oIsComputed = isComputed(); - _o.setIsComputed(_oIsComputed); - boolean _oIsImu = isImu(); - _o.setIsImu(_oIsImu); - String _oDisplayName = displayName(); - _o.setDisplayName(_oDisplayName); - String _oCustomName = customName(); - _o.setCustomName(_oCustomName); - boolean _oAllowDriftCompensation = allowDriftCompensation(); - _o.setAllowDriftCompensation(_oAllowDriftCompensation); - if (mountingResetOrientation() != null) mountingResetOrientation().unpackTo(_o.getMountingResetOrientation()); - else _o.setMountingResetOrientation(null); - boolean _oIsHmd = isHmd(); - _o.setIsHmd(_oIsHmd); - } - 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()); - addIsComputed(builder, _o.getIsComputed()); - addIsImu(builder, _o.getIsImu()); - addDisplayName(builder, _displayName); - addCustomName(builder, _customName); - addAllowDriftCompensation(builder, _o.getAllowDriftCompensation()); - addMountingResetOrientation(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getMountingResetOrientation())); - addIsHmd(builder, _o.getIsHmd()); - 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_22_10_26(); } + 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; } + /** + * Should the tracker's settings be editable by the user + */ + public boolean editable() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + /** + * Indicates if the tracker is computed (solved position and rotation) + */ + public boolean isComputed() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + /** + * Indicates if the tracker is using an IMU for its tracking data + */ + public boolean isImu() { int o = __offset(16); 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(18); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer displayNameAsByteBuffer() { return __vector_as_bytebuffer(18, 1); } + public ByteBuffer displayNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 18, 1); } + /** + * name to display as the name of the tracker set by the user + */ + public String customName() { int o = __offset(20); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer customNameAsByteBuffer() { return __vector_as_bytebuffer(20, 1); } + public ByteBuffer customNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 20, 1); } + /** + * Whether to allow yaw drift compensation for this tracker or not. + */ + public boolean allowDriftCompensation() { int o = __offset(22); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + /** + * Mounting Reset orientation overrides the current `mounting_orientation` of + * the tracker, this orientation is not saved and needs to be calculated + * each time the server is ran + */ + public solarxr_protocol.datatypes.math.Quat mountingResetOrientation() { return mountingResetOrientation(new solarxr_protocol.datatypes.math.Quat()); } + public solarxr_protocol.datatypes.math.Quat mountingResetOrientation(solarxr_protocol.datatypes.math.Quat obj) { int o = __offset(24); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + /** + * Indicates if the tracker is actually an HMD + */ + public boolean isHmd() { int o = __offset(26); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static void startTrackerInfo(FlatBufferBuilder builder) { builder.startTable(12); } + 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 addIsComputed(FlatBufferBuilder builder, boolean isComputed) { builder.addBoolean(5, isComputed, false); } + public static void addIsImu(FlatBufferBuilder builder, boolean isImu) { builder.addBoolean(6, isImu, false); } + public static void addDisplayName(FlatBufferBuilder builder, int displayNameOffset) { builder.addOffset(7, displayNameOffset, 0); } + public static void addCustomName(FlatBufferBuilder builder, int customNameOffset) { builder.addOffset(8, customNameOffset, 0); } + public static void addAllowDriftCompensation(FlatBufferBuilder builder, boolean allowDriftCompensation) { builder.addBoolean(9, allowDriftCompensation, false); } + public static void addMountingResetOrientation(FlatBufferBuilder builder, int mountingResetOrientationOffset) { builder.addStruct(10, mountingResetOrientationOffset, 0); } + public static void addIsHmd(FlatBufferBuilder builder, boolean isHmd) { builder.addBoolean(11, isHmd, false); } + 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 _oIsComputed = isComputed(); + _o.setIsComputed(_oIsComputed); + boolean _oIsImu = isImu(); + _o.setIsImu(_oIsImu); + String _oDisplayName = displayName(); + _o.setDisplayName(_oDisplayName); + String _oCustomName = customName(); + _o.setCustomName(_oCustomName); + boolean _oAllowDriftCompensation = allowDriftCompensation(); + _o.setAllowDriftCompensation(_oAllowDriftCompensation); + if (mountingResetOrientation() != null) mountingResetOrientation().unpackTo(_o.getMountingResetOrientation()); + else _o.setMountingResetOrientation(null); + boolean _oIsHmd = isHmd(); + _o.setIsHmd(_oIsHmd); + } + 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()); + addIsComputed(builder, _o.getIsComputed()); + addIsImu(builder, _o.getIsImu()); + addDisplayName(builder, _displayName); + addCustomName(builder, _customName); + addAllowDriftCompensation(builder, _o.getAllowDriftCompensation()); + addMountingResetOrientation(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getMountingResetOrientation())); + addIsHmd(builder, _o.getIsHmd()); + 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 4d775c60..7cdb7565 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerInfoT.java +++ b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerInfoT.java @@ -1,88 +1,88 @@ -// 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 isComputed; - private boolean isImu; - private String displayName; - private String customName; - private boolean allowDriftCompensation; - private solarxr_protocol.datatypes.math.QuatT mountingResetOrientation; - private boolean isHmd; - - 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 getIsComputed() { return isComputed; } - - public void setIsComputed(boolean isComputed) { this.isComputed = isComputed; } - - public boolean getIsImu() { return isImu; } - - public void setIsImu(boolean isImu) { this.isImu = isImu; } - - 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 boolean getAllowDriftCompensation() { return allowDriftCompensation; } - - public void setAllowDriftCompensation(boolean allowDriftCompensation) { this.allowDriftCompensation = allowDriftCompensation; } - - public solarxr_protocol.datatypes.math.QuatT getMountingResetOrientation() { return mountingResetOrientation; } - - public void setMountingResetOrientation(solarxr_protocol.datatypes.math.QuatT mountingResetOrientation) { this.mountingResetOrientation = mountingResetOrientation; } - - public boolean getIsHmd() { return isHmd; } - - public void setIsHmd(boolean isHmd) { this.isHmd = isHmd; } - - - 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.isComputed = false; - this.isImu = false; - this.displayName = null; - this.customName = null; - this.allowDriftCompensation = false; - this.mountingResetOrientation = new solarxr_protocol.datatypes.math.QuatT(); - this.isHmd = 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 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 isComputed; + private boolean isImu; + private String displayName; + private String customName; + private boolean allowDriftCompensation; + private solarxr_protocol.datatypes.math.QuatT mountingResetOrientation; + private boolean isHmd; + + 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 getIsComputed() { return isComputed; } + + public void setIsComputed(boolean isComputed) { this.isComputed = isComputed; } + + public boolean getIsImu() { return isImu; } + + public void setIsImu(boolean isImu) { this.isImu = isImu; } + + 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 boolean getAllowDriftCompensation() { return allowDriftCompensation; } + + public void setAllowDriftCompensation(boolean allowDriftCompensation) { this.allowDriftCompensation = allowDriftCompensation; } + + public solarxr_protocol.datatypes.math.QuatT getMountingResetOrientation() { return mountingResetOrientation; } + + public void setMountingResetOrientation(solarxr_protocol.datatypes.math.QuatT mountingResetOrientation) { this.mountingResetOrientation = mountingResetOrientation; } + + public boolean getIsHmd() { return isHmd; } + + public void setIsHmd(boolean isHmd) { this.isHmd = isHmd; } + + + 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.isComputed = false; + this.isImu = false; + this.displayName = null; + this.customName = null; + this.allowDriftCompensation = false; + this.mountingResetOrientation = new solarxr_protocol.datatypes.math.QuatT(); + this.isHmd = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/BodyPart.java b/protocol/java/src/solarxr_protocol/datatypes/BodyPart.java index b7ba54d1..d2d80e25 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/BodyPart.java +++ b/protocol/java/src/solarxr_protocol/datatypes/BodyPart.java @@ -1,40 +1,40 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes; - -/** - * Different parts of the body. Maps to each possible non-tracker 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_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 int UPPER_CHEST = 22; - public static final int LEFT_HIP = 23; - public static final int RIGHT_HIP = 24; - - 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_LOWER_ARM", "RIGHT_LOWER_ARM", "LEFT_UPPER_ARM", "RIGHT_UPPER_ARM", "LEFT_HAND", "RIGHT_HAND", "LEFT_SHOULDER", "RIGHT_SHOULDER", "UPPER_CHEST", "LEFT_HIP", "RIGHT_HIP", }; - - 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. Maps to each possible non-tracker 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_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 int UPPER_CHEST = 22; + public static final int LEFT_HIP = 23; + public static final int RIGHT_HIP = 24; + + 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_LOWER_ARM", "RIGHT_LOWER_ARM", "LEFT_UPPER_ARM", "RIGHT_UPPER_ARM", "LEFT_HAND", "RIGHT_HAND", "LEFT_SHOULDER", "RIGHT_SHOULDER", "UPPER_CHEST", "LEFT_HIP", "RIGHT_HIP", }; + + 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 index 6129209f..dfb3180b 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/Bytes.java +++ b/protocol/java/src/solarxr_protocol/datatypes/Bytes.java @@ -1,72 +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_22_10_26(); } - 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); - } -} - +// 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_22_10_26(); } + 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 index 5d757e8f..a4d259dc 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/BytesT.java +++ b/protocol/java/src/solarxr_protocol/datatypes/BytesT.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 BytesT { - private int[] b; - - public int[] getB() { return b; } - - public void setB(int[] b) { this.b = b; } - - - public BytesT() { - this.b = 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 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 3a0f7b18..64fd0931 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 2901e01e..f51817b0 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/DeviceIdTable.java b/protocol/java/src/solarxr_protocol/datatypes/DeviceIdTable.java new file mode 100644 index 00000000..75cb3304 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/datatypes/DeviceIdTable.java @@ -0,0 +1,53 @@ +// 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.*; + +/** + * To be used inside unions + */ +@SuppressWarnings("unused") +public final class DeviceIdTable extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static DeviceIdTable getRootAsDeviceIdTable(ByteBuffer _bb) { return getRootAsDeviceIdTable(_bb, new DeviceIdTable()); } + public static DeviceIdTable getRootAsDeviceIdTable(ByteBuffer _bb, DeviceIdTable 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 DeviceIdTable __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; } + + public static void startDeviceIdTable(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addId(FlatBufferBuilder builder, int idOffset) { builder.addStruct(0, idOffset, 0); } + public static int endDeviceIdTable(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 DeviceIdTable get(int j) { return get(new DeviceIdTable(), j); } + public DeviceIdTable get(DeviceIdTable obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public DeviceIdTableT unpack() { + DeviceIdTableT _o = new DeviceIdTableT(); + unpackTo(_o); + return _o; + } + public void unpackTo(DeviceIdTableT _o) { + if (id() != null) id().unpackTo(_o.getId()); + else _o.setId(null); + } + public static int pack(FlatBufferBuilder builder, DeviceIdTableT _o) { + if (_o == null) return 0; + startDeviceIdTable(builder); + addId(builder, solarxr_protocol.datatypes.DeviceId.pack(builder, _o.getId())); + return endDeviceIdTable(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/DeviceIdTableT.java b/protocol/java/src/solarxr_protocol/datatypes/DeviceIdTableT.java new file mode 100644 index 00000000..c2dd2b35 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/datatypes/DeviceIdTableT.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 DeviceIdTableT { + private solarxr_protocol.datatypes.DeviceIdT id; + + public solarxr_protocol.datatypes.DeviceIdT getId() { return id; } + + public void setId(solarxr_protocol.datatypes.DeviceIdT id) { this.id = id; } + + + public DeviceIdTableT() { + this.id = new solarxr_protocol.datatypes.DeviceIdT(); + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/FilteringType.java b/protocol/java/src/solarxr_protocol/datatypes/FilteringType.java index e7975bae..e267cf6e 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 797a1f80..3398b4d5 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 4d0a31bc..2391d1f3 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 5455f534..b6c6e170 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/Ipv4Address.java b/protocol/java/src/solarxr_protocol/datatypes/Ipv4Address.java index 863329a9..47786e1c 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/Ipv4Address.java +++ b/protocol/java/src/solarxr_protocol/datatypes/Ipv4Address.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.*; - -/** - * 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()); - } -} - +// 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 index 86ee8ad7..0555608a 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/Ipv4AddressT.java +++ b/protocol/java/src/solarxr_protocol/datatypes/Ipv4AddressT.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 Ipv4AddressT { - private long addr; - - public long getAddr() { return addr; } - - public void setAddr(long addr) { this.addr = addr; } - - - public Ipv4AddressT() { - this.addr = 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 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/LogData.java b/protocol/java/src/solarxr_protocol/datatypes/LogData.java index 3d9e7e12..634f15e3 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_22_10_26(); } - 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_22_10_26(); } + 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 64ee8e53..8d244ba9 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/StringTable.java b/protocol/java/src/solarxr_protocol/datatypes/StringTable.java index 764517d3..77531ac2 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/StringTable.java +++ b/protocol/java/src/solarxr_protocol/datatypes/StringTable.java @@ -1,59 +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 StringTable extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - 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 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 createStringTable(FlatBufferBuilder builder, - int sOffset) { - builder.startTable(1); - StringTable.addS(builder, sOffset); - return StringTable.endStringTable(builder); - } - - 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 endStringTable(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 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 StringTableT unpack() { - StringTableT _o = new StringTableT(); - unpackTo(_o); - return _o; - } - public void unpackTo(StringTableT _o) { - String _oS = s(); - _o.setS(_oS); - } - public static int pack(FlatBufferBuilder builder, StringTableT _o) { - if (_o == null) return 0; - int _s = _o.getS() == null ? 0 : builder.createString(_o.getS()); - return createStringTable( - builder, - _s); - } -} - +// 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 StringTable extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + 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 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 createStringTable(FlatBufferBuilder builder, + int sOffset) { + builder.startTable(1); + StringTable.addS(builder, sOffset); + return StringTable.endStringTable(builder); + } + + 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 endStringTable(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 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 StringTableT unpack() { + StringTableT _o = new StringTableT(); + unpackTo(_o); + return _o; + } + public void unpackTo(StringTableT _o) { + String _oS = s(); + _o.setS(_oS); + } + public static int pack(FlatBufferBuilder builder, StringTableT _o) { + if (_o == null) return 0; + int _s = _o.getS() == null ? 0 : builder.createString(_o.getS()); + return createStringTable( + builder, + _s); + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/StringTableT.java b/protocol/java/src/solarxr_protocol/datatypes/StringTableT.java index 193f556d..3043b32e 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/StringTableT.java +++ b/protocol/java/src/solarxr_protocol/datatypes/StringTableT.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 StringTableT { - private String s; - - public String getS() { return s; } - - public void setS(String s) { this.s = s; } - - - public StringTableT() { - this.s = 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 StringTableT { + private String s; + + public String getS() { return s; } + + public void setS(String s) { this.s = s; } + + + public StringTableT() { + this.s = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/Temperature.java b/protocol/java/src/solarxr_protocol/datatypes/Temperature.java index 917142b7..c6022374 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 7d1d8268..379ec613 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 252e7b43..824fd02a 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_22_10_26(); } - 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_22_10_26(); } + 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 35ad561e..3296c563 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 65202716..d0a4774f 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 6a7a778a..c536cbf3 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/TrackerStatus.java +++ b/protocol/java/src/solarxr_protocol/datatypes/TrackerStatus.java @@ -1,20 +1,20 @@ -// 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 int TIMED_OUT = 6; - - public static final String[] names = { "NONE", "DISCONNECTED", "OK", "BUSY", "ERROR", "OCCLUDED", "TIMED_OUT", }; - - 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 int TIMED_OUT = 6; + + public static final String[] names = { "NONE", "DISCONNECTED", "OK", "BUSY", "ERROR", "OCCLUDED", "TIMED_OUT", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/TransactionId.java b/protocol/java/src/solarxr_protocol/datatypes/TransactionId.java index 7699e024..54dfb2e1 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 0bbfd947..73f64ff8 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/BoardType.java b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/BoardType.java new file mode 100644 index 00000000..2df1cdaf --- /dev/null +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/BoardType.java @@ -0,0 +1,26 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.hardware_info; + +@SuppressWarnings("unused") +public final class BoardType { + private BoardType() { } + public static final int UNKNOWN = 0; + public static final int SLIMEVR_LEGACY = 1; + public static final int SLIMEVR_DEV = 2; + public static final int NODEMCU = 3; + public static final int CUSTOM = 4; + public static final int WROOM32 = 5; + public static final int WEMOSD1MINI = 6; + public static final int TTGO_TBASE = 7; + public static final int ESP01 = 8; + public static final int SLIMEVR = 9; + public static final int LOLIN_C3_MINI = 10; + public static final int BEETLE32C3 = 11; + public static final int ES32C3DEVKITM1 = 12; + + public static final String[] names = { "UNKNOWN", "SLIMEVR_LEGACY", "SLIMEVR_DEV", "NODEMCU", "CUSTOM", "WROOM32", "WEMOSD1MINI", "TTGO_TBASE", "ESP01", "SLIMEVR", "LOLIN_C3_MINI", "BEETLE32C3", "ES32C3DEVKITM1", }; + + public static String name(int e) { return names[e]; } +} + 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 3abfaca2..c97187b1 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_22_10_26(); } - 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_22_10_26(); } + 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 48d8f157..ff0d2dfc 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 101fc32e..3bf72605 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 621d89a5..335a65bd 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 13599b59..2154a983 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareInfo.java +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareInfo.java @@ -1,148 +1,159 @@ -// 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_22_10_26(); } - 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 String boardType() { int o = __offset(20); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer boardTypeAsByteBuffer() { return __vector_as_bytebuffer(20, 1); } - public ByteBuffer boardTypeInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 20, 1); } - /** - * A unique identifier for the device. Depending on the type of device it can be the MAC address, - * the IP address, or some other unique identifier like what USB device it is. - */ - public String hardwareIdentifier() { int o = __offset(22); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer hardwareIdentifierAsByteBuffer() { return __vector_as_bytebuffer(22, 1); } - public ByteBuffer hardwareIdentifierInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 22, 1); } - /** - * The version of the protocol it's using to communicate with server - */ - public boolean hasNetworkProtocolVersion() { return 0 != __offset(24); } - public int networkProtocolVersion() { int o = __offset(24); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } - - public static void startHardwareInfo(FlatBufferBuilder builder) { builder.startTable(11); } - 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 void addBoardType(FlatBufferBuilder builder, int boardTypeOffset) { builder.addOffset(8, boardTypeOffset, 0); } - public static void addHardwareIdentifier(FlatBufferBuilder builder, int hardwareIdentifierOffset) { builder.addOffset(9, hardwareIdentifierOffset, 0); } - public static void addNetworkProtocolVersion(FlatBufferBuilder builder, int networkProtocolVersion) { builder.addShort(10, (short) networkProtocolVersion, (short) 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); - String _oBoardType = boardType(); - _o.setBoardType(_oBoardType); - String _oHardwareIdentifier = hardwareIdentifier(); - _o.setHardwareIdentifier(_oHardwareIdentifier); - Integer _oNetworkProtocolVersion = hasNetworkProtocolVersion() ? networkProtocolVersion() : null; - _o.setNetworkProtocolVersion(_oNetworkProtocolVersion); - } - 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()); - int _boardType = _o.getBoardType() == null ? 0 : builder.createString(_o.getBoardType()); - int _hardwareIdentifier = _o.getHardwareIdentifier() == null ? 0 : builder.createString(_o.getHardwareIdentifier()); - 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())); - addBoardType(builder, _boardType); - addHardwareIdentifier(builder, _hardwareIdentifier); - if (_o.getNetworkProtocolVersion() != null) { addNetworkProtocolVersion(builder, _o.getNetworkProtocolVersion()); } - 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_22_10_26(); } + 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; } + /** + * A board type string that can be used to name a board. if possible you should use official board type + */ + public String boardType() { int o = __offset(20); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer boardTypeAsByteBuffer() { return __vector_as_bytebuffer(20, 1); } + public ByteBuffer boardTypeInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 20, 1); } + /** + * An enum listing all the board types supported by the firmware + */ + public int officialBoardType() { int o = __offset(22); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } + /** + * A unique identifier for the device. Depending on the type of device it can be the MAC address, + * the IP address, or some other unique identifier like what USB device it is. + */ + public String hardwareIdentifier() { int o = __offset(24); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer hardwareIdentifierAsByteBuffer() { return __vector_as_bytebuffer(24, 1); } + public ByteBuffer hardwareIdentifierInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 24, 1); } + /** + * The version of the protocol it's using to communicate with server + */ + public boolean hasNetworkProtocolVersion() { return 0 != __offset(26); } + public int networkProtocolVersion() { int o = __offset(26); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } + + public static void startHardwareInfo(FlatBufferBuilder builder) { builder.startTable(12); } + 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 void addBoardType(FlatBufferBuilder builder, int boardTypeOffset) { builder.addOffset(8, boardTypeOffset, 0); } + public static void addOfficialBoardType(FlatBufferBuilder builder, int officialBoardType) { builder.addShort(9, (short) officialBoardType, (short) 0); } + public static void addHardwareIdentifier(FlatBufferBuilder builder, int hardwareIdentifierOffset) { builder.addOffset(10, hardwareIdentifierOffset, 0); } + public static void addNetworkProtocolVersion(FlatBufferBuilder builder, int networkProtocolVersion) { builder.addShort(11, (short) networkProtocolVersion, (short) 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); + String _oBoardType = boardType(); + _o.setBoardType(_oBoardType); + int _oOfficialBoardType = officialBoardType(); + _o.setOfficialBoardType(_oOfficialBoardType); + String _oHardwareIdentifier = hardwareIdentifier(); + _o.setHardwareIdentifier(_oHardwareIdentifier); + Integer _oNetworkProtocolVersion = hasNetworkProtocolVersion() ? networkProtocolVersion() : null; + _o.setNetworkProtocolVersion(_oNetworkProtocolVersion); + } + 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()); + int _boardType = _o.getBoardType() == null ? 0 : builder.createString(_o.getBoardType()); + int _hardwareIdentifier = _o.getHardwareIdentifier() == null ? 0 : builder.createString(_o.getHardwareIdentifier()); + 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())); + addBoardType(builder, _boardType); + addOfficialBoardType(builder, _o.getOfficialBoardType()); + addHardwareIdentifier(builder, _hardwareIdentifier); + if (_o.getNetworkProtocolVersion() != null) { addNetworkProtocolVersion(builder, _o.getNetworkProtocolVersion()); } + 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 cd14a3d8..db219f9c 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareInfoT.java +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareInfoT.java @@ -1,82 +1,88 @@ -// 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; - private String boardType; - private String hardwareIdentifier; - private Integer networkProtocolVersion; - - 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 String getBoardType() { return boardType; } - - public void setBoardType(String boardType) { this.boardType = boardType; } - - public String getHardwareIdentifier() { return hardwareIdentifier; } - - public void setHardwareIdentifier(String hardwareIdentifier) { this.hardwareIdentifier = hardwareIdentifier; } - - public Integer getNetworkProtocolVersion() { return networkProtocolVersion; } - - public void setNetworkProtocolVersion(Integer networkProtocolVersion) { this.networkProtocolVersion = networkProtocolVersion; } - - - 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(); - this.boardType = null; - this.hardwareIdentifier = null; - this.networkProtocolVersion = 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 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; + private String boardType; + private int officialBoardType; + private String hardwareIdentifier; + private Integer networkProtocolVersion; + + 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 String getBoardType() { return boardType; } + + public void setBoardType(String boardType) { this.boardType = boardType; } + + public int getOfficialBoardType() { return officialBoardType; } + + public void setOfficialBoardType(int officialBoardType) { this.officialBoardType = officialBoardType; } + + public String getHardwareIdentifier() { return hardwareIdentifier; } + + public void setHardwareIdentifier(String hardwareIdentifier) { this.hardwareIdentifier = hardwareIdentifier; } + + public Integer getNetworkProtocolVersion() { return networkProtocolVersion; } + + public void setNetworkProtocolVersion(Integer networkProtocolVersion) { this.networkProtocolVersion = networkProtocolVersion; } + + + 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(); + this.boardType = null; + this.officialBoardType = 0; + this.hardwareIdentifier = null; + this.networkProtocolVersion = 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 371c9734..11ba0e22 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareStatus.java +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareStatus.java @@ -1,115 +1,115 @@ -// 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_22_10_26(); } - 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 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 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.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 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 _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.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_22_10_26(); } + 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 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 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.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 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 _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.getPing(), + _o.getRssi(), + _o.getMcuTemp(), + _o.getBatteryVoltage(), + _o.getBatteryPctEstimate(), + _logData); + } +} + 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 9df8f160..31f87472 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareStatusT.java +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareStatusT.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 HardwareStatusT { - private Integer errorStatus; - 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 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.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 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 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.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 1cab55ee..1ace9c77 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/ImuType.java +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/ImuType.java @@ -1,24 +1,24 @@ -// 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 MPU9250 = 1; - public static final int MPU6500 = 2; - public static final int BNO080 = 3; - public static final int BNO085 = 4; - public static final int BNO055 = 5; - public static final int MPU6050 = 6; - public static final int BNO086 = 7; - public static final int BMI160 = 8; - public static final int ICM20948 = 9; - public static final int ICM42688 = 10; - - public static final String[] names = { "Other", "MPU9250", "MPU6500", "BNO080", "BNO085", "BNO055", "MPU6050", "BNO086", "BMI160", "ICM20948", "ICM42688", }; - - 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 MPU9250 = 1; + public static final int MPU6500 = 2; + public static final int BNO080 = 3; + public static final int BNO085 = 4; + public static final int BNO055 = 5; + public static final int MPU6050 = 6; + public static final int BNO086 = 7; + public static final int BMI160 = 8; + public static final int ICM20948 = 9; + public static final int ICM42688 = 10; + + public static final String[] names = { "Other", "MPU9250", "MPU6500", "BNO080", "BNO085", "BNO055", "MPU6050", "BNO086", "BMI160", "ICM20948", "ICM42688", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/McuType.java b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/McuType.java index dc81d5ce..99c385f3 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 = 2; - public static final int OWOTRACK_ANDROID = 3; - public static final int WRANGLER = 4; - public static final int OWOTRACK_IOS = 5; - public static final int ESP32_C3 = 6; - public static final int MOCOPI = 7; - public static final int DEV_RESERVED = 250; -} - +// 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 = 2; + public static final int OWOTRACK_ANDROID = 3; + public static final int WRANGLER = 4; + public static final int OWOTRACK_IOS = 5; + public static final int ESP32_C3 = 6; + public static final int MOCOPI = 7; + public static final int DEV_RESERVED = 250; +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/math/Quat.java b/protocol/java/src/solarxr_protocol/datatypes/math/Quat.java index 3f51df79..5e4f88ab 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 b5f97270..74791a38 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 27ba51d8..b9f97211 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 f24ef60c..d78ade3b 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 index f5a4c6b8..c5b845c4 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/KeyValues.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/KeyValues.java @@ -1,89 +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_22_10_26(); } - 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); - } -} - +// 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_22_10_26(); } + 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 index 7616240d..cba5f634 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/KeyValuesT.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/KeyValuesT.java @@ -1,28 +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; - } -} - +// 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 index 8989e5ee..25a2bdb1 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/Message.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/Message.java @@ -1,112 +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_22_10_26(); } - 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_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()); - _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); - } -} - +// 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_22_10_26(); } + 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_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()); + _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 index 87b3aa5d..6ee70ad6 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/MessageT.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/MessageT.java @@ -1,28 +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; - } -} - +// 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 index a6c5bba7..50c688e2 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/Payload.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/Payload.java @@ -1,17 +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_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_StringTable", "solarxr_protocol_datatypes_Bytes", "KeyValues", }; - - public static String name(int e) { return names[e]; } -} - +// 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_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_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 a54ee59f..6afb18b5 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/PayloadUnion.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/PayloadUnion.java @@ -1,37 +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.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_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; - } - } -} - +// 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.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_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/pub_sub/PubSubHeader.java b/protocol/java/src/solarxr_protocol/pub_sub/PubSubHeader.java index e64ffd83..b8b06b0e 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/PubSubHeader.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/PubSubHeader.java @@ -1,85 +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_22_10_26(); } - 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.TopicMapping: - _oUValue = u(new solarxr_protocol.pub_sub.TopicMapping()); - _oU.setValue(_oUValue != null ? ((solarxr_protocol.pub_sub.TopicMapping) _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); - } -} - +// 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_22_10_26(); } + 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.TopicMapping: + _oUValue = u(new solarxr_protocol.pub_sub.TopicMapping()); + _oU.setValue(_oUValue != null ? ((solarxr_protocol.pub_sub.TopicMapping) _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 index 7098f81b..444a8d42 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/PubSubHeaderT.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/PubSubHeaderT.java @@ -1,22 +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; - } -} - +// 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 index 698b203a..bcf431a8 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/PubSubUnion.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/PubSubUnion.java @@ -1,18 +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 TopicMapping = 4; - - public static final String[] names = { "NONE", "Message", "SubscriptionRequest", "TopicHandleRequest", "TopicMapping", }; - - public static String name(int e) { return names[e]; } -} - +// 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 TopicMapping = 4; + + 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 f413196f..a4243cac 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/PubSubUnionUnion.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/PubSubUnionUnion.java @@ -1,39 +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.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.TopicMapping: return solarxr_protocol.pub_sub.TopicMapping.pack(builder, _o.asTopicMapping()); - default: return 0; - } - } -} - +// 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.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.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 cd05f42a..0dfabd64 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/SubscriptionRequest.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/SubscriptionRequest.java @@ -1,80 +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`. Replies with a `TopicMapping`. - */ -@SuppressWarnings("unused") -public final class SubscriptionRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - 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); - } -} - +// 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`. Replies with a `TopicMapping`. + */ +@SuppressWarnings("unused") +public final class SubscriptionRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + 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 index f17a8e0b..2eefaad8 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/SubscriptionRequestT.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/SubscriptionRequestT.java @@ -1,22 +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; - } -} - +// 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 index e368064c..4320054f 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/Topic.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/Topic.java @@ -1,16 +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]; } -} - +// 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 index 0f91d6c5..d7ee96f2 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/TopicHandle.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/TopicHandle.java @@ -1,60 +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_22_10_26(); } - 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()); - } -} - +// 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_22_10_26(); } + 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 index 5333e954..4b48a97b 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleRequest.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleRequest.java @@ -1,62 +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_22_10_26(); } - 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); - } -} - +// 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_22_10_26(); } + 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 index acf0811f..26431889 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleRequestT.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleRequestT.java @@ -1,22 +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; - } -} - +// 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/TopicHandleT.java b/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleT.java index deaa0d32..c4902179 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleT.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleT.java @@ -1,22 +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; - } -} - +// 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 index 8a43f7f7..5f95edcc 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/TopicId.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/TopicId.java @@ -1,98 +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_22_10_26(); } - 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); - } -} - +// 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_22_10_26(); } + 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 index 8359c964..c24d9342 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/TopicIdT.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/TopicIdT.java @@ -1,34 +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; - } -} - +// 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/TopicMapping.java b/protocol/java/src/solarxr_protocol/pub_sub/TopicMapping.java index 2672edd6..83f5cd96 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/TopicMapping.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/TopicMapping.java @@ -1,70 +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_22_10_26(); } - 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); - } -} - +// 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_22_10_26(); } + 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/TopicMappingT.java b/protocol/java/src/solarxr_protocol/pub_sub/TopicMappingT.java index 8429afa4..a74b8507 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/TopicMappingT.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/TopicMappingT.java @@ -1,28 +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 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 TopicMappingT() { - this.id = null; - this.handle = null; - } -} - +// 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 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 TopicMappingT() { + this.id = null; + this.handle = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/TopicUnion.java b/protocol/java/src/solarxr_protocol/pub_sub/TopicUnion.java index 02b96440..d2f1844e 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/TopicUnion.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/TopicUnion.java @@ -1,35 +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; - } - } -} - +// 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/AddUnknownDeviceRequest.java b/protocol/java/src/solarxr_protocol/rpc/AddUnknownDeviceRequest.java index cd34f224..477d86d5 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AddUnknownDeviceRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/AddUnknownDeviceRequest.java @@ -1,59 +1,59 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -@SuppressWarnings("unused") -public final class AddUnknownDeviceRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static AddUnknownDeviceRequest getRootAsAddUnknownDeviceRequest(ByteBuffer _bb) { return getRootAsAddUnknownDeviceRequest(_bb, new AddUnknownDeviceRequest()); } - public static AddUnknownDeviceRequest getRootAsAddUnknownDeviceRequest(ByteBuffer _bb, AddUnknownDeviceRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } - public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } - public AddUnknownDeviceRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public String macAddress() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer macAddressAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } - public ByteBuffer macAddressInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } - - public static int createAddUnknownDeviceRequest(FlatBufferBuilder builder, - int macAddressOffset) { - builder.startTable(1); - AddUnknownDeviceRequest.addMacAddress(builder, macAddressOffset); - return AddUnknownDeviceRequest.endAddUnknownDeviceRequest(builder); - } - - public static void startAddUnknownDeviceRequest(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addMacAddress(FlatBufferBuilder builder, int macAddressOffset) { builder.addOffset(0, macAddressOffset, 0); } - public static int endAddUnknownDeviceRequest(FlatBufferBuilder builder) { - int o = builder.endTable(); - return o; - } - - public static final class Vector extends BaseVector { - public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } - - public AddUnknownDeviceRequest get(int j) { return get(new AddUnknownDeviceRequest(), j); } - public AddUnknownDeviceRequest get(AddUnknownDeviceRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public AddUnknownDeviceRequestT unpack() { - AddUnknownDeviceRequestT _o = new AddUnknownDeviceRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(AddUnknownDeviceRequestT _o) { - String _oMacAddress = macAddress(); - _o.setMacAddress(_oMacAddress); - } - public static int pack(FlatBufferBuilder builder, AddUnknownDeviceRequestT _o) { - if (_o == null) return 0; - int _macAddress = _o.getMacAddress() == null ? 0 : builder.createString(_o.getMacAddress()); - return createAddUnknownDeviceRequest( - builder, - _macAddress); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class AddUnknownDeviceRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static AddUnknownDeviceRequest getRootAsAddUnknownDeviceRequest(ByteBuffer _bb) { return getRootAsAddUnknownDeviceRequest(_bb, new AddUnknownDeviceRequest()); } + public static AddUnknownDeviceRequest getRootAsAddUnknownDeviceRequest(ByteBuffer _bb, AddUnknownDeviceRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public AddUnknownDeviceRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String macAddress() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer macAddressAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer macAddressInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + + public static int createAddUnknownDeviceRequest(FlatBufferBuilder builder, + int macAddressOffset) { + builder.startTable(1); + AddUnknownDeviceRequest.addMacAddress(builder, macAddressOffset); + return AddUnknownDeviceRequest.endAddUnknownDeviceRequest(builder); + } + + public static void startAddUnknownDeviceRequest(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addMacAddress(FlatBufferBuilder builder, int macAddressOffset) { builder.addOffset(0, macAddressOffset, 0); } + public static int endAddUnknownDeviceRequest(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public AddUnknownDeviceRequest get(int j) { return get(new AddUnknownDeviceRequest(), j); } + public AddUnknownDeviceRequest get(AddUnknownDeviceRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public AddUnknownDeviceRequestT unpack() { + AddUnknownDeviceRequestT _o = new AddUnknownDeviceRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(AddUnknownDeviceRequestT _o) { + String _oMacAddress = macAddress(); + _o.setMacAddress(_oMacAddress); + } + public static int pack(FlatBufferBuilder builder, AddUnknownDeviceRequestT _o) { + if (_o == null) return 0; + int _macAddress = _o.getMacAddress() == null ? 0 : builder.createString(_o.getMacAddress()); + return createAddUnknownDeviceRequest( + builder, + _macAddress); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AddUnknownDeviceRequestT.java b/protocol/java/src/solarxr_protocol/rpc/AddUnknownDeviceRequestT.java index d3e8af2d..539a4c88 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AddUnknownDeviceRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/AddUnknownDeviceRequestT.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 AddUnknownDeviceRequestT { - private String macAddress; - - public String getMacAddress() { return macAddress; } - - public void setMacAddress(String macAddress) { this.macAddress = macAddress; } - - - public AddUnknownDeviceRequestT() { - this.macAddress = 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 AddUnknownDeviceRequestT { + private String macAddress; + + public String getMacAddress() { return macAddress; } + + public void setMacAddress(String macAddress) { this.macAddress = macAddress; } + + + public AddUnknownDeviceRequestT() { + this.macAddress = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ArmsMountingResetMode.java b/protocol/java/src/solarxr_protocol/rpc/ArmsMountingResetMode.java index 2a8bf5dc..4d3d4e49 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ArmsMountingResetMode.java +++ b/protocol/java/src/solarxr_protocol/rpc/ArmsMountingResetMode.java @@ -1,29 +1,29 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -@SuppressWarnings("unused") -public final class ArmsMountingResetMode { - private ArmsMountingResetMode() { } - /** - * Upper arm going back and forearm going forward - */ - public static final int BACK = 0; - /** - * Arms going forward - */ - public static final int FORWARD = 1; - /** - * Arms going up to the sides into a tpose - */ - public static final int TPOSE_UP = 2; - /** - * Arms going down to the sides from a tpose - */ - public static final int TPOSE_DOWN = 3; - - public static final String[] names = { "BACK", "FORWARD", "TPOSE_UP", "TPOSE_DOWN", }; - - 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 ArmsMountingResetMode { + private ArmsMountingResetMode() { } + /** + * Upper arm going back and forearm going forward + */ + public static final int BACK = 0; + /** + * Arms going forward + */ + public static final int FORWARD = 1; + /** + * Arms going up to the sides into a tpose + */ + public static final int TPOSE_UP = 2; + /** + * Arms going down to the sides from a tpose + */ + public static final int TPOSE_DOWN = 3; + + public static final String[] names = { "BACK", "FORWARD", "TPOSE_UP", "TPOSE_DOWN", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AssignTrackerRequest.java b/protocol/java/src/solarxr_protocol/rpc/AssignTrackerRequest.java index 466465ca..d849ae34 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AssignTrackerRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/AssignTrackerRequest.java @@ -1,75 +1,75 @@ -// 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_22_10_26(); } - 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 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(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 boolean allowDriftCompensation() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static void startAssignTrackerRequest(FlatBufferBuilder builder) { builder.startTable(5); } - 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 addMountingOrientation(FlatBufferBuilder builder, int mountingOrientationOffset) { builder.addStruct(2, mountingOrientationOffset, 0); } - public static void addDisplayName(FlatBufferBuilder builder, int displayNameOffset) { builder.addOffset(3, displayNameOffset, 0); } - public static void addAllowDriftCompensation(FlatBufferBuilder builder, boolean allowDriftCompensation) { builder.addBoolean(4, allowDriftCompensation, false); } - 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 (mountingOrientation() != null) mountingOrientation().unpackTo(_o.getMountingOrientation()); - else _o.setMountingOrientation(null); - String _oDisplayName = displayName(); - _o.setDisplayName(_oDisplayName); - boolean _oAllowDriftCompensation = allowDriftCompensation(); - _o.setAllowDriftCompensation(_oAllowDriftCompensation); - } - 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()); - addMountingOrientation(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getMountingOrientation())); - addDisplayName(builder, _displayName); - addAllowDriftCompensation(builder, _o.getAllowDriftCompensation()); - 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_22_10_26(); } + 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 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(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 boolean allowDriftCompensation() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static void startAssignTrackerRequest(FlatBufferBuilder builder) { builder.startTable(5); } + 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 addMountingOrientation(FlatBufferBuilder builder, int mountingOrientationOffset) { builder.addStruct(2, mountingOrientationOffset, 0); } + public static void addDisplayName(FlatBufferBuilder builder, int displayNameOffset) { builder.addOffset(3, displayNameOffset, 0); } + public static void addAllowDriftCompensation(FlatBufferBuilder builder, boolean allowDriftCompensation) { builder.addBoolean(4, allowDriftCompensation, false); } + 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 (mountingOrientation() != null) mountingOrientation().unpackTo(_o.getMountingOrientation()); + else _o.setMountingOrientation(null); + String _oDisplayName = displayName(); + _o.setDisplayName(_oDisplayName); + boolean _oAllowDriftCompensation = allowDriftCompensation(); + _o.setAllowDriftCompensation(_oAllowDriftCompensation); + } + 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()); + addMountingOrientation(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getMountingOrientation())); + addDisplayName(builder, _displayName); + addAllowDriftCompensation(builder, _o.getAllowDriftCompensation()); + return endAssignTrackerRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AssignTrackerRequestT.java b/protocol/java/src/solarxr_protocol/rpc/AssignTrackerRequestT.java index 3b225750..d086d3a9 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AssignTrackerRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/AssignTrackerRequestT.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 AssignTrackerRequestT { - private solarxr_protocol.datatypes.TrackerIdT trackerId; - private int bodyPosition; - private solarxr_protocol.datatypes.math.QuatT mountingOrientation; - private String displayName; - private boolean allowDriftCompensation; - - 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 getMountingOrientation() { return mountingOrientation; } - - public void setMountingOrientation(solarxr_protocol.datatypes.math.QuatT mountingOrientation) { this.mountingOrientation = mountingOrientation; } - - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { this.displayName = displayName; } - - public boolean getAllowDriftCompensation() { return allowDriftCompensation; } - - public void setAllowDriftCompensation(boolean allowDriftCompensation) { this.allowDriftCompensation = allowDriftCompensation; } - - - public AssignTrackerRequestT() { - this.trackerId = null; - this.bodyPosition = 0; - this.mountingOrientation = new solarxr_protocol.datatypes.math.QuatT(); - this.displayName = null; - this.allowDriftCompensation = 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 AssignTrackerRequestT { + private solarxr_protocol.datatypes.TrackerIdT trackerId; + private int bodyPosition; + private solarxr_protocol.datatypes.math.QuatT mountingOrientation; + private String displayName; + private boolean allowDriftCompensation; + + 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 getMountingOrientation() { return mountingOrientation; } + + public void setMountingOrientation(solarxr_protocol.datatypes.math.QuatT mountingOrientation) { this.mountingOrientation = mountingOrientation; } + + public String getDisplayName() { return displayName; } + + public void setDisplayName(String displayName) { this.displayName = displayName; } + + public boolean getAllowDriftCompensation() { return allowDriftCompensation; } + + public void setAllowDriftCompensation(boolean allowDriftCompensation) { this.allowDriftCompensation = allowDriftCompensation; } + + + public AssignTrackerRequestT() { + this.trackerId = null; + this.bodyPosition = 0; + this.mountingOrientation = new solarxr_protocol.datatypes.math.QuatT(); + this.displayName = null; + this.allowDriftCompensation = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AutoBoneApplyRequest.java b/protocol/java/src/solarxr_protocol/rpc/AutoBoneApplyRequest.java index b4624483..38028ee9 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AutoBoneApplyRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/AutoBoneApplyRequest.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.*; - -/** - * Applies the estimated proportions - */ -@SuppressWarnings("unused") -public final class AutoBoneApplyRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static AutoBoneApplyRequest getRootAsAutoBoneApplyRequest(ByteBuffer _bb) { return getRootAsAutoBoneApplyRequest(_bb, new AutoBoneApplyRequest()); } - public static AutoBoneApplyRequest getRootAsAutoBoneApplyRequest(ByteBuffer _bb, AutoBoneApplyRequest 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 AutoBoneApplyRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startAutoBoneApplyRequest(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endAutoBoneApplyRequest(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 AutoBoneApplyRequest get(int j) { return get(new AutoBoneApplyRequest(), j); } - public AutoBoneApplyRequest get(AutoBoneApplyRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public AutoBoneApplyRequestT unpack() { - AutoBoneApplyRequestT _o = new AutoBoneApplyRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(AutoBoneApplyRequestT _o) { - } - public static int pack(FlatBufferBuilder builder, AutoBoneApplyRequestT _o) { - if (_o == null) return 0; - startAutoBoneApplyRequest(builder); - return endAutoBoneApplyRequest(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.*; + +/** + * Applies the estimated proportions + */ +@SuppressWarnings("unused") +public final class AutoBoneApplyRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static AutoBoneApplyRequest getRootAsAutoBoneApplyRequest(ByteBuffer _bb) { return getRootAsAutoBoneApplyRequest(_bb, new AutoBoneApplyRequest()); } + public static AutoBoneApplyRequest getRootAsAutoBoneApplyRequest(ByteBuffer _bb, AutoBoneApplyRequest 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 AutoBoneApplyRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startAutoBoneApplyRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endAutoBoneApplyRequest(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 AutoBoneApplyRequest get(int j) { return get(new AutoBoneApplyRequest(), j); } + public AutoBoneApplyRequest get(AutoBoneApplyRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public AutoBoneApplyRequestT unpack() { + AutoBoneApplyRequestT _o = new AutoBoneApplyRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(AutoBoneApplyRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, AutoBoneApplyRequestT _o) { + if (_o == null) return 0; + startAutoBoneApplyRequest(builder); + return endAutoBoneApplyRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AutoBoneApplyRequestT.java b/protocol/java/src/solarxr_protocol/rpc/AutoBoneApplyRequestT.java index 0041d3e9..13fe260d 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AutoBoneApplyRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/AutoBoneApplyRequestT.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 AutoBoneApplyRequestT { - - - public AutoBoneApplyRequestT() { - } -} - +// 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 AutoBoneApplyRequestT { + + + public AutoBoneApplyRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AutoBoneCancelRecordingRequest.java b/protocol/java/src/solarxr_protocol/rpc/AutoBoneCancelRecordingRequest.java index e09d6fd5..53c87fea 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AutoBoneCancelRecordingRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/AutoBoneCancelRecordingRequest.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.*; - -/** - * Cancels the current recording, aborting the process and discarding the data - */ -@SuppressWarnings("unused") -public final class AutoBoneCancelRecordingRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static AutoBoneCancelRecordingRequest getRootAsAutoBoneCancelRecordingRequest(ByteBuffer _bb) { return getRootAsAutoBoneCancelRecordingRequest(_bb, new AutoBoneCancelRecordingRequest()); } - public static AutoBoneCancelRecordingRequest getRootAsAutoBoneCancelRecordingRequest(ByteBuffer _bb, AutoBoneCancelRecordingRequest 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 AutoBoneCancelRecordingRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startAutoBoneCancelRecordingRequest(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endAutoBoneCancelRecordingRequest(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 AutoBoneCancelRecordingRequest get(int j) { return get(new AutoBoneCancelRecordingRequest(), j); } - public AutoBoneCancelRecordingRequest get(AutoBoneCancelRecordingRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public AutoBoneCancelRecordingRequestT unpack() { - AutoBoneCancelRecordingRequestT _o = new AutoBoneCancelRecordingRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(AutoBoneCancelRecordingRequestT _o) { - } - public static int pack(FlatBufferBuilder builder, AutoBoneCancelRecordingRequestT _o) { - if (_o == null) return 0; - startAutoBoneCancelRecordingRequest(builder); - return endAutoBoneCancelRecordingRequest(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.*; + +/** + * Cancels the current recording, aborting the process and discarding the data + */ +@SuppressWarnings("unused") +public final class AutoBoneCancelRecordingRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static AutoBoneCancelRecordingRequest getRootAsAutoBoneCancelRecordingRequest(ByteBuffer _bb) { return getRootAsAutoBoneCancelRecordingRequest(_bb, new AutoBoneCancelRecordingRequest()); } + public static AutoBoneCancelRecordingRequest getRootAsAutoBoneCancelRecordingRequest(ByteBuffer _bb, AutoBoneCancelRecordingRequest 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 AutoBoneCancelRecordingRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startAutoBoneCancelRecordingRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endAutoBoneCancelRecordingRequest(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 AutoBoneCancelRecordingRequest get(int j) { return get(new AutoBoneCancelRecordingRequest(), j); } + public AutoBoneCancelRecordingRequest get(AutoBoneCancelRecordingRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public AutoBoneCancelRecordingRequestT unpack() { + AutoBoneCancelRecordingRequestT _o = new AutoBoneCancelRecordingRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(AutoBoneCancelRecordingRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, AutoBoneCancelRecordingRequestT _o) { + if (_o == null) return 0; + startAutoBoneCancelRecordingRequest(builder); + return endAutoBoneCancelRecordingRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AutoBoneCancelRecordingRequestT.java b/protocol/java/src/solarxr_protocol/rpc/AutoBoneCancelRecordingRequestT.java index 204f792a..80e1208d 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AutoBoneCancelRecordingRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/AutoBoneCancelRecordingRequestT.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 AutoBoneCancelRecordingRequestT { - - - public AutoBoneCancelRecordingRequestT() { - } -} - +// 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 AutoBoneCancelRecordingRequestT { + + + public AutoBoneCancelRecordingRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AutoBoneEpochResponse.java b/protocol/java/src/solarxr_protocol/rpc/AutoBoneEpochResponse.java index ae921c3c..4b010e22 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AutoBoneEpochResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/AutoBoneEpochResponse.java @@ -1,97 +1,97 @@ -// 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_22_10_26(); } - 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; } - /** - * The current error value. This can be any positive number, where lower is better. - */ - public float epochError() { int o = __offset(8); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } - /** - * A list of the current estimated body proportions. - */ - 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_22_10_26(); } + 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; } + /** + * The current error value. This can be any positive number, where lower is better. + */ + public float epochError() { int o = __offset(8); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + /** + * A list of the current estimated body proportions. + */ + 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 7fa27895..efdac149 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 785be773..1437b7fd 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_22_10_26(); } - 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_22_10_26(); } + 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 968cb38e..577494f5 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 eb121a3b..abd4563b 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessStatusResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessStatusResponse.java @@ -1,106 +1,106 @@ -// 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_22_10_26(); } - 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; } - /** - * The current count. This value is -1 if there is nothing to report. - */ - public long current() { int o = __offset(8); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } - /** - * The total count. This value is -1 if there is nothing to report. - */ - public long total() { int o = __offset(10); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } - /** - * True if the operation has completed with any result, successful or not. - */ - public boolean completed() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - /** - * True if the completed operation was successful, only observe if `completed` is true. - */ - public boolean success() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - /** - * The time remaining in seconds. This value is -1 if there is nothing to report. - */ - public float eta() { int o = __offset(16); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } - - public static int createAutoBoneProcessStatusResponse(FlatBufferBuilder builder, - int processType, - long current, - long total, - boolean completed, - boolean success, - float eta) { - builder.startTable(7); - AutoBoneProcessStatusResponse.addEta(builder, eta); - AutoBoneProcessStatusResponse.addTotal(builder, total); - AutoBoneProcessStatusResponse.addCurrent(builder, current); - AutoBoneProcessStatusResponse.addSuccess(builder, success); - AutoBoneProcessStatusResponse.addCompleted(builder, completed); - AutoBoneProcessStatusResponse.addProcessType(builder, processType); - return AutoBoneProcessStatusResponse.endAutoBoneProcessStatusResponse(builder); - } - - public static void startAutoBoneProcessStatusResponse(FlatBufferBuilder builder) { builder.startTable(7); } - public static void addProcessType(FlatBufferBuilder builder, int processType) { builder.addByte(0, (byte) processType, (byte) 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 void addEta(FlatBufferBuilder builder, float eta) { builder.addFloat(6, eta, 0.0f); } - 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); - long _oCurrent = current(); - _o.setCurrent(_oCurrent); - long _oTotal = total(); - _o.setTotal(_oTotal); - boolean _oCompleted = completed(); - _o.setCompleted(_oCompleted); - boolean _oSuccess = success(); - _o.setSuccess(_oSuccess); - float _oEta = eta(); - _o.setEta(_oEta); - } - public static int pack(FlatBufferBuilder builder, AutoBoneProcessStatusResponseT _o) { - if (_o == null) return 0; - return createAutoBoneProcessStatusResponse( - builder, - _o.getProcessType(), - _o.getCurrent(), - _o.getTotal(), - _o.getCompleted(), - _o.getSuccess(), - _o.getEta()); - } -} - +// 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_22_10_26(); } + 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; } + /** + * The current count. This value is -1 if there is nothing to report. + */ + public long current() { int o = __offset(8); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } + /** + * The total count. This value is -1 if there is nothing to report. + */ + public long total() { int o = __offset(10); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } + /** + * True if the operation has completed with any result, successful or not. + */ + public boolean completed() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + /** + * True if the completed operation was successful, only observe if `completed` is true. + */ + public boolean success() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + /** + * The time remaining in seconds. This value is -1 if there is nothing to report. + */ + public float eta() { int o = __offset(16); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + + public static int createAutoBoneProcessStatusResponse(FlatBufferBuilder builder, + int processType, + long current, + long total, + boolean completed, + boolean success, + float eta) { + builder.startTable(7); + AutoBoneProcessStatusResponse.addEta(builder, eta); + AutoBoneProcessStatusResponse.addTotal(builder, total); + AutoBoneProcessStatusResponse.addCurrent(builder, current); + AutoBoneProcessStatusResponse.addSuccess(builder, success); + AutoBoneProcessStatusResponse.addCompleted(builder, completed); + AutoBoneProcessStatusResponse.addProcessType(builder, processType); + return AutoBoneProcessStatusResponse.endAutoBoneProcessStatusResponse(builder); + } + + public static void startAutoBoneProcessStatusResponse(FlatBufferBuilder builder) { builder.startTable(7); } + public static void addProcessType(FlatBufferBuilder builder, int processType) { builder.addByte(0, (byte) processType, (byte) 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 void addEta(FlatBufferBuilder builder, float eta) { builder.addFloat(6, eta, 0.0f); } + 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); + long _oCurrent = current(); + _o.setCurrent(_oCurrent); + long _oTotal = total(); + _o.setTotal(_oTotal); + boolean _oCompleted = completed(); + _o.setCompleted(_oCompleted); + boolean _oSuccess = success(); + _o.setSuccess(_oSuccess); + float _oEta = eta(); + _o.setEta(_oEta); + } + public static int pack(FlatBufferBuilder builder, AutoBoneProcessStatusResponseT _o) { + if (_o == null) return 0; + return createAutoBoneProcessStatusResponse( + builder, + _o.getProcessType(), + _o.getCurrent(), + _o.getTotal(), + _o.getCompleted(), + _o.getSuccess(), + _o.getEta()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessStatusResponseT.java b/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessStatusResponseT.java index 88ca02a6..56921ea8 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 long current; - private long total; - private boolean completed; - private boolean success; - private float eta; - - public int getProcessType() { return processType; } - - public void setProcessType(int processType) { this.processType = processType; } - - 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 float getEta() { return eta; } - - public void setEta(float eta) { this.eta = eta; } - - - public AutoBoneProcessStatusResponseT() { - this.processType = 0; - this.current = 0L; - this.total = 0L; - this.completed = false; - this.success = false; - this.eta = 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 AutoBoneProcessStatusResponseT { + private int processType; + private long current; + private long total; + private boolean completed; + private boolean success; + private float eta; + + public int getProcessType() { return processType; } + + public void setProcessType(int processType) { this.processType = processType; } + + 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 float getEta() { return eta; } + + public void setEta(float eta) { this.eta = eta; } + + + public AutoBoneProcessStatusResponseT() { + this.processType = 0; + this.current = 0L; + this.total = 0L; + this.completed = false; + this.success = false; + this.eta = 0.0f; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessType.java b/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessType.java index a90a98d8..48f9d8f4 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessType.java +++ b/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessType.java @@ -1,22 +1,22 @@ -// 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; - /** - * @deprecated - * Use AutoBoneApplyRequest instead - */ - 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; + /** + * @deprecated + * Use AutoBoneApplyRequest instead + */ + 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/AutoBoneSettings.java b/protocol/java/src/solarxr_protocol/rpc/AutoBoneSettings.java index 958ea0b0..b5adeb96 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AutoBoneSettings.java +++ b/protocol/java/src/solarxr_protocol/rpc/AutoBoneSettings.java @@ -1,244 +1,244 @@ -// 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.*; - -/** - * https://github.com/SlimeVR/SlimeVR-Server/blob/v0.8.3/server/src/main/java/dev/slimevr/config/AutoBoneConfig.kt - */ -@SuppressWarnings("unused") -public final class AutoBoneSettings extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static AutoBoneSettings getRootAsAutoBoneSettings(ByteBuffer _bb) { return getRootAsAutoBoneSettings(_bb, new AutoBoneSettings()); } - public static AutoBoneSettings getRootAsAutoBoneSettings(ByteBuffer _bb, AutoBoneSettings 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 AutoBoneSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public boolean hasCursorIncrement() { return 0 != __offset(4); } - public int cursorIncrement() { int o = __offset(4); return o != 0 ? bb.getInt(o + bb_pos) : 0; } - public boolean hasMinDataDistance() { return 0 != __offset(6); } - public int minDataDistance() { int o = __offset(6); return o != 0 ? bb.getInt(o + bb_pos) : 0; } - public boolean hasMaxDataDistance() { return 0 != __offset(8); } - public int maxDataDistance() { int o = __offset(8); return o != 0 ? bb.getInt(o + bb_pos) : 0; } - public boolean hasNumEpochs() { return 0 != __offset(10); } - public int numEpochs() { int o = __offset(10); return o != 0 ? bb.getInt(o + bb_pos) : 0; } - public boolean hasPrintEveryNumEpochs() { return 0 != __offset(12); } - public int printEveryNumEpochs() { int o = __offset(12); return o != 0 ? bb.getInt(o + bb_pos) : 0; } - public boolean hasInitialAdjustRate() { return 0 != __offset(14); } - public float initialAdjustRate() { int o = __offset(14); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - public boolean hasAdjustRateDecay() { return 0 != __offset(16); } - public float adjustRateDecay() { int o = __offset(16); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - public boolean hasSlideErrorFactor() { return 0 != __offset(18); } - public float slideErrorFactor() { int o = __offset(18); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - public boolean hasOffsetSlideErrorFactor() { return 0 != __offset(20); } - public float offsetSlideErrorFactor() { int o = __offset(20); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - public boolean hasFootHeightOffsetErrorFactor() { return 0 != __offset(22); } - public float footHeightOffsetErrorFactor() { int o = __offset(22); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - public boolean hasBodyProportionErrorFactor() { return 0 != __offset(24); } - public float bodyProportionErrorFactor() { int o = __offset(24); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - public boolean hasHeightErrorFactor() { return 0 != __offset(26); } - public float heightErrorFactor() { int o = __offset(26); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - public boolean hasPositionErrorFactor() { return 0 != __offset(28); } - public float positionErrorFactor() { int o = __offset(28); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - public boolean hasPositionOffsetErrorFactor() { return 0 != __offset(30); } - public float positionOffsetErrorFactor() { int o = __offset(30); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - public boolean hasCalcInitError() { return 0 != __offset(32); } - public boolean calcInitError() { int o = __offset(32); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasTargetHmdHeight() { return 0 != __offset(34); } - public float targetHmdHeight() { int o = __offset(34); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - public boolean hasTargetFullHeight() { return 0 != __offset(36); } - public float targetFullHeight() { int o = __offset(36); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - public boolean hasRandomizeFrameOrder() { return 0 != __offset(38); } - public boolean randomizeFrameOrder() { int o = __offset(38); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasScaleEachStep() { return 0 != __offset(40); } - public boolean scaleEachStep() { int o = __offset(40); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasSampleCount() { return 0 != __offset(42); } - public int sampleCount() { int o = __offset(42); return o != 0 ? bb.getInt(o + bb_pos) : 0; } - public boolean hasSampleRateMs() { return 0 != __offset(44); } - public long sampleRateMs() { int o = __offset(44); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } - public boolean hasSaveRecordings() { return 0 != __offset(46); } - public boolean saveRecordings() { int o = __offset(46); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasUseSkeletonHeight() { return 0 != __offset(48); } - public boolean useSkeletonHeight() { int o = __offset(48); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasRandSeed() { return 0 != __offset(50); } - public long randSeed() { int o = __offset(50); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } - - public static int createAutoBoneSettings(FlatBufferBuilder builder, - int cursorIncrement, - int minDataDistance, - int maxDataDistance, - int numEpochs, - int printEveryNumEpochs, - float initialAdjustRate, - float adjustRateDecay, - float slideErrorFactor, - float offsetSlideErrorFactor, - float footHeightOffsetErrorFactor, - float bodyProportionErrorFactor, - float heightErrorFactor, - float positionErrorFactor, - float positionOffsetErrorFactor, - boolean calcInitError, - float targetHmdHeight, - float targetFullHeight, - boolean randomizeFrameOrder, - boolean scaleEachStep, - int sampleCount, - long sampleRateMs, - boolean saveRecordings, - boolean useSkeletonHeight, - long randSeed) { - builder.startTable(24); - AutoBoneSettings.addRandSeed(builder, randSeed); - AutoBoneSettings.addSampleRateMs(builder, sampleRateMs); - AutoBoneSettings.addSampleCount(builder, sampleCount); - AutoBoneSettings.addTargetFullHeight(builder, targetFullHeight); - AutoBoneSettings.addTargetHmdHeight(builder, targetHmdHeight); - AutoBoneSettings.addPositionOffsetErrorFactor(builder, positionOffsetErrorFactor); - AutoBoneSettings.addPositionErrorFactor(builder, positionErrorFactor); - AutoBoneSettings.addHeightErrorFactor(builder, heightErrorFactor); - AutoBoneSettings.addBodyProportionErrorFactor(builder, bodyProportionErrorFactor); - AutoBoneSettings.addFootHeightOffsetErrorFactor(builder, footHeightOffsetErrorFactor); - AutoBoneSettings.addOffsetSlideErrorFactor(builder, offsetSlideErrorFactor); - AutoBoneSettings.addSlideErrorFactor(builder, slideErrorFactor); - AutoBoneSettings.addAdjustRateDecay(builder, adjustRateDecay); - AutoBoneSettings.addInitialAdjustRate(builder, initialAdjustRate); - AutoBoneSettings.addPrintEveryNumEpochs(builder, printEveryNumEpochs); - AutoBoneSettings.addNumEpochs(builder, numEpochs); - AutoBoneSettings.addMaxDataDistance(builder, maxDataDistance); - AutoBoneSettings.addMinDataDistance(builder, minDataDistance); - AutoBoneSettings.addCursorIncrement(builder, cursorIncrement); - AutoBoneSettings.addUseSkeletonHeight(builder, useSkeletonHeight); - AutoBoneSettings.addSaveRecordings(builder, saveRecordings); - AutoBoneSettings.addScaleEachStep(builder, scaleEachStep); - AutoBoneSettings.addRandomizeFrameOrder(builder, randomizeFrameOrder); - AutoBoneSettings.addCalcInitError(builder, calcInitError); - return AutoBoneSettings.endAutoBoneSettings(builder); - } - - public static void startAutoBoneSettings(FlatBufferBuilder builder) { builder.startTable(24); } - public static void addCursorIncrement(FlatBufferBuilder builder, int cursorIncrement) { builder.addInt(0, cursorIncrement, 0); } - public static void addMinDataDistance(FlatBufferBuilder builder, int minDataDistance) { builder.addInt(1, minDataDistance, 0); } - public static void addMaxDataDistance(FlatBufferBuilder builder, int maxDataDistance) { builder.addInt(2, maxDataDistance, 0); } - public static void addNumEpochs(FlatBufferBuilder builder, int numEpochs) { builder.addInt(3, numEpochs, 0); } - public static void addPrintEveryNumEpochs(FlatBufferBuilder builder, int printEveryNumEpochs) { builder.addInt(4, printEveryNumEpochs, 0); } - public static void addInitialAdjustRate(FlatBufferBuilder builder, float initialAdjustRate) { builder.addFloat(5, initialAdjustRate, 0f); } - public static void addAdjustRateDecay(FlatBufferBuilder builder, float adjustRateDecay) { builder.addFloat(6, adjustRateDecay, 0f); } - public static void addSlideErrorFactor(FlatBufferBuilder builder, float slideErrorFactor) { builder.addFloat(7, slideErrorFactor, 0f); } - public static void addOffsetSlideErrorFactor(FlatBufferBuilder builder, float offsetSlideErrorFactor) { builder.addFloat(8, offsetSlideErrorFactor, 0f); } - public static void addFootHeightOffsetErrorFactor(FlatBufferBuilder builder, float footHeightOffsetErrorFactor) { builder.addFloat(9, footHeightOffsetErrorFactor, 0f); } - public static void addBodyProportionErrorFactor(FlatBufferBuilder builder, float bodyProportionErrorFactor) { builder.addFloat(10, bodyProportionErrorFactor, 0f); } - public static void addHeightErrorFactor(FlatBufferBuilder builder, float heightErrorFactor) { builder.addFloat(11, heightErrorFactor, 0f); } - public static void addPositionErrorFactor(FlatBufferBuilder builder, float positionErrorFactor) { builder.addFloat(12, positionErrorFactor, 0f); } - public static void addPositionOffsetErrorFactor(FlatBufferBuilder builder, float positionOffsetErrorFactor) { builder.addFloat(13, positionOffsetErrorFactor, 0f); } - public static void addCalcInitError(FlatBufferBuilder builder, boolean calcInitError) { builder.addBoolean(14, calcInitError, false); } - public static void addTargetHmdHeight(FlatBufferBuilder builder, float targetHmdHeight) { builder.addFloat(15, targetHmdHeight, 0f); } - public static void addTargetFullHeight(FlatBufferBuilder builder, float targetFullHeight) { builder.addFloat(16, targetFullHeight, 0f); } - public static void addRandomizeFrameOrder(FlatBufferBuilder builder, boolean randomizeFrameOrder) { builder.addBoolean(17, randomizeFrameOrder, false); } - public static void addScaleEachStep(FlatBufferBuilder builder, boolean scaleEachStep) { builder.addBoolean(18, scaleEachStep, false); } - public static void addSampleCount(FlatBufferBuilder builder, int sampleCount) { builder.addInt(19, sampleCount, 0); } - public static void addSampleRateMs(FlatBufferBuilder builder, long sampleRateMs) { builder.addLong(20, sampleRateMs, 0L); } - public static void addSaveRecordings(FlatBufferBuilder builder, boolean saveRecordings) { builder.addBoolean(21, saveRecordings, false); } - public static void addUseSkeletonHeight(FlatBufferBuilder builder, boolean useSkeletonHeight) { builder.addBoolean(22, useSkeletonHeight, false); } - public static void addRandSeed(FlatBufferBuilder builder, long randSeed) { builder.addLong(23, randSeed, 0L); } - public static int endAutoBoneSettings(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 AutoBoneSettings get(int j) { return get(new AutoBoneSettings(), j); } - public AutoBoneSettings get(AutoBoneSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public AutoBoneSettingsT unpack() { - AutoBoneSettingsT _o = new AutoBoneSettingsT(); - unpackTo(_o); - return _o; - } - public void unpackTo(AutoBoneSettingsT _o) { - Integer _oCursorIncrement = hasCursorIncrement() ? cursorIncrement() : null; - _o.setCursorIncrement(_oCursorIncrement); - Integer _oMinDataDistance = hasMinDataDistance() ? minDataDistance() : null; - _o.setMinDataDistance(_oMinDataDistance); - Integer _oMaxDataDistance = hasMaxDataDistance() ? maxDataDistance() : null; - _o.setMaxDataDistance(_oMaxDataDistance); - Integer _oNumEpochs = hasNumEpochs() ? numEpochs() : null; - _o.setNumEpochs(_oNumEpochs); - Integer _oPrintEveryNumEpochs = hasPrintEveryNumEpochs() ? printEveryNumEpochs() : null; - _o.setPrintEveryNumEpochs(_oPrintEveryNumEpochs); - Float _oInitialAdjustRate = hasInitialAdjustRate() ? initialAdjustRate() : null; - _o.setInitialAdjustRate(_oInitialAdjustRate); - Float _oAdjustRateDecay = hasAdjustRateDecay() ? adjustRateDecay() : null; - _o.setAdjustRateDecay(_oAdjustRateDecay); - Float _oSlideErrorFactor = hasSlideErrorFactor() ? slideErrorFactor() : null; - _o.setSlideErrorFactor(_oSlideErrorFactor); - Float _oOffsetSlideErrorFactor = hasOffsetSlideErrorFactor() ? offsetSlideErrorFactor() : null; - _o.setOffsetSlideErrorFactor(_oOffsetSlideErrorFactor); - Float _oFootHeightOffsetErrorFactor = hasFootHeightOffsetErrorFactor() ? footHeightOffsetErrorFactor() : null; - _o.setFootHeightOffsetErrorFactor(_oFootHeightOffsetErrorFactor); - Float _oBodyProportionErrorFactor = hasBodyProportionErrorFactor() ? bodyProportionErrorFactor() : null; - _o.setBodyProportionErrorFactor(_oBodyProportionErrorFactor); - Float _oHeightErrorFactor = hasHeightErrorFactor() ? heightErrorFactor() : null; - _o.setHeightErrorFactor(_oHeightErrorFactor); - Float _oPositionErrorFactor = hasPositionErrorFactor() ? positionErrorFactor() : null; - _o.setPositionErrorFactor(_oPositionErrorFactor); - Float _oPositionOffsetErrorFactor = hasPositionOffsetErrorFactor() ? positionOffsetErrorFactor() : null; - _o.setPositionOffsetErrorFactor(_oPositionOffsetErrorFactor); - Boolean _oCalcInitError = hasCalcInitError() ? calcInitError() : null; - _o.setCalcInitError(_oCalcInitError); - Float _oTargetHmdHeight = hasTargetHmdHeight() ? targetHmdHeight() : null; - _o.setTargetHmdHeight(_oTargetHmdHeight); - Float _oTargetFullHeight = hasTargetFullHeight() ? targetFullHeight() : null; - _o.setTargetFullHeight(_oTargetFullHeight); - Boolean _oRandomizeFrameOrder = hasRandomizeFrameOrder() ? randomizeFrameOrder() : null; - _o.setRandomizeFrameOrder(_oRandomizeFrameOrder); - Boolean _oScaleEachStep = hasScaleEachStep() ? scaleEachStep() : null; - _o.setScaleEachStep(_oScaleEachStep); - Integer _oSampleCount = hasSampleCount() ? sampleCount() : null; - _o.setSampleCount(_oSampleCount); - Long _oSampleRateMs = hasSampleRateMs() ? sampleRateMs() : null; - _o.setSampleRateMs(_oSampleRateMs); - Boolean _oSaveRecordings = hasSaveRecordings() ? saveRecordings() : null; - _o.setSaveRecordings(_oSaveRecordings); - Boolean _oUseSkeletonHeight = hasUseSkeletonHeight() ? useSkeletonHeight() : null; - _o.setUseSkeletonHeight(_oUseSkeletonHeight); - Long _oRandSeed = hasRandSeed() ? randSeed() : null; - _o.setRandSeed(_oRandSeed); - } - public static int pack(FlatBufferBuilder builder, AutoBoneSettingsT _o) { - if (_o == null) return 0; - return createAutoBoneSettings( - builder, - _o.getCursorIncrement(), - _o.getMinDataDistance(), - _o.getMaxDataDistance(), - _o.getNumEpochs(), - _o.getPrintEveryNumEpochs(), - _o.getInitialAdjustRate(), - _o.getAdjustRateDecay(), - _o.getSlideErrorFactor(), - _o.getOffsetSlideErrorFactor(), - _o.getFootHeightOffsetErrorFactor(), - _o.getBodyProportionErrorFactor(), - _o.getHeightErrorFactor(), - _o.getPositionErrorFactor(), - _o.getPositionOffsetErrorFactor(), - _o.getCalcInitError(), - _o.getTargetHmdHeight(), - _o.getTargetFullHeight(), - _o.getRandomizeFrameOrder(), - _o.getScaleEachStep(), - _o.getSampleCount(), - _o.getSampleRateMs(), - _o.getSaveRecordings(), - _o.getUseSkeletonHeight(), - _o.getRandSeed()); - } -} - +// 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.*; + +/** + * https://github.com/SlimeVR/SlimeVR-Server/blob/v0.8.3/server/src/main/java/dev/slimevr/config/AutoBoneConfig.kt + */ +@SuppressWarnings("unused") +public final class AutoBoneSettings extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static AutoBoneSettings getRootAsAutoBoneSettings(ByteBuffer _bb) { return getRootAsAutoBoneSettings(_bb, new AutoBoneSettings()); } + public static AutoBoneSettings getRootAsAutoBoneSettings(ByteBuffer _bb, AutoBoneSettings 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 AutoBoneSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean hasCursorIncrement() { return 0 != __offset(4); } + public int cursorIncrement() { int o = __offset(4); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + public boolean hasMinDataDistance() { return 0 != __offset(6); } + public int minDataDistance() { int o = __offset(6); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + public boolean hasMaxDataDistance() { return 0 != __offset(8); } + public int maxDataDistance() { int o = __offset(8); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + public boolean hasNumEpochs() { return 0 != __offset(10); } + public int numEpochs() { int o = __offset(10); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + public boolean hasPrintEveryNumEpochs() { return 0 != __offset(12); } + public int printEveryNumEpochs() { int o = __offset(12); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + public boolean hasInitialAdjustRate() { return 0 != __offset(14); } + public float initialAdjustRate() { int o = __offset(14); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + public boolean hasAdjustRateDecay() { return 0 != __offset(16); } + public float adjustRateDecay() { int o = __offset(16); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + public boolean hasSlideErrorFactor() { return 0 != __offset(18); } + public float slideErrorFactor() { int o = __offset(18); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + public boolean hasOffsetSlideErrorFactor() { return 0 != __offset(20); } + public float offsetSlideErrorFactor() { int o = __offset(20); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + public boolean hasFootHeightOffsetErrorFactor() { return 0 != __offset(22); } + public float footHeightOffsetErrorFactor() { int o = __offset(22); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + public boolean hasBodyProportionErrorFactor() { return 0 != __offset(24); } + public float bodyProportionErrorFactor() { int o = __offset(24); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + public boolean hasHeightErrorFactor() { return 0 != __offset(26); } + public float heightErrorFactor() { int o = __offset(26); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + public boolean hasPositionErrorFactor() { return 0 != __offset(28); } + public float positionErrorFactor() { int o = __offset(28); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + public boolean hasPositionOffsetErrorFactor() { return 0 != __offset(30); } + public float positionOffsetErrorFactor() { int o = __offset(30); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + public boolean hasCalcInitError() { return 0 != __offset(32); } + public boolean calcInitError() { int o = __offset(32); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasTargetHmdHeight() { return 0 != __offset(34); } + public float targetHmdHeight() { int o = __offset(34); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + public boolean hasTargetFullHeight() { return 0 != __offset(36); } + public float targetFullHeight() { int o = __offset(36); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + public boolean hasRandomizeFrameOrder() { return 0 != __offset(38); } + public boolean randomizeFrameOrder() { int o = __offset(38); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasScaleEachStep() { return 0 != __offset(40); } + public boolean scaleEachStep() { int o = __offset(40); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasSampleCount() { return 0 != __offset(42); } + public int sampleCount() { int o = __offset(42); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + public boolean hasSampleRateMs() { return 0 != __offset(44); } + public long sampleRateMs() { int o = __offset(44); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public boolean hasSaveRecordings() { return 0 != __offset(46); } + public boolean saveRecordings() { int o = __offset(46); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasUseSkeletonHeight() { return 0 != __offset(48); } + public boolean useSkeletonHeight() { int o = __offset(48); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasRandSeed() { return 0 != __offset(50); } + public long randSeed() { int o = __offset(50); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + + public static int createAutoBoneSettings(FlatBufferBuilder builder, + int cursorIncrement, + int minDataDistance, + int maxDataDistance, + int numEpochs, + int printEveryNumEpochs, + float initialAdjustRate, + float adjustRateDecay, + float slideErrorFactor, + float offsetSlideErrorFactor, + float footHeightOffsetErrorFactor, + float bodyProportionErrorFactor, + float heightErrorFactor, + float positionErrorFactor, + float positionOffsetErrorFactor, + boolean calcInitError, + float targetHmdHeight, + float targetFullHeight, + boolean randomizeFrameOrder, + boolean scaleEachStep, + int sampleCount, + long sampleRateMs, + boolean saveRecordings, + boolean useSkeletonHeight, + long randSeed) { + builder.startTable(24); + AutoBoneSettings.addRandSeed(builder, randSeed); + AutoBoneSettings.addSampleRateMs(builder, sampleRateMs); + AutoBoneSettings.addSampleCount(builder, sampleCount); + AutoBoneSettings.addTargetFullHeight(builder, targetFullHeight); + AutoBoneSettings.addTargetHmdHeight(builder, targetHmdHeight); + AutoBoneSettings.addPositionOffsetErrorFactor(builder, positionOffsetErrorFactor); + AutoBoneSettings.addPositionErrorFactor(builder, positionErrorFactor); + AutoBoneSettings.addHeightErrorFactor(builder, heightErrorFactor); + AutoBoneSettings.addBodyProportionErrorFactor(builder, bodyProportionErrorFactor); + AutoBoneSettings.addFootHeightOffsetErrorFactor(builder, footHeightOffsetErrorFactor); + AutoBoneSettings.addOffsetSlideErrorFactor(builder, offsetSlideErrorFactor); + AutoBoneSettings.addSlideErrorFactor(builder, slideErrorFactor); + AutoBoneSettings.addAdjustRateDecay(builder, adjustRateDecay); + AutoBoneSettings.addInitialAdjustRate(builder, initialAdjustRate); + AutoBoneSettings.addPrintEveryNumEpochs(builder, printEveryNumEpochs); + AutoBoneSettings.addNumEpochs(builder, numEpochs); + AutoBoneSettings.addMaxDataDistance(builder, maxDataDistance); + AutoBoneSettings.addMinDataDistance(builder, minDataDistance); + AutoBoneSettings.addCursorIncrement(builder, cursorIncrement); + AutoBoneSettings.addUseSkeletonHeight(builder, useSkeletonHeight); + AutoBoneSettings.addSaveRecordings(builder, saveRecordings); + AutoBoneSettings.addScaleEachStep(builder, scaleEachStep); + AutoBoneSettings.addRandomizeFrameOrder(builder, randomizeFrameOrder); + AutoBoneSettings.addCalcInitError(builder, calcInitError); + return AutoBoneSettings.endAutoBoneSettings(builder); + } + + public static void startAutoBoneSettings(FlatBufferBuilder builder) { builder.startTable(24); } + public static void addCursorIncrement(FlatBufferBuilder builder, int cursorIncrement) { builder.addInt(0, cursorIncrement, 0); } + public static void addMinDataDistance(FlatBufferBuilder builder, int minDataDistance) { builder.addInt(1, minDataDistance, 0); } + public static void addMaxDataDistance(FlatBufferBuilder builder, int maxDataDistance) { builder.addInt(2, maxDataDistance, 0); } + public static void addNumEpochs(FlatBufferBuilder builder, int numEpochs) { builder.addInt(3, numEpochs, 0); } + public static void addPrintEveryNumEpochs(FlatBufferBuilder builder, int printEveryNumEpochs) { builder.addInt(4, printEveryNumEpochs, 0); } + public static void addInitialAdjustRate(FlatBufferBuilder builder, float initialAdjustRate) { builder.addFloat(5, initialAdjustRate, 0f); } + public static void addAdjustRateDecay(FlatBufferBuilder builder, float adjustRateDecay) { builder.addFloat(6, adjustRateDecay, 0f); } + public static void addSlideErrorFactor(FlatBufferBuilder builder, float slideErrorFactor) { builder.addFloat(7, slideErrorFactor, 0f); } + public static void addOffsetSlideErrorFactor(FlatBufferBuilder builder, float offsetSlideErrorFactor) { builder.addFloat(8, offsetSlideErrorFactor, 0f); } + public static void addFootHeightOffsetErrorFactor(FlatBufferBuilder builder, float footHeightOffsetErrorFactor) { builder.addFloat(9, footHeightOffsetErrorFactor, 0f); } + public static void addBodyProportionErrorFactor(FlatBufferBuilder builder, float bodyProportionErrorFactor) { builder.addFloat(10, bodyProportionErrorFactor, 0f); } + public static void addHeightErrorFactor(FlatBufferBuilder builder, float heightErrorFactor) { builder.addFloat(11, heightErrorFactor, 0f); } + public static void addPositionErrorFactor(FlatBufferBuilder builder, float positionErrorFactor) { builder.addFloat(12, positionErrorFactor, 0f); } + public static void addPositionOffsetErrorFactor(FlatBufferBuilder builder, float positionOffsetErrorFactor) { builder.addFloat(13, positionOffsetErrorFactor, 0f); } + public static void addCalcInitError(FlatBufferBuilder builder, boolean calcInitError) { builder.addBoolean(14, calcInitError, false); } + public static void addTargetHmdHeight(FlatBufferBuilder builder, float targetHmdHeight) { builder.addFloat(15, targetHmdHeight, 0f); } + public static void addTargetFullHeight(FlatBufferBuilder builder, float targetFullHeight) { builder.addFloat(16, targetFullHeight, 0f); } + public static void addRandomizeFrameOrder(FlatBufferBuilder builder, boolean randomizeFrameOrder) { builder.addBoolean(17, randomizeFrameOrder, false); } + public static void addScaleEachStep(FlatBufferBuilder builder, boolean scaleEachStep) { builder.addBoolean(18, scaleEachStep, false); } + public static void addSampleCount(FlatBufferBuilder builder, int sampleCount) { builder.addInt(19, sampleCount, 0); } + public static void addSampleRateMs(FlatBufferBuilder builder, long sampleRateMs) { builder.addLong(20, sampleRateMs, 0L); } + public static void addSaveRecordings(FlatBufferBuilder builder, boolean saveRecordings) { builder.addBoolean(21, saveRecordings, false); } + public static void addUseSkeletonHeight(FlatBufferBuilder builder, boolean useSkeletonHeight) { builder.addBoolean(22, useSkeletonHeight, false); } + public static void addRandSeed(FlatBufferBuilder builder, long randSeed) { builder.addLong(23, randSeed, 0L); } + public static int endAutoBoneSettings(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 AutoBoneSettings get(int j) { return get(new AutoBoneSettings(), j); } + public AutoBoneSettings get(AutoBoneSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public AutoBoneSettingsT unpack() { + AutoBoneSettingsT _o = new AutoBoneSettingsT(); + unpackTo(_o); + return _o; + } + public void unpackTo(AutoBoneSettingsT _o) { + Integer _oCursorIncrement = hasCursorIncrement() ? cursorIncrement() : null; + _o.setCursorIncrement(_oCursorIncrement); + Integer _oMinDataDistance = hasMinDataDistance() ? minDataDistance() : null; + _o.setMinDataDistance(_oMinDataDistance); + Integer _oMaxDataDistance = hasMaxDataDistance() ? maxDataDistance() : null; + _o.setMaxDataDistance(_oMaxDataDistance); + Integer _oNumEpochs = hasNumEpochs() ? numEpochs() : null; + _o.setNumEpochs(_oNumEpochs); + Integer _oPrintEveryNumEpochs = hasPrintEveryNumEpochs() ? printEveryNumEpochs() : null; + _o.setPrintEveryNumEpochs(_oPrintEveryNumEpochs); + Float _oInitialAdjustRate = hasInitialAdjustRate() ? initialAdjustRate() : null; + _o.setInitialAdjustRate(_oInitialAdjustRate); + Float _oAdjustRateDecay = hasAdjustRateDecay() ? adjustRateDecay() : null; + _o.setAdjustRateDecay(_oAdjustRateDecay); + Float _oSlideErrorFactor = hasSlideErrorFactor() ? slideErrorFactor() : null; + _o.setSlideErrorFactor(_oSlideErrorFactor); + Float _oOffsetSlideErrorFactor = hasOffsetSlideErrorFactor() ? offsetSlideErrorFactor() : null; + _o.setOffsetSlideErrorFactor(_oOffsetSlideErrorFactor); + Float _oFootHeightOffsetErrorFactor = hasFootHeightOffsetErrorFactor() ? footHeightOffsetErrorFactor() : null; + _o.setFootHeightOffsetErrorFactor(_oFootHeightOffsetErrorFactor); + Float _oBodyProportionErrorFactor = hasBodyProportionErrorFactor() ? bodyProportionErrorFactor() : null; + _o.setBodyProportionErrorFactor(_oBodyProportionErrorFactor); + Float _oHeightErrorFactor = hasHeightErrorFactor() ? heightErrorFactor() : null; + _o.setHeightErrorFactor(_oHeightErrorFactor); + Float _oPositionErrorFactor = hasPositionErrorFactor() ? positionErrorFactor() : null; + _o.setPositionErrorFactor(_oPositionErrorFactor); + Float _oPositionOffsetErrorFactor = hasPositionOffsetErrorFactor() ? positionOffsetErrorFactor() : null; + _o.setPositionOffsetErrorFactor(_oPositionOffsetErrorFactor); + Boolean _oCalcInitError = hasCalcInitError() ? calcInitError() : null; + _o.setCalcInitError(_oCalcInitError); + Float _oTargetHmdHeight = hasTargetHmdHeight() ? targetHmdHeight() : null; + _o.setTargetHmdHeight(_oTargetHmdHeight); + Float _oTargetFullHeight = hasTargetFullHeight() ? targetFullHeight() : null; + _o.setTargetFullHeight(_oTargetFullHeight); + Boolean _oRandomizeFrameOrder = hasRandomizeFrameOrder() ? randomizeFrameOrder() : null; + _o.setRandomizeFrameOrder(_oRandomizeFrameOrder); + Boolean _oScaleEachStep = hasScaleEachStep() ? scaleEachStep() : null; + _o.setScaleEachStep(_oScaleEachStep); + Integer _oSampleCount = hasSampleCount() ? sampleCount() : null; + _o.setSampleCount(_oSampleCount); + Long _oSampleRateMs = hasSampleRateMs() ? sampleRateMs() : null; + _o.setSampleRateMs(_oSampleRateMs); + Boolean _oSaveRecordings = hasSaveRecordings() ? saveRecordings() : null; + _o.setSaveRecordings(_oSaveRecordings); + Boolean _oUseSkeletonHeight = hasUseSkeletonHeight() ? useSkeletonHeight() : null; + _o.setUseSkeletonHeight(_oUseSkeletonHeight); + Long _oRandSeed = hasRandSeed() ? randSeed() : null; + _o.setRandSeed(_oRandSeed); + } + public static int pack(FlatBufferBuilder builder, AutoBoneSettingsT _o) { + if (_o == null) return 0; + return createAutoBoneSettings( + builder, + _o.getCursorIncrement(), + _o.getMinDataDistance(), + _o.getMaxDataDistance(), + _o.getNumEpochs(), + _o.getPrintEveryNumEpochs(), + _o.getInitialAdjustRate(), + _o.getAdjustRateDecay(), + _o.getSlideErrorFactor(), + _o.getOffsetSlideErrorFactor(), + _o.getFootHeightOffsetErrorFactor(), + _o.getBodyProportionErrorFactor(), + _o.getHeightErrorFactor(), + _o.getPositionErrorFactor(), + _o.getPositionOffsetErrorFactor(), + _o.getCalcInitError(), + _o.getTargetHmdHeight(), + _o.getTargetFullHeight(), + _o.getRandomizeFrameOrder(), + _o.getScaleEachStep(), + _o.getSampleCount(), + _o.getSampleRateMs(), + _o.getSaveRecordings(), + _o.getUseSkeletonHeight(), + _o.getRandSeed()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AutoBoneSettingsT.java b/protocol/java/src/solarxr_protocol/rpc/AutoBoneSettingsT.java index 160aab09..006aa578 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AutoBoneSettingsT.java +++ b/protocol/java/src/solarxr_protocol/rpc/AutoBoneSettingsT.java @@ -1,160 +1,160 @@ -// 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 AutoBoneSettingsT { - private Integer cursorIncrement; - private Integer minDataDistance; - private Integer maxDataDistance; - private Integer numEpochs; - private Integer printEveryNumEpochs; - private Float initialAdjustRate; - private Float adjustRateDecay; - private Float slideErrorFactor; - private Float offsetSlideErrorFactor; - private Float footHeightOffsetErrorFactor; - private Float bodyProportionErrorFactor; - private Float heightErrorFactor; - private Float positionErrorFactor; - private Float positionOffsetErrorFactor; - private Boolean calcInitError; - private Float targetHmdHeight; - private Float targetFullHeight; - private Boolean randomizeFrameOrder; - private Boolean scaleEachStep; - private Integer sampleCount; - private Long sampleRateMs; - private Boolean saveRecordings; - private Boolean useSkeletonHeight; - private Long randSeed; - - public Integer getCursorIncrement() { return cursorIncrement; } - - public void setCursorIncrement(Integer cursorIncrement) { this.cursorIncrement = cursorIncrement; } - - public Integer getMinDataDistance() { return minDataDistance; } - - public void setMinDataDistance(Integer minDataDistance) { this.minDataDistance = minDataDistance; } - - public Integer getMaxDataDistance() { return maxDataDistance; } - - public void setMaxDataDistance(Integer maxDataDistance) { this.maxDataDistance = maxDataDistance; } - - public Integer getNumEpochs() { return numEpochs; } - - public void setNumEpochs(Integer numEpochs) { this.numEpochs = numEpochs; } - - public Integer getPrintEveryNumEpochs() { return printEveryNumEpochs; } - - public void setPrintEveryNumEpochs(Integer printEveryNumEpochs) { this.printEveryNumEpochs = printEveryNumEpochs; } - - public Float getInitialAdjustRate() { return initialAdjustRate; } - - public void setInitialAdjustRate(Float initialAdjustRate) { this.initialAdjustRate = initialAdjustRate; } - - public Float getAdjustRateDecay() { return adjustRateDecay; } - - public void setAdjustRateDecay(Float adjustRateDecay) { this.adjustRateDecay = adjustRateDecay; } - - public Float getSlideErrorFactor() { return slideErrorFactor; } - - public void setSlideErrorFactor(Float slideErrorFactor) { this.slideErrorFactor = slideErrorFactor; } - - public Float getOffsetSlideErrorFactor() { return offsetSlideErrorFactor; } - - public void setOffsetSlideErrorFactor(Float offsetSlideErrorFactor) { this.offsetSlideErrorFactor = offsetSlideErrorFactor; } - - public Float getFootHeightOffsetErrorFactor() { return footHeightOffsetErrorFactor; } - - public void setFootHeightOffsetErrorFactor(Float footHeightOffsetErrorFactor) { this.footHeightOffsetErrorFactor = footHeightOffsetErrorFactor; } - - public Float getBodyProportionErrorFactor() { return bodyProportionErrorFactor; } - - public void setBodyProportionErrorFactor(Float bodyProportionErrorFactor) { this.bodyProportionErrorFactor = bodyProportionErrorFactor; } - - public Float getHeightErrorFactor() { return heightErrorFactor; } - - public void setHeightErrorFactor(Float heightErrorFactor) { this.heightErrorFactor = heightErrorFactor; } - - public Float getPositionErrorFactor() { return positionErrorFactor; } - - public void setPositionErrorFactor(Float positionErrorFactor) { this.positionErrorFactor = positionErrorFactor; } - - public Float getPositionOffsetErrorFactor() { return positionOffsetErrorFactor; } - - public void setPositionOffsetErrorFactor(Float positionOffsetErrorFactor) { this.positionOffsetErrorFactor = positionOffsetErrorFactor; } - - public Boolean getCalcInitError() { return calcInitError; } - - public void setCalcInitError(Boolean calcInitError) { this.calcInitError = calcInitError; } - - public Float getTargetHmdHeight() { return targetHmdHeight; } - - public void setTargetHmdHeight(Float targetHmdHeight) { this.targetHmdHeight = targetHmdHeight; } - - public Float getTargetFullHeight() { return targetFullHeight; } - - public void setTargetFullHeight(Float targetFullHeight) { this.targetFullHeight = targetFullHeight; } - - public Boolean getRandomizeFrameOrder() { return randomizeFrameOrder; } - - public void setRandomizeFrameOrder(Boolean randomizeFrameOrder) { this.randomizeFrameOrder = randomizeFrameOrder; } - - public Boolean getScaleEachStep() { return scaleEachStep; } - - public void setScaleEachStep(Boolean scaleEachStep) { this.scaleEachStep = scaleEachStep; } - - public Integer getSampleCount() { return sampleCount; } - - public void setSampleCount(Integer sampleCount) { this.sampleCount = sampleCount; } - - public Long getSampleRateMs() { return sampleRateMs; } - - public void setSampleRateMs(Long sampleRateMs) { this.sampleRateMs = sampleRateMs; } - - public Boolean getSaveRecordings() { return saveRecordings; } - - public void setSaveRecordings(Boolean saveRecordings) { this.saveRecordings = saveRecordings; } - - public Boolean getUseSkeletonHeight() { return useSkeletonHeight; } - - public void setUseSkeletonHeight(Boolean useSkeletonHeight) { this.useSkeletonHeight = useSkeletonHeight; } - - public Long getRandSeed() { return randSeed; } - - public void setRandSeed(Long randSeed) { this.randSeed = randSeed; } - - - public AutoBoneSettingsT() { - this.cursorIncrement = null; - this.minDataDistance = null; - this.maxDataDistance = null; - this.numEpochs = null; - this.printEveryNumEpochs = null; - this.initialAdjustRate = null; - this.adjustRateDecay = null; - this.slideErrorFactor = null; - this.offsetSlideErrorFactor = null; - this.footHeightOffsetErrorFactor = null; - this.bodyProportionErrorFactor = null; - this.heightErrorFactor = null; - this.positionErrorFactor = null; - this.positionOffsetErrorFactor = null; - this.calcInitError = null; - this.targetHmdHeight = null; - this.targetFullHeight = null; - this.randomizeFrameOrder = null; - this.scaleEachStep = null; - this.sampleCount = null; - this.sampleRateMs = null; - this.saveRecordings = null; - this.useSkeletonHeight = null; - this.randSeed = 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 AutoBoneSettingsT { + private Integer cursorIncrement; + private Integer minDataDistance; + private Integer maxDataDistance; + private Integer numEpochs; + private Integer printEveryNumEpochs; + private Float initialAdjustRate; + private Float adjustRateDecay; + private Float slideErrorFactor; + private Float offsetSlideErrorFactor; + private Float footHeightOffsetErrorFactor; + private Float bodyProportionErrorFactor; + private Float heightErrorFactor; + private Float positionErrorFactor; + private Float positionOffsetErrorFactor; + private Boolean calcInitError; + private Float targetHmdHeight; + private Float targetFullHeight; + private Boolean randomizeFrameOrder; + private Boolean scaleEachStep; + private Integer sampleCount; + private Long sampleRateMs; + private Boolean saveRecordings; + private Boolean useSkeletonHeight; + private Long randSeed; + + public Integer getCursorIncrement() { return cursorIncrement; } + + public void setCursorIncrement(Integer cursorIncrement) { this.cursorIncrement = cursorIncrement; } + + public Integer getMinDataDistance() { return minDataDistance; } + + public void setMinDataDistance(Integer minDataDistance) { this.minDataDistance = minDataDistance; } + + public Integer getMaxDataDistance() { return maxDataDistance; } + + public void setMaxDataDistance(Integer maxDataDistance) { this.maxDataDistance = maxDataDistance; } + + public Integer getNumEpochs() { return numEpochs; } + + public void setNumEpochs(Integer numEpochs) { this.numEpochs = numEpochs; } + + public Integer getPrintEveryNumEpochs() { return printEveryNumEpochs; } + + public void setPrintEveryNumEpochs(Integer printEveryNumEpochs) { this.printEveryNumEpochs = printEveryNumEpochs; } + + public Float getInitialAdjustRate() { return initialAdjustRate; } + + public void setInitialAdjustRate(Float initialAdjustRate) { this.initialAdjustRate = initialAdjustRate; } + + public Float getAdjustRateDecay() { return adjustRateDecay; } + + public void setAdjustRateDecay(Float adjustRateDecay) { this.adjustRateDecay = adjustRateDecay; } + + public Float getSlideErrorFactor() { return slideErrorFactor; } + + public void setSlideErrorFactor(Float slideErrorFactor) { this.slideErrorFactor = slideErrorFactor; } + + public Float getOffsetSlideErrorFactor() { return offsetSlideErrorFactor; } + + public void setOffsetSlideErrorFactor(Float offsetSlideErrorFactor) { this.offsetSlideErrorFactor = offsetSlideErrorFactor; } + + public Float getFootHeightOffsetErrorFactor() { return footHeightOffsetErrorFactor; } + + public void setFootHeightOffsetErrorFactor(Float footHeightOffsetErrorFactor) { this.footHeightOffsetErrorFactor = footHeightOffsetErrorFactor; } + + public Float getBodyProportionErrorFactor() { return bodyProportionErrorFactor; } + + public void setBodyProportionErrorFactor(Float bodyProportionErrorFactor) { this.bodyProportionErrorFactor = bodyProportionErrorFactor; } + + public Float getHeightErrorFactor() { return heightErrorFactor; } + + public void setHeightErrorFactor(Float heightErrorFactor) { this.heightErrorFactor = heightErrorFactor; } + + public Float getPositionErrorFactor() { return positionErrorFactor; } + + public void setPositionErrorFactor(Float positionErrorFactor) { this.positionErrorFactor = positionErrorFactor; } + + public Float getPositionOffsetErrorFactor() { return positionOffsetErrorFactor; } + + public void setPositionOffsetErrorFactor(Float positionOffsetErrorFactor) { this.positionOffsetErrorFactor = positionOffsetErrorFactor; } + + public Boolean getCalcInitError() { return calcInitError; } + + public void setCalcInitError(Boolean calcInitError) { this.calcInitError = calcInitError; } + + public Float getTargetHmdHeight() { return targetHmdHeight; } + + public void setTargetHmdHeight(Float targetHmdHeight) { this.targetHmdHeight = targetHmdHeight; } + + public Float getTargetFullHeight() { return targetFullHeight; } + + public void setTargetFullHeight(Float targetFullHeight) { this.targetFullHeight = targetFullHeight; } + + public Boolean getRandomizeFrameOrder() { return randomizeFrameOrder; } + + public void setRandomizeFrameOrder(Boolean randomizeFrameOrder) { this.randomizeFrameOrder = randomizeFrameOrder; } + + public Boolean getScaleEachStep() { return scaleEachStep; } + + public void setScaleEachStep(Boolean scaleEachStep) { this.scaleEachStep = scaleEachStep; } + + public Integer getSampleCount() { return sampleCount; } + + public void setSampleCount(Integer sampleCount) { this.sampleCount = sampleCount; } + + public Long getSampleRateMs() { return sampleRateMs; } + + public void setSampleRateMs(Long sampleRateMs) { this.sampleRateMs = sampleRateMs; } + + public Boolean getSaveRecordings() { return saveRecordings; } + + public void setSaveRecordings(Boolean saveRecordings) { this.saveRecordings = saveRecordings; } + + public Boolean getUseSkeletonHeight() { return useSkeletonHeight; } + + public void setUseSkeletonHeight(Boolean useSkeletonHeight) { this.useSkeletonHeight = useSkeletonHeight; } + + public Long getRandSeed() { return randSeed; } + + public void setRandSeed(Long randSeed) { this.randSeed = randSeed; } + + + public AutoBoneSettingsT() { + this.cursorIncrement = null; + this.minDataDistance = null; + this.maxDataDistance = null; + this.numEpochs = null; + this.printEveryNumEpochs = null; + this.initialAdjustRate = null; + this.adjustRateDecay = null; + this.slideErrorFactor = null; + this.offsetSlideErrorFactor = null; + this.footHeightOffsetErrorFactor = null; + this.bodyProportionErrorFactor = null; + this.heightErrorFactor = null; + this.positionErrorFactor = null; + this.positionOffsetErrorFactor = null; + this.calcInitError = null; + this.targetHmdHeight = null; + this.targetFullHeight = null; + this.randomizeFrameOrder = null; + this.scaleEachStep = null; + this.sampleCount = null; + this.sampleRateMs = null; + this.saveRecordings = null; + this.useSkeletonHeight = null; + this.randSeed = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AutoBoneStopRecordingRequest.java b/protocol/java/src/solarxr_protocol/rpc/AutoBoneStopRecordingRequest.java index 2745273a..9c0c376f 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AutoBoneStopRecordingRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/AutoBoneStopRecordingRequest.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.*; - -/** - * Stops the current recording, using it as far as it has been recorded - */ -@SuppressWarnings("unused") -public final class AutoBoneStopRecordingRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static AutoBoneStopRecordingRequest getRootAsAutoBoneStopRecordingRequest(ByteBuffer _bb) { return getRootAsAutoBoneStopRecordingRequest(_bb, new AutoBoneStopRecordingRequest()); } - public static AutoBoneStopRecordingRequest getRootAsAutoBoneStopRecordingRequest(ByteBuffer _bb, AutoBoneStopRecordingRequest 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 AutoBoneStopRecordingRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startAutoBoneStopRecordingRequest(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endAutoBoneStopRecordingRequest(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 AutoBoneStopRecordingRequest get(int j) { return get(new AutoBoneStopRecordingRequest(), j); } - public AutoBoneStopRecordingRequest get(AutoBoneStopRecordingRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public AutoBoneStopRecordingRequestT unpack() { - AutoBoneStopRecordingRequestT _o = new AutoBoneStopRecordingRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(AutoBoneStopRecordingRequestT _o) { - } - public static int pack(FlatBufferBuilder builder, AutoBoneStopRecordingRequestT _o) { - if (_o == null) return 0; - startAutoBoneStopRecordingRequest(builder); - return endAutoBoneStopRecordingRequest(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.*; + +/** + * Stops the current recording, using it as far as it has been recorded + */ +@SuppressWarnings("unused") +public final class AutoBoneStopRecordingRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static AutoBoneStopRecordingRequest getRootAsAutoBoneStopRecordingRequest(ByteBuffer _bb) { return getRootAsAutoBoneStopRecordingRequest(_bb, new AutoBoneStopRecordingRequest()); } + public static AutoBoneStopRecordingRequest getRootAsAutoBoneStopRecordingRequest(ByteBuffer _bb, AutoBoneStopRecordingRequest 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 AutoBoneStopRecordingRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startAutoBoneStopRecordingRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endAutoBoneStopRecordingRequest(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 AutoBoneStopRecordingRequest get(int j) { return get(new AutoBoneStopRecordingRequest(), j); } + public AutoBoneStopRecordingRequest get(AutoBoneStopRecordingRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public AutoBoneStopRecordingRequestT unpack() { + AutoBoneStopRecordingRequestT _o = new AutoBoneStopRecordingRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(AutoBoneStopRecordingRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, AutoBoneStopRecordingRequestT _o) { + if (_o == null) return 0; + startAutoBoneStopRecordingRequest(builder); + return endAutoBoneStopRecordingRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AutoBoneStopRecordingRequestT.java b/protocol/java/src/solarxr_protocol/rpc/AutoBoneStopRecordingRequestT.java index 6c851608..4a95b1ad 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AutoBoneStopRecordingRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/AutoBoneStopRecordingRequestT.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 AutoBoneStopRecordingRequestT { - - - public AutoBoneStopRecordingRequestT() { - } -} - +// 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 AutoBoneStopRecordingRequestT { + + + public AutoBoneStopRecordingRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java index 9f4049de..2467c822 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java @@ -1,139 +1,139 @@ -// 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_22_10_26(); } - 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.DriftCompensationSettings driftCompensation() { return driftCompensation(new solarxr_protocol.rpc.DriftCompensationSettings()); } - public solarxr_protocol.rpc.DriftCompensationSettings driftCompensation(solarxr_protocol.rpc.DriftCompensationSettings obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.OSCRouterSettings oscRouter() { return oscRouter(new solarxr_protocol.rpc.OSCRouterSettings()); } - public solarxr_protocol.rpc.OSCRouterSettings oscRouter(solarxr_protocol.rpc.OSCRouterSettings obj) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.VRCOSCSettings vrcOsc() { return vrcOsc(new solarxr_protocol.rpc.VRCOSCSettings()); } - public solarxr_protocol.rpc.VRCOSCSettings vrcOsc(solarxr_protocol.rpc.VRCOSCSettings obj) { int o = __offset(12); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.VMCOSCSettings vmcOsc() { return vmcOsc(new solarxr_protocol.rpc.VMCOSCSettings()); } - public solarxr_protocol.rpc.VMCOSCSettings vmcOsc(solarxr_protocol.rpc.VMCOSCSettings obj) { int o = __offset(14); 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(16); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.TapDetectionSettings tapDetectionSettings() { return tapDetectionSettings(new solarxr_protocol.rpc.TapDetectionSettings()); } - public solarxr_protocol.rpc.TapDetectionSettings tapDetectionSettings(solarxr_protocol.rpc.TapDetectionSettings obj) { int o = __offset(18); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.AutoBoneSettings autoBoneSettings() { return autoBoneSettings(new solarxr_protocol.rpc.AutoBoneSettings()); } - public solarxr_protocol.rpc.AutoBoneSettings autoBoneSettings(solarxr_protocol.rpc.AutoBoneSettings obj) { int o = __offset(20); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.ResetsSettings resetsSettings() { return resetsSettings(new solarxr_protocol.rpc.ResetsSettings()); } - public solarxr_protocol.rpc.ResetsSettings resetsSettings(solarxr_protocol.rpc.ResetsSettings obj) { int o = __offset(22); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - - public static int createChangeSettingsRequest(FlatBufferBuilder builder, - int steamVrTrackersOffset, - int filteringOffset, - int driftCompensationOffset, - int oscRouterOffset, - int vrcOscOffset, - int vmcOscOffset, - int modelSettingsOffset, - int tapDetectionSettingsOffset, - int autoBoneSettingsOffset, - int resetsSettingsOffset) { - builder.startTable(10); - ChangeSettingsRequest.addResetsSettings(builder, resetsSettingsOffset); - ChangeSettingsRequest.addAutoBoneSettings(builder, autoBoneSettingsOffset); - ChangeSettingsRequest.addTapDetectionSettings(builder, tapDetectionSettingsOffset); - ChangeSettingsRequest.addModelSettings(builder, modelSettingsOffset); - ChangeSettingsRequest.addVmcOsc(builder, vmcOscOffset); - ChangeSettingsRequest.addVrcOsc(builder, vrcOscOffset); - ChangeSettingsRequest.addOscRouter(builder, oscRouterOffset); - ChangeSettingsRequest.addDriftCompensation(builder, driftCompensationOffset); - ChangeSettingsRequest.addFiltering(builder, filteringOffset); - ChangeSettingsRequest.addSteamVrTrackers(builder, steamVrTrackersOffset); - return ChangeSettingsRequest.endChangeSettingsRequest(builder); - } - - public static void startChangeSettingsRequest(FlatBufferBuilder builder) { builder.startTable(10); } - public static void addSteamVrTrackers(FlatBufferBuilder builder, int steamVrTrackersOffset) { builder.addOffset(0, steamVrTrackersOffset, 0); } - public static void addFiltering(FlatBufferBuilder builder, int filteringOffset) { builder.addOffset(1, filteringOffset, 0); } - public static void addDriftCompensation(FlatBufferBuilder builder, int driftCompensationOffset) { builder.addOffset(2, driftCompensationOffset, 0); } - public static void addOscRouter(FlatBufferBuilder builder, int oscRouterOffset) { builder.addOffset(3, oscRouterOffset, 0); } - public static void addVrcOsc(FlatBufferBuilder builder, int vrcOscOffset) { builder.addOffset(4, vrcOscOffset, 0); } - public static void addVmcOsc(FlatBufferBuilder builder, int vmcOscOffset) { builder.addOffset(5, vmcOscOffset, 0); } - public static void addModelSettings(FlatBufferBuilder builder, int modelSettingsOffset) { builder.addOffset(6, modelSettingsOffset, 0); } - public static void addTapDetectionSettings(FlatBufferBuilder builder, int tapDetectionSettingsOffset) { builder.addOffset(7, tapDetectionSettingsOffset, 0); } - public static void addAutoBoneSettings(FlatBufferBuilder builder, int autoBoneSettingsOffset) { builder.addOffset(8, autoBoneSettingsOffset, 0); } - public static void addResetsSettings(FlatBufferBuilder builder, int resetsSettingsOffset) { builder.addOffset(9, resetsSettingsOffset, 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 (driftCompensation() != null) _o.setDriftCompensation(driftCompensation().unpack()); - else _o.setDriftCompensation(null); - if (oscRouter() != null) _o.setOscRouter(oscRouter().unpack()); - else _o.setOscRouter(null); - if (vrcOsc() != null) _o.setVrcOsc(vrcOsc().unpack()); - else _o.setVrcOsc(null); - if (vmcOsc() != null) _o.setVmcOsc(vmcOsc().unpack()); - else _o.setVmcOsc(null); - if (modelSettings() != null) _o.setModelSettings(modelSettings().unpack()); - else _o.setModelSettings(null); - if (tapDetectionSettings() != null) _o.setTapDetectionSettings(tapDetectionSettings().unpack()); - else _o.setTapDetectionSettings(null); - if (autoBoneSettings() != null) _o.setAutoBoneSettings(autoBoneSettings().unpack()); - else _o.setAutoBoneSettings(null); - if (resetsSettings() != null) _o.setResetsSettings(resetsSettings().unpack()); - else _o.setResetsSettings(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 _driftCompensation = _o.getDriftCompensation() == null ? 0 : solarxr_protocol.rpc.DriftCompensationSettings.pack(builder, _o.getDriftCompensation()); - int _oscRouter = _o.getOscRouter() == null ? 0 : solarxr_protocol.rpc.OSCRouterSettings.pack(builder, _o.getOscRouter()); - int _vrcOsc = _o.getVrcOsc() == null ? 0 : solarxr_protocol.rpc.VRCOSCSettings.pack(builder, _o.getVrcOsc()); - int _vmcOsc = _o.getVmcOsc() == null ? 0 : solarxr_protocol.rpc.VMCOSCSettings.pack(builder, _o.getVmcOsc()); - int _modelSettings = _o.getModelSettings() == null ? 0 : solarxr_protocol.rpc.settings.ModelSettings.pack(builder, _o.getModelSettings()); - int _tapDetectionSettings = _o.getTapDetectionSettings() == null ? 0 : solarxr_protocol.rpc.TapDetectionSettings.pack(builder, _o.getTapDetectionSettings()); - int _autoBoneSettings = _o.getAutoBoneSettings() == null ? 0 : solarxr_protocol.rpc.AutoBoneSettings.pack(builder, _o.getAutoBoneSettings()); - int _resetsSettings = _o.getResetsSettings() == null ? 0 : solarxr_protocol.rpc.ResetsSettings.pack(builder, _o.getResetsSettings()); - return createChangeSettingsRequest( - builder, - _steamVrTrackers, - _filtering, - _driftCompensation, - _oscRouter, - _vrcOsc, - _vmcOsc, - _modelSettings, - _tapDetectionSettings, - _autoBoneSettings, - _resetsSettings); - } -} - +// 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_22_10_26(); } + 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.DriftCompensationSettings driftCompensation() { return driftCompensation(new solarxr_protocol.rpc.DriftCompensationSettings()); } + public solarxr_protocol.rpc.DriftCompensationSettings driftCompensation(solarxr_protocol.rpc.DriftCompensationSettings obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.OSCRouterSettings oscRouter() { return oscRouter(new solarxr_protocol.rpc.OSCRouterSettings()); } + public solarxr_protocol.rpc.OSCRouterSettings oscRouter(solarxr_protocol.rpc.OSCRouterSettings obj) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.VRCOSCSettings vrcOsc() { return vrcOsc(new solarxr_protocol.rpc.VRCOSCSettings()); } + public solarxr_protocol.rpc.VRCOSCSettings vrcOsc(solarxr_protocol.rpc.VRCOSCSettings obj) { int o = __offset(12); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.VMCOSCSettings vmcOsc() { return vmcOsc(new solarxr_protocol.rpc.VMCOSCSettings()); } + public solarxr_protocol.rpc.VMCOSCSettings vmcOsc(solarxr_protocol.rpc.VMCOSCSettings obj) { int o = __offset(14); 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(16); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.TapDetectionSettings tapDetectionSettings() { return tapDetectionSettings(new solarxr_protocol.rpc.TapDetectionSettings()); } + public solarxr_protocol.rpc.TapDetectionSettings tapDetectionSettings(solarxr_protocol.rpc.TapDetectionSettings obj) { int o = __offset(18); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.AutoBoneSettings autoBoneSettings() { return autoBoneSettings(new solarxr_protocol.rpc.AutoBoneSettings()); } + public solarxr_protocol.rpc.AutoBoneSettings autoBoneSettings(solarxr_protocol.rpc.AutoBoneSettings obj) { int o = __offset(20); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.ResetsSettings resetsSettings() { return resetsSettings(new solarxr_protocol.rpc.ResetsSettings()); } + public solarxr_protocol.rpc.ResetsSettings resetsSettings(solarxr_protocol.rpc.ResetsSettings obj) { int o = __offset(22); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createChangeSettingsRequest(FlatBufferBuilder builder, + int steamVrTrackersOffset, + int filteringOffset, + int driftCompensationOffset, + int oscRouterOffset, + int vrcOscOffset, + int vmcOscOffset, + int modelSettingsOffset, + int tapDetectionSettingsOffset, + int autoBoneSettingsOffset, + int resetsSettingsOffset) { + builder.startTable(10); + ChangeSettingsRequest.addResetsSettings(builder, resetsSettingsOffset); + ChangeSettingsRequest.addAutoBoneSettings(builder, autoBoneSettingsOffset); + ChangeSettingsRequest.addTapDetectionSettings(builder, tapDetectionSettingsOffset); + ChangeSettingsRequest.addModelSettings(builder, modelSettingsOffset); + ChangeSettingsRequest.addVmcOsc(builder, vmcOscOffset); + ChangeSettingsRequest.addVrcOsc(builder, vrcOscOffset); + ChangeSettingsRequest.addOscRouter(builder, oscRouterOffset); + ChangeSettingsRequest.addDriftCompensation(builder, driftCompensationOffset); + ChangeSettingsRequest.addFiltering(builder, filteringOffset); + ChangeSettingsRequest.addSteamVrTrackers(builder, steamVrTrackersOffset); + return ChangeSettingsRequest.endChangeSettingsRequest(builder); + } + + public static void startChangeSettingsRequest(FlatBufferBuilder builder) { builder.startTable(10); } + public static void addSteamVrTrackers(FlatBufferBuilder builder, int steamVrTrackersOffset) { builder.addOffset(0, steamVrTrackersOffset, 0); } + public static void addFiltering(FlatBufferBuilder builder, int filteringOffset) { builder.addOffset(1, filteringOffset, 0); } + public static void addDriftCompensation(FlatBufferBuilder builder, int driftCompensationOffset) { builder.addOffset(2, driftCompensationOffset, 0); } + public static void addOscRouter(FlatBufferBuilder builder, int oscRouterOffset) { builder.addOffset(3, oscRouterOffset, 0); } + public static void addVrcOsc(FlatBufferBuilder builder, int vrcOscOffset) { builder.addOffset(4, vrcOscOffset, 0); } + public static void addVmcOsc(FlatBufferBuilder builder, int vmcOscOffset) { builder.addOffset(5, vmcOscOffset, 0); } + public static void addModelSettings(FlatBufferBuilder builder, int modelSettingsOffset) { builder.addOffset(6, modelSettingsOffset, 0); } + public static void addTapDetectionSettings(FlatBufferBuilder builder, int tapDetectionSettingsOffset) { builder.addOffset(7, tapDetectionSettingsOffset, 0); } + public static void addAutoBoneSettings(FlatBufferBuilder builder, int autoBoneSettingsOffset) { builder.addOffset(8, autoBoneSettingsOffset, 0); } + public static void addResetsSettings(FlatBufferBuilder builder, int resetsSettingsOffset) { builder.addOffset(9, resetsSettingsOffset, 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 (driftCompensation() != null) _o.setDriftCompensation(driftCompensation().unpack()); + else _o.setDriftCompensation(null); + if (oscRouter() != null) _o.setOscRouter(oscRouter().unpack()); + else _o.setOscRouter(null); + if (vrcOsc() != null) _o.setVrcOsc(vrcOsc().unpack()); + else _o.setVrcOsc(null); + if (vmcOsc() != null) _o.setVmcOsc(vmcOsc().unpack()); + else _o.setVmcOsc(null); + if (modelSettings() != null) _o.setModelSettings(modelSettings().unpack()); + else _o.setModelSettings(null); + if (tapDetectionSettings() != null) _o.setTapDetectionSettings(tapDetectionSettings().unpack()); + else _o.setTapDetectionSettings(null); + if (autoBoneSettings() != null) _o.setAutoBoneSettings(autoBoneSettings().unpack()); + else _o.setAutoBoneSettings(null); + if (resetsSettings() != null) _o.setResetsSettings(resetsSettings().unpack()); + else _o.setResetsSettings(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 _driftCompensation = _o.getDriftCompensation() == null ? 0 : solarxr_protocol.rpc.DriftCompensationSettings.pack(builder, _o.getDriftCompensation()); + int _oscRouter = _o.getOscRouter() == null ? 0 : solarxr_protocol.rpc.OSCRouterSettings.pack(builder, _o.getOscRouter()); + int _vrcOsc = _o.getVrcOsc() == null ? 0 : solarxr_protocol.rpc.VRCOSCSettings.pack(builder, _o.getVrcOsc()); + int _vmcOsc = _o.getVmcOsc() == null ? 0 : solarxr_protocol.rpc.VMCOSCSettings.pack(builder, _o.getVmcOsc()); + int _modelSettings = _o.getModelSettings() == null ? 0 : solarxr_protocol.rpc.settings.ModelSettings.pack(builder, _o.getModelSettings()); + int _tapDetectionSettings = _o.getTapDetectionSettings() == null ? 0 : solarxr_protocol.rpc.TapDetectionSettings.pack(builder, _o.getTapDetectionSettings()); + int _autoBoneSettings = _o.getAutoBoneSettings() == null ? 0 : solarxr_protocol.rpc.AutoBoneSettings.pack(builder, _o.getAutoBoneSettings()); + int _resetsSettings = _o.getResetsSettings() == null ? 0 : solarxr_protocol.rpc.ResetsSettings.pack(builder, _o.getResetsSettings()); + return createChangeSettingsRequest( + builder, + _steamVrTrackers, + _filtering, + _driftCompensation, + _oscRouter, + _vrcOsc, + _vmcOsc, + _modelSettings, + _tapDetectionSettings, + _autoBoneSettings, + _resetsSettings); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequestT.java b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequestT.java index 850e97ce..85e891f9 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequestT.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.*; - -public class ChangeSettingsRequestT { - private solarxr_protocol.rpc.SteamVRTrackersSettingT steamVrTrackers; - private solarxr_protocol.rpc.FilteringSettingsT filtering; - private solarxr_protocol.rpc.DriftCompensationSettingsT driftCompensation; - private solarxr_protocol.rpc.OSCRouterSettingsT oscRouter; - private solarxr_protocol.rpc.VRCOSCSettingsT vrcOsc; - private solarxr_protocol.rpc.VMCOSCSettingsT vmcOsc; - private solarxr_protocol.rpc.settings.ModelSettingsT modelSettings; - private solarxr_protocol.rpc.TapDetectionSettingsT tapDetectionSettings; - private solarxr_protocol.rpc.AutoBoneSettingsT autoBoneSettings; - private solarxr_protocol.rpc.ResetsSettingsT resetsSettings; - - 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.DriftCompensationSettingsT getDriftCompensation() { return driftCompensation; } - - public void setDriftCompensation(solarxr_protocol.rpc.DriftCompensationSettingsT driftCompensation) { this.driftCompensation = driftCompensation; } - - public solarxr_protocol.rpc.OSCRouterSettingsT getOscRouter() { return oscRouter; } - - public void setOscRouter(solarxr_protocol.rpc.OSCRouterSettingsT oscRouter) { this.oscRouter = oscRouter; } - - public solarxr_protocol.rpc.VRCOSCSettingsT getVrcOsc() { return vrcOsc; } - - public void setVrcOsc(solarxr_protocol.rpc.VRCOSCSettingsT vrcOsc) { this.vrcOsc = vrcOsc; } - - public solarxr_protocol.rpc.VMCOSCSettingsT getVmcOsc() { return vmcOsc; } - - public void setVmcOsc(solarxr_protocol.rpc.VMCOSCSettingsT vmcOsc) { this.vmcOsc = vmcOsc; } - - public solarxr_protocol.rpc.settings.ModelSettingsT getModelSettings() { return modelSettings; } - - public void setModelSettings(solarxr_protocol.rpc.settings.ModelSettingsT modelSettings) { this.modelSettings = modelSettings; } - - public solarxr_protocol.rpc.TapDetectionSettingsT getTapDetectionSettings() { return tapDetectionSettings; } - - public void setTapDetectionSettings(solarxr_protocol.rpc.TapDetectionSettingsT tapDetectionSettings) { this.tapDetectionSettings = tapDetectionSettings; } - - public solarxr_protocol.rpc.AutoBoneSettingsT getAutoBoneSettings() { return autoBoneSettings; } - - public void setAutoBoneSettings(solarxr_protocol.rpc.AutoBoneSettingsT autoBoneSettings) { this.autoBoneSettings = autoBoneSettings; } - - public solarxr_protocol.rpc.ResetsSettingsT getResetsSettings() { return resetsSettings; } - - public void setResetsSettings(solarxr_protocol.rpc.ResetsSettingsT resetsSettings) { this.resetsSettings = resetsSettings; } - - - public ChangeSettingsRequestT() { - this.steamVrTrackers = null; - this.filtering = null; - this.driftCompensation = null; - this.oscRouter = null; - this.vrcOsc = null; - this.vmcOsc = null; - this.modelSettings = null; - this.tapDetectionSettings = null; - this.autoBoneSettings = null; - this.resetsSettings = 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.DriftCompensationSettingsT driftCompensation; + private solarxr_protocol.rpc.OSCRouterSettingsT oscRouter; + private solarxr_protocol.rpc.VRCOSCSettingsT vrcOsc; + private solarxr_protocol.rpc.VMCOSCSettingsT vmcOsc; + private solarxr_protocol.rpc.settings.ModelSettingsT modelSettings; + private solarxr_protocol.rpc.TapDetectionSettingsT tapDetectionSettings; + private solarxr_protocol.rpc.AutoBoneSettingsT autoBoneSettings; + private solarxr_protocol.rpc.ResetsSettingsT resetsSettings; + + 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.DriftCompensationSettingsT getDriftCompensation() { return driftCompensation; } + + public void setDriftCompensation(solarxr_protocol.rpc.DriftCompensationSettingsT driftCompensation) { this.driftCompensation = driftCompensation; } + + public solarxr_protocol.rpc.OSCRouterSettingsT getOscRouter() { return oscRouter; } + + public void setOscRouter(solarxr_protocol.rpc.OSCRouterSettingsT oscRouter) { this.oscRouter = oscRouter; } + + public solarxr_protocol.rpc.VRCOSCSettingsT getVrcOsc() { return vrcOsc; } + + public void setVrcOsc(solarxr_protocol.rpc.VRCOSCSettingsT vrcOsc) { this.vrcOsc = vrcOsc; } + + public solarxr_protocol.rpc.VMCOSCSettingsT getVmcOsc() { return vmcOsc; } + + public void setVmcOsc(solarxr_protocol.rpc.VMCOSCSettingsT vmcOsc) { this.vmcOsc = vmcOsc; } + + public solarxr_protocol.rpc.settings.ModelSettingsT getModelSettings() { return modelSettings; } + + public void setModelSettings(solarxr_protocol.rpc.settings.ModelSettingsT modelSettings) { this.modelSettings = modelSettings; } + + public solarxr_protocol.rpc.TapDetectionSettingsT getTapDetectionSettings() { return tapDetectionSettings; } + + public void setTapDetectionSettings(solarxr_protocol.rpc.TapDetectionSettingsT tapDetectionSettings) { this.tapDetectionSettings = tapDetectionSettings; } + + public solarxr_protocol.rpc.AutoBoneSettingsT getAutoBoneSettings() { return autoBoneSettings; } + + public void setAutoBoneSettings(solarxr_protocol.rpc.AutoBoneSettingsT autoBoneSettings) { this.autoBoneSettings = autoBoneSettings; } + + public solarxr_protocol.rpc.ResetsSettingsT getResetsSettings() { return resetsSettings; } + + public void setResetsSettings(solarxr_protocol.rpc.ResetsSettingsT resetsSettings) { this.resetsSettings = resetsSettings; } + + + public ChangeSettingsRequestT() { + this.steamVrTrackers = null; + this.filtering = null; + this.driftCompensation = null; + this.oscRouter = null; + this.vrcOsc = null; + this.vmcOsc = null; + this.modelSettings = null; + this.tapDetectionSettings = null; + this.autoBoneSettings = null; + this.resetsSettings = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ChangeSkeletonConfigRequest.java b/protocol/java/src/solarxr_protocol/rpc/ChangeSkeletonConfigRequest.java index 9c29761a..b5433d17 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_22_10_26(); } - 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_22_10_26(); } + 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 c24c572a..dbabd008 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/ClearDriftCompensationRequest.java b/protocol/java/src/solarxr_protocol/rpc/ClearDriftCompensationRequest.java index 4a7160c2..076f8f0f 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ClearDriftCompensationRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/ClearDriftCompensationRequest.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 ClearDriftCompensationRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static ClearDriftCompensationRequest getRootAsClearDriftCompensationRequest(ByteBuffer _bb) { return getRootAsClearDriftCompensationRequest(_bb, new ClearDriftCompensationRequest()); } - public static ClearDriftCompensationRequest getRootAsClearDriftCompensationRequest(ByteBuffer _bb, ClearDriftCompensationRequest 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 ClearDriftCompensationRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startClearDriftCompensationRequest(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endClearDriftCompensationRequest(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 ClearDriftCompensationRequest get(int j) { return get(new ClearDriftCompensationRequest(), j); } - public ClearDriftCompensationRequest get(ClearDriftCompensationRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public ClearDriftCompensationRequestT unpack() { - ClearDriftCompensationRequestT _o = new ClearDriftCompensationRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(ClearDriftCompensationRequestT _o) { - } - public static int pack(FlatBufferBuilder builder, ClearDriftCompensationRequestT _o) { - if (_o == null) return 0; - startClearDriftCompensationRequest(builder); - return endClearDriftCompensationRequest(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 ClearDriftCompensationRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static ClearDriftCompensationRequest getRootAsClearDriftCompensationRequest(ByteBuffer _bb) { return getRootAsClearDriftCompensationRequest(_bb, new ClearDriftCompensationRequest()); } + public static ClearDriftCompensationRequest getRootAsClearDriftCompensationRequest(ByteBuffer _bb, ClearDriftCompensationRequest 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 ClearDriftCompensationRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startClearDriftCompensationRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endClearDriftCompensationRequest(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 ClearDriftCompensationRequest get(int j) { return get(new ClearDriftCompensationRequest(), j); } + public ClearDriftCompensationRequest get(ClearDriftCompensationRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public ClearDriftCompensationRequestT unpack() { + ClearDriftCompensationRequestT _o = new ClearDriftCompensationRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(ClearDriftCompensationRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, ClearDriftCompensationRequestT _o) { + if (_o == null) return 0; + startClearDriftCompensationRequest(builder); + return endClearDriftCompensationRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ClearDriftCompensationRequestT.java b/protocol/java/src/solarxr_protocol/rpc/ClearDriftCompensationRequestT.java index df8a4de5..d31ec34c 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ClearDriftCompensationRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/ClearDriftCompensationRequestT.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 ClearDriftCompensationRequestT { - - - public ClearDriftCompensationRequestT() { - } -} - +// 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 ClearDriftCompensationRequestT { + + + public ClearDriftCompensationRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ClearMountingResetRequest.java b/protocol/java/src/solarxr_protocol/rpc/ClearMountingResetRequest.java index 2ce6c48c..30fa84a5 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ClearMountingResetRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/ClearMountingResetRequest.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.*; - -/** - * Clears mounting reset data, defaulting to the manually set mounting orientations - */ -@SuppressWarnings("unused") -public final class ClearMountingResetRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static ClearMountingResetRequest getRootAsClearMountingResetRequest(ByteBuffer _bb) { return getRootAsClearMountingResetRequest(_bb, new ClearMountingResetRequest()); } - public static ClearMountingResetRequest getRootAsClearMountingResetRequest(ByteBuffer _bb, ClearMountingResetRequest 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 ClearMountingResetRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startClearMountingResetRequest(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endClearMountingResetRequest(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 ClearMountingResetRequest get(int j) { return get(new ClearMountingResetRequest(), j); } - public ClearMountingResetRequest get(ClearMountingResetRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public ClearMountingResetRequestT unpack() { - ClearMountingResetRequestT _o = new ClearMountingResetRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(ClearMountingResetRequestT _o) { - } - public static int pack(FlatBufferBuilder builder, ClearMountingResetRequestT _o) { - if (_o == null) return 0; - startClearMountingResetRequest(builder); - return endClearMountingResetRequest(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.*; + +/** + * Clears mounting reset data, defaulting to the manually set mounting orientations + */ +@SuppressWarnings("unused") +public final class ClearMountingResetRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static ClearMountingResetRequest getRootAsClearMountingResetRequest(ByteBuffer _bb) { return getRootAsClearMountingResetRequest(_bb, new ClearMountingResetRequest()); } + public static ClearMountingResetRequest getRootAsClearMountingResetRequest(ByteBuffer _bb, ClearMountingResetRequest 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 ClearMountingResetRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startClearMountingResetRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endClearMountingResetRequest(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 ClearMountingResetRequest get(int j) { return get(new ClearMountingResetRequest(), j); } + public ClearMountingResetRequest get(ClearMountingResetRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public ClearMountingResetRequestT unpack() { + ClearMountingResetRequestT _o = new ClearMountingResetRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(ClearMountingResetRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, ClearMountingResetRequestT _o) { + if (_o == null) return 0; + startClearMountingResetRequest(builder); + return endClearMountingResetRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ClearMountingResetRequestT.java b/protocol/java/src/solarxr_protocol/rpc/ClearMountingResetRequestT.java index df6d1c4e..b5a284b9 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ClearMountingResetRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/ClearMountingResetRequestT.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 ClearMountingResetRequestT { - - - public ClearMountingResetRequestT() { - } -} - +// 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 ClearMountingResetRequestT { + + + public ClearMountingResetRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/CloseSerialRequest.java b/protocol/java/src/solarxr_protocol/rpc/CloseSerialRequest.java index 4c4df8b3..37a9b780 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_22_10_26(); } - 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_22_10_26(); } + 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 72ce4134..16a5ebe5 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/ComputerDirectory.java b/protocol/java/src/solarxr_protocol/rpc/ComputerDirectory.java index b5a5e820..4cb93fcb 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ComputerDirectory.java +++ b/protocol/java/src/solarxr_protocol/rpc/ComputerDirectory.java @@ -1,17 +1,17 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -/** - * Common folders often used in computers for storing files - */ -@SuppressWarnings("unused") -public final class ComputerDirectory { - private ComputerDirectory() { } - public static final int Documents = 0; - - public static final String[] names = { "Documents", }; - - public static String name(int e) { return names[e]; } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +/** + * Common folders often used in computers for storing files + */ +@SuppressWarnings("unused") +public final class ComputerDirectory { + private ComputerDirectory() { } + public static final int Documents = 0; + + public static final String[] names = { "Documents", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/DriftCompensationSettings.java b/protocol/java/src/solarxr_protocol/rpc/DriftCompensationSettings.java index 1a0fd06c..bf2e575b 100644 --- a/protocol/java/src/solarxr_protocol/rpc/DriftCompensationSettings.java +++ b/protocol/java/src/solarxr_protocol/rpc/DriftCompensationSettings.java @@ -1,79 +1,79 @@ -// 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.*; - -/** - * Settings related to IMU yaw drift compensation - */ -@SuppressWarnings("unused") -public final class DriftCompensationSettings extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static DriftCompensationSettings getRootAsDriftCompensationSettings(ByteBuffer _bb) { return getRootAsDriftCompensationSettings(_bb, new DriftCompensationSettings()); } - public static DriftCompensationSettings getRootAsDriftCompensationSettings(ByteBuffer _bb, DriftCompensationSettings 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 DriftCompensationSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public boolean enabled() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - /** - * 0 to 1. A higher value results in more yaw drift compensation - */ - public float amount() { int o = __offset(6); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } - /** - * Number of previous resets to take into account when calculating yaw drift - */ - public int maxResets() { int o = __offset(8); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } - - public static int createDriftCompensationSettings(FlatBufferBuilder builder, - boolean enabled, - float amount, - int maxResets) { - builder.startTable(3); - DriftCompensationSettings.addAmount(builder, amount); - DriftCompensationSettings.addMaxResets(builder, maxResets); - DriftCompensationSettings.addEnabled(builder, enabled); - return DriftCompensationSettings.endDriftCompensationSettings(builder); - } - - public static void startDriftCompensationSettings(FlatBufferBuilder builder) { builder.startTable(3); } - public static void addEnabled(FlatBufferBuilder builder, boolean enabled) { builder.addBoolean(0, enabled, false); } - public static void addAmount(FlatBufferBuilder builder, float amount) { builder.addFloat(1, amount, 0.0f); } - public static void addMaxResets(FlatBufferBuilder builder, int maxResets) { builder.addShort(2, (short) maxResets, (short) 0); } - public static int endDriftCompensationSettings(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 DriftCompensationSettings get(int j) { return get(new DriftCompensationSettings(), j); } - public DriftCompensationSettings get(DriftCompensationSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public DriftCompensationSettingsT unpack() { - DriftCompensationSettingsT _o = new DriftCompensationSettingsT(); - unpackTo(_o); - return _o; - } - public void unpackTo(DriftCompensationSettingsT _o) { - boolean _oEnabled = enabled(); - _o.setEnabled(_oEnabled); - float _oAmount = amount(); - _o.setAmount(_oAmount); - int _oMaxResets = maxResets(); - _o.setMaxResets(_oMaxResets); - } - public static int pack(FlatBufferBuilder builder, DriftCompensationSettingsT _o) { - if (_o == null) return 0; - return createDriftCompensationSettings( - builder, - _o.getEnabled(), - _o.getAmount(), - _o.getMaxResets()); - } -} - +// 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.*; + +/** + * Settings related to IMU yaw drift compensation + */ +@SuppressWarnings("unused") +public final class DriftCompensationSettings extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static DriftCompensationSettings getRootAsDriftCompensationSettings(ByteBuffer _bb) { return getRootAsDriftCompensationSettings(_bb, new DriftCompensationSettings()); } + public static DriftCompensationSettings getRootAsDriftCompensationSettings(ByteBuffer _bb, DriftCompensationSettings 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 DriftCompensationSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean enabled() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + /** + * 0 to 1. A higher value results in more yaw drift compensation + */ + public float amount() { int o = __offset(6); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + /** + * Number of previous resets to take into account when calculating yaw drift + */ + public int maxResets() { int o = __offset(8); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } + + public static int createDriftCompensationSettings(FlatBufferBuilder builder, + boolean enabled, + float amount, + int maxResets) { + builder.startTable(3); + DriftCompensationSettings.addAmount(builder, amount); + DriftCompensationSettings.addMaxResets(builder, maxResets); + DriftCompensationSettings.addEnabled(builder, enabled); + return DriftCompensationSettings.endDriftCompensationSettings(builder); + } + + public static void startDriftCompensationSettings(FlatBufferBuilder builder) { builder.startTable(3); } + public static void addEnabled(FlatBufferBuilder builder, boolean enabled) { builder.addBoolean(0, enabled, false); } + public static void addAmount(FlatBufferBuilder builder, float amount) { builder.addFloat(1, amount, 0.0f); } + public static void addMaxResets(FlatBufferBuilder builder, int maxResets) { builder.addShort(2, (short) maxResets, (short) 0); } + public static int endDriftCompensationSettings(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 DriftCompensationSettings get(int j) { return get(new DriftCompensationSettings(), j); } + public DriftCompensationSettings get(DriftCompensationSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public DriftCompensationSettingsT unpack() { + DriftCompensationSettingsT _o = new DriftCompensationSettingsT(); + unpackTo(_o); + return _o; + } + public void unpackTo(DriftCompensationSettingsT _o) { + boolean _oEnabled = enabled(); + _o.setEnabled(_oEnabled); + float _oAmount = amount(); + _o.setAmount(_oAmount); + int _oMaxResets = maxResets(); + _o.setMaxResets(_oMaxResets); + } + public static int pack(FlatBufferBuilder builder, DriftCompensationSettingsT _o) { + if (_o == null) return 0; + return createDriftCompensationSettings( + builder, + _o.getEnabled(), + _o.getAmount(), + _o.getMaxResets()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/DriftCompensationSettingsT.java b/protocol/java/src/solarxr_protocol/rpc/DriftCompensationSettingsT.java index fa5f7004..2409580c 100644 --- a/protocol/java/src/solarxr_protocol/rpc/DriftCompensationSettingsT.java +++ b/protocol/java/src/solarxr_protocol/rpc/DriftCompensationSettingsT.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 DriftCompensationSettingsT { - private boolean enabled; - private float amount; - private int maxResets; - - public boolean getEnabled() { return enabled; } - - public void setEnabled(boolean enabled) { this.enabled = enabled; } - - public float getAmount() { return amount; } - - public void setAmount(float amount) { this.amount = amount; } - - public int getMaxResets() { return maxResets; } - - public void setMaxResets(int maxResets) { this.maxResets = maxResets; } - - - public DriftCompensationSettingsT() { - this.enabled = false; - this.amount = 0.0f; - this.maxResets = 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 DriftCompensationSettingsT { + private boolean enabled; + private float amount; + private int maxResets; + + public boolean getEnabled() { return enabled; } + + public void setEnabled(boolean enabled) { this.enabled = enabled; } + + public float getAmount() { return amount; } + + public void setAmount(float amount) { this.amount = amount; } + + public int getMaxResets() { return maxResets; } + + public void setMaxResets(int maxResets) { this.maxResets = maxResets; } + + + public DriftCompensationSettingsT() { + this.enabled = false; + this.amount = 0.0f; + this.maxResets = 0; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/FilteringSettings.java b/protocol/java/src/solarxr_protocol/rpc/FilteringSettings.java index ec01758a..cf881492 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_22_10_26(); } - 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_22_10_26(); } + 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 880197fa..106ae155 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/FirmwarePart.java b/protocol/java/src/solarxr_protocol/rpc/FirmwarePart.java new file mode 100644 index 00000000..184d5be3 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/FirmwarePart.java @@ -0,0 +1,73 @@ +// 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 FirmwarePart extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static FirmwarePart getRootAsFirmwarePart(ByteBuffer _bb) { return getRootAsFirmwarePart(_bb, new FirmwarePart()); } + public static FirmwarePart getRootAsFirmwarePart(ByteBuffer _bb, FirmwarePart 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 FirmwarePart __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * Url of the firmware bin to download + */ + public String url() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer urlAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer urlInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + /** + * Offset of the firmware, used when flashing to the mcu, it indicates where to write this file in memory + * Will be ignored in the case of OTA flashing + */ + public long offset() { int o = __offset(6); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } + + public static int createFirmwarePart(FlatBufferBuilder builder, + int urlOffset, + long offset) { + builder.startTable(2); + FirmwarePart.addOffset(builder, offset); + FirmwarePart.addUrl(builder, urlOffset); + return FirmwarePart.endFirmwarePart(builder); + } + + public static void startFirmwarePart(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addUrl(FlatBufferBuilder builder, int urlOffset) { builder.addOffset(0, urlOffset, 0); } + public static void addOffset(FlatBufferBuilder builder, long offset) { builder.addInt(1, (int) offset, (int) 0L); } + public static int endFirmwarePart(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 FirmwarePart get(int j) { return get(new FirmwarePart(), j); } + public FirmwarePart get(FirmwarePart obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public FirmwarePartT unpack() { + FirmwarePartT _o = new FirmwarePartT(); + unpackTo(_o); + return _o; + } + public void unpackTo(FirmwarePartT _o) { + String _oUrl = url(); + _o.setUrl(_oUrl); + long _oOffset = offset(); + _o.setOffset(_oOffset); + } + public static int pack(FlatBufferBuilder builder, FirmwarePartT _o) { + if (_o == null) return 0; + int _url = _o.getUrl() == null ? 0 : builder.createString(_o.getUrl()); + return createFirmwarePart( + builder, + _url, + _o.getOffset()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/FirmwarePartT.java b/protocol/java/src/solarxr_protocol/rpc/FirmwarePartT.java new file mode 100644 index 00000000..1f2b534b --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/FirmwarePartT.java @@ -0,0 +1,28 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class FirmwarePartT { + private String url; + private long offset; + + public String getUrl() { return url; } + + public void setUrl(String url) { this.url = url; } + + public long getOffset() { return offset; } + + public void setOffset(long offset) { this.offset = offset; } + + + public FirmwarePartT() { + this.url = null; + this.offset = 0L; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateDeviceId.java b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateDeviceId.java new file mode 100644 index 00000000..65f6c701 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateDeviceId.java @@ -0,0 +1,16 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +@SuppressWarnings("unused") +public final class FirmwareUpdateDeviceId { + private FirmwareUpdateDeviceId() { } + public static final byte NONE = 0; + public static final byte solarxr_protocol_datatypes_DeviceIdTable = 1; + public static final byte SerialDevicePort = 2; + + public static final String[] names = { "NONE", "solarxr_protocol_datatypes_DeviceIdTable", "SerialDevicePort", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateDeviceIdUnion.java b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateDeviceIdUnion.java new file mode 100644 index 00000000..ade7a343 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateDeviceIdUnion.java @@ -0,0 +1,35 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import com.google.flatbuffers.FlatBufferBuilder; + +public class FirmwareUpdateDeviceIdUnion { + 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 FirmwareUpdateDeviceIdUnion() { + this.type = FirmwareUpdateDeviceId.NONE; + this.value = null; + } + + public solarxr_protocol.datatypes.DeviceIdTableT assolarxr_protocol_datatypes_DeviceIdTable() { return (solarxr_protocol.datatypes.DeviceIdTableT) value; } + public solarxr_protocol.rpc.SerialDevicePortT asSerialDevicePort() { return (solarxr_protocol.rpc.SerialDevicePortT) value; } + + public static int pack(FlatBufferBuilder builder, FirmwareUpdateDeviceIdUnion _o) { + switch (_o.type) { + case FirmwareUpdateDeviceId.solarxr_protocol_datatypes_DeviceIdTable: return solarxr_protocol.datatypes.DeviceIdTable.pack(builder, _o.assolarxr_protocol_datatypes_DeviceIdTable()); + case FirmwareUpdateDeviceId.SerialDevicePort: return solarxr_protocol.rpc.SerialDevicePort.pack(builder, _o.asSerialDevicePort()); + default: return 0; + } + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateMethod.java b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateMethod.java new file mode 100644 index 00000000..9d900484 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateMethod.java @@ -0,0 +1,16 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +@SuppressWarnings("unused") +public final class FirmwareUpdateMethod { + private FirmwareUpdateMethod() { } + public static final byte NONE = 0; + public static final byte OTAFirmwareUpdate = 1; + public static final byte SerialFirmwareUpdate = 2; + + public static final String[] names = { "NONE", "OTAFirmwareUpdate", "SerialFirmwareUpdate", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateMethodUnion.java b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateMethodUnion.java new file mode 100644 index 00000000..3cebcd6e --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateMethodUnion.java @@ -0,0 +1,35 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import com.google.flatbuffers.FlatBufferBuilder; + +public class FirmwareUpdateMethodUnion { + 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 FirmwareUpdateMethodUnion() { + this.type = FirmwareUpdateMethod.NONE; + this.value = null; + } + + public solarxr_protocol.rpc.OTAFirmwareUpdateT asOTAFirmwareUpdate() { return (solarxr_protocol.rpc.OTAFirmwareUpdateT) value; } + public solarxr_protocol.rpc.SerialFirmwareUpdateT asSerialFirmwareUpdate() { return (solarxr_protocol.rpc.SerialFirmwareUpdateT) value; } + + public static int pack(FlatBufferBuilder builder, FirmwareUpdateMethodUnion _o) { + switch (_o.type) { + case FirmwareUpdateMethod.OTAFirmwareUpdate: return solarxr_protocol.rpc.OTAFirmwareUpdate.pack(builder, _o.asOTAFirmwareUpdate()); + case FirmwareUpdateMethod.SerialFirmwareUpdate: return solarxr_protocol.rpc.SerialFirmwareUpdate.pack(builder, _o.asSerialFirmwareUpdate()); + default: return 0; + } + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateRequest.java b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateRequest.java new file mode 100644 index 00000000..a8553ff9 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateRequest.java @@ -0,0 +1,77 @@ +// 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 FirmwareUpdateRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static FirmwareUpdateRequest getRootAsFirmwareUpdateRequest(ByteBuffer _bb) { return getRootAsFirmwareUpdateRequest(_bb, new FirmwareUpdateRequest()); } + public static FirmwareUpdateRequest getRootAsFirmwareUpdateRequest(ByteBuffer _bb, FirmwareUpdateRequest 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 FirmwareUpdateRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public byte methodType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; } + public Table method(Table obj) { int o = __offset(6); return o != 0 ? __union(obj, o + bb_pos) : null; } + + public static int createFirmwareUpdateRequest(FlatBufferBuilder builder, + byte methodType, + int methodOffset) { + builder.startTable(2); + FirmwareUpdateRequest.addMethod(builder, methodOffset); + FirmwareUpdateRequest.addMethodType(builder, methodType); + return FirmwareUpdateRequest.endFirmwareUpdateRequest(builder); + } + + public static void startFirmwareUpdateRequest(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addMethodType(FlatBufferBuilder builder, byte methodType) { builder.addByte(0, methodType, 0); } + public static void addMethod(FlatBufferBuilder builder, int methodOffset) { builder.addOffset(1, methodOffset, 0); } + public static int endFirmwareUpdateRequest(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 FirmwareUpdateRequest get(int j) { return get(new FirmwareUpdateRequest(), j); } + public FirmwareUpdateRequest get(FirmwareUpdateRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public FirmwareUpdateRequestT unpack() { + FirmwareUpdateRequestT _o = new FirmwareUpdateRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(FirmwareUpdateRequestT _o) { + solarxr_protocol.rpc.FirmwareUpdateMethodUnion _oMethod = new solarxr_protocol.rpc.FirmwareUpdateMethodUnion(); + byte _oMethodType = methodType(); + _oMethod.setType(_oMethodType); + Table _oMethodValue; + switch (_oMethodType) { + case solarxr_protocol.rpc.FirmwareUpdateMethod.OTAFirmwareUpdate: + _oMethodValue = method(new solarxr_protocol.rpc.OTAFirmwareUpdate()); + _oMethod.setValue(_oMethodValue != null ? ((solarxr_protocol.rpc.OTAFirmwareUpdate) _oMethodValue).unpack() : null); + break; + case solarxr_protocol.rpc.FirmwareUpdateMethod.SerialFirmwareUpdate: + _oMethodValue = method(new solarxr_protocol.rpc.SerialFirmwareUpdate()); + _oMethod.setValue(_oMethodValue != null ? ((solarxr_protocol.rpc.SerialFirmwareUpdate) _oMethodValue).unpack() : null); + break; + default: break; + } + _o.setMethod(_oMethod); + } + public static int pack(FlatBufferBuilder builder, FirmwareUpdateRequestT _o) { + if (_o == null) return 0; + byte _methodType = _o.getMethod() == null ? solarxr_protocol.rpc.FirmwareUpdateMethod.NONE : _o.getMethod().getType(); + int _method = _o.getMethod() == null ? 0 : solarxr_protocol.rpc.FirmwareUpdateMethodUnion.pack(builder, _o.getMethod()); + return createFirmwareUpdateRequest( + builder, + _methodType, + _method); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateRequestT.java b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateRequestT.java new file mode 100644 index 00000000..4fc89dbc --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateRequestT.java @@ -0,0 +1,22 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class FirmwareUpdateRequestT { + private solarxr_protocol.rpc.FirmwareUpdateMethodUnion method; + + public solarxr_protocol.rpc.FirmwareUpdateMethodUnion getMethod() { return method; } + + public void setMethod(solarxr_protocol.rpc.FirmwareUpdateMethodUnion method) { this.method = method; } + + + public FirmwareUpdateRequestT() { + this.method = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateStatus.java b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateStatus.java new file mode 100644 index 00000000..5ad0236e --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateStatus.java @@ -0,0 +1,73 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +@SuppressWarnings("unused") +public final class FirmwareUpdateStatus { + private FirmwareUpdateStatus() { } + /** + * The server is downloading the firmware + */ + public static final int DOWNLOADING = 0; + /** + * The server is waiting for the tracker to be rebooted by the user + * Note that is is not the same as REBOOTING + */ + public static final int NEED_MANUAL_REBOOT = 1; + /** + * The server tries to authenticate with the MCU + */ + public static final int AUTHENTICATING = 2; + /** + * The server is uploading the firmware to the Device + */ + public static final int UPLOADING = 3; + /** + * The serial flasher tries to sync with the MCU + * You can use this event to prompt the user to press the boot btn + */ + public static final int SYNCING_WITH_MCU = 4; + /** + * The MCU is rebooting + */ + public static final int REBOOTING = 5; + /** + * The server is provisioning the tracker + */ + public static final int PROVISIONING = 6; + public static final int DONE = 7; + /** + * Could not find the device + */ + public static final int ERROR_DEVICE_NOT_FOUND = 8; + /** + * The operation timed out, > 1min + */ + public static final int ERROR_TIMEOUT = 9; + /** + * The firmware download failed + */ + public static final int ERROR_DOWNLOAD_FAILED = 10; + /** + * The server could not authenticate with the MCU + */ + public static final int ERROR_AUTHENTICATION_FAILED = 11; + /** + * Could not upload the firmware to the MUC + */ + public static final int ERROR_UPLOAD_FAILED = 12; + /** + * The provision of the tracker failed, usually wifi credentials + */ + public static final int ERROR_PROVISIONING_FAILED = 13; + /** + * An unsupported Flashing method was used + */ + public static final int ERROR_UNSUPPORTED_METHOD = 14; + public static final int ERROR_UNKNOWN = 15; + + public static final String[] names = { "DOWNLOADING", "NEED_MANUAL_REBOOT", "AUTHENTICATING", "UPLOADING", "SYNCING_WITH_MCU", "REBOOTING", "PROVISIONING", "DONE", "ERROR_DEVICE_NOT_FOUND", "ERROR_TIMEOUT", "ERROR_DOWNLOAD_FAILED", "ERROR_AUTHENTICATION_FAILED", "ERROR_UPLOAD_FAILED", "ERROR_PROVISIONING_FAILED", "ERROR_UNSUPPORTED_METHOD", "ERROR_UNKNOWN", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateStatusResponse.java b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateStatusResponse.java new file mode 100644 index 00000000..14821224 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateStatusResponse.java @@ -0,0 +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 FirmwareUpdateStatusResponse extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static FirmwareUpdateStatusResponse getRootAsFirmwareUpdateStatusResponse(ByteBuffer _bb) { return getRootAsFirmwareUpdateStatusResponse(_bb, new FirmwareUpdateStatusResponse()); } + public static FirmwareUpdateStatusResponse getRootAsFirmwareUpdateStatusResponse(ByteBuffer _bb, FirmwareUpdateStatusResponse 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 FirmwareUpdateStatusResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public byte deviceIdType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; } + public Table deviceId(Table obj) { int o = __offset(6); return o != 0 ? __union(obj, o + bb_pos) : null; } + public int status() { int o = __offset(8); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + /** + * from 0 to 100 + */ + public byte progress() { int o = __offset(10); return o != 0 ? bb.get(o + bb_pos) : 0; } + + public static int createFirmwareUpdateStatusResponse(FlatBufferBuilder builder, + byte deviceIdType, + int deviceIdOffset, + int status, + byte progress) { + builder.startTable(4); + FirmwareUpdateStatusResponse.addDeviceId(builder, deviceIdOffset); + FirmwareUpdateStatusResponse.addProgress(builder, progress); + FirmwareUpdateStatusResponse.addStatus(builder, status); + FirmwareUpdateStatusResponse.addDeviceIdType(builder, deviceIdType); + return FirmwareUpdateStatusResponse.endFirmwareUpdateStatusResponse(builder); + } + + public static void startFirmwareUpdateStatusResponse(FlatBufferBuilder builder) { builder.startTable(4); } + public static void addDeviceIdType(FlatBufferBuilder builder, byte deviceIdType) { builder.addByte(0, deviceIdType, 0); } + public static void addDeviceId(FlatBufferBuilder builder, int deviceIdOffset) { builder.addOffset(1, deviceIdOffset, 0); } + public static void addStatus(FlatBufferBuilder builder, int status) { builder.addByte(2, (byte) status, (byte) 0); } + public static void addProgress(FlatBufferBuilder builder, byte progress) { builder.addByte(3, progress, 0); } + public static int endFirmwareUpdateStatusResponse(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 FirmwareUpdateStatusResponse get(int j) { return get(new FirmwareUpdateStatusResponse(), j); } + public FirmwareUpdateStatusResponse get(FirmwareUpdateStatusResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public FirmwareUpdateStatusResponseT unpack() { + FirmwareUpdateStatusResponseT _o = new FirmwareUpdateStatusResponseT(); + unpackTo(_o); + return _o; + } + public void unpackTo(FirmwareUpdateStatusResponseT _o) { + solarxr_protocol.rpc.FirmwareUpdateDeviceIdUnion _oDeviceId = new solarxr_protocol.rpc.FirmwareUpdateDeviceIdUnion(); + byte _oDeviceIdType = deviceIdType(); + _oDeviceId.setType(_oDeviceIdType); + Table _oDeviceIdValue; + switch (_oDeviceIdType) { + case solarxr_protocol.rpc.FirmwareUpdateDeviceId.solarxr_protocol_datatypes_DeviceIdTable: + _oDeviceIdValue = deviceId(new solarxr_protocol.datatypes.DeviceIdTable()); + _oDeviceId.setValue(_oDeviceIdValue != null ? ((solarxr_protocol.datatypes.DeviceIdTable) _oDeviceIdValue).unpack() : null); + break; + case solarxr_protocol.rpc.FirmwareUpdateDeviceId.SerialDevicePort: + _oDeviceIdValue = deviceId(new solarxr_protocol.rpc.SerialDevicePort()); + _oDeviceId.setValue(_oDeviceIdValue != null ? ((solarxr_protocol.rpc.SerialDevicePort) _oDeviceIdValue).unpack() : null); + break; + default: break; + } + _o.setDeviceId(_oDeviceId); + int _oStatus = status(); + _o.setStatus(_oStatus); + byte _oProgress = progress(); + _o.setProgress(_oProgress); + } + public static int pack(FlatBufferBuilder builder, FirmwareUpdateStatusResponseT _o) { + if (_o == null) return 0; + byte _deviceIdType = _o.getDeviceId() == null ? solarxr_protocol.rpc.FirmwareUpdateDeviceId.NONE : _o.getDeviceId().getType(); + int _deviceId = _o.getDeviceId() == null ? 0 : solarxr_protocol.rpc.FirmwareUpdateDeviceIdUnion.pack(builder, _o.getDeviceId()); + return createFirmwareUpdateStatusResponse( + builder, + _deviceIdType, + _deviceId, + _o.getStatus(), + _o.getProgress()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateStatusResponseT.java b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateStatusResponseT.java new file mode 100644 index 00000000..d352fd6c --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateStatusResponseT.java @@ -0,0 +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 FirmwareUpdateStatusResponseT { + private solarxr_protocol.rpc.FirmwareUpdateDeviceIdUnion deviceId; + private int status; + private byte progress; + + public solarxr_protocol.rpc.FirmwareUpdateDeviceIdUnion getDeviceId() { return deviceId; } + + public void setDeviceId(solarxr_protocol.rpc.FirmwareUpdateDeviceIdUnion deviceId) { this.deviceId = deviceId; } + + public int getStatus() { return status; } + + public void setStatus(int status) { this.status = status; } + + public byte getProgress() { return progress; } + + public void setProgress(byte progress) { this.progress = progress; } + + + public FirmwareUpdateStatusResponseT() { + this.deviceId = null; + this.status = 0; + this.progress = 0; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateStopQueuesRequest.java b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateStopQueuesRequest.java new file mode 100644 index 00000000..f7991434 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateStopQueuesRequest.java @@ -0,0 +1,44 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class FirmwareUpdateStopQueuesRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static FirmwareUpdateStopQueuesRequest getRootAsFirmwareUpdateStopQueuesRequest(ByteBuffer _bb) { return getRootAsFirmwareUpdateStopQueuesRequest(_bb, new FirmwareUpdateStopQueuesRequest()); } + public static FirmwareUpdateStopQueuesRequest getRootAsFirmwareUpdateStopQueuesRequest(ByteBuffer _bb, FirmwareUpdateStopQueuesRequest 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 FirmwareUpdateStopQueuesRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startFirmwareUpdateStopQueuesRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endFirmwareUpdateStopQueuesRequest(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 FirmwareUpdateStopQueuesRequest get(int j) { return get(new FirmwareUpdateStopQueuesRequest(), j); } + public FirmwareUpdateStopQueuesRequest get(FirmwareUpdateStopQueuesRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public FirmwareUpdateStopQueuesRequestT unpack() { + FirmwareUpdateStopQueuesRequestT _o = new FirmwareUpdateStopQueuesRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(FirmwareUpdateStopQueuesRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, FirmwareUpdateStopQueuesRequestT _o) { + if (_o == null) return 0; + startFirmwareUpdateStopQueuesRequest(builder); + return endFirmwareUpdateStopQueuesRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateStopQueuesRequestT.java b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateStopQueuesRequestT.java new file mode 100644 index 00000000..5dc8a927 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/FirmwareUpdateStopQueuesRequestT.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 FirmwareUpdateStopQueuesRequestT { + + + public FirmwareUpdateStopQueuesRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ForgetDeviceRequest.java b/protocol/java/src/solarxr_protocol/rpc/ForgetDeviceRequest.java index 182a0405..f58ad8e1 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ForgetDeviceRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/ForgetDeviceRequest.java @@ -1,59 +1,59 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -@SuppressWarnings("unused") -public final class ForgetDeviceRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static ForgetDeviceRequest getRootAsForgetDeviceRequest(ByteBuffer _bb) { return getRootAsForgetDeviceRequest(_bb, new ForgetDeviceRequest()); } - public static ForgetDeviceRequest getRootAsForgetDeviceRequest(ByteBuffer _bb, ForgetDeviceRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } - public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } - public ForgetDeviceRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public String macAddress() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer macAddressAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } - public ByteBuffer macAddressInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } - - public static int createForgetDeviceRequest(FlatBufferBuilder builder, - int macAddressOffset) { - builder.startTable(1); - ForgetDeviceRequest.addMacAddress(builder, macAddressOffset); - return ForgetDeviceRequest.endForgetDeviceRequest(builder); - } - - public static void startForgetDeviceRequest(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addMacAddress(FlatBufferBuilder builder, int macAddressOffset) { builder.addOffset(0, macAddressOffset, 0); } - public static int endForgetDeviceRequest(FlatBufferBuilder builder) { - int o = builder.endTable(); - return o; - } - - public static final class Vector extends BaseVector { - public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } - - public ForgetDeviceRequest get(int j) { return get(new ForgetDeviceRequest(), j); } - public ForgetDeviceRequest get(ForgetDeviceRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public ForgetDeviceRequestT unpack() { - ForgetDeviceRequestT _o = new ForgetDeviceRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(ForgetDeviceRequestT _o) { - String _oMacAddress = macAddress(); - _o.setMacAddress(_oMacAddress); - } - public static int pack(FlatBufferBuilder builder, ForgetDeviceRequestT _o) { - if (_o == null) return 0; - int _macAddress = _o.getMacAddress() == null ? 0 : builder.createString(_o.getMacAddress()); - return createForgetDeviceRequest( - builder, - _macAddress); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class ForgetDeviceRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static ForgetDeviceRequest getRootAsForgetDeviceRequest(ByteBuffer _bb) { return getRootAsForgetDeviceRequest(_bb, new ForgetDeviceRequest()); } + public static ForgetDeviceRequest getRootAsForgetDeviceRequest(ByteBuffer _bb, ForgetDeviceRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public ForgetDeviceRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String macAddress() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer macAddressAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer macAddressInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + + public static int createForgetDeviceRequest(FlatBufferBuilder builder, + int macAddressOffset) { + builder.startTable(1); + ForgetDeviceRequest.addMacAddress(builder, macAddressOffset); + return ForgetDeviceRequest.endForgetDeviceRequest(builder); + } + + public static void startForgetDeviceRequest(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addMacAddress(FlatBufferBuilder builder, int macAddressOffset) { builder.addOffset(0, macAddressOffset, 0); } + public static int endForgetDeviceRequest(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public ForgetDeviceRequest get(int j) { return get(new ForgetDeviceRequest(), j); } + public ForgetDeviceRequest get(ForgetDeviceRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public ForgetDeviceRequestT unpack() { + ForgetDeviceRequestT _o = new ForgetDeviceRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(ForgetDeviceRequestT _o) { + String _oMacAddress = macAddress(); + _o.setMacAddress(_oMacAddress); + } + public static int pack(FlatBufferBuilder builder, ForgetDeviceRequestT _o) { + if (_o == null) return 0; + int _macAddress = _o.getMacAddress() == null ? 0 : builder.createString(_o.getMacAddress()); + return createForgetDeviceRequest( + builder, + _macAddress); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ForgetDeviceRequestT.java b/protocol/java/src/solarxr_protocol/rpc/ForgetDeviceRequestT.java index 026164f1..76dc2eff 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ForgetDeviceRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/ForgetDeviceRequestT.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 ForgetDeviceRequestT { - private String macAddress; - - public String getMacAddress() { return macAddress; } - - public void setMacAddress(String macAddress) { this.macAddress = macAddress; } - - - public ForgetDeviceRequestT() { - this.macAddress = 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 ForgetDeviceRequestT { + private String macAddress; + + public String getMacAddress() { return macAddress; } + + public void setMacAddress(String macAddress) { this.macAddress = macAddress; } + + + public ForgetDeviceRequestT() { + this.macAddress = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/HeartbeatRequest.java b/protocol/java/src/solarxr_protocol/rpc/HeartbeatRequest.java index d0c8e8e3..d596df7e 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_22_10_26(); } - 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_22_10_26(); } + 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 983924cf..216d6326 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 9ffa4637..3c734a86 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_22_10_26(); } - 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_22_10_26(); } + 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 8c8ab5ea..89d1dd5f 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/HeightRequest.java b/protocol/java/src/solarxr_protocol/rpc/HeightRequest.java index fcff1197..38f6fa68 100644 --- a/protocol/java/src/solarxr_protocol/rpc/HeightRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/HeightRequest.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 HeightRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static HeightRequest getRootAsHeightRequest(ByteBuffer _bb) { return getRootAsHeightRequest(_bb, new HeightRequest()); } - public static HeightRequest getRootAsHeightRequest(ByteBuffer _bb, HeightRequest 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 HeightRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startHeightRequest(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endHeightRequest(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 HeightRequest get(int j) { return get(new HeightRequest(), j); } - public HeightRequest get(HeightRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public HeightRequestT unpack() { - HeightRequestT _o = new HeightRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(HeightRequestT _o) { - } - public static int pack(FlatBufferBuilder builder, HeightRequestT _o) { - if (_o == null) return 0; - startHeightRequest(builder); - return endHeightRequest(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 HeightRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static HeightRequest getRootAsHeightRequest(ByteBuffer _bb) { return getRootAsHeightRequest(_bb, new HeightRequest()); } + public static HeightRequest getRootAsHeightRequest(ByteBuffer _bb, HeightRequest 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 HeightRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startHeightRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endHeightRequest(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 HeightRequest get(int j) { return get(new HeightRequest(), j); } + public HeightRequest get(HeightRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public HeightRequestT unpack() { + HeightRequestT _o = new HeightRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(HeightRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, HeightRequestT _o) { + if (_o == null) return 0; + startHeightRequest(builder); + return endHeightRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/HeightRequestT.java b/protocol/java/src/solarxr_protocol/rpc/HeightRequestT.java index f7d33669..9a4ac23a 100644 --- a/protocol/java/src/solarxr_protocol/rpc/HeightRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/HeightRequestT.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 HeightRequestT { - - - public HeightRequestT() { - } -} - +// 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 HeightRequestT { + + + public HeightRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/HeightResponse.java b/protocol/java/src/solarxr_protocol/rpc/HeightResponse.java index cbb15a3e..c2c62668 100644 --- a/protocol/java/src/solarxr_protocol/rpc/HeightResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/HeightResponse.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.*; - -/** - * Returns the current HMD height and returns an estimated full height (user height) - */ -@SuppressWarnings("unused") -public final class HeightResponse extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static HeightResponse getRootAsHeightResponse(ByteBuffer _bb) { return getRootAsHeightResponse(_bb, new HeightResponse()); } - public static HeightResponse getRootAsHeightResponse(ByteBuffer _bb, HeightResponse 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 HeightResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public float hmdHeight() { int o = __offset(4); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } - public float estimatedFullHeight() { int o = __offset(6); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } - - public static int createHeightResponse(FlatBufferBuilder builder, - float hmdHeight, - float estimatedFullHeight) { - builder.startTable(2); - HeightResponse.addEstimatedFullHeight(builder, estimatedFullHeight); - HeightResponse.addHmdHeight(builder, hmdHeight); - return HeightResponse.endHeightResponse(builder); - } - - public static void startHeightResponse(FlatBufferBuilder builder) { builder.startTable(2); } - public static void addHmdHeight(FlatBufferBuilder builder, float hmdHeight) { builder.addFloat(0, hmdHeight, 0.0f); } - public static void addEstimatedFullHeight(FlatBufferBuilder builder, float estimatedFullHeight) { builder.addFloat(1, estimatedFullHeight, 0.0f); } - public static int endHeightResponse(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 HeightResponse get(int j) { return get(new HeightResponse(), j); } - public HeightResponse get(HeightResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public HeightResponseT unpack() { - HeightResponseT _o = new HeightResponseT(); - unpackTo(_o); - return _o; - } - public void unpackTo(HeightResponseT _o) { - float _oHmdHeight = hmdHeight(); - _o.setHmdHeight(_oHmdHeight); - float _oEstimatedFullHeight = estimatedFullHeight(); - _o.setEstimatedFullHeight(_oEstimatedFullHeight); - } - public static int pack(FlatBufferBuilder builder, HeightResponseT _o) { - if (_o == null) return 0; - return createHeightResponse( - builder, - _o.getHmdHeight(), - _o.getEstimatedFullHeight()); - } -} - +// 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.*; + +/** + * Returns the current HMD height and returns an estimated full height (user height) + */ +@SuppressWarnings("unused") +public final class HeightResponse extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static HeightResponse getRootAsHeightResponse(ByteBuffer _bb) { return getRootAsHeightResponse(_bb, new HeightResponse()); } + public static HeightResponse getRootAsHeightResponse(ByteBuffer _bb, HeightResponse 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 HeightResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public float hmdHeight() { int o = __offset(4); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + public float estimatedFullHeight() { int o = __offset(6); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + + public static int createHeightResponse(FlatBufferBuilder builder, + float hmdHeight, + float estimatedFullHeight) { + builder.startTable(2); + HeightResponse.addEstimatedFullHeight(builder, estimatedFullHeight); + HeightResponse.addHmdHeight(builder, hmdHeight); + return HeightResponse.endHeightResponse(builder); + } + + public static void startHeightResponse(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addHmdHeight(FlatBufferBuilder builder, float hmdHeight) { builder.addFloat(0, hmdHeight, 0.0f); } + public static void addEstimatedFullHeight(FlatBufferBuilder builder, float estimatedFullHeight) { builder.addFloat(1, estimatedFullHeight, 0.0f); } + public static int endHeightResponse(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 HeightResponse get(int j) { return get(new HeightResponse(), j); } + public HeightResponse get(HeightResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public HeightResponseT unpack() { + HeightResponseT _o = new HeightResponseT(); + unpackTo(_o); + return _o; + } + public void unpackTo(HeightResponseT _o) { + float _oHmdHeight = hmdHeight(); + _o.setHmdHeight(_oHmdHeight); + float _oEstimatedFullHeight = estimatedFullHeight(); + _o.setEstimatedFullHeight(_oEstimatedFullHeight); + } + public static int pack(FlatBufferBuilder builder, HeightResponseT _o) { + if (_o == null) return 0; + return createHeightResponse( + builder, + _o.getHmdHeight(), + _o.getEstimatedFullHeight()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/HeightResponseT.java b/protocol/java/src/solarxr_protocol/rpc/HeightResponseT.java index d3ef2bae..6d5dcb4d 100644 --- a/protocol/java/src/solarxr_protocol/rpc/HeightResponseT.java +++ b/protocol/java/src/solarxr_protocol/rpc/HeightResponseT.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 HeightResponseT { - private float hmdHeight; - private float estimatedFullHeight; - - public float getHmdHeight() { return hmdHeight; } - - public void setHmdHeight(float hmdHeight) { this.hmdHeight = hmdHeight; } - - public float getEstimatedFullHeight() { return estimatedFullHeight; } - - public void setEstimatedFullHeight(float estimatedFullHeight) { this.estimatedFullHeight = estimatedFullHeight; } - - - public HeightResponseT() { - this.hmdHeight = 0.0f; - this.estimatedFullHeight = 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 HeightResponseT { + private float hmdHeight; + private float estimatedFullHeight; + + public float getHmdHeight() { return hmdHeight; } + + public void setHmdHeight(float hmdHeight) { this.hmdHeight = hmdHeight; } + + public float getEstimatedFullHeight() { return estimatedFullHeight; } + + public void setEstimatedFullHeight(float estimatedFullHeight) { this.estimatedFullHeight = estimatedFullHeight; } + + + public HeightResponseT() { + this.hmdHeight = 0.0f; + this.estimatedFullHeight = 0.0f; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/LegTweaksTmpChange.java b/protocol/java/src/solarxr_protocol/rpc/LegTweaksTmpChange.java index 6c97121c..cdd10d30 100644 --- a/protocol/java/src/solarxr_protocol/rpc/LegTweaksTmpChange.java +++ b/protocol/java/src/solarxr_protocol/rpc/LegTweaksTmpChange.java @@ -1,85 +1,85 @@ -// 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.*; - -/** - * Makes a temporary change to legtweaks. This is not saved to disk, and can be - * cleared with `LegTweaksTmpClear` - */ -@SuppressWarnings("unused") -public final class LegTweaksTmpChange extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static LegTweaksTmpChange getRootAsLegTweaksTmpChange(ByteBuffer _bb) { return getRootAsLegTweaksTmpChange(_bb, new LegTweaksTmpChange()); } - public static LegTweaksTmpChange getRootAsLegTweaksTmpChange(ByteBuffer _bb, LegTweaksTmpChange 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 LegTweaksTmpChange __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public boolean hasFloorClip() { return 0 != __offset(4); } - public boolean floorClip() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasSkatingCorrection() { return 0 != __offset(6); } - public boolean skatingCorrection() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasToeSnap() { return 0 != __offset(8); } - public boolean toeSnap() { int o = __offset(8); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasFootPlant() { return 0 != __offset(10); } - public boolean footPlant() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static int createLegTweaksTmpChange(FlatBufferBuilder builder, - boolean floorClip, - boolean skatingCorrection, - boolean toeSnap, - boolean footPlant) { - builder.startTable(4); - LegTweaksTmpChange.addFootPlant(builder, footPlant); - LegTweaksTmpChange.addToeSnap(builder, toeSnap); - LegTweaksTmpChange.addSkatingCorrection(builder, skatingCorrection); - LegTweaksTmpChange.addFloorClip(builder, floorClip); - return LegTweaksTmpChange.endLegTweaksTmpChange(builder); - } - - public static void startLegTweaksTmpChange(FlatBufferBuilder builder) { builder.startTable(4); } - public static void addFloorClip(FlatBufferBuilder builder, boolean floorClip) { builder.addBoolean(0, floorClip, false); } - public static void addSkatingCorrection(FlatBufferBuilder builder, boolean skatingCorrection) { builder.addBoolean(1, skatingCorrection, false); } - public static void addToeSnap(FlatBufferBuilder builder, boolean toeSnap) { builder.addBoolean(2, toeSnap, false); } - public static void addFootPlant(FlatBufferBuilder builder, boolean footPlant) { builder.addBoolean(3, footPlant, false); } - public static int endLegTweaksTmpChange(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 LegTweaksTmpChange get(int j) { return get(new LegTweaksTmpChange(), j); } - public LegTweaksTmpChange get(LegTweaksTmpChange obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public LegTweaksTmpChangeT unpack() { - LegTweaksTmpChangeT _o = new LegTweaksTmpChangeT(); - unpackTo(_o); - return _o; - } - public void unpackTo(LegTweaksTmpChangeT _o) { - Boolean _oFloorClip = hasFloorClip() ? floorClip() : null; - _o.setFloorClip(_oFloorClip); - Boolean _oSkatingCorrection = hasSkatingCorrection() ? skatingCorrection() : null; - _o.setSkatingCorrection(_oSkatingCorrection); - Boolean _oToeSnap = hasToeSnap() ? toeSnap() : null; - _o.setToeSnap(_oToeSnap); - Boolean _oFootPlant = hasFootPlant() ? footPlant() : null; - _o.setFootPlant(_oFootPlant); - } - public static int pack(FlatBufferBuilder builder, LegTweaksTmpChangeT _o) { - if (_o == null) return 0; - return createLegTweaksTmpChange( - builder, - _o.getFloorClip(), - _o.getSkatingCorrection(), - _o.getToeSnap(), - _o.getFootPlant()); - } -} - +// 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.*; + +/** + * Makes a temporary change to legtweaks. This is not saved to disk, and can be + * cleared with `LegTweaksTmpClear` + */ +@SuppressWarnings("unused") +public final class LegTweaksTmpChange extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static LegTweaksTmpChange getRootAsLegTweaksTmpChange(ByteBuffer _bb) { return getRootAsLegTweaksTmpChange(_bb, new LegTweaksTmpChange()); } + public static LegTweaksTmpChange getRootAsLegTweaksTmpChange(ByteBuffer _bb, LegTweaksTmpChange 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 LegTweaksTmpChange __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean hasFloorClip() { return 0 != __offset(4); } + public boolean floorClip() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasSkatingCorrection() { return 0 != __offset(6); } + public boolean skatingCorrection() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasToeSnap() { return 0 != __offset(8); } + public boolean toeSnap() { int o = __offset(8); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasFootPlant() { return 0 != __offset(10); } + public boolean footPlant() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createLegTweaksTmpChange(FlatBufferBuilder builder, + boolean floorClip, + boolean skatingCorrection, + boolean toeSnap, + boolean footPlant) { + builder.startTable(4); + LegTweaksTmpChange.addFootPlant(builder, footPlant); + LegTweaksTmpChange.addToeSnap(builder, toeSnap); + LegTweaksTmpChange.addSkatingCorrection(builder, skatingCorrection); + LegTweaksTmpChange.addFloorClip(builder, floorClip); + return LegTweaksTmpChange.endLegTweaksTmpChange(builder); + } + + public static void startLegTweaksTmpChange(FlatBufferBuilder builder) { builder.startTable(4); } + public static void addFloorClip(FlatBufferBuilder builder, boolean floorClip) { builder.addBoolean(0, floorClip, false); } + public static void addSkatingCorrection(FlatBufferBuilder builder, boolean skatingCorrection) { builder.addBoolean(1, skatingCorrection, false); } + public static void addToeSnap(FlatBufferBuilder builder, boolean toeSnap) { builder.addBoolean(2, toeSnap, false); } + public static void addFootPlant(FlatBufferBuilder builder, boolean footPlant) { builder.addBoolean(3, footPlant, false); } + public static int endLegTweaksTmpChange(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 LegTweaksTmpChange get(int j) { return get(new LegTweaksTmpChange(), j); } + public LegTweaksTmpChange get(LegTweaksTmpChange obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public LegTweaksTmpChangeT unpack() { + LegTweaksTmpChangeT _o = new LegTweaksTmpChangeT(); + unpackTo(_o); + return _o; + } + public void unpackTo(LegTweaksTmpChangeT _o) { + Boolean _oFloorClip = hasFloorClip() ? floorClip() : null; + _o.setFloorClip(_oFloorClip); + Boolean _oSkatingCorrection = hasSkatingCorrection() ? skatingCorrection() : null; + _o.setSkatingCorrection(_oSkatingCorrection); + Boolean _oToeSnap = hasToeSnap() ? toeSnap() : null; + _o.setToeSnap(_oToeSnap); + Boolean _oFootPlant = hasFootPlant() ? footPlant() : null; + _o.setFootPlant(_oFootPlant); + } + public static int pack(FlatBufferBuilder builder, LegTweaksTmpChangeT _o) { + if (_o == null) return 0; + return createLegTweaksTmpChange( + builder, + _o.getFloorClip(), + _o.getSkatingCorrection(), + _o.getToeSnap(), + _o.getFootPlant()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/LegTweaksTmpChangeT.java b/protocol/java/src/solarxr_protocol/rpc/LegTweaksTmpChangeT.java index 7c242f2c..7b214999 100644 --- a/protocol/java/src/solarxr_protocol/rpc/LegTweaksTmpChangeT.java +++ b/protocol/java/src/solarxr_protocol/rpc/LegTweaksTmpChangeT.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 LegTweaksTmpChangeT { - private Boolean floorClip; - private Boolean skatingCorrection; - private Boolean toeSnap; - private Boolean footPlant; - - 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 Boolean getToeSnap() { return toeSnap; } - - public void setToeSnap(Boolean toeSnap) { this.toeSnap = toeSnap; } - - public Boolean getFootPlant() { return footPlant; } - - public void setFootPlant(Boolean footPlant) { this.footPlant = footPlant; } - - - public LegTweaksTmpChangeT() { - this.floorClip = null; - this.skatingCorrection = null; - this.toeSnap = null; - this.footPlant = 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 LegTweaksTmpChangeT { + private Boolean floorClip; + private Boolean skatingCorrection; + private Boolean toeSnap; + private Boolean footPlant; + + 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 Boolean getToeSnap() { return toeSnap; } + + public void setToeSnap(Boolean toeSnap) { this.toeSnap = toeSnap; } + + public Boolean getFootPlant() { return footPlant; } + + public void setFootPlant(Boolean footPlant) { this.footPlant = footPlant; } + + + public LegTweaksTmpChangeT() { + this.floorClip = null; + this.skatingCorrection = null; + this.toeSnap = null; + this.footPlant = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/LegTweaksTmpClear.java b/protocol/java/src/solarxr_protocol/rpc/LegTweaksTmpClear.java index fc38a716..677fd38a 100644 --- a/protocol/java/src/solarxr_protocol/rpc/LegTweaksTmpClear.java +++ b/protocol/java/src/solarxr_protocol/rpc/LegTweaksTmpClear.java @@ -1,81 +1,81 @@ -// 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.*; - -/** - * Clears the legtweaks temprorary state back to what the config has. - * Setting a field to `true` will reset that field. - */ -@SuppressWarnings("unused") -public final class LegTweaksTmpClear extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static LegTweaksTmpClear getRootAsLegTweaksTmpClear(ByteBuffer _bb) { return getRootAsLegTweaksTmpClear(_bb, new LegTweaksTmpClear()); } - public static LegTweaksTmpClear getRootAsLegTweaksTmpClear(ByteBuffer _bb, LegTweaksTmpClear 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 LegTweaksTmpClear __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public boolean floorClip() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean skatingCorrection() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean toeSnap() { int o = __offset(8); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean footPlant() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static int createLegTweaksTmpClear(FlatBufferBuilder builder, - boolean floorClip, - boolean skatingCorrection, - boolean toeSnap, - boolean footPlant) { - builder.startTable(4); - LegTweaksTmpClear.addFootPlant(builder, footPlant); - LegTweaksTmpClear.addToeSnap(builder, toeSnap); - LegTweaksTmpClear.addSkatingCorrection(builder, skatingCorrection); - LegTweaksTmpClear.addFloorClip(builder, floorClip); - return LegTweaksTmpClear.endLegTweaksTmpClear(builder); - } - - public static void startLegTweaksTmpClear(FlatBufferBuilder builder) { builder.startTable(4); } - public static void addFloorClip(FlatBufferBuilder builder, boolean floorClip) { builder.addBoolean(0, floorClip, false); } - public static void addSkatingCorrection(FlatBufferBuilder builder, boolean skatingCorrection) { builder.addBoolean(1, skatingCorrection, false); } - public static void addToeSnap(FlatBufferBuilder builder, boolean toeSnap) { builder.addBoolean(2, toeSnap, false); } - public static void addFootPlant(FlatBufferBuilder builder, boolean footPlant) { builder.addBoolean(3, footPlant, false); } - public static int endLegTweaksTmpClear(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 LegTweaksTmpClear get(int j) { return get(new LegTweaksTmpClear(), j); } - public LegTweaksTmpClear get(LegTweaksTmpClear obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public LegTweaksTmpClearT unpack() { - LegTweaksTmpClearT _o = new LegTweaksTmpClearT(); - unpackTo(_o); - return _o; - } - public void unpackTo(LegTweaksTmpClearT _o) { - boolean _oFloorClip = floorClip(); - _o.setFloorClip(_oFloorClip); - boolean _oSkatingCorrection = skatingCorrection(); - _o.setSkatingCorrection(_oSkatingCorrection); - boolean _oToeSnap = toeSnap(); - _o.setToeSnap(_oToeSnap); - boolean _oFootPlant = footPlant(); - _o.setFootPlant(_oFootPlant); - } - public static int pack(FlatBufferBuilder builder, LegTweaksTmpClearT _o) { - if (_o == null) return 0; - return createLegTweaksTmpClear( - builder, - _o.getFloorClip(), - _o.getSkatingCorrection(), - _o.getToeSnap(), - _o.getFootPlant()); - } -} - +// 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.*; + +/** + * Clears the legtweaks temprorary state back to what the config has. + * Setting a field to `true` will reset that field. + */ +@SuppressWarnings("unused") +public final class LegTweaksTmpClear extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static LegTweaksTmpClear getRootAsLegTweaksTmpClear(ByteBuffer _bb) { return getRootAsLegTweaksTmpClear(_bb, new LegTweaksTmpClear()); } + public static LegTweaksTmpClear getRootAsLegTweaksTmpClear(ByteBuffer _bb, LegTweaksTmpClear 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 LegTweaksTmpClear __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean floorClip() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean skatingCorrection() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean toeSnap() { int o = __offset(8); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean footPlant() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createLegTweaksTmpClear(FlatBufferBuilder builder, + boolean floorClip, + boolean skatingCorrection, + boolean toeSnap, + boolean footPlant) { + builder.startTable(4); + LegTweaksTmpClear.addFootPlant(builder, footPlant); + LegTweaksTmpClear.addToeSnap(builder, toeSnap); + LegTweaksTmpClear.addSkatingCorrection(builder, skatingCorrection); + LegTweaksTmpClear.addFloorClip(builder, floorClip); + return LegTweaksTmpClear.endLegTweaksTmpClear(builder); + } + + public static void startLegTweaksTmpClear(FlatBufferBuilder builder) { builder.startTable(4); } + public static void addFloorClip(FlatBufferBuilder builder, boolean floorClip) { builder.addBoolean(0, floorClip, false); } + public static void addSkatingCorrection(FlatBufferBuilder builder, boolean skatingCorrection) { builder.addBoolean(1, skatingCorrection, false); } + public static void addToeSnap(FlatBufferBuilder builder, boolean toeSnap) { builder.addBoolean(2, toeSnap, false); } + public static void addFootPlant(FlatBufferBuilder builder, boolean footPlant) { builder.addBoolean(3, footPlant, false); } + public static int endLegTweaksTmpClear(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 LegTweaksTmpClear get(int j) { return get(new LegTweaksTmpClear(), j); } + public LegTweaksTmpClear get(LegTweaksTmpClear obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public LegTweaksTmpClearT unpack() { + LegTweaksTmpClearT _o = new LegTweaksTmpClearT(); + unpackTo(_o); + return _o; + } + public void unpackTo(LegTweaksTmpClearT _o) { + boolean _oFloorClip = floorClip(); + _o.setFloorClip(_oFloorClip); + boolean _oSkatingCorrection = skatingCorrection(); + _o.setSkatingCorrection(_oSkatingCorrection); + boolean _oToeSnap = toeSnap(); + _o.setToeSnap(_oToeSnap); + boolean _oFootPlant = footPlant(); + _o.setFootPlant(_oFootPlant); + } + public static int pack(FlatBufferBuilder builder, LegTweaksTmpClearT _o) { + if (_o == null) return 0; + return createLegTweaksTmpClear( + builder, + _o.getFloorClip(), + _o.getSkatingCorrection(), + _o.getToeSnap(), + _o.getFootPlant()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/LegTweaksTmpClearT.java b/protocol/java/src/solarxr_protocol/rpc/LegTweaksTmpClearT.java index 7e036664..123ede63 100644 --- a/protocol/java/src/solarxr_protocol/rpc/LegTweaksTmpClearT.java +++ b/protocol/java/src/solarxr_protocol/rpc/LegTweaksTmpClearT.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 LegTweaksTmpClearT { - private boolean floorClip; - private boolean skatingCorrection; - private boolean toeSnap; - private boolean footPlant; - - 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 boolean getToeSnap() { return toeSnap; } - - public void setToeSnap(boolean toeSnap) { this.toeSnap = toeSnap; } - - public boolean getFootPlant() { return footPlant; } - - public void setFootPlant(boolean footPlant) { this.footPlant = footPlant; } - - - public LegTweaksTmpClearT() { - this.floorClip = false; - this.skatingCorrection = false; - this.toeSnap = false; - this.footPlant = 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 LegTweaksTmpClearT { + private boolean floorClip; + private boolean skatingCorrection; + private boolean toeSnap; + private boolean footPlant; + + 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 boolean getToeSnap() { return toeSnap; } + + public void setToeSnap(boolean toeSnap) { this.toeSnap = toeSnap; } + + public boolean getFootPlant() { return footPlant; } + + public void setFootPlant(boolean footPlant) { this.footPlant = footPlant; } + + + public LegTweaksTmpClearT() { + this.floorClip = false; + this.skatingCorrection = false; + this.toeSnap = false; + this.footPlant = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/NewSerialDeviceResponse.java b/protocol/java/src/solarxr_protocol/rpc/NewSerialDeviceResponse.java index 9d0b51ae..01f8fc32 100644 --- a/protocol/java/src/solarxr_protocol/rpc/NewSerialDeviceResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/NewSerialDeviceResponse.java @@ -1,58 +1,58 @@ -// 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 NewSerialDeviceResponse extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static NewSerialDeviceResponse getRootAsNewSerialDeviceResponse(ByteBuffer _bb) { return getRootAsNewSerialDeviceResponse(_bb, new NewSerialDeviceResponse()); } - public static NewSerialDeviceResponse getRootAsNewSerialDeviceResponse(ByteBuffer _bb, NewSerialDeviceResponse 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 NewSerialDeviceResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public solarxr_protocol.rpc.SerialDevice device() { return device(new solarxr_protocol.rpc.SerialDevice()); } - public solarxr_protocol.rpc.SerialDevice device(solarxr_protocol.rpc.SerialDevice obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - - public static int createNewSerialDeviceResponse(FlatBufferBuilder builder, - int deviceOffset) { - builder.startTable(1); - NewSerialDeviceResponse.addDevice(builder, deviceOffset); - return NewSerialDeviceResponse.endNewSerialDeviceResponse(builder); - } - - public static void startNewSerialDeviceResponse(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addDevice(FlatBufferBuilder builder, int deviceOffset) { builder.addOffset(0, deviceOffset, 0); } - public static int endNewSerialDeviceResponse(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 NewSerialDeviceResponse get(int j) { return get(new NewSerialDeviceResponse(), j); } - public NewSerialDeviceResponse get(NewSerialDeviceResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public NewSerialDeviceResponseT unpack() { - NewSerialDeviceResponseT _o = new NewSerialDeviceResponseT(); - unpackTo(_o); - return _o; - } - public void unpackTo(NewSerialDeviceResponseT _o) { - if (device() != null) _o.setDevice(device().unpack()); - else _o.setDevice(null); - } - public static int pack(FlatBufferBuilder builder, NewSerialDeviceResponseT _o) { - if (_o == null) return 0; - int _device = _o.getDevice() == null ? 0 : solarxr_protocol.rpc.SerialDevice.pack(builder, _o.getDevice()); - return createNewSerialDeviceResponse( - builder, - _device); - } -} - +// 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 NewSerialDeviceResponse extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static NewSerialDeviceResponse getRootAsNewSerialDeviceResponse(ByteBuffer _bb) { return getRootAsNewSerialDeviceResponse(_bb, new NewSerialDeviceResponse()); } + public static NewSerialDeviceResponse getRootAsNewSerialDeviceResponse(ByteBuffer _bb, NewSerialDeviceResponse 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 NewSerialDeviceResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.rpc.SerialDevice device() { return device(new solarxr_protocol.rpc.SerialDevice()); } + public solarxr_protocol.rpc.SerialDevice device(solarxr_protocol.rpc.SerialDevice obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createNewSerialDeviceResponse(FlatBufferBuilder builder, + int deviceOffset) { + builder.startTable(1); + NewSerialDeviceResponse.addDevice(builder, deviceOffset); + return NewSerialDeviceResponse.endNewSerialDeviceResponse(builder); + } + + public static void startNewSerialDeviceResponse(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addDevice(FlatBufferBuilder builder, int deviceOffset) { builder.addOffset(0, deviceOffset, 0); } + public static int endNewSerialDeviceResponse(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 NewSerialDeviceResponse get(int j) { return get(new NewSerialDeviceResponse(), j); } + public NewSerialDeviceResponse get(NewSerialDeviceResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public NewSerialDeviceResponseT unpack() { + NewSerialDeviceResponseT _o = new NewSerialDeviceResponseT(); + unpackTo(_o); + return _o; + } + public void unpackTo(NewSerialDeviceResponseT _o) { + if (device() != null) _o.setDevice(device().unpack()); + else _o.setDevice(null); + } + public static int pack(FlatBufferBuilder builder, NewSerialDeviceResponseT _o) { + if (_o == null) return 0; + int _device = _o.getDevice() == null ? 0 : solarxr_protocol.rpc.SerialDevice.pack(builder, _o.getDevice()); + return createNewSerialDeviceResponse( + builder, + _device); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/NewSerialDeviceResponseT.java b/protocol/java/src/solarxr_protocol/rpc/NewSerialDeviceResponseT.java index bbafba96..a782119c 100644 --- a/protocol/java/src/solarxr_protocol/rpc/NewSerialDeviceResponseT.java +++ b/protocol/java/src/solarxr_protocol/rpc/NewSerialDeviceResponseT.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 NewSerialDeviceResponseT { - private solarxr_protocol.rpc.SerialDeviceT device; - - public solarxr_protocol.rpc.SerialDeviceT getDevice() { return device; } - - public void setDevice(solarxr_protocol.rpc.SerialDeviceT device) { this.device = device; } - - - public NewSerialDeviceResponseT() { - this.device = 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 NewSerialDeviceResponseT { + private solarxr_protocol.rpc.SerialDeviceT device; + + public solarxr_protocol.rpc.SerialDeviceT getDevice() { return device; } + + public void setDevice(solarxr_protocol.rpc.SerialDeviceT device) { this.device = device; } + + + public NewSerialDeviceResponseT() { + this.device = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/OSCRouterSettings.java b/protocol/java/src/solarxr_protocol/rpc/OSCRouterSettings.java index 4b7e2bd4..dc6cf074 100644 --- a/protocol/java/src/solarxr_protocol/rpc/OSCRouterSettings.java +++ b/protocol/java/src/solarxr_protocol/rpc/OSCRouterSettings.java @@ -1,61 +1,61 @@ -// 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.*; - -/** - * OSC router forwards messages it receives, to allow the usage of multiple OSC programs for the same app. - */ -@SuppressWarnings("unused") -public final class OSCRouterSettings extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static OSCRouterSettings getRootAsOSCRouterSettings(ByteBuffer _bb) { return getRootAsOSCRouterSettings(_bb, new OSCRouterSettings()); } - public static OSCRouterSettings getRootAsOSCRouterSettings(ByteBuffer _bb, OSCRouterSettings 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 OSCRouterSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public solarxr_protocol.rpc.OSCSettings oscSettings() { return oscSettings(new solarxr_protocol.rpc.OSCSettings()); } - public solarxr_protocol.rpc.OSCSettings oscSettings(solarxr_protocol.rpc.OSCSettings obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - - public static int createOSCRouterSettings(FlatBufferBuilder builder, - int oscSettingsOffset) { - builder.startTable(1); - OSCRouterSettings.addOscSettings(builder, oscSettingsOffset); - return OSCRouterSettings.endOSCRouterSettings(builder); - } - - public static void startOSCRouterSettings(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addOscSettings(FlatBufferBuilder builder, int oscSettingsOffset) { builder.addOffset(0, oscSettingsOffset, 0); } - public static int endOSCRouterSettings(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 OSCRouterSettings get(int j) { return get(new OSCRouterSettings(), j); } - public OSCRouterSettings get(OSCRouterSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public OSCRouterSettingsT unpack() { - OSCRouterSettingsT _o = new OSCRouterSettingsT(); - unpackTo(_o); - return _o; - } - public void unpackTo(OSCRouterSettingsT _o) { - if (oscSettings() != null) _o.setOscSettings(oscSettings().unpack()); - else _o.setOscSettings(null); - } - public static int pack(FlatBufferBuilder builder, OSCRouterSettingsT _o) { - if (_o == null) return 0; - int _oscSettings = _o.getOscSettings() == null ? 0 : solarxr_protocol.rpc.OSCSettings.pack(builder, _o.getOscSettings()); - return createOSCRouterSettings( - builder, - _oscSettings); - } -} - +// 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.*; + +/** + * OSC router forwards messages it receives, to allow the usage of multiple OSC programs for the same app. + */ +@SuppressWarnings("unused") +public final class OSCRouterSettings extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static OSCRouterSettings getRootAsOSCRouterSettings(ByteBuffer _bb) { return getRootAsOSCRouterSettings(_bb, new OSCRouterSettings()); } + public static OSCRouterSettings getRootAsOSCRouterSettings(ByteBuffer _bb, OSCRouterSettings 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 OSCRouterSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.rpc.OSCSettings oscSettings() { return oscSettings(new solarxr_protocol.rpc.OSCSettings()); } + public solarxr_protocol.rpc.OSCSettings oscSettings(solarxr_protocol.rpc.OSCSettings obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createOSCRouterSettings(FlatBufferBuilder builder, + int oscSettingsOffset) { + builder.startTable(1); + OSCRouterSettings.addOscSettings(builder, oscSettingsOffset); + return OSCRouterSettings.endOSCRouterSettings(builder); + } + + public static void startOSCRouterSettings(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addOscSettings(FlatBufferBuilder builder, int oscSettingsOffset) { builder.addOffset(0, oscSettingsOffset, 0); } + public static int endOSCRouterSettings(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 OSCRouterSettings get(int j) { return get(new OSCRouterSettings(), j); } + public OSCRouterSettings get(OSCRouterSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public OSCRouterSettingsT unpack() { + OSCRouterSettingsT _o = new OSCRouterSettingsT(); + unpackTo(_o); + return _o; + } + public void unpackTo(OSCRouterSettingsT _o) { + if (oscSettings() != null) _o.setOscSettings(oscSettings().unpack()); + else _o.setOscSettings(null); + } + public static int pack(FlatBufferBuilder builder, OSCRouterSettingsT _o) { + if (_o == null) return 0; + int _oscSettings = _o.getOscSettings() == null ? 0 : solarxr_protocol.rpc.OSCSettings.pack(builder, _o.getOscSettings()); + return createOSCRouterSettings( + builder, + _oscSettings); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/OSCRouterSettingsT.java b/protocol/java/src/solarxr_protocol/rpc/OSCRouterSettingsT.java index a0a2c79f..d57e28fe 100644 --- a/protocol/java/src/solarxr_protocol/rpc/OSCRouterSettingsT.java +++ b/protocol/java/src/solarxr_protocol/rpc/OSCRouterSettingsT.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 OSCRouterSettingsT { - private solarxr_protocol.rpc.OSCSettingsT oscSettings; - - public solarxr_protocol.rpc.OSCSettingsT getOscSettings() { return oscSettings; } - - public void setOscSettings(solarxr_protocol.rpc.OSCSettingsT oscSettings) { this.oscSettings = oscSettings; } - - - public OSCRouterSettingsT() { - this.oscSettings = 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 OSCRouterSettingsT { + private solarxr_protocol.rpc.OSCSettingsT oscSettings; + + public solarxr_protocol.rpc.OSCSettingsT getOscSettings() { return oscSettings; } + + public void setOscSettings(solarxr_protocol.rpc.OSCSettingsT oscSettings) { this.oscSettings = oscSettings; } + + + public OSCRouterSettingsT() { + this.oscSettings = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/OSCSettings.java b/protocol/java/src/solarxr_protocol/rpc/OSCSettings.java index 6392815d..56f08ebd 100644 --- a/protocol/java/src/solarxr_protocol/rpc/OSCSettings.java +++ b/protocol/java/src/solarxr_protocol/rpc/OSCSettings.java @@ -1,83 +1,83 @@ -// 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.*; - -/** - * OSC Settings that are used in *any* osc application. - */ -@SuppressWarnings("unused") -public final class OSCSettings extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static OSCSettings getRootAsOSCSettings(ByteBuffer _bb) { return getRootAsOSCSettings(_bb, new OSCSettings()); } - public static OSCSettings getRootAsOSCSettings(ByteBuffer _bb, OSCSettings 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 OSCSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public boolean enabled() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public int portIn() { int o = __offset(6); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } - public int portOut() { int o = __offset(8); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } - public String address() { int o = __offset(10); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer addressAsByteBuffer() { return __vector_as_bytebuffer(10, 1); } - public ByteBuffer addressInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 10, 1); } - - public static int createOSCSettings(FlatBufferBuilder builder, - boolean enabled, - int portIn, - int portOut, - int addressOffset) { - builder.startTable(4); - OSCSettings.addAddress(builder, addressOffset); - OSCSettings.addPortOut(builder, portOut); - OSCSettings.addPortIn(builder, portIn); - OSCSettings.addEnabled(builder, enabled); - return OSCSettings.endOSCSettings(builder); - } - - public static void startOSCSettings(FlatBufferBuilder builder) { builder.startTable(4); } - public static void addEnabled(FlatBufferBuilder builder, boolean enabled) { builder.addBoolean(0, enabled, false); } - public static void addPortIn(FlatBufferBuilder builder, int portIn) { builder.addShort(1, (short) portIn, (short) 0); } - public static void addPortOut(FlatBufferBuilder builder, int portOut) { builder.addShort(2, (short) portOut, (short) 0); } - public static void addAddress(FlatBufferBuilder builder, int addressOffset) { builder.addOffset(3, addressOffset, 0); } - public static int endOSCSettings(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 OSCSettings get(int j) { return get(new OSCSettings(), j); } - public OSCSettings get(OSCSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public OSCSettingsT unpack() { - OSCSettingsT _o = new OSCSettingsT(); - unpackTo(_o); - return _o; - } - public void unpackTo(OSCSettingsT _o) { - boolean _oEnabled = enabled(); - _o.setEnabled(_oEnabled); - int _oPortIn = portIn(); - _o.setPortIn(_oPortIn); - int _oPortOut = portOut(); - _o.setPortOut(_oPortOut); - String _oAddress = address(); - _o.setAddress(_oAddress); - } - public static int pack(FlatBufferBuilder builder, OSCSettingsT _o) { - if (_o == null) return 0; - int _address = _o.getAddress() == null ? 0 : builder.createString(_o.getAddress()); - return createOSCSettings( - builder, - _o.getEnabled(), - _o.getPortIn(), - _o.getPortOut(), - _address); - } -} - +// 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.*; + +/** + * OSC Settings that are used in *any* osc application. + */ +@SuppressWarnings("unused") +public final class OSCSettings extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static OSCSettings getRootAsOSCSettings(ByteBuffer _bb) { return getRootAsOSCSettings(_bb, new OSCSettings()); } + public static OSCSettings getRootAsOSCSettings(ByteBuffer _bb, OSCSettings 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 OSCSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean enabled() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public int portIn() { int o = __offset(6); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } + public int portOut() { int o = __offset(8); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } + public String address() { int o = __offset(10); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer addressAsByteBuffer() { return __vector_as_bytebuffer(10, 1); } + public ByteBuffer addressInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 10, 1); } + + public static int createOSCSettings(FlatBufferBuilder builder, + boolean enabled, + int portIn, + int portOut, + int addressOffset) { + builder.startTable(4); + OSCSettings.addAddress(builder, addressOffset); + OSCSettings.addPortOut(builder, portOut); + OSCSettings.addPortIn(builder, portIn); + OSCSettings.addEnabled(builder, enabled); + return OSCSettings.endOSCSettings(builder); + } + + public static void startOSCSettings(FlatBufferBuilder builder) { builder.startTable(4); } + public static void addEnabled(FlatBufferBuilder builder, boolean enabled) { builder.addBoolean(0, enabled, false); } + public static void addPortIn(FlatBufferBuilder builder, int portIn) { builder.addShort(1, (short) portIn, (short) 0); } + public static void addPortOut(FlatBufferBuilder builder, int portOut) { builder.addShort(2, (short) portOut, (short) 0); } + public static void addAddress(FlatBufferBuilder builder, int addressOffset) { builder.addOffset(3, addressOffset, 0); } + public static int endOSCSettings(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 OSCSettings get(int j) { return get(new OSCSettings(), j); } + public OSCSettings get(OSCSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public OSCSettingsT unpack() { + OSCSettingsT _o = new OSCSettingsT(); + unpackTo(_o); + return _o; + } + public void unpackTo(OSCSettingsT _o) { + boolean _oEnabled = enabled(); + _o.setEnabled(_oEnabled); + int _oPortIn = portIn(); + _o.setPortIn(_oPortIn); + int _oPortOut = portOut(); + _o.setPortOut(_oPortOut); + String _oAddress = address(); + _o.setAddress(_oAddress); + } + public static int pack(FlatBufferBuilder builder, OSCSettingsT _o) { + if (_o == null) return 0; + int _address = _o.getAddress() == null ? 0 : builder.createString(_o.getAddress()); + return createOSCSettings( + builder, + _o.getEnabled(), + _o.getPortIn(), + _o.getPortOut(), + _address); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/OSCSettingsT.java b/protocol/java/src/solarxr_protocol/rpc/OSCSettingsT.java index f9705bb3..360215dd 100644 --- a/protocol/java/src/solarxr_protocol/rpc/OSCSettingsT.java +++ b/protocol/java/src/solarxr_protocol/rpc/OSCSettingsT.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 OSCSettingsT { - private boolean enabled; - private int portIn; - private int portOut; - private String address; - - public boolean getEnabled() { return enabled; } - - public void setEnabled(boolean enabled) { this.enabled = enabled; } - - public int getPortIn() { return portIn; } - - public void setPortIn(int portIn) { this.portIn = portIn; } - - public int getPortOut() { return portOut; } - - public void setPortOut(int portOut) { this.portOut = portOut; } - - public String getAddress() { return address; } - - public void setAddress(String address) { this.address = address; } - - - public OSCSettingsT() { - this.enabled = false; - this.portIn = 0; - this.portOut = 0; - this.address = 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 OSCSettingsT { + private boolean enabled; + private int portIn; + private int portOut; + private String address; + + public boolean getEnabled() { return enabled; } + + public void setEnabled(boolean enabled) { this.enabled = enabled; } + + public int getPortIn() { return portIn; } + + public void setPortIn(int portIn) { this.portIn = portIn; } + + public int getPortOut() { return portOut; } + + public void setPortOut(int portOut) { this.portOut = portOut; } + + public String getAddress() { return address; } + + public void setAddress(String address) { this.address = address; } + + + public OSCSettingsT() { + this.enabled = false; + this.portIn = 0; + this.portOut = 0; + this.address = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/OSCTrackersSetting.java b/protocol/java/src/solarxr_protocol/rpc/OSCTrackersSetting.java index cbb00418..b0342a57 100644 --- a/protocol/java/src/solarxr_protocol/rpc/OSCTrackersSetting.java +++ b/protocol/java/src/solarxr_protocol/rpc/OSCTrackersSetting.java @@ -1,98 +1,98 @@ -// 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 OSCTrackersSetting extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static OSCTrackersSetting getRootAsOSCTrackersSetting(ByteBuffer _bb) { return getRootAsOSCTrackersSetting(_bb, new OSCTrackersSetting()); } - public static OSCTrackersSetting getRootAsOSCTrackersSetting(ByteBuffer _bb, OSCTrackersSetting 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 OSCTrackersSetting __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public boolean head() { 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 waist() { 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 feet() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean elbows() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hands() { int o = __offset(16); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static int createOSCTrackersSetting(FlatBufferBuilder builder, - boolean head, - boolean chest, - boolean waist, - boolean knees, - boolean feet, - boolean elbows, - boolean hands) { - builder.startTable(7); - OSCTrackersSetting.addHands(builder, hands); - OSCTrackersSetting.addElbows(builder, elbows); - OSCTrackersSetting.addFeet(builder, feet); - OSCTrackersSetting.addKnees(builder, knees); - OSCTrackersSetting.addWaist(builder, waist); - OSCTrackersSetting.addChest(builder, chest); - OSCTrackersSetting.addHead(builder, head); - return OSCTrackersSetting.endOSCTrackersSetting(builder); - } - - public static void startOSCTrackersSetting(FlatBufferBuilder builder) { builder.startTable(7); } - public static void addHead(FlatBufferBuilder builder, boolean head) { builder.addBoolean(0, head, false); } - public static void addChest(FlatBufferBuilder builder, boolean chest) { builder.addBoolean(1, chest, false); } - public static void addWaist(FlatBufferBuilder builder, boolean waist) { builder.addBoolean(2, waist, false); } - public static void addKnees(FlatBufferBuilder builder, boolean knees) { builder.addBoolean(3, knees, false); } - public static void addFeet(FlatBufferBuilder builder, boolean feet) { builder.addBoolean(4, feet, false); } - public static void addElbows(FlatBufferBuilder builder, boolean elbows) { builder.addBoolean(5, elbows, false); } - public static void addHands(FlatBufferBuilder builder, boolean hands) { builder.addBoolean(6, hands, false); } - public static int endOSCTrackersSetting(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 OSCTrackersSetting get(int j) { return get(new OSCTrackersSetting(), j); } - public OSCTrackersSetting get(OSCTrackersSetting obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public OSCTrackersSettingT unpack() { - OSCTrackersSettingT _o = new OSCTrackersSettingT(); - unpackTo(_o); - return _o; - } - public void unpackTo(OSCTrackersSettingT _o) { - boolean _oHead = head(); - _o.setHead(_oHead); - boolean _oChest = chest(); - _o.setChest(_oChest); - boolean _oWaist = waist(); - _o.setWaist(_oWaist); - boolean _oKnees = knees(); - _o.setKnees(_oKnees); - boolean _oFeet = feet(); - _o.setFeet(_oFeet); - boolean _oElbows = elbows(); - _o.setElbows(_oElbows); - boolean _oHands = hands(); - _o.setHands(_oHands); - } - public static int pack(FlatBufferBuilder builder, OSCTrackersSettingT _o) { - if (_o == null) return 0; - return createOSCTrackersSetting( - builder, - _o.getHead(), - _o.getChest(), - _o.getWaist(), - _o.getKnees(), - _o.getFeet(), - _o.getElbows(), - _o.getHands()); - } -} - +// 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 OSCTrackersSetting extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static OSCTrackersSetting getRootAsOSCTrackersSetting(ByteBuffer _bb) { return getRootAsOSCTrackersSetting(_bb, new OSCTrackersSetting()); } + public static OSCTrackersSetting getRootAsOSCTrackersSetting(ByteBuffer _bb, OSCTrackersSetting 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 OSCTrackersSetting __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean head() { 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 waist() { 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 feet() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean elbows() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hands() { int o = __offset(16); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createOSCTrackersSetting(FlatBufferBuilder builder, + boolean head, + boolean chest, + boolean waist, + boolean knees, + boolean feet, + boolean elbows, + boolean hands) { + builder.startTable(7); + OSCTrackersSetting.addHands(builder, hands); + OSCTrackersSetting.addElbows(builder, elbows); + OSCTrackersSetting.addFeet(builder, feet); + OSCTrackersSetting.addKnees(builder, knees); + OSCTrackersSetting.addWaist(builder, waist); + OSCTrackersSetting.addChest(builder, chest); + OSCTrackersSetting.addHead(builder, head); + return OSCTrackersSetting.endOSCTrackersSetting(builder); + } + + public static void startOSCTrackersSetting(FlatBufferBuilder builder) { builder.startTable(7); } + public static void addHead(FlatBufferBuilder builder, boolean head) { builder.addBoolean(0, head, false); } + public static void addChest(FlatBufferBuilder builder, boolean chest) { builder.addBoolean(1, chest, false); } + public static void addWaist(FlatBufferBuilder builder, boolean waist) { builder.addBoolean(2, waist, false); } + public static void addKnees(FlatBufferBuilder builder, boolean knees) { builder.addBoolean(3, knees, false); } + public static void addFeet(FlatBufferBuilder builder, boolean feet) { builder.addBoolean(4, feet, false); } + public static void addElbows(FlatBufferBuilder builder, boolean elbows) { builder.addBoolean(5, elbows, false); } + public static void addHands(FlatBufferBuilder builder, boolean hands) { builder.addBoolean(6, hands, false); } + public static int endOSCTrackersSetting(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 OSCTrackersSetting get(int j) { return get(new OSCTrackersSetting(), j); } + public OSCTrackersSetting get(OSCTrackersSetting obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public OSCTrackersSettingT unpack() { + OSCTrackersSettingT _o = new OSCTrackersSettingT(); + unpackTo(_o); + return _o; + } + public void unpackTo(OSCTrackersSettingT _o) { + boolean _oHead = head(); + _o.setHead(_oHead); + boolean _oChest = chest(); + _o.setChest(_oChest); + boolean _oWaist = waist(); + _o.setWaist(_oWaist); + boolean _oKnees = knees(); + _o.setKnees(_oKnees); + boolean _oFeet = feet(); + _o.setFeet(_oFeet); + boolean _oElbows = elbows(); + _o.setElbows(_oElbows); + boolean _oHands = hands(); + _o.setHands(_oHands); + } + public static int pack(FlatBufferBuilder builder, OSCTrackersSettingT _o) { + if (_o == null) return 0; + return createOSCTrackersSetting( + builder, + _o.getHead(), + _o.getChest(), + _o.getWaist(), + _o.getKnees(), + _o.getFeet(), + _o.getElbows(), + _o.getHands()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/OSCTrackersSettingT.java b/protocol/java/src/solarxr_protocol/rpc/OSCTrackersSettingT.java index c23627a3..aeabbe12 100644 --- a/protocol/java/src/solarxr_protocol/rpc/OSCTrackersSettingT.java +++ b/protocol/java/src/solarxr_protocol/rpc/OSCTrackersSettingT.java @@ -1,58 +1,58 @@ -// 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 OSCTrackersSettingT { - private boolean head; - private boolean chest; - private boolean waist; - private boolean knees; - private boolean feet; - private boolean elbows; - private boolean hands; - - public boolean getHead() { return head; } - - public void setHead(boolean head) { this.head = head; } - - public boolean getChest() { return chest; } - - public void setChest(boolean chest) { this.chest = chest; } - - public boolean getWaist() { return waist; } - - public void setWaist(boolean waist) { this.waist = waist; } - - public boolean getKnees() { return knees; } - - public void setKnees(boolean knees) { this.knees = knees; } - - public boolean getFeet() { return feet; } - - public void setFeet(boolean feet) { this.feet = feet; } - - public boolean getElbows() { return elbows; } - - public void setElbows(boolean elbows) { this.elbows = elbows; } - - public boolean getHands() { return hands; } - - public void setHands(boolean hands) { this.hands = hands; } - - - public OSCTrackersSettingT() { - this.head = false; - this.chest = false; - this.waist = false; - this.knees = false; - this.feet = false; - this.elbows = false; - this.hands = 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 OSCTrackersSettingT { + private boolean head; + private boolean chest; + private boolean waist; + private boolean knees; + private boolean feet; + private boolean elbows; + private boolean hands; + + public boolean getHead() { return head; } + + public void setHead(boolean head) { this.head = head; } + + public boolean getChest() { return chest; } + + public void setChest(boolean chest) { this.chest = chest; } + + public boolean getWaist() { return waist; } + + public void setWaist(boolean waist) { this.waist = waist; } + + public boolean getKnees() { return knees; } + + public void setKnees(boolean knees) { this.knees = knees; } + + public boolean getFeet() { return feet; } + + public void setFeet(boolean feet) { this.feet = feet; } + + public boolean getElbows() { return elbows; } + + public void setElbows(boolean elbows) { this.elbows = elbows; } + + public boolean getHands() { return hands; } + + public void setHands(boolean hands) { this.hands = hands; } + + + public OSCTrackersSettingT() { + this.head = false; + this.chest = false; + this.waist = false; + this.knees = false; + this.feet = false; + this.elbows = false; + this.hands = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/OTAFirmwareUpdate.java b/protocol/java/src/solarxr_protocol/rpc/OTAFirmwareUpdate.java new file mode 100644 index 00000000..f697fb7d --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/OTAFirmwareUpdate.java @@ -0,0 +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 OTAFirmwareUpdate extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static OTAFirmwareUpdate getRootAsOTAFirmwareUpdate(ByteBuffer _bb) { return getRootAsOTAFirmwareUpdate(_bb, new OTAFirmwareUpdate()); } + public static OTAFirmwareUpdate getRootAsOTAFirmwareUpdate(ByteBuffer _bb, OTAFirmwareUpdate 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 OTAFirmwareUpdate __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * id of the device, this refer to the actual DeviceId from the protocol + */ + 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; } + /** + * A table containing the url and offset of the firmware bin file + */ + public solarxr_protocol.rpc.FirmwarePart firmwarePart() { return firmwarePart(new solarxr_protocol.rpc.FirmwarePart()); } + public solarxr_protocol.rpc.FirmwarePart firmwarePart(solarxr_protocol.rpc.FirmwarePart obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static void startOTAFirmwareUpdate(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addDeviceId(FlatBufferBuilder builder, int deviceIdOffset) { builder.addStruct(0, deviceIdOffset, 0); } + public static void addFirmwarePart(FlatBufferBuilder builder, int firmwarePartOffset) { builder.addOffset(1, firmwarePartOffset, 0); } + public static int endOTAFirmwareUpdate(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 OTAFirmwareUpdate get(int j) { return get(new OTAFirmwareUpdate(), j); } + public OTAFirmwareUpdate get(OTAFirmwareUpdate obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public OTAFirmwareUpdateT unpack() { + OTAFirmwareUpdateT _o = new OTAFirmwareUpdateT(); + unpackTo(_o); + return _o; + } + public void unpackTo(OTAFirmwareUpdateT _o) { + if (deviceId() != null) deviceId().unpackTo(_o.getDeviceId()); + else _o.setDeviceId(null); + if (firmwarePart() != null) _o.setFirmwarePart(firmwarePart().unpack()); + else _o.setFirmwarePart(null); + } + public static int pack(FlatBufferBuilder builder, OTAFirmwareUpdateT _o) { + if (_o == null) return 0; + int _firmwarePart = _o.getFirmwarePart() == null ? 0 : solarxr_protocol.rpc.FirmwarePart.pack(builder, _o.getFirmwarePart()); + startOTAFirmwareUpdate(builder); + addDeviceId(builder, solarxr_protocol.datatypes.DeviceId.pack(builder, _o.getDeviceId())); + addFirmwarePart(builder, _firmwarePart); + return endOTAFirmwareUpdate(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/OTAFirmwareUpdateT.java b/protocol/java/src/solarxr_protocol/rpc/OTAFirmwareUpdateT.java new file mode 100644 index 00000000..33010410 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/OTAFirmwareUpdateT.java @@ -0,0 +1,28 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class OTAFirmwareUpdateT { + private solarxr_protocol.datatypes.DeviceIdT deviceId; + private solarxr_protocol.rpc.FirmwarePartT firmwarePart; + + public solarxr_protocol.datatypes.DeviceIdT getDeviceId() { return deviceId; } + + public void setDeviceId(solarxr_protocol.datatypes.DeviceIdT deviceId) { this.deviceId = deviceId; } + + public solarxr_protocol.rpc.FirmwarePartT getFirmwarePart() { return firmwarePart; } + + public void setFirmwarePart(solarxr_protocol.rpc.FirmwarePartT firmwarePart) { this.firmwarePart = firmwarePart; } + + + public OTAFirmwareUpdateT() { + this.deviceId = new solarxr_protocol.datatypes.DeviceIdT(); + this.firmwarePart = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/OpenSerialRequest.java b/protocol/java/src/solarxr_protocol/rpc/OpenSerialRequest.java index 1430781c..6d314b2b 100644 --- a/protocol/java/src/solarxr_protocol/rpc/OpenSerialRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/OpenSerialRequest.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 OpenSerialRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - 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; } - - /** - * Automaticaly pick the first serial device available - */ - public boolean auto() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public String port() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer portAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } - public ByteBuffer portInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } - - public static int createOpenSerialRequest(FlatBufferBuilder builder, - boolean auto, - int portOffset) { - builder.startTable(2); - OpenSerialRequest.addPort(builder, portOffset); - OpenSerialRequest.addAuto(builder, auto); - return OpenSerialRequest.endOpenSerialRequest(builder); - } - - public static void startOpenSerialRequest(FlatBufferBuilder builder) { builder.startTable(2); } - public static void addAuto(FlatBufferBuilder builder, boolean auto) { builder.addBoolean(0, auto, false); } - public static void addPort(FlatBufferBuilder builder, int portOffset) { builder.addOffset(1, portOffset, 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) { - boolean _oAuto = auto(); - _o.setAuto(_oAuto); - String _oPort = port(); - _o.setPort(_oPort); - } - public static int pack(FlatBufferBuilder builder, OpenSerialRequestT _o) { - if (_o == null) return 0; - int _port = _o.getPort() == null ? 0 : builder.createString(_o.getPort()); - return createOpenSerialRequest( - builder, - _o.getAuto(), - _port); - } -} - +// 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_22_10_26(); } + 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; } + + /** + * Automaticaly pick the first serial device available + */ + public boolean auto() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public String port() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer portAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer portInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + + public static int createOpenSerialRequest(FlatBufferBuilder builder, + boolean auto, + int portOffset) { + builder.startTable(2); + OpenSerialRequest.addPort(builder, portOffset); + OpenSerialRequest.addAuto(builder, auto); + return OpenSerialRequest.endOpenSerialRequest(builder); + } + + public static void startOpenSerialRequest(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addAuto(FlatBufferBuilder builder, boolean auto) { builder.addBoolean(0, auto, false); } + public static void addPort(FlatBufferBuilder builder, int portOffset) { builder.addOffset(1, portOffset, 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) { + boolean _oAuto = auto(); + _o.setAuto(_oAuto); + String _oPort = port(); + _o.setPort(_oPort); + } + public static int pack(FlatBufferBuilder builder, OpenSerialRequestT _o) { + if (_o == null) return 0; + int _port = _o.getPort() == null ? 0 : builder.createString(_o.getPort()); + return createOpenSerialRequest( + builder, + _o.getAuto(), + _port); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/OpenSerialRequestT.java b/protocol/java/src/solarxr_protocol/rpc/OpenSerialRequestT.java index db9d7678..87566b88 100644 --- a/protocol/java/src/solarxr_protocol/rpc/OpenSerialRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/OpenSerialRequestT.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 OpenSerialRequestT { - private boolean auto; - private String port; - - public boolean getAuto() { return auto; } - - public void setAuto(boolean auto) { this.auto = auto; } - - public String getPort() { return port; } - - public void setPort(String port) { this.port = port; } - - - public OpenSerialRequestT() { - this.auto = false; - this.port = 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 OpenSerialRequestT { + private boolean auto; + private String port; + + public boolean getAuto() { return auto; } + + public void setAuto(boolean auto) { this.auto = auto; } + + public String getPort() { return port; } + + public void setPort(String port) { this.port = port; } + + + public OpenSerialRequestT() { + this.auto = false; + this.port = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeChangeRequest.java b/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeChangeRequest.java index 6eac30a6..860e77b1 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_22_10_26(); } - 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_22_10_26(); } + 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 2b05a81c..4e1d8676 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 6ff36afc..1730f8dc 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_22_10_26(); } - 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_22_10_26(); } + 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 79966304..f7224526 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 eda6f81d..18bebef6 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_22_10_26(); } - 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_22_10_26(); } + 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 0a7c5493..05f5b75a 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 aeb0830c..e7b1fac7 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_22_10_26(); } - 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_22_10_26(); } + 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 747aeaa7..286a9999 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 b31c298f..98b92aa8 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_22_10_26(); } - 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_22_10_26(); } + 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 733e0cfe..5c8be2f2 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 cca86e83..e89a007c 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_22_10_26(); } - 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_22_10_26(); } + 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 7d11b5af..b0abcad1 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 23a56dc7..498bd7c1 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ResetResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/ResetResponse.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 ResetResponse extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - 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 int resetType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - public int status() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - - public static int createResetResponse(FlatBufferBuilder builder, - int resetType, - int status) { - builder.startTable(2); - ResetResponse.addStatus(builder, status); - ResetResponse.addResetType(builder, resetType); - return ResetResponse.endResetResponse(builder); - } - - public static void startResetResponse(FlatBufferBuilder builder) { builder.startTable(2); } - public static void addResetType(FlatBufferBuilder builder, int resetType) { builder.addByte(0, (byte) resetType, (byte) 0); } - public static void addStatus(FlatBufferBuilder builder, int status) { builder.addByte(1, (byte) status, (byte) 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) { - int _oResetType = resetType(); - _o.setResetType(_oResetType); - int _oStatus = status(); - _o.setStatus(_oStatus); - } - public static int pack(FlatBufferBuilder builder, ResetResponseT _o) { - if (_o == null) return 0; - return createResetResponse( - builder, - _o.getResetType(), - _o.getStatus()); - } -} - +// 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_22_10_26(); } + 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 int resetType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + public int status() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + + public static int createResetResponse(FlatBufferBuilder builder, + int resetType, + int status) { + builder.startTable(2); + ResetResponse.addStatus(builder, status); + ResetResponse.addResetType(builder, resetType); + return ResetResponse.endResetResponse(builder); + } + + public static void startResetResponse(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addResetType(FlatBufferBuilder builder, int resetType) { builder.addByte(0, (byte) resetType, (byte) 0); } + public static void addStatus(FlatBufferBuilder builder, int status) { builder.addByte(1, (byte) status, (byte) 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) { + int _oResetType = resetType(); + _o.setResetType(_oResetType); + int _oStatus = status(); + _o.setStatus(_oStatus); + } + public static int pack(FlatBufferBuilder builder, ResetResponseT _o) { + if (_o == null) return 0; + return createResetResponse( + builder, + _o.getResetType(), + _o.getStatus()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ResetResponseT.java b/protocol/java/src/solarxr_protocol/rpc/ResetResponseT.java index eed7e36b..18ad29ed 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ResetResponseT.java +++ b/protocol/java/src/solarxr_protocol/rpc/ResetResponseT.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 ResetResponseT { - private int resetType; - private int status; - - public int getResetType() { return resetType; } - - public void setResetType(int resetType) { this.resetType = resetType; } - - public int getStatus() { return status; } - - public void setStatus(int status) { this.status = status; } - - - public ResetResponseT() { - this.resetType = 0; - this.status = 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 ResetResponseT { + private int resetType; + private int status; + + public int getResetType() { return resetType; } + + public void setResetType(int resetType) { this.resetType = resetType; } + + public int getStatus() { return status; } + + public void setStatus(int status) { this.status = status; } + + + public ResetResponseT() { + this.resetType = 0; + this.status = 0; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ResetStatus.java b/protocol/java/src/solarxr_protocol/rpc/ResetStatus.java index 7719d2df..aea9a44a 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ResetStatus.java +++ b/protocol/java/src/solarxr_protocol/rpc/ResetStatus.java @@ -1,15 +1,15 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -@SuppressWarnings("unused") -public final class ResetStatus { - private ResetStatus() { } - public static final int STARTED = 0; - public static final int FINISHED = 1; - - public static final String[] names = { "STARTED", "FINISHED", }; - - 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 ResetStatus { + private ResetStatus() { } + public static final int STARTED = 0; + public static final int FINISHED = 1; + + public static final String[] names = { "STARTED", "FINISHED", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ResetType.java b/protocol/java/src/solarxr_protocol/rpc/ResetType.java index cf510b0b..0ce48e6a 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ResetType.java +++ b/protocol/java/src/solarxr_protocol/rpc/ResetType.java @@ -1,19 +1,19 @@ -// 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 Yaw = 0; - public static final int Full = 1; - /** - * Second pose for calibrating mounting rotation - */ - public static final int Mounting = 2; - - public static final String[] names = { "Yaw", "Full", "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 Yaw = 0; + public static final int Full = 1; + /** + * Second pose for calibrating mounting rotation + */ + public static final int Mounting = 2; + + public static final String[] names = { "Yaw", "Full", "Mounting", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ResetsSettings.java b/protocol/java/src/solarxr_protocol/rpc/ResetsSettings.java index 75ff71c2..3d05d440 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ResetsSettings.java +++ b/protocol/java/src/solarxr_protocol/rpc/ResetsSettings.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 ResetsSettings extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static ResetsSettings getRootAsResetsSettings(ByteBuffer _bb) { return getRootAsResetsSettings(_bb, new ResetsSettings()); } - public static ResetsSettings getRootAsResetsSettings(ByteBuffer _bb, ResetsSettings 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 ResetsSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public boolean resetMountingFeet() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public int armsMountingResetMode() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - public float yawResetSmoothTime() { int o = __offset(8); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } - public boolean saveMountingReset() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean resetHmdPitch() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static int createResetsSettings(FlatBufferBuilder builder, - boolean resetMountingFeet, - int armsMountingResetMode, - float yawResetSmoothTime, - boolean saveMountingReset, - boolean resetHmdPitch) { - builder.startTable(5); - ResetsSettings.addYawResetSmoothTime(builder, yawResetSmoothTime); - ResetsSettings.addResetHmdPitch(builder, resetHmdPitch); - ResetsSettings.addSaveMountingReset(builder, saveMountingReset); - ResetsSettings.addArmsMountingResetMode(builder, armsMountingResetMode); - ResetsSettings.addResetMountingFeet(builder, resetMountingFeet); - return ResetsSettings.endResetsSettings(builder); - } - - public static void startResetsSettings(FlatBufferBuilder builder) { builder.startTable(5); } - public static void addResetMountingFeet(FlatBufferBuilder builder, boolean resetMountingFeet) { builder.addBoolean(0, resetMountingFeet, false); } - public static void addArmsMountingResetMode(FlatBufferBuilder builder, int armsMountingResetMode) { builder.addByte(1, (byte) armsMountingResetMode, (byte) 0); } - public static void addYawResetSmoothTime(FlatBufferBuilder builder, float yawResetSmoothTime) { builder.addFloat(2, yawResetSmoothTime, 0.0f); } - public static void addSaveMountingReset(FlatBufferBuilder builder, boolean saveMountingReset) { builder.addBoolean(3, saveMountingReset, false); } - public static void addResetHmdPitch(FlatBufferBuilder builder, boolean resetHmdPitch) { builder.addBoolean(4, resetHmdPitch, false); } - public static int endResetsSettings(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 ResetsSettings get(int j) { return get(new ResetsSettings(), j); } - public ResetsSettings get(ResetsSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public ResetsSettingsT unpack() { - ResetsSettingsT _o = new ResetsSettingsT(); - unpackTo(_o); - return _o; - } - public void unpackTo(ResetsSettingsT _o) { - boolean _oResetMountingFeet = resetMountingFeet(); - _o.setResetMountingFeet(_oResetMountingFeet); - int _oArmsMountingResetMode = armsMountingResetMode(); - _o.setArmsMountingResetMode(_oArmsMountingResetMode); - float _oYawResetSmoothTime = yawResetSmoothTime(); - _o.setYawResetSmoothTime(_oYawResetSmoothTime); - boolean _oSaveMountingReset = saveMountingReset(); - _o.setSaveMountingReset(_oSaveMountingReset); - boolean _oResetHmdPitch = resetHmdPitch(); - _o.setResetHmdPitch(_oResetHmdPitch); - } - public static int pack(FlatBufferBuilder builder, ResetsSettingsT _o) { - if (_o == null) return 0; - return createResetsSettings( - builder, - _o.getResetMountingFeet(), - _o.getArmsMountingResetMode(), - _o.getYawResetSmoothTime(), - _o.getSaveMountingReset(), - _o.getResetHmdPitch()); - } -} - +// 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 ResetsSettings extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static ResetsSettings getRootAsResetsSettings(ByteBuffer _bb) { return getRootAsResetsSettings(_bb, new ResetsSettings()); } + public static ResetsSettings getRootAsResetsSettings(ByteBuffer _bb, ResetsSettings 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 ResetsSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean resetMountingFeet() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public int armsMountingResetMode() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + public float yawResetSmoothTime() { int o = __offset(8); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + public boolean saveMountingReset() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean resetHmdPitch() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createResetsSettings(FlatBufferBuilder builder, + boolean resetMountingFeet, + int armsMountingResetMode, + float yawResetSmoothTime, + boolean saveMountingReset, + boolean resetHmdPitch) { + builder.startTable(5); + ResetsSettings.addYawResetSmoothTime(builder, yawResetSmoothTime); + ResetsSettings.addResetHmdPitch(builder, resetHmdPitch); + ResetsSettings.addSaveMountingReset(builder, saveMountingReset); + ResetsSettings.addArmsMountingResetMode(builder, armsMountingResetMode); + ResetsSettings.addResetMountingFeet(builder, resetMountingFeet); + return ResetsSettings.endResetsSettings(builder); + } + + public static void startResetsSettings(FlatBufferBuilder builder) { builder.startTable(5); } + public static void addResetMountingFeet(FlatBufferBuilder builder, boolean resetMountingFeet) { builder.addBoolean(0, resetMountingFeet, false); } + public static void addArmsMountingResetMode(FlatBufferBuilder builder, int armsMountingResetMode) { builder.addByte(1, (byte) armsMountingResetMode, (byte) 0); } + public static void addYawResetSmoothTime(FlatBufferBuilder builder, float yawResetSmoothTime) { builder.addFloat(2, yawResetSmoothTime, 0.0f); } + public static void addSaveMountingReset(FlatBufferBuilder builder, boolean saveMountingReset) { builder.addBoolean(3, saveMountingReset, false); } + public static void addResetHmdPitch(FlatBufferBuilder builder, boolean resetHmdPitch) { builder.addBoolean(4, resetHmdPitch, false); } + public static int endResetsSettings(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 ResetsSettings get(int j) { return get(new ResetsSettings(), j); } + public ResetsSettings get(ResetsSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public ResetsSettingsT unpack() { + ResetsSettingsT _o = new ResetsSettingsT(); + unpackTo(_o); + return _o; + } + public void unpackTo(ResetsSettingsT _o) { + boolean _oResetMountingFeet = resetMountingFeet(); + _o.setResetMountingFeet(_oResetMountingFeet); + int _oArmsMountingResetMode = armsMountingResetMode(); + _o.setArmsMountingResetMode(_oArmsMountingResetMode); + float _oYawResetSmoothTime = yawResetSmoothTime(); + _o.setYawResetSmoothTime(_oYawResetSmoothTime); + boolean _oSaveMountingReset = saveMountingReset(); + _o.setSaveMountingReset(_oSaveMountingReset); + boolean _oResetHmdPitch = resetHmdPitch(); + _o.setResetHmdPitch(_oResetHmdPitch); + } + public static int pack(FlatBufferBuilder builder, ResetsSettingsT _o) { + if (_o == null) return 0; + return createResetsSettings( + builder, + _o.getResetMountingFeet(), + _o.getArmsMountingResetMode(), + _o.getYawResetSmoothTime(), + _o.getSaveMountingReset(), + _o.getResetHmdPitch()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ResetsSettingsT.java b/protocol/java/src/solarxr_protocol/rpc/ResetsSettingsT.java index 0fe0addf..40331269 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ResetsSettingsT.java +++ b/protocol/java/src/solarxr_protocol/rpc/ResetsSettingsT.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 ResetsSettingsT { - private boolean resetMountingFeet; - private int armsMountingResetMode; - private float yawResetSmoothTime; - private boolean saveMountingReset; - private boolean resetHmdPitch; - - public boolean getResetMountingFeet() { return resetMountingFeet; } - - public void setResetMountingFeet(boolean resetMountingFeet) { this.resetMountingFeet = resetMountingFeet; } - - public int getArmsMountingResetMode() { return armsMountingResetMode; } - - public void setArmsMountingResetMode(int armsMountingResetMode) { this.armsMountingResetMode = armsMountingResetMode; } - - public float getYawResetSmoothTime() { return yawResetSmoothTime; } - - public void setYawResetSmoothTime(float yawResetSmoothTime) { this.yawResetSmoothTime = yawResetSmoothTime; } - - public boolean getSaveMountingReset() { return saveMountingReset; } - - public void setSaveMountingReset(boolean saveMountingReset) { this.saveMountingReset = saveMountingReset; } - - public boolean getResetHmdPitch() { return resetHmdPitch; } - - public void setResetHmdPitch(boolean resetHmdPitch) { this.resetHmdPitch = resetHmdPitch; } - - - public ResetsSettingsT() { - this.resetMountingFeet = false; - this.armsMountingResetMode = 0; - this.yawResetSmoothTime = 0.0f; - this.saveMountingReset = false; - this.resetHmdPitch = 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 ResetsSettingsT { + private boolean resetMountingFeet; + private int armsMountingResetMode; + private float yawResetSmoothTime; + private boolean saveMountingReset; + private boolean resetHmdPitch; + + public boolean getResetMountingFeet() { return resetMountingFeet; } + + public void setResetMountingFeet(boolean resetMountingFeet) { this.resetMountingFeet = resetMountingFeet; } + + public int getArmsMountingResetMode() { return armsMountingResetMode; } + + public void setArmsMountingResetMode(int armsMountingResetMode) { this.armsMountingResetMode = armsMountingResetMode; } + + public float getYawResetSmoothTime() { return yawResetSmoothTime; } + + public void setYawResetSmoothTime(float yawResetSmoothTime) { this.yawResetSmoothTime = yawResetSmoothTime; } + + public boolean getSaveMountingReset() { return saveMountingReset; } + + public void setSaveMountingReset(boolean saveMountingReset) { this.saveMountingReset = saveMountingReset; } + + public boolean getResetHmdPitch() { return resetHmdPitch; } + + public void setResetHmdPitch(boolean resetHmdPitch) { this.resetHmdPitch = resetHmdPitch; } + + + public ResetsSettingsT() { + this.resetMountingFeet = false; + this.armsMountingResetMode = 0; + this.yawResetSmoothTime = 0.0f; + this.saveMountingReset = false; + this.resetHmdPitch = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java b/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java index cc1a5a50..ee14fb49 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java @@ -1,71 +1,74 @@ -// 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 ResetResponse = 4; - public static final byte AssignTrackerRequest = 5; - public static final byte SettingsRequest = 6; - public static final byte SettingsResponse = 7; - public static final byte ChangeSettingsRequest = 8; - public static final byte ClearDriftCompensationRequest = 9; - public static final byte RecordBVHRequest = 10; - public static final byte RecordBVHStatus = 11; - public static final byte SkeletonConfigRequest = 12; - public static final byte ChangeSkeletonConfigRequest = 13; - public static final byte SkeletonResetAllRequest = 14; - public static final byte SkeletonConfigResponse = 15; - public static final byte OpenSerialRequest = 16; - public static final byte CloseSerialRequest = 17; - public static final byte SetWifiRequest = 18; - public static final byte SerialUpdateResponse = 19; - public static final byte AutoBoneProcessRequest = 20; - public static final byte AutoBoneProcessStatusResponse = 21; - public static final byte AutoBoneEpochResponse = 22; - public static final byte OverlayDisplayModeRequest = 23; - public static final byte OverlayDisplayModeChangeRequest = 24; - public static final byte OverlayDisplayModeResponse = 25; - public static final byte SerialTrackerRebootRequest = 26; - public static final byte SerialTrackerGetInfoRequest = 27; - public static final byte SerialTrackerFactoryResetRequest = 28; - public static final byte SerialDevicesRequest = 29; - public static final byte SerialDevicesResponse = 30; - public static final byte NewSerialDeviceResponse = 31; - public static final byte StartWifiProvisioningRequest = 32; - public static final byte StopWifiProvisioningRequest = 33; - public static final byte WifiProvisioningStatusResponse = 34; - public static final byte ServerInfosRequest = 35; - public static final byte ServerInfosResponse = 36; - public static final byte LegTweaksTmpChange = 37; - public static final byte LegTweaksTmpClear = 38; - public static final byte TapDetectionSetupNotification = 39; - public static final byte SetPauseTrackingRequest = 40; - public static final byte StatusSystemRequest = 41; - public static final byte StatusSystemResponse = 42; - public static final byte StatusSystemUpdate = 43; - public static final byte StatusSystemFixed = 44; - public static final byte ClearMountingResetRequest = 45; - public static final byte HeightRequest = 46; - public static final byte HeightResponse = 47; - public static final byte AutoBoneApplyRequest = 48; - public static final byte AutoBoneStopRecordingRequest = 49; - public static final byte AutoBoneCancelRecordingRequest = 50; - public static final byte SaveFileNotification = 51; - public static final byte TrackingPauseStateRequest = 52; - public static final byte TrackingPauseStateResponse = 53; - public static final byte SerialTrackerGetWifiScanRequest = 54; - public static final byte UnknownDeviceHandshakeNotification = 55; - public static final byte AddUnknownDeviceRequest = 56; - public static final byte ForgetDeviceRequest = 57; - - public static final String[] names = { "NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", "TrackingPauseStateRequest", "TrackingPauseStateResponse", "SerialTrackerGetWifiScanRequest", "UnknownDeviceHandshakeNotification", "AddUnknownDeviceRequest", "ForgetDeviceRequest", }; - - 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 ResetResponse = 4; + public static final byte AssignTrackerRequest = 5; + public static final byte SettingsRequest = 6; + public static final byte SettingsResponse = 7; + public static final byte ChangeSettingsRequest = 8; + public static final byte ClearDriftCompensationRequest = 9; + public static final byte RecordBVHRequest = 10; + public static final byte RecordBVHStatus = 11; + public static final byte SkeletonConfigRequest = 12; + public static final byte ChangeSkeletonConfigRequest = 13; + public static final byte SkeletonResetAllRequest = 14; + public static final byte SkeletonConfigResponse = 15; + public static final byte OpenSerialRequest = 16; + public static final byte CloseSerialRequest = 17; + public static final byte SetWifiRequest = 18; + public static final byte SerialUpdateResponse = 19; + public static final byte AutoBoneProcessRequest = 20; + public static final byte AutoBoneProcessStatusResponse = 21; + public static final byte AutoBoneEpochResponse = 22; + public static final byte OverlayDisplayModeRequest = 23; + public static final byte OverlayDisplayModeChangeRequest = 24; + public static final byte OverlayDisplayModeResponse = 25; + public static final byte SerialTrackerRebootRequest = 26; + public static final byte SerialTrackerGetInfoRequest = 27; + public static final byte SerialTrackerFactoryResetRequest = 28; + public static final byte SerialDevicesRequest = 29; + public static final byte SerialDevicesResponse = 30; + public static final byte NewSerialDeviceResponse = 31; + public static final byte StartWifiProvisioningRequest = 32; + public static final byte StopWifiProvisioningRequest = 33; + public static final byte WifiProvisioningStatusResponse = 34; + public static final byte ServerInfosRequest = 35; + public static final byte ServerInfosResponse = 36; + public static final byte LegTweaksTmpChange = 37; + public static final byte LegTweaksTmpClear = 38; + public static final byte TapDetectionSetupNotification = 39; + public static final byte SetPauseTrackingRequest = 40; + public static final byte StatusSystemRequest = 41; + public static final byte StatusSystemResponse = 42; + public static final byte StatusSystemUpdate = 43; + public static final byte StatusSystemFixed = 44; + public static final byte ClearMountingResetRequest = 45; + public static final byte HeightRequest = 46; + public static final byte HeightResponse = 47; + public static final byte AutoBoneApplyRequest = 48; + public static final byte AutoBoneStopRecordingRequest = 49; + public static final byte AutoBoneCancelRecordingRequest = 50; + public static final byte SaveFileNotification = 51; + public static final byte TrackingPauseStateRequest = 52; + public static final byte TrackingPauseStateResponse = 53; + public static final byte SerialTrackerGetWifiScanRequest = 54; + public static final byte UnknownDeviceHandshakeNotification = 55; + public static final byte AddUnknownDeviceRequest = 56; + public static final byte ForgetDeviceRequest = 57; + public static final byte FirmwareUpdateRequest = 58; + public static final byte FirmwareUpdateStatusResponse = 59; + public static final byte FirmwareUpdateStopQueuesRequest = 60; + + public static final String[] names = { "NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", "TrackingPauseStateRequest", "TrackingPauseStateResponse", "SerialTrackerGetWifiScanRequest", "UnknownDeviceHandshakeNotification", "AddUnknownDeviceRequest", "ForgetDeviceRequest", "FirmwareUpdateRequest", "FirmwareUpdateStatusResponse", "FirmwareUpdateStopQueuesRequest", }; + + 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 1ed2d5a1..6cbccc8e 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java @@ -1,298 +1,310 @@ -// 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_22_10_26(); } - 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.ResetResponse: - _oMessageValue = message(new solarxr_protocol.rpc.ResetResponse()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ResetResponse) _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.ClearDriftCompensationRequest: - _oMessageValue = message(new solarxr_protocol.rpc.ClearDriftCompensationRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ClearDriftCompensationRequest) _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; - case solarxr_protocol.rpc.RpcMessage.SerialDevicesRequest: - _oMessageValue = message(new solarxr_protocol.rpc.SerialDevicesRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SerialDevicesRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.SerialDevicesResponse: - _oMessageValue = message(new solarxr_protocol.rpc.SerialDevicesResponse()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SerialDevicesResponse) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.NewSerialDeviceResponse: - _oMessageValue = message(new solarxr_protocol.rpc.NewSerialDeviceResponse()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.NewSerialDeviceResponse) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.StartWifiProvisioningRequest: - _oMessageValue = message(new solarxr_protocol.rpc.StartWifiProvisioningRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.StartWifiProvisioningRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.StopWifiProvisioningRequest: - _oMessageValue = message(new solarxr_protocol.rpc.StopWifiProvisioningRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.StopWifiProvisioningRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.WifiProvisioningStatusResponse: - _oMessageValue = message(new solarxr_protocol.rpc.WifiProvisioningStatusResponse()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.WifiProvisioningStatusResponse) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.ServerInfosRequest: - _oMessageValue = message(new solarxr_protocol.rpc.ServerInfosRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ServerInfosRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.ServerInfosResponse: - _oMessageValue = message(new solarxr_protocol.rpc.ServerInfosResponse()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ServerInfosResponse) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.LegTweaksTmpChange: - _oMessageValue = message(new solarxr_protocol.rpc.LegTweaksTmpChange()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.LegTweaksTmpChange) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.LegTweaksTmpClear: - _oMessageValue = message(new solarxr_protocol.rpc.LegTweaksTmpClear()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.LegTweaksTmpClear) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.TapDetectionSetupNotification: - _oMessageValue = message(new solarxr_protocol.rpc.TapDetectionSetupNotification()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.TapDetectionSetupNotification) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.SetPauseTrackingRequest: - _oMessageValue = message(new solarxr_protocol.rpc.SetPauseTrackingRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SetPauseTrackingRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.StatusSystemRequest: - _oMessageValue = message(new solarxr_protocol.rpc.StatusSystemRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.StatusSystemRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.StatusSystemResponse: - _oMessageValue = message(new solarxr_protocol.rpc.StatusSystemResponse()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.StatusSystemResponse) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.StatusSystemUpdate: - _oMessageValue = message(new solarxr_protocol.rpc.StatusSystemUpdate()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.StatusSystemUpdate) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.StatusSystemFixed: - _oMessageValue = message(new solarxr_protocol.rpc.StatusSystemFixed()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.StatusSystemFixed) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.ClearMountingResetRequest: - _oMessageValue = message(new solarxr_protocol.rpc.ClearMountingResetRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ClearMountingResetRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.HeightRequest: - _oMessageValue = message(new solarxr_protocol.rpc.HeightRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.HeightRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.HeightResponse: - _oMessageValue = message(new solarxr_protocol.rpc.HeightResponse()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.HeightResponse) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.AutoBoneApplyRequest: - _oMessageValue = message(new solarxr_protocol.rpc.AutoBoneApplyRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.AutoBoneApplyRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.AutoBoneStopRecordingRequest: - _oMessageValue = message(new solarxr_protocol.rpc.AutoBoneStopRecordingRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.AutoBoneStopRecordingRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.AutoBoneCancelRecordingRequest: - _oMessageValue = message(new solarxr_protocol.rpc.AutoBoneCancelRecordingRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.AutoBoneCancelRecordingRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.SaveFileNotification: - _oMessageValue = message(new solarxr_protocol.rpc.SaveFileNotification()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SaveFileNotification) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.TrackingPauseStateRequest: - _oMessageValue = message(new solarxr_protocol.rpc.TrackingPauseStateRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.TrackingPauseStateRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.TrackingPauseStateResponse: - _oMessageValue = message(new solarxr_protocol.rpc.TrackingPauseStateResponse()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.TrackingPauseStateResponse) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.SerialTrackerGetWifiScanRequest: - _oMessageValue = message(new solarxr_protocol.rpc.SerialTrackerGetWifiScanRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SerialTrackerGetWifiScanRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.UnknownDeviceHandshakeNotification: - _oMessageValue = message(new solarxr_protocol.rpc.UnknownDeviceHandshakeNotification()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.UnknownDeviceHandshakeNotification) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.AddUnknownDeviceRequest: - _oMessageValue = message(new solarxr_protocol.rpc.AddUnknownDeviceRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.AddUnknownDeviceRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.ForgetDeviceRequest: - _oMessageValue = message(new solarxr_protocol.rpc.ForgetDeviceRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ForgetDeviceRequest) _oMessageValue).unpack() : null); - break; - default: break; - } - _o.setMessage(_oMessage); - } - 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_22_10_26(); } + 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.ResetResponse: + _oMessageValue = message(new solarxr_protocol.rpc.ResetResponse()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ResetResponse) _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.ClearDriftCompensationRequest: + _oMessageValue = message(new solarxr_protocol.rpc.ClearDriftCompensationRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ClearDriftCompensationRequest) _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; + case solarxr_protocol.rpc.RpcMessage.SerialDevicesRequest: + _oMessageValue = message(new solarxr_protocol.rpc.SerialDevicesRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SerialDevicesRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.SerialDevicesResponse: + _oMessageValue = message(new solarxr_protocol.rpc.SerialDevicesResponse()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SerialDevicesResponse) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.NewSerialDeviceResponse: + _oMessageValue = message(new solarxr_protocol.rpc.NewSerialDeviceResponse()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.NewSerialDeviceResponse) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.StartWifiProvisioningRequest: + _oMessageValue = message(new solarxr_protocol.rpc.StartWifiProvisioningRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.StartWifiProvisioningRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.StopWifiProvisioningRequest: + _oMessageValue = message(new solarxr_protocol.rpc.StopWifiProvisioningRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.StopWifiProvisioningRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.WifiProvisioningStatusResponse: + _oMessageValue = message(new solarxr_protocol.rpc.WifiProvisioningStatusResponse()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.WifiProvisioningStatusResponse) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.ServerInfosRequest: + _oMessageValue = message(new solarxr_protocol.rpc.ServerInfosRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ServerInfosRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.ServerInfosResponse: + _oMessageValue = message(new solarxr_protocol.rpc.ServerInfosResponse()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ServerInfosResponse) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.LegTweaksTmpChange: + _oMessageValue = message(new solarxr_protocol.rpc.LegTweaksTmpChange()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.LegTweaksTmpChange) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.LegTweaksTmpClear: + _oMessageValue = message(new solarxr_protocol.rpc.LegTweaksTmpClear()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.LegTweaksTmpClear) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.TapDetectionSetupNotification: + _oMessageValue = message(new solarxr_protocol.rpc.TapDetectionSetupNotification()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.TapDetectionSetupNotification) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.SetPauseTrackingRequest: + _oMessageValue = message(new solarxr_protocol.rpc.SetPauseTrackingRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SetPauseTrackingRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.StatusSystemRequest: + _oMessageValue = message(new solarxr_protocol.rpc.StatusSystemRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.StatusSystemRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.StatusSystemResponse: + _oMessageValue = message(new solarxr_protocol.rpc.StatusSystemResponse()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.StatusSystemResponse) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.StatusSystemUpdate: + _oMessageValue = message(new solarxr_protocol.rpc.StatusSystemUpdate()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.StatusSystemUpdate) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.StatusSystemFixed: + _oMessageValue = message(new solarxr_protocol.rpc.StatusSystemFixed()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.StatusSystemFixed) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.ClearMountingResetRequest: + _oMessageValue = message(new solarxr_protocol.rpc.ClearMountingResetRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ClearMountingResetRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.HeightRequest: + _oMessageValue = message(new solarxr_protocol.rpc.HeightRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.HeightRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.HeightResponse: + _oMessageValue = message(new solarxr_protocol.rpc.HeightResponse()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.HeightResponse) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.AutoBoneApplyRequest: + _oMessageValue = message(new solarxr_protocol.rpc.AutoBoneApplyRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.AutoBoneApplyRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.AutoBoneStopRecordingRequest: + _oMessageValue = message(new solarxr_protocol.rpc.AutoBoneStopRecordingRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.AutoBoneStopRecordingRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.AutoBoneCancelRecordingRequest: + _oMessageValue = message(new solarxr_protocol.rpc.AutoBoneCancelRecordingRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.AutoBoneCancelRecordingRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.SaveFileNotification: + _oMessageValue = message(new solarxr_protocol.rpc.SaveFileNotification()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SaveFileNotification) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.TrackingPauseStateRequest: + _oMessageValue = message(new solarxr_protocol.rpc.TrackingPauseStateRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.TrackingPauseStateRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.TrackingPauseStateResponse: + _oMessageValue = message(new solarxr_protocol.rpc.TrackingPauseStateResponse()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.TrackingPauseStateResponse) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.SerialTrackerGetWifiScanRequest: + _oMessageValue = message(new solarxr_protocol.rpc.SerialTrackerGetWifiScanRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SerialTrackerGetWifiScanRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.UnknownDeviceHandshakeNotification: + _oMessageValue = message(new solarxr_protocol.rpc.UnknownDeviceHandshakeNotification()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.UnknownDeviceHandshakeNotification) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.AddUnknownDeviceRequest: + _oMessageValue = message(new solarxr_protocol.rpc.AddUnknownDeviceRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.AddUnknownDeviceRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.ForgetDeviceRequest: + _oMessageValue = message(new solarxr_protocol.rpc.ForgetDeviceRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ForgetDeviceRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.FirmwareUpdateRequest: + _oMessageValue = message(new solarxr_protocol.rpc.FirmwareUpdateRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.FirmwareUpdateRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.FirmwareUpdateStatusResponse: + _oMessageValue = message(new solarxr_protocol.rpc.FirmwareUpdateStatusResponse()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.FirmwareUpdateStatusResponse) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.FirmwareUpdateStopQueuesRequest: + _oMessageValue = message(new solarxr_protocol.rpc.FirmwareUpdateStopQueuesRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.FirmwareUpdateStopQueuesRequest) _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 feb5a83c..e679bdc0 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 ed8d587c..14a014a9 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java @@ -1,145 +1,151 @@ -// 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.ResetResponseT asResetResponse() { return (solarxr_protocol.rpc.ResetResponseT) 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.ClearDriftCompensationRequestT asClearDriftCompensationRequest() { return (solarxr_protocol.rpc.ClearDriftCompensationRequestT) 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 solarxr_protocol.rpc.SerialDevicesRequestT asSerialDevicesRequest() { return (solarxr_protocol.rpc.SerialDevicesRequestT) value; } - public solarxr_protocol.rpc.SerialDevicesResponseT asSerialDevicesResponse() { return (solarxr_protocol.rpc.SerialDevicesResponseT) value; } - public solarxr_protocol.rpc.NewSerialDeviceResponseT asNewSerialDeviceResponse() { return (solarxr_protocol.rpc.NewSerialDeviceResponseT) value; } - public solarxr_protocol.rpc.StartWifiProvisioningRequestT asStartWifiProvisioningRequest() { return (solarxr_protocol.rpc.StartWifiProvisioningRequestT) value; } - public solarxr_protocol.rpc.StopWifiProvisioningRequestT asStopWifiProvisioningRequest() { return (solarxr_protocol.rpc.StopWifiProvisioningRequestT) value; } - public solarxr_protocol.rpc.WifiProvisioningStatusResponseT asWifiProvisioningStatusResponse() { return (solarxr_protocol.rpc.WifiProvisioningStatusResponseT) value; } - public solarxr_protocol.rpc.ServerInfosRequestT asServerInfosRequest() { return (solarxr_protocol.rpc.ServerInfosRequestT) value; } - public solarxr_protocol.rpc.ServerInfosResponseT asServerInfosResponse() { return (solarxr_protocol.rpc.ServerInfosResponseT) value; } - public solarxr_protocol.rpc.LegTweaksTmpChangeT asLegTweaksTmpChange() { return (solarxr_protocol.rpc.LegTweaksTmpChangeT) value; } - public solarxr_protocol.rpc.LegTweaksTmpClearT asLegTweaksTmpClear() { return (solarxr_protocol.rpc.LegTweaksTmpClearT) value; } - public solarxr_protocol.rpc.TapDetectionSetupNotificationT asTapDetectionSetupNotification() { return (solarxr_protocol.rpc.TapDetectionSetupNotificationT) value; } - public solarxr_protocol.rpc.SetPauseTrackingRequestT asSetPauseTrackingRequest() { return (solarxr_protocol.rpc.SetPauseTrackingRequestT) value; } - public solarxr_protocol.rpc.StatusSystemRequestT asStatusSystemRequest() { return (solarxr_protocol.rpc.StatusSystemRequestT) value; } - public solarxr_protocol.rpc.StatusSystemResponseT asStatusSystemResponse() { return (solarxr_protocol.rpc.StatusSystemResponseT) value; } - public solarxr_protocol.rpc.StatusSystemUpdateT asStatusSystemUpdate() { return (solarxr_protocol.rpc.StatusSystemUpdateT) value; } - public solarxr_protocol.rpc.StatusSystemFixedT asStatusSystemFixed() { return (solarxr_protocol.rpc.StatusSystemFixedT) value; } - public solarxr_protocol.rpc.ClearMountingResetRequestT asClearMountingResetRequest() { return (solarxr_protocol.rpc.ClearMountingResetRequestT) value; } - public solarxr_protocol.rpc.HeightRequestT asHeightRequest() { return (solarxr_protocol.rpc.HeightRequestT) value; } - public solarxr_protocol.rpc.HeightResponseT asHeightResponse() { return (solarxr_protocol.rpc.HeightResponseT) value; } - public solarxr_protocol.rpc.AutoBoneApplyRequestT asAutoBoneApplyRequest() { return (solarxr_protocol.rpc.AutoBoneApplyRequestT) value; } - public solarxr_protocol.rpc.AutoBoneStopRecordingRequestT asAutoBoneStopRecordingRequest() { return (solarxr_protocol.rpc.AutoBoneStopRecordingRequestT) value; } - public solarxr_protocol.rpc.AutoBoneCancelRecordingRequestT asAutoBoneCancelRecordingRequest() { return (solarxr_protocol.rpc.AutoBoneCancelRecordingRequestT) value; } - public solarxr_protocol.rpc.SaveFileNotificationT asSaveFileNotification() { return (solarxr_protocol.rpc.SaveFileNotificationT) value; } - public solarxr_protocol.rpc.TrackingPauseStateRequestT asTrackingPauseStateRequest() { return (solarxr_protocol.rpc.TrackingPauseStateRequestT) value; } - public solarxr_protocol.rpc.TrackingPauseStateResponseT asTrackingPauseStateResponse() { return (solarxr_protocol.rpc.TrackingPauseStateResponseT) value; } - public solarxr_protocol.rpc.SerialTrackerGetWifiScanRequestT asSerialTrackerGetWifiScanRequest() { return (solarxr_protocol.rpc.SerialTrackerGetWifiScanRequestT) value; } - public solarxr_protocol.rpc.UnknownDeviceHandshakeNotificationT asUnknownDeviceHandshakeNotification() { return (solarxr_protocol.rpc.UnknownDeviceHandshakeNotificationT) value; } - public solarxr_protocol.rpc.AddUnknownDeviceRequestT asAddUnknownDeviceRequest() { return (solarxr_protocol.rpc.AddUnknownDeviceRequestT) value; } - public solarxr_protocol.rpc.ForgetDeviceRequestT asForgetDeviceRequest() { return (solarxr_protocol.rpc.ForgetDeviceRequestT) value; } - - public static int pack(FlatBufferBuilder builder, RpcMessageUnion _o) { - switch (_o.type) { - 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.ResetResponse: return solarxr_protocol.rpc.ResetResponse.pack(builder, _o.asResetResponse()); - 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.ClearDriftCompensationRequest: return solarxr_protocol.rpc.ClearDriftCompensationRequest.pack(builder, _o.asClearDriftCompensationRequest()); - 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()); - case RpcMessage.SerialDevicesRequest: return solarxr_protocol.rpc.SerialDevicesRequest.pack(builder, _o.asSerialDevicesRequest()); - case RpcMessage.SerialDevicesResponse: return solarxr_protocol.rpc.SerialDevicesResponse.pack(builder, _o.asSerialDevicesResponse()); - case RpcMessage.NewSerialDeviceResponse: return solarxr_protocol.rpc.NewSerialDeviceResponse.pack(builder, _o.asNewSerialDeviceResponse()); - case RpcMessage.StartWifiProvisioningRequest: return solarxr_protocol.rpc.StartWifiProvisioningRequest.pack(builder, _o.asStartWifiProvisioningRequest()); - case RpcMessage.StopWifiProvisioningRequest: return solarxr_protocol.rpc.StopWifiProvisioningRequest.pack(builder, _o.asStopWifiProvisioningRequest()); - case RpcMessage.WifiProvisioningStatusResponse: return solarxr_protocol.rpc.WifiProvisioningStatusResponse.pack(builder, _o.asWifiProvisioningStatusResponse()); - case RpcMessage.ServerInfosRequest: return solarxr_protocol.rpc.ServerInfosRequest.pack(builder, _o.asServerInfosRequest()); - case RpcMessage.ServerInfosResponse: return solarxr_protocol.rpc.ServerInfosResponse.pack(builder, _o.asServerInfosResponse()); - case RpcMessage.LegTweaksTmpChange: return solarxr_protocol.rpc.LegTweaksTmpChange.pack(builder, _o.asLegTweaksTmpChange()); - case RpcMessage.LegTweaksTmpClear: return solarxr_protocol.rpc.LegTweaksTmpClear.pack(builder, _o.asLegTweaksTmpClear()); - case RpcMessage.TapDetectionSetupNotification: return solarxr_protocol.rpc.TapDetectionSetupNotification.pack(builder, _o.asTapDetectionSetupNotification()); - case RpcMessage.SetPauseTrackingRequest: return solarxr_protocol.rpc.SetPauseTrackingRequest.pack(builder, _o.asSetPauseTrackingRequest()); - case RpcMessage.StatusSystemRequest: return solarxr_protocol.rpc.StatusSystemRequest.pack(builder, _o.asStatusSystemRequest()); - case RpcMessage.StatusSystemResponse: return solarxr_protocol.rpc.StatusSystemResponse.pack(builder, _o.asStatusSystemResponse()); - case RpcMessage.StatusSystemUpdate: return solarxr_protocol.rpc.StatusSystemUpdate.pack(builder, _o.asStatusSystemUpdate()); - case RpcMessage.StatusSystemFixed: return solarxr_protocol.rpc.StatusSystemFixed.pack(builder, _o.asStatusSystemFixed()); - case RpcMessage.ClearMountingResetRequest: return solarxr_protocol.rpc.ClearMountingResetRequest.pack(builder, _o.asClearMountingResetRequest()); - case RpcMessage.HeightRequest: return solarxr_protocol.rpc.HeightRequest.pack(builder, _o.asHeightRequest()); - case RpcMessage.HeightResponse: return solarxr_protocol.rpc.HeightResponse.pack(builder, _o.asHeightResponse()); - case RpcMessage.AutoBoneApplyRequest: return solarxr_protocol.rpc.AutoBoneApplyRequest.pack(builder, _o.asAutoBoneApplyRequest()); - case RpcMessage.AutoBoneStopRecordingRequest: return solarxr_protocol.rpc.AutoBoneStopRecordingRequest.pack(builder, _o.asAutoBoneStopRecordingRequest()); - case RpcMessage.AutoBoneCancelRecordingRequest: return solarxr_protocol.rpc.AutoBoneCancelRecordingRequest.pack(builder, _o.asAutoBoneCancelRecordingRequest()); - case RpcMessage.SaveFileNotification: return solarxr_protocol.rpc.SaveFileNotification.pack(builder, _o.asSaveFileNotification()); - case RpcMessage.TrackingPauseStateRequest: return solarxr_protocol.rpc.TrackingPauseStateRequest.pack(builder, _o.asTrackingPauseStateRequest()); - case RpcMessage.TrackingPauseStateResponse: return solarxr_protocol.rpc.TrackingPauseStateResponse.pack(builder, _o.asTrackingPauseStateResponse()); - case RpcMessage.SerialTrackerGetWifiScanRequest: return solarxr_protocol.rpc.SerialTrackerGetWifiScanRequest.pack(builder, _o.asSerialTrackerGetWifiScanRequest()); - case RpcMessage.UnknownDeviceHandshakeNotification: return solarxr_protocol.rpc.UnknownDeviceHandshakeNotification.pack(builder, _o.asUnknownDeviceHandshakeNotification()); - case RpcMessage.AddUnknownDeviceRequest: return solarxr_protocol.rpc.AddUnknownDeviceRequest.pack(builder, _o.asAddUnknownDeviceRequest()); - case RpcMessage.ForgetDeviceRequest: return solarxr_protocol.rpc.ForgetDeviceRequest.pack(builder, _o.asForgetDeviceRequest()); - default: return 0; - } - } -} - +// 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.ResetResponseT asResetResponse() { return (solarxr_protocol.rpc.ResetResponseT) 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.ClearDriftCompensationRequestT asClearDriftCompensationRequest() { return (solarxr_protocol.rpc.ClearDriftCompensationRequestT) 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 solarxr_protocol.rpc.SerialDevicesRequestT asSerialDevicesRequest() { return (solarxr_protocol.rpc.SerialDevicesRequestT) value; } + public solarxr_protocol.rpc.SerialDevicesResponseT asSerialDevicesResponse() { return (solarxr_protocol.rpc.SerialDevicesResponseT) value; } + public solarxr_protocol.rpc.NewSerialDeviceResponseT asNewSerialDeviceResponse() { return (solarxr_protocol.rpc.NewSerialDeviceResponseT) value; } + public solarxr_protocol.rpc.StartWifiProvisioningRequestT asStartWifiProvisioningRequest() { return (solarxr_protocol.rpc.StartWifiProvisioningRequestT) value; } + public solarxr_protocol.rpc.StopWifiProvisioningRequestT asStopWifiProvisioningRequest() { return (solarxr_protocol.rpc.StopWifiProvisioningRequestT) value; } + public solarxr_protocol.rpc.WifiProvisioningStatusResponseT asWifiProvisioningStatusResponse() { return (solarxr_protocol.rpc.WifiProvisioningStatusResponseT) value; } + public solarxr_protocol.rpc.ServerInfosRequestT asServerInfosRequest() { return (solarxr_protocol.rpc.ServerInfosRequestT) value; } + public solarxr_protocol.rpc.ServerInfosResponseT asServerInfosResponse() { return (solarxr_protocol.rpc.ServerInfosResponseT) value; } + public solarxr_protocol.rpc.LegTweaksTmpChangeT asLegTweaksTmpChange() { return (solarxr_protocol.rpc.LegTweaksTmpChangeT) value; } + public solarxr_protocol.rpc.LegTweaksTmpClearT asLegTweaksTmpClear() { return (solarxr_protocol.rpc.LegTweaksTmpClearT) value; } + public solarxr_protocol.rpc.TapDetectionSetupNotificationT asTapDetectionSetupNotification() { return (solarxr_protocol.rpc.TapDetectionSetupNotificationT) value; } + public solarxr_protocol.rpc.SetPauseTrackingRequestT asSetPauseTrackingRequest() { return (solarxr_protocol.rpc.SetPauseTrackingRequestT) value; } + public solarxr_protocol.rpc.StatusSystemRequestT asStatusSystemRequest() { return (solarxr_protocol.rpc.StatusSystemRequestT) value; } + public solarxr_protocol.rpc.StatusSystemResponseT asStatusSystemResponse() { return (solarxr_protocol.rpc.StatusSystemResponseT) value; } + public solarxr_protocol.rpc.StatusSystemUpdateT asStatusSystemUpdate() { return (solarxr_protocol.rpc.StatusSystemUpdateT) value; } + public solarxr_protocol.rpc.StatusSystemFixedT asStatusSystemFixed() { return (solarxr_protocol.rpc.StatusSystemFixedT) value; } + public solarxr_protocol.rpc.ClearMountingResetRequestT asClearMountingResetRequest() { return (solarxr_protocol.rpc.ClearMountingResetRequestT) value; } + public solarxr_protocol.rpc.HeightRequestT asHeightRequest() { return (solarxr_protocol.rpc.HeightRequestT) value; } + public solarxr_protocol.rpc.HeightResponseT asHeightResponse() { return (solarxr_protocol.rpc.HeightResponseT) value; } + public solarxr_protocol.rpc.AutoBoneApplyRequestT asAutoBoneApplyRequest() { return (solarxr_protocol.rpc.AutoBoneApplyRequestT) value; } + public solarxr_protocol.rpc.AutoBoneStopRecordingRequestT asAutoBoneStopRecordingRequest() { return (solarxr_protocol.rpc.AutoBoneStopRecordingRequestT) value; } + public solarxr_protocol.rpc.AutoBoneCancelRecordingRequestT asAutoBoneCancelRecordingRequest() { return (solarxr_protocol.rpc.AutoBoneCancelRecordingRequestT) value; } + public solarxr_protocol.rpc.SaveFileNotificationT asSaveFileNotification() { return (solarxr_protocol.rpc.SaveFileNotificationT) value; } + public solarxr_protocol.rpc.TrackingPauseStateRequestT asTrackingPauseStateRequest() { return (solarxr_protocol.rpc.TrackingPauseStateRequestT) value; } + public solarxr_protocol.rpc.TrackingPauseStateResponseT asTrackingPauseStateResponse() { return (solarxr_protocol.rpc.TrackingPauseStateResponseT) value; } + public solarxr_protocol.rpc.SerialTrackerGetWifiScanRequestT asSerialTrackerGetWifiScanRequest() { return (solarxr_protocol.rpc.SerialTrackerGetWifiScanRequestT) value; } + public solarxr_protocol.rpc.UnknownDeviceHandshakeNotificationT asUnknownDeviceHandshakeNotification() { return (solarxr_protocol.rpc.UnknownDeviceHandshakeNotificationT) value; } + public solarxr_protocol.rpc.AddUnknownDeviceRequestT asAddUnknownDeviceRequest() { return (solarxr_protocol.rpc.AddUnknownDeviceRequestT) value; } + public solarxr_protocol.rpc.ForgetDeviceRequestT asForgetDeviceRequest() { return (solarxr_protocol.rpc.ForgetDeviceRequestT) value; } + public solarxr_protocol.rpc.FirmwareUpdateRequestT asFirmwareUpdateRequest() { return (solarxr_protocol.rpc.FirmwareUpdateRequestT) value; } + public solarxr_protocol.rpc.FirmwareUpdateStatusResponseT asFirmwareUpdateStatusResponse() { return (solarxr_protocol.rpc.FirmwareUpdateStatusResponseT) value; } + public solarxr_protocol.rpc.FirmwareUpdateStopQueuesRequestT asFirmwareUpdateStopQueuesRequest() { return (solarxr_protocol.rpc.FirmwareUpdateStopQueuesRequestT) 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.ResetResponse: return solarxr_protocol.rpc.ResetResponse.pack(builder, _o.asResetResponse()); + 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.ClearDriftCompensationRequest: return solarxr_protocol.rpc.ClearDriftCompensationRequest.pack(builder, _o.asClearDriftCompensationRequest()); + 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()); + case RpcMessage.SerialDevicesRequest: return solarxr_protocol.rpc.SerialDevicesRequest.pack(builder, _o.asSerialDevicesRequest()); + case RpcMessage.SerialDevicesResponse: return solarxr_protocol.rpc.SerialDevicesResponse.pack(builder, _o.asSerialDevicesResponse()); + case RpcMessage.NewSerialDeviceResponse: return solarxr_protocol.rpc.NewSerialDeviceResponse.pack(builder, _o.asNewSerialDeviceResponse()); + case RpcMessage.StartWifiProvisioningRequest: return solarxr_protocol.rpc.StartWifiProvisioningRequest.pack(builder, _o.asStartWifiProvisioningRequest()); + case RpcMessage.StopWifiProvisioningRequest: return solarxr_protocol.rpc.StopWifiProvisioningRequest.pack(builder, _o.asStopWifiProvisioningRequest()); + case RpcMessage.WifiProvisioningStatusResponse: return solarxr_protocol.rpc.WifiProvisioningStatusResponse.pack(builder, _o.asWifiProvisioningStatusResponse()); + case RpcMessage.ServerInfosRequest: return solarxr_protocol.rpc.ServerInfosRequest.pack(builder, _o.asServerInfosRequest()); + case RpcMessage.ServerInfosResponse: return solarxr_protocol.rpc.ServerInfosResponse.pack(builder, _o.asServerInfosResponse()); + case RpcMessage.LegTweaksTmpChange: return solarxr_protocol.rpc.LegTweaksTmpChange.pack(builder, _o.asLegTweaksTmpChange()); + case RpcMessage.LegTweaksTmpClear: return solarxr_protocol.rpc.LegTweaksTmpClear.pack(builder, _o.asLegTweaksTmpClear()); + case RpcMessage.TapDetectionSetupNotification: return solarxr_protocol.rpc.TapDetectionSetupNotification.pack(builder, _o.asTapDetectionSetupNotification()); + case RpcMessage.SetPauseTrackingRequest: return solarxr_protocol.rpc.SetPauseTrackingRequest.pack(builder, _o.asSetPauseTrackingRequest()); + case RpcMessage.StatusSystemRequest: return solarxr_protocol.rpc.StatusSystemRequest.pack(builder, _o.asStatusSystemRequest()); + case RpcMessage.StatusSystemResponse: return solarxr_protocol.rpc.StatusSystemResponse.pack(builder, _o.asStatusSystemResponse()); + case RpcMessage.StatusSystemUpdate: return solarxr_protocol.rpc.StatusSystemUpdate.pack(builder, _o.asStatusSystemUpdate()); + case RpcMessage.StatusSystemFixed: return solarxr_protocol.rpc.StatusSystemFixed.pack(builder, _o.asStatusSystemFixed()); + case RpcMessage.ClearMountingResetRequest: return solarxr_protocol.rpc.ClearMountingResetRequest.pack(builder, _o.asClearMountingResetRequest()); + case RpcMessage.HeightRequest: return solarxr_protocol.rpc.HeightRequest.pack(builder, _o.asHeightRequest()); + case RpcMessage.HeightResponse: return solarxr_protocol.rpc.HeightResponse.pack(builder, _o.asHeightResponse()); + case RpcMessage.AutoBoneApplyRequest: return solarxr_protocol.rpc.AutoBoneApplyRequest.pack(builder, _o.asAutoBoneApplyRequest()); + case RpcMessage.AutoBoneStopRecordingRequest: return solarxr_protocol.rpc.AutoBoneStopRecordingRequest.pack(builder, _o.asAutoBoneStopRecordingRequest()); + case RpcMessage.AutoBoneCancelRecordingRequest: return solarxr_protocol.rpc.AutoBoneCancelRecordingRequest.pack(builder, _o.asAutoBoneCancelRecordingRequest()); + case RpcMessage.SaveFileNotification: return solarxr_protocol.rpc.SaveFileNotification.pack(builder, _o.asSaveFileNotification()); + case RpcMessage.TrackingPauseStateRequest: return solarxr_protocol.rpc.TrackingPauseStateRequest.pack(builder, _o.asTrackingPauseStateRequest()); + case RpcMessage.TrackingPauseStateResponse: return solarxr_protocol.rpc.TrackingPauseStateResponse.pack(builder, _o.asTrackingPauseStateResponse()); + case RpcMessage.SerialTrackerGetWifiScanRequest: return solarxr_protocol.rpc.SerialTrackerGetWifiScanRequest.pack(builder, _o.asSerialTrackerGetWifiScanRequest()); + case RpcMessage.UnknownDeviceHandshakeNotification: return solarxr_protocol.rpc.UnknownDeviceHandshakeNotification.pack(builder, _o.asUnknownDeviceHandshakeNotification()); + case RpcMessage.AddUnknownDeviceRequest: return solarxr_protocol.rpc.AddUnknownDeviceRequest.pack(builder, _o.asAddUnknownDeviceRequest()); + case RpcMessage.ForgetDeviceRequest: return solarxr_protocol.rpc.ForgetDeviceRequest.pack(builder, _o.asForgetDeviceRequest()); + case RpcMessage.FirmwareUpdateRequest: return solarxr_protocol.rpc.FirmwareUpdateRequest.pack(builder, _o.asFirmwareUpdateRequest()); + case RpcMessage.FirmwareUpdateStatusResponse: return solarxr_protocol.rpc.FirmwareUpdateStatusResponse.pack(builder, _o.asFirmwareUpdateStatusResponse()); + case RpcMessage.FirmwareUpdateStopQueuesRequest: return solarxr_protocol.rpc.FirmwareUpdateStopQueuesRequest.pack(builder, _o.asFirmwareUpdateStopQueuesRequest()); + default: return 0; + } + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SaveFileNotification.java b/protocol/java/src/solarxr_protocol/rpc/SaveFileNotification.java index 09806c28..7fabc859 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SaveFileNotification.java +++ b/protocol/java/src/solarxr_protocol/rpc/SaveFileNotification.java @@ -1,128 +1,128 @@ -// 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.*; - -/** - * Used for the server to save a file and have it prompt in the user side - */ -@SuppressWarnings("unused") -public final class SaveFileNotification extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static SaveFileNotification getRootAsSaveFileNotification(ByteBuffer _bb) { return getRootAsSaveFileNotification(_bb, new SaveFileNotification()); } - public static SaveFileNotification getRootAsSaveFileNotification(ByteBuffer _bb, SaveFileNotification 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 SaveFileNotification __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - /** - * Binary data of the file - */ - public int data(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; } - public int dataLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } - public ByteVector dataVector() { return dataVector(new ByteVector()); } - public ByteVector dataVector(ByteVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } - public ByteBuffer dataAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } - public ByteBuffer dataInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } - /** - * MIME type of file if one exists, use `file_extension` otherwise - */ - public String mimeType() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer mimeTypeAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } - public ByteBuffer mimeTypeInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } - /** - * Use MIME type preferably if one exists - */ - public String fileExtension() { int o = __offset(8); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer fileExtensionAsByteBuffer() { return __vector_as_bytebuffer(8, 1); } - public ByteBuffer fileExtensionInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 8, 1); } - /** - * Directory recommended to save the file on - */ - public boolean hasExpectedDir() { return 0 != __offset(10); } - public int expectedDir() { int o = __offset(10); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - /** - * Recommended filename - */ - public String expectedFilename() { int o = __offset(12); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer expectedFilenameAsByteBuffer() { return __vector_as_bytebuffer(12, 1); } - public ByteBuffer expectedFilenameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 12, 1); } - - public static int createSaveFileNotification(FlatBufferBuilder builder, - int dataOffset, - int mimeTypeOffset, - int fileExtensionOffset, - int expectedDir, - int expectedFilenameOffset) { - builder.startTable(5); - SaveFileNotification.addExpectedFilename(builder, expectedFilenameOffset); - SaveFileNotification.addFileExtension(builder, fileExtensionOffset); - SaveFileNotification.addMimeType(builder, mimeTypeOffset); - SaveFileNotification.addData(builder, dataOffset); - SaveFileNotification.addExpectedDir(builder, expectedDir); - return SaveFileNotification.endSaveFileNotification(builder); - } - - public static void startSaveFileNotification(FlatBufferBuilder builder) { builder.startTable(5); } - public static void addData(FlatBufferBuilder builder, int dataOffset) { builder.addOffset(0, 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 void addMimeType(FlatBufferBuilder builder, int mimeTypeOffset) { builder.addOffset(1, mimeTypeOffset, 0); } - public static void addFileExtension(FlatBufferBuilder builder, int fileExtensionOffset) { builder.addOffset(2, fileExtensionOffset, 0); } - public static void addExpectedDir(FlatBufferBuilder builder, int expectedDir) { builder.addByte(3, (byte) expectedDir, (byte) 0); } - public static void addExpectedFilename(FlatBufferBuilder builder, int expectedFilenameOffset) { builder.addOffset(4, expectedFilenameOffset, 0); } - public static int endSaveFileNotification(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 SaveFileNotification get(int j) { return get(new SaveFileNotification(), j); } - public SaveFileNotification get(SaveFileNotification obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public SaveFileNotificationT unpack() { - SaveFileNotificationT _o = new SaveFileNotificationT(); - unpackTo(_o); - return _o; - } - public void unpackTo(SaveFileNotificationT _o) { - int[] _oData = new int[dataLength()]; - for (int _j = 0; _j < dataLength(); ++_j) {_oData[_j] = data(_j);} - _o.setData(_oData); - String _oMimeType = mimeType(); - _o.setMimeType(_oMimeType); - String _oFileExtension = fileExtension(); - _o.setFileExtension(_oFileExtension); - Integer _oExpectedDir = hasExpectedDir() ? expectedDir() : null; - _o.setExpectedDir(_oExpectedDir); - String _oExpectedFilename = expectedFilename(); - _o.setExpectedFilename(_oExpectedFilename); - } - public static int pack(FlatBufferBuilder builder, SaveFileNotificationT _o) { - if (_o == null) return 0; - 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); - } - int _mimeType = _o.getMimeType() == null ? 0 : builder.createString(_o.getMimeType()); - int _fileExtension = _o.getFileExtension() == null ? 0 : builder.createString(_o.getFileExtension()); - int _expectedFilename = _o.getExpectedFilename() == null ? 0 : builder.createString(_o.getExpectedFilename()); - return createSaveFileNotification( - builder, - _data, - _mimeType, - _fileExtension, - _o.getExpectedDir(), - _expectedFilename); - } -} - +// 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.*; + +/** + * Used for the server to save a file and have it prompt in the user side + */ +@SuppressWarnings("unused") +public final class SaveFileNotification extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static SaveFileNotification getRootAsSaveFileNotification(ByteBuffer _bb) { return getRootAsSaveFileNotification(_bb, new SaveFileNotification()); } + public static SaveFileNotification getRootAsSaveFileNotification(ByteBuffer _bb, SaveFileNotification 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 SaveFileNotification __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * Binary data of the file + */ + public int data(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; } + public int dataLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ByteVector dataVector() { return dataVector(new ByteVector()); } + public ByteVector dataVector(ByteVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer dataAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer dataInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + /** + * MIME type of file if one exists, use `file_extension` otherwise + */ + public String mimeType() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer mimeTypeAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer mimeTypeInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + /** + * Use MIME type preferably if one exists + */ + public String fileExtension() { int o = __offset(8); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer fileExtensionAsByteBuffer() { return __vector_as_bytebuffer(8, 1); } + public ByteBuffer fileExtensionInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 8, 1); } + /** + * Directory recommended to save the file on + */ + public boolean hasExpectedDir() { return 0 != __offset(10); } + public int expectedDir() { int o = __offset(10); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + /** + * Recommended filename + */ + public String expectedFilename() { int o = __offset(12); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer expectedFilenameAsByteBuffer() { return __vector_as_bytebuffer(12, 1); } + public ByteBuffer expectedFilenameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 12, 1); } + + public static int createSaveFileNotification(FlatBufferBuilder builder, + int dataOffset, + int mimeTypeOffset, + int fileExtensionOffset, + int expectedDir, + int expectedFilenameOffset) { + builder.startTable(5); + SaveFileNotification.addExpectedFilename(builder, expectedFilenameOffset); + SaveFileNotification.addFileExtension(builder, fileExtensionOffset); + SaveFileNotification.addMimeType(builder, mimeTypeOffset); + SaveFileNotification.addData(builder, dataOffset); + SaveFileNotification.addExpectedDir(builder, expectedDir); + return SaveFileNotification.endSaveFileNotification(builder); + } + + public static void startSaveFileNotification(FlatBufferBuilder builder) { builder.startTable(5); } + public static void addData(FlatBufferBuilder builder, int dataOffset) { builder.addOffset(0, 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 void addMimeType(FlatBufferBuilder builder, int mimeTypeOffset) { builder.addOffset(1, mimeTypeOffset, 0); } + public static void addFileExtension(FlatBufferBuilder builder, int fileExtensionOffset) { builder.addOffset(2, fileExtensionOffset, 0); } + public static void addExpectedDir(FlatBufferBuilder builder, int expectedDir) { builder.addByte(3, (byte) expectedDir, (byte) 0); } + public static void addExpectedFilename(FlatBufferBuilder builder, int expectedFilenameOffset) { builder.addOffset(4, expectedFilenameOffset, 0); } + public static int endSaveFileNotification(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 SaveFileNotification get(int j) { return get(new SaveFileNotification(), j); } + public SaveFileNotification get(SaveFileNotification obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SaveFileNotificationT unpack() { + SaveFileNotificationT _o = new SaveFileNotificationT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SaveFileNotificationT _o) { + int[] _oData = new int[dataLength()]; + for (int _j = 0; _j < dataLength(); ++_j) {_oData[_j] = data(_j);} + _o.setData(_oData); + String _oMimeType = mimeType(); + _o.setMimeType(_oMimeType); + String _oFileExtension = fileExtension(); + _o.setFileExtension(_oFileExtension); + Integer _oExpectedDir = hasExpectedDir() ? expectedDir() : null; + _o.setExpectedDir(_oExpectedDir); + String _oExpectedFilename = expectedFilename(); + _o.setExpectedFilename(_oExpectedFilename); + } + public static int pack(FlatBufferBuilder builder, SaveFileNotificationT _o) { + if (_o == null) return 0; + 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); + } + int _mimeType = _o.getMimeType() == null ? 0 : builder.createString(_o.getMimeType()); + int _fileExtension = _o.getFileExtension() == null ? 0 : builder.createString(_o.getFileExtension()); + int _expectedFilename = _o.getExpectedFilename() == null ? 0 : builder.createString(_o.getExpectedFilename()); + return createSaveFileNotification( + builder, + _data, + _mimeType, + _fileExtension, + _o.getExpectedDir(), + _expectedFilename); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SaveFileNotificationT.java b/protocol/java/src/solarxr_protocol/rpc/SaveFileNotificationT.java index a517e544..78fb0704 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SaveFileNotificationT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SaveFileNotificationT.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 SaveFileNotificationT { - private int[] data; - private String mimeType; - private String fileExtension; - private Integer expectedDir; - private String expectedFilename; - - public int[] getData() { return data; } - - public void setData(int[] data) { this.data = data; } - - public String getMimeType() { return mimeType; } - - public void setMimeType(String mimeType) { this.mimeType = mimeType; } - - public String getFileExtension() { return fileExtension; } - - public void setFileExtension(String fileExtension) { this.fileExtension = fileExtension; } - - public Integer getExpectedDir() { return expectedDir; } - - public void setExpectedDir(Integer expectedDir) { this.expectedDir = expectedDir; } - - public String getExpectedFilename() { return expectedFilename; } - - public void setExpectedFilename(String expectedFilename) { this.expectedFilename = expectedFilename; } - - - public SaveFileNotificationT() { - this.data = null; - this.mimeType = null; - this.fileExtension = null; - this.expectedDir = null; - this.expectedFilename = 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 SaveFileNotificationT { + private int[] data; + private String mimeType; + private String fileExtension; + private Integer expectedDir; + private String expectedFilename; + + public int[] getData() { return data; } + + public void setData(int[] data) { this.data = data; } + + public String getMimeType() { return mimeType; } + + public void setMimeType(String mimeType) { this.mimeType = mimeType; } + + public String getFileExtension() { return fileExtension; } + + public void setFileExtension(String fileExtension) { this.fileExtension = fileExtension; } + + public Integer getExpectedDir() { return expectedDir; } + + public void setExpectedDir(Integer expectedDir) { this.expectedDir = expectedDir; } + + public String getExpectedFilename() { return expectedFilename; } + + public void setExpectedFilename(String expectedFilename) { this.expectedFilename = expectedFilename; } + + + public SaveFileNotificationT() { + this.data = null; + this.mimeType = null; + this.fileExtension = null; + this.expectedDir = null; + this.expectedFilename = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialDevice.java b/protocol/java/src/solarxr_protocol/rpc/SerialDevice.java index b3e241e2..bcfa0594 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SerialDevice.java +++ b/protocol/java/src/solarxr_protocol/rpc/SerialDevice.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 SerialDevice extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static SerialDevice getRootAsSerialDevice(ByteBuffer _bb) { return getRootAsSerialDevice(_bb, new SerialDevice()); } - public static SerialDevice getRootAsSerialDevice(ByteBuffer _bb, SerialDevice 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 SerialDevice __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public String port() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer portAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } - public ByteBuffer portInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } - public String name() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } - public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } - - public static int createSerialDevice(FlatBufferBuilder builder, - int portOffset, - int nameOffset) { - builder.startTable(2); - SerialDevice.addName(builder, nameOffset); - SerialDevice.addPort(builder, portOffset); - return SerialDevice.endSerialDevice(builder); - } - - public static void startSerialDevice(FlatBufferBuilder builder) { builder.startTable(2); } - public static void addPort(FlatBufferBuilder builder, int portOffset) { builder.addOffset(0, portOffset, 0); } - public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(1, nameOffset, 0); } - public static int endSerialDevice(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 SerialDevice get(int j) { return get(new SerialDevice(), j); } - public SerialDevice get(SerialDevice obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public SerialDeviceT unpack() { - SerialDeviceT _o = new SerialDeviceT(); - unpackTo(_o); - return _o; - } - public void unpackTo(SerialDeviceT _o) { - String _oPort = port(); - _o.setPort(_oPort); - String _oName = name(); - _o.setName(_oName); - } - public static int pack(FlatBufferBuilder builder, SerialDeviceT _o) { - if (_o == null) return 0; - int _port = _o.getPort() == null ? 0 : builder.createString(_o.getPort()); - int _name = _o.getName() == null ? 0 : builder.createString(_o.getName()); - return createSerialDevice( - builder, - _port, - _name); - } -} - +// 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 SerialDevice extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static SerialDevice getRootAsSerialDevice(ByteBuffer _bb) { return getRootAsSerialDevice(_bb, new SerialDevice()); } + public static SerialDevice getRootAsSerialDevice(ByteBuffer _bb, SerialDevice 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 SerialDevice __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String port() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer portAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer portInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public String name() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + + public static int createSerialDevice(FlatBufferBuilder builder, + int portOffset, + int nameOffset) { + builder.startTable(2); + SerialDevice.addName(builder, nameOffset); + SerialDevice.addPort(builder, portOffset); + return SerialDevice.endSerialDevice(builder); + } + + public static void startSerialDevice(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addPort(FlatBufferBuilder builder, int portOffset) { builder.addOffset(0, portOffset, 0); } + public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(1, nameOffset, 0); } + public static int endSerialDevice(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 SerialDevice get(int j) { return get(new SerialDevice(), j); } + public SerialDevice get(SerialDevice obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SerialDeviceT unpack() { + SerialDeviceT _o = new SerialDeviceT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SerialDeviceT _o) { + String _oPort = port(); + _o.setPort(_oPort); + String _oName = name(); + _o.setName(_oName); + } + public static int pack(FlatBufferBuilder builder, SerialDeviceT _o) { + if (_o == null) return 0; + int _port = _o.getPort() == null ? 0 : builder.createString(_o.getPort()); + int _name = _o.getName() == null ? 0 : builder.createString(_o.getName()); + return createSerialDevice( + builder, + _port, + _name); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialDevicePort.java b/protocol/java/src/solarxr_protocol/rpc/SerialDevicePort.java new file mode 100644 index 00000000..b78189d0 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/SerialDevicePort.java @@ -0,0 +1,59 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class SerialDevicePort extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static SerialDevicePort getRootAsSerialDevicePort(ByteBuffer _bb) { return getRootAsSerialDevicePort(_bb, new SerialDevicePort()); } + public static SerialDevicePort getRootAsSerialDevicePort(ByteBuffer _bb, SerialDevicePort 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 SerialDevicePort __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String port() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer portAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer portInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + + public static int createSerialDevicePort(FlatBufferBuilder builder, + int portOffset) { + builder.startTable(1); + SerialDevicePort.addPort(builder, portOffset); + return SerialDevicePort.endSerialDevicePort(builder); + } + + public static void startSerialDevicePort(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addPort(FlatBufferBuilder builder, int portOffset) { builder.addOffset(0, portOffset, 0); } + public static int endSerialDevicePort(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 SerialDevicePort get(int j) { return get(new SerialDevicePort(), j); } + public SerialDevicePort get(SerialDevicePort obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SerialDevicePortT unpack() { + SerialDevicePortT _o = new SerialDevicePortT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SerialDevicePortT _o) { + String _oPort = port(); + _o.setPort(_oPort); + } + public static int pack(FlatBufferBuilder builder, SerialDevicePortT _o) { + if (_o == null) return 0; + int _port = _o.getPort() == null ? 0 : builder.createString(_o.getPort()); + return createSerialDevicePort( + builder, + _port); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialDevicePortT.java b/protocol/java/src/solarxr_protocol/rpc/SerialDevicePortT.java new file mode 100644 index 00000000..e56dc6d1 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/SerialDevicePortT.java @@ -0,0 +1,22 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class SerialDevicePortT { + private String port; + + public String getPort() { return port; } + + public void setPort(String port) { this.port = port; } + + + public SerialDevicePortT() { + this.port = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialDeviceT.java b/protocol/java/src/solarxr_protocol/rpc/SerialDeviceT.java index e92ac710..68000a6c 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SerialDeviceT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SerialDeviceT.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 SerialDeviceT { - private String port; - private String name; - - public String getPort() { return port; } - - public void setPort(String port) { this.port = port; } - - public String getName() { return name; } - - public void setName(String name) { this.name = name; } - - - public SerialDeviceT() { - this.port = null; - this.name = 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 SerialDeviceT { + private String port; + private String name; + + public String getPort() { return port; } + + public void setPort(String port) { this.port = port; } + + public String getName() { return name; } + + public void setName(String name) { this.name = name; } + + + public SerialDeviceT() { + this.port = null; + this.name = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialDevicesRequest.java b/protocol/java/src/solarxr_protocol/rpc/SerialDevicesRequest.java index 3178a2d3..e15789d6 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SerialDevicesRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/SerialDevicesRequest.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 SerialDevicesRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static SerialDevicesRequest getRootAsSerialDevicesRequest(ByteBuffer _bb) { return getRootAsSerialDevicesRequest(_bb, new SerialDevicesRequest()); } - public static SerialDevicesRequest getRootAsSerialDevicesRequest(ByteBuffer _bb, SerialDevicesRequest 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 SerialDevicesRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startSerialDevicesRequest(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endSerialDevicesRequest(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 SerialDevicesRequest get(int j) { return get(new SerialDevicesRequest(), j); } - public SerialDevicesRequest get(SerialDevicesRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public SerialDevicesRequestT unpack() { - SerialDevicesRequestT _o = new SerialDevicesRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(SerialDevicesRequestT _o) { - } - public static int pack(FlatBufferBuilder builder, SerialDevicesRequestT _o) { - if (_o == null) return 0; - startSerialDevicesRequest(builder); - return endSerialDevicesRequest(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 SerialDevicesRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static SerialDevicesRequest getRootAsSerialDevicesRequest(ByteBuffer _bb) { return getRootAsSerialDevicesRequest(_bb, new SerialDevicesRequest()); } + public static SerialDevicesRequest getRootAsSerialDevicesRequest(ByteBuffer _bb, SerialDevicesRequest 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 SerialDevicesRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startSerialDevicesRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endSerialDevicesRequest(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 SerialDevicesRequest get(int j) { return get(new SerialDevicesRequest(), j); } + public SerialDevicesRequest get(SerialDevicesRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SerialDevicesRequestT unpack() { + SerialDevicesRequestT _o = new SerialDevicesRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SerialDevicesRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, SerialDevicesRequestT _o) { + if (_o == null) return 0; + startSerialDevicesRequest(builder); + return endSerialDevicesRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialDevicesRequestT.java b/protocol/java/src/solarxr_protocol/rpc/SerialDevicesRequestT.java index 1be90cbe..5a16b124 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SerialDevicesRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SerialDevicesRequestT.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 SerialDevicesRequestT { - - - public SerialDevicesRequestT() { - } -} - +// 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 SerialDevicesRequestT { + + + public SerialDevicesRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialDevicesResponse.java b/protocol/java/src/solarxr_protocol/rpc/SerialDevicesResponse.java index d01b3c79..8531245c 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SerialDevicesResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/SerialDevicesResponse.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 SerialDevicesResponse extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static SerialDevicesResponse getRootAsSerialDevicesResponse(ByteBuffer _bb) { return getRootAsSerialDevicesResponse(_bb, new SerialDevicesResponse()); } - public static SerialDevicesResponse getRootAsSerialDevicesResponse(ByteBuffer _bb, SerialDevicesResponse 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 SerialDevicesResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public solarxr_protocol.rpc.SerialDevice devices(int j) { return devices(new solarxr_protocol.rpc.SerialDevice(), j); } - public solarxr_protocol.rpc.SerialDevice devices(solarxr_protocol.rpc.SerialDevice 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.rpc.SerialDevice.Vector devicesVector() { return devicesVector(new solarxr_protocol.rpc.SerialDevice.Vector()); } - public solarxr_protocol.rpc.SerialDevice.Vector devicesVector(solarxr_protocol.rpc.SerialDevice.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } - - public static int createSerialDevicesResponse(FlatBufferBuilder builder, - int devicesOffset) { - builder.startTable(1); - SerialDevicesResponse.addDevices(builder, devicesOffset); - return SerialDevicesResponse.endSerialDevicesResponse(builder); - } - - public static void startSerialDevicesResponse(FlatBufferBuilder builder) { builder.startTable(1); } - 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 int endSerialDevicesResponse(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 SerialDevicesResponse get(int j) { return get(new SerialDevicesResponse(), j); } - public SerialDevicesResponse get(SerialDevicesResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public SerialDevicesResponseT unpack() { - SerialDevicesResponseT _o = new SerialDevicesResponseT(); - unpackTo(_o); - return _o; - } - public void unpackTo(SerialDevicesResponseT _o) { - solarxr_protocol.rpc.SerialDeviceT[] _oDevices = new solarxr_protocol.rpc.SerialDeviceT[devicesLength()]; - for (int _j = 0; _j < devicesLength(); ++_j) {_oDevices[_j] = (devices(_j) != null ? devices(_j).unpack() : null);} - _o.setDevices(_oDevices); - } - public static int pack(FlatBufferBuilder builder, SerialDevicesResponseT _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.rpc.SerialDeviceT _e : _o.getDevices()) { __devices[_j] = solarxr_protocol.rpc.SerialDevice.pack(builder, _e); _j++;} - _devices = createDevicesVector(builder, __devices); - } - return createSerialDevicesResponse( - builder, - _devices); - } -} - +// 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 SerialDevicesResponse extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static SerialDevicesResponse getRootAsSerialDevicesResponse(ByteBuffer _bb) { return getRootAsSerialDevicesResponse(_bb, new SerialDevicesResponse()); } + public static SerialDevicesResponse getRootAsSerialDevicesResponse(ByteBuffer _bb, SerialDevicesResponse 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 SerialDevicesResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.rpc.SerialDevice devices(int j) { return devices(new solarxr_protocol.rpc.SerialDevice(), j); } + public solarxr_protocol.rpc.SerialDevice devices(solarxr_protocol.rpc.SerialDevice 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.rpc.SerialDevice.Vector devicesVector() { return devicesVector(new solarxr_protocol.rpc.SerialDevice.Vector()); } + public solarxr_protocol.rpc.SerialDevice.Vector devicesVector(solarxr_protocol.rpc.SerialDevice.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + + public static int createSerialDevicesResponse(FlatBufferBuilder builder, + int devicesOffset) { + builder.startTable(1); + SerialDevicesResponse.addDevices(builder, devicesOffset); + return SerialDevicesResponse.endSerialDevicesResponse(builder); + } + + public static void startSerialDevicesResponse(FlatBufferBuilder builder) { builder.startTable(1); } + 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 int endSerialDevicesResponse(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 SerialDevicesResponse get(int j) { return get(new SerialDevicesResponse(), j); } + public SerialDevicesResponse get(SerialDevicesResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SerialDevicesResponseT unpack() { + SerialDevicesResponseT _o = new SerialDevicesResponseT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SerialDevicesResponseT _o) { + solarxr_protocol.rpc.SerialDeviceT[] _oDevices = new solarxr_protocol.rpc.SerialDeviceT[devicesLength()]; + for (int _j = 0; _j < devicesLength(); ++_j) {_oDevices[_j] = (devices(_j) != null ? devices(_j).unpack() : null);} + _o.setDevices(_oDevices); + } + public static int pack(FlatBufferBuilder builder, SerialDevicesResponseT _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.rpc.SerialDeviceT _e : _o.getDevices()) { __devices[_j] = solarxr_protocol.rpc.SerialDevice.pack(builder, _e); _j++;} + _devices = createDevicesVector(builder, __devices); + } + return createSerialDevicesResponse( + builder, + _devices); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialDevicesResponseT.java b/protocol/java/src/solarxr_protocol/rpc/SerialDevicesResponseT.java index 3edcc1ed..40101379 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SerialDevicesResponseT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SerialDevicesResponseT.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 SerialDevicesResponseT { - private solarxr_protocol.rpc.SerialDeviceT[] devices; - - public solarxr_protocol.rpc.SerialDeviceT[] getDevices() { return devices; } - - public void setDevices(solarxr_protocol.rpc.SerialDeviceT[] devices) { this.devices = devices; } - - - public SerialDevicesResponseT() { - this.devices = 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 SerialDevicesResponseT { + private solarxr_protocol.rpc.SerialDeviceT[] devices; + + public solarxr_protocol.rpc.SerialDeviceT[] getDevices() { return devices; } + + public void setDevices(solarxr_protocol.rpc.SerialDeviceT[] devices) { this.devices = devices; } + + + public SerialDevicesResponseT() { + this.devices = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialFirmwareUpdate.java b/protocol/java/src/solarxr_protocol/rpc/SerialFirmwareUpdate.java new file mode 100644 index 00000000..1afbf256 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/SerialFirmwareUpdate.java @@ -0,0 +1,120 @@ +// 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 SerialFirmwareUpdate extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static SerialFirmwareUpdate getRootAsSerialFirmwareUpdate(ByteBuffer _bb) { return getRootAsSerialFirmwareUpdate(_bb, new SerialFirmwareUpdate()); } + public static SerialFirmwareUpdate getRootAsSerialFirmwareUpdate(ByteBuffer _bb, SerialFirmwareUpdate 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 SerialFirmwareUpdate __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * id of the device, this refer to a serial port id + */ + public solarxr_protocol.rpc.SerialDevicePort deviceId() { return deviceId(new solarxr_protocol.rpc.SerialDevicePort()); } + public solarxr_protocol.rpc.SerialDevicePort deviceId(solarxr_protocol.rpc.SerialDevicePort obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + /** + * Will make the server ask for the tracker to be manually rebooted by the user + * after the tracker is done flashing + */ + public boolean needManualReboot() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + /** + * Credentials to provision after the flashing + * Only used with Serial flashing, because OTA is already connected to the wifi + */ + public String ssid() { int o = __offset(8); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer ssidAsByteBuffer() { return __vector_as_bytebuffer(8, 1); } + public ByteBuffer ssidInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 8, 1); } + public String password() { int o = __offset(10); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer passwordAsByteBuffer() { return __vector_as_bytebuffer(10, 1); } + public ByteBuffer passwordInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 10, 1); } + /** + * A list of urls and offsets of the different firmware files to flash + */ + public solarxr_protocol.rpc.FirmwarePart firmwarePart(int j) { return firmwarePart(new solarxr_protocol.rpc.FirmwarePart(), j); } + public solarxr_protocol.rpc.FirmwarePart firmwarePart(solarxr_protocol.rpc.FirmwarePart obj, int j) { int o = __offset(12); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int firmwarePartLength() { int o = __offset(12); return o != 0 ? __vector_len(o) : 0; } + public solarxr_protocol.rpc.FirmwarePart.Vector firmwarePartVector() { return firmwarePartVector(new solarxr_protocol.rpc.FirmwarePart.Vector()); } + public solarxr_protocol.rpc.FirmwarePart.Vector firmwarePartVector(solarxr_protocol.rpc.FirmwarePart.Vector obj) { int o = __offset(12); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + + public static int createSerialFirmwareUpdate(FlatBufferBuilder builder, + int deviceIdOffset, + boolean needManualReboot, + int ssidOffset, + int passwordOffset, + int firmwarePartOffset) { + builder.startTable(5); + SerialFirmwareUpdate.addFirmwarePart(builder, firmwarePartOffset); + SerialFirmwareUpdate.addPassword(builder, passwordOffset); + SerialFirmwareUpdate.addSsid(builder, ssidOffset); + SerialFirmwareUpdate.addDeviceId(builder, deviceIdOffset); + SerialFirmwareUpdate.addNeedManualReboot(builder, needManualReboot); + return SerialFirmwareUpdate.endSerialFirmwareUpdate(builder); + } + + public static void startSerialFirmwareUpdate(FlatBufferBuilder builder) { builder.startTable(5); } + public static void addDeviceId(FlatBufferBuilder builder, int deviceIdOffset) { builder.addOffset(0, deviceIdOffset, 0); } + public static void addNeedManualReboot(FlatBufferBuilder builder, boolean needManualReboot) { builder.addBoolean(1, needManualReboot, false); } + public static void addSsid(FlatBufferBuilder builder, int ssidOffset) { builder.addOffset(2, ssidOffset, 0); } + public static void addPassword(FlatBufferBuilder builder, int passwordOffset) { builder.addOffset(3, passwordOffset, 0); } + public static void addFirmwarePart(FlatBufferBuilder builder, int firmwarePartOffset) { builder.addOffset(4, firmwarePartOffset, 0); } + public static int createFirmwarePartVector(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 startFirmwarePartVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endSerialFirmwareUpdate(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 SerialFirmwareUpdate get(int j) { return get(new SerialFirmwareUpdate(), j); } + public SerialFirmwareUpdate get(SerialFirmwareUpdate obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SerialFirmwareUpdateT unpack() { + SerialFirmwareUpdateT _o = new SerialFirmwareUpdateT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SerialFirmwareUpdateT _o) { + if (deviceId() != null) _o.setDeviceId(deviceId().unpack()); + else _o.setDeviceId(null); + boolean _oNeedManualReboot = needManualReboot(); + _o.setNeedManualReboot(_oNeedManualReboot); + String _oSsid = ssid(); + _o.setSsid(_oSsid); + String _oPassword = password(); + _o.setPassword(_oPassword); + solarxr_protocol.rpc.FirmwarePartT[] _oFirmwarePart = new solarxr_protocol.rpc.FirmwarePartT[firmwarePartLength()]; + for (int _j = 0; _j < firmwarePartLength(); ++_j) {_oFirmwarePart[_j] = (firmwarePart(_j) != null ? firmwarePart(_j).unpack() : null);} + _o.setFirmwarePart(_oFirmwarePart); + } + public static int pack(FlatBufferBuilder builder, SerialFirmwareUpdateT _o) { + if (_o == null) return 0; + int _deviceId = _o.getDeviceId() == null ? 0 : solarxr_protocol.rpc.SerialDevicePort.pack(builder, _o.getDeviceId()); + int _ssid = _o.getSsid() == null ? 0 : builder.createString(_o.getSsid()); + int _password = _o.getPassword() == null ? 0 : builder.createString(_o.getPassword()); + int _firmwarePart = 0; + if (_o.getFirmwarePart() != null) { + int[] __firmwarePart = new int[_o.getFirmwarePart().length]; + int _j = 0; + for (solarxr_protocol.rpc.FirmwarePartT _e : _o.getFirmwarePart()) { __firmwarePart[_j] = solarxr_protocol.rpc.FirmwarePart.pack(builder, _e); _j++;} + _firmwarePart = createFirmwarePartVector(builder, __firmwarePart); + } + return createSerialFirmwareUpdate( + builder, + _deviceId, + _o.getNeedManualReboot(), + _ssid, + _password, + _firmwarePart); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialFirmwareUpdateT.java b/protocol/java/src/solarxr_protocol/rpc/SerialFirmwareUpdateT.java new file mode 100644 index 00000000..fd8d349f --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/SerialFirmwareUpdateT.java @@ -0,0 +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 SerialFirmwareUpdateT { + private solarxr_protocol.rpc.SerialDevicePortT deviceId; + private boolean needManualReboot; + private String ssid; + private String password; + private solarxr_protocol.rpc.FirmwarePartT[] firmwarePart; + + public solarxr_protocol.rpc.SerialDevicePortT getDeviceId() { return deviceId; } + + public void setDeviceId(solarxr_protocol.rpc.SerialDevicePortT deviceId) { this.deviceId = deviceId; } + + public boolean getNeedManualReboot() { return needManualReboot; } + + public void setNeedManualReboot(boolean needManualReboot) { this.needManualReboot = needManualReboot; } + + 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 solarxr_protocol.rpc.FirmwarePartT[] getFirmwarePart() { return firmwarePart; } + + public void setFirmwarePart(solarxr_protocol.rpc.FirmwarePartT[] firmwarePart) { this.firmwarePart = firmwarePart; } + + + public SerialFirmwareUpdateT() { + this.deviceId = null; + this.needManualReboot = false; + this.ssid = null; + this.password = null; + this.firmwarePart = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialTrackerFactoryResetRequest.java b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerFactoryResetRequest.java index 4c27aa8d..4e89204b 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SerialTrackerFactoryResetRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerFactoryResetRequest.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.*; - -/** - * 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_22_10_26(); } - 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); - } -} - +// 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_22_10_26(); } + 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 index 8600f7b3..df695d2f 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SerialTrackerFactoryResetRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerFactoryResetRequestT.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 SerialTrackerFactoryResetRequestT { - - - public SerialTrackerFactoryResetRequestT() { - } -} - +// 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 index 37eb5996..3c749419 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetInfoRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetInfoRequest.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.*; - -/** - * 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_22_10_26(); } - 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); - } -} - +// 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_22_10_26(); } + 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 index 47178ba1..50030add 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetInfoRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetInfoRequestT.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 SerialTrackerGetInfoRequestT { - - - public SerialTrackerGetInfoRequestT() { - } -} - +// 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/SerialTrackerGetWifiScanRequest.java b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequest.java index 40c5341e..3a4e5d91 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequest.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.*; - -/** - * Sends the GET WIFISCAN cmd to the current tracker on the serial monitor - */ -@SuppressWarnings("unused") -public final class SerialTrackerGetWifiScanRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static SerialTrackerGetWifiScanRequest getRootAsSerialTrackerGetWifiScanRequest(ByteBuffer _bb) { return getRootAsSerialTrackerGetWifiScanRequest(_bb, new SerialTrackerGetWifiScanRequest()); } - public static SerialTrackerGetWifiScanRequest getRootAsSerialTrackerGetWifiScanRequest(ByteBuffer _bb, SerialTrackerGetWifiScanRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } - public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } - public SerialTrackerGetWifiScanRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startSerialTrackerGetWifiScanRequest(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endSerialTrackerGetWifiScanRequest(FlatBufferBuilder builder) { - int o = builder.endTable(); - return o; - } - - public static final class Vector extends BaseVector { - public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } - - public SerialTrackerGetWifiScanRequest get(int j) { return get(new SerialTrackerGetWifiScanRequest(), j); } - public SerialTrackerGetWifiScanRequest get(SerialTrackerGetWifiScanRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public SerialTrackerGetWifiScanRequestT unpack() { - SerialTrackerGetWifiScanRequestT _o = new SerialTrackerGetWifiScanRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(SerialTrackerGetWifiScanRequestT _o) { - } - public static int pack(FlatBufferBuilder builder, SerialTrackerGetWifiScanRequestT _o) { - if (_o == null) return 0; - startSerialTrackerGetWifiScanRequest(builder); - return endSerialTrackerGetWifiScanRequest(builder); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Sends the GET WIFISCAN cmd to the current tracker on the serial monitor + */ +@SuppressWarnings("unused") +public final class SerialTrackerGetWifiScanRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static SerialTrackerGetWifiScanRequest getRootAsSerialTrackerGetWifiScanRequest(ByteBuffer _bb) { return getRootAsSerialTrackerGetWifiScanRequest(_bb, new SerialTrackerGetWifiScanRequest()); } + public static SerialTrackerGetWifiScanRequest getRootAsSerialTrackerGetWifiScanRequest(ByteBuffer _bb, SerialTrackerGetWifiScanRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public SerialTrackerGetWifiScanRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startSerialTrackerGetWifiScanRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endSerialTrackerGetWifiScanRequest(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public SerialTrackerGetWifiScanRequest get(int j) { return get(new SerialTrackerGetWifiScanRequest(), j); } + public SerialTrackerGetWifiScanRequest get(SerialTrackerGetWifiScanRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SerialTrackerGetWifiScanRequestT unpack() { + SerialTrackerGetWifiScanRequestT _o = new SerialTrackerGetWifiScanRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SerialTrackerGetWifiScanRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, SerialTrackerGetWifiScanRequestT _o) { + if (_o == null) return 0; + startSerialTrackerGetWifiScanRequest(builder); + return endSerialTrackerGetWifiScanRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequestT.java b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequestT.java index e4202f0c..8a4bce90 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequestT.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 SerialTrackerGetWifiScanRequestT { - - - public SerialTrackerGetWifiScanRequestT() { - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class SerialTrackerGetWifiScanRequestT { + + + public SerialTrackerGetWifiScanRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialTrackerRebootRequest.java b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerRebootRequest.java index d971d72c..de9ff2f3 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SerialTrackerRebootRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerRebootRequest.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.*; - -/** - * Reboots the tracker connected to the serial monitor - */ -@SuppressWarnings("unused") -public final class SerialTrackerRebootRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - 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); - } -} - +// 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_22_10_26(); } + 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 index f0350379..e8e61ffc 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SerialTrackerRebootRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerRebootRequestT.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 SerialTrackerRebootRequestT { - - - public SerialTrackerRebootRequestT() { - } -} - +// 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/java/src/solarxr_protocol/rpc/SerialUpdateResponse.java b/protocol/java/src/solarxr_protocol/rpc/SerialUpdateResponse.java index cd264334..f3266c24 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_22_10_26(); } - 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_22_10_26(); } + 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 06a15b5f..15ae4874 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/ServerInfosRequest.java b/protocol/java/src/solarxr_protocol/rpc/ServerInfosRequest.java index 1357ed57..4151c5d5 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ServerInfosRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/ServerInfosRequest.java @@ -1,50 +1,50 @@ -// 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.*; - -/** - * Allows to ask generic infos about the server, - * like the local ip address, the version of the server, the java version, - * the current working dir and other informations we might want to show in the gui - * for information/debug purposes - */ -@SuppressWarnings("unused") -public final class ServerInfosRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static ServerInfosRequest getRootAsServerInfosRequest(ByteBuffer _bb) { return getRootAsServerInfosRequest(_bb, new ServerInfosRequest()); } - public static ServerInfosRequest getRootAsServerInfosRequest(ByteBuffer _bb, ServerInfosRequest 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 ServerInfosRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startServerInfosRequest(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endServerInfosRequest(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 ServerInfosRequest get(int j) { return get(new ServerInfosRequest(), j); } - public ServerInfosRequest get(ServerInfosRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public ServerInfosRequestT unpack() { - ServerInfosRequestT _o = new ServerInfosRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(ServerInfosRequestT _o) { - } - public static int pack(FlatBufferBuilder builder, ServerInfosRequestT _o) { - if (_o == null) return 0; - startServerInfosRequest(builder); - return endServerInfosRequest(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.*; + +/** + * Allows to ask generic infos about the server, + * like the local ip address, the version of the server, the java version, + * the current working dir and other informations we might want to show in the gui + * for information/debug purposes + */ +@SuppressWarnings("unused") +public final class ServerInfosRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static ServerInfosRequest getRootAsServerInfosRequest(ByteBuffer _bb) { return getRootAsServerInfosRequest(_bb, new ServerInfosRequest()); } + public static ServerInfosRequest getRootAsServerInfosRequest(ByteBuffer _bb, ServerInfosRequest 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 ServerInfosRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startServerInfosRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endServerInfosRequest(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 ServerInfosRequest get(int j) { return get(new ServerInfosRequest(), j); } + public ServerInfosRequest get(ServerInfosRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public ServerInfosRequestT unpack() { + ServerInfosRequestT _o = new ServerInfosRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(ServerInfosRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, ServerInfosRequestT _o) { + if (_o == null) return 0; + startServerInfosRequest(builder); + return endServerInfosRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ServerInfosRequestT.java b/protocol/java/src/solarxr_protocol/rpc/ServerInfosRequestT.java index 568779d2..63de441d 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ServerInfosRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/ServerInfosRequestT.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 ServerInfosRequestT { - - - public ServerInfosRequestT() { - } -} - +// 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 ServerInfosRequestT { + + + public ServerInfosRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ServerInfosResponse.java b/protocol/java/src/solarxr_protocol/rpc/ServerInfosResponse.java index f4e48849..8dd62ecb 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ServerInfosResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/ServerInfosResponse.java @@ -1,65 +1,65 @@ -// 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.*; - -/** - * Holds the Server informations, this is a basic table holding various informations about the currently running server - * like its local ip address (usefull for standalone users so they can specify the ip of the server more easilly) and any more - * infos we might want to add in the future. (like java version, working dir, server version ....) - * This only holds the local ip for now. But there will be other informations added as we chose to display them on the gui for instance - */ -@SuppressWarnings("unused") -public final class ServerInfosResponse extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static ServerInfosResponse getRootAsServerInfosResponse(ByteBuffer _bb) { return getRootAsServerInfosResponse(_bb, new ServerInfosResponse()); } - public static ServerInfosResponse getRootAsServerInfosResponse(ByteBuffer _bb, ServerInfosResponse 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 ServerInfosResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public String localIp() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer localIpAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } - public ByteBuffer localIpInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } - - public static int createServerInfosResponse(FlatBufferBuilder builder, - int localIpOffset) { - builder.startTable(1); - ServerInfosResponse.addLocalIp(builder, localIpOffset); - return ServerInfosResponse.endServerInfosResponse(builder); - } - - public static void startServerInfosResponse(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addLocalIp(FlatBufferBuilder builder, int localIpOffset) { builder.addOffset(0, localIpOffset, 0); } - public static int endServerInfosResponse(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 ServerInfosResponse get(int j) { return get(new ServerInfosResponse(), j); } - public ServerInfosResponse get(ServerInfosResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public ServerInfosResponseT unpack() { - ServerInfosResponseT _o = new ServerInfosResponseT(); - unpackTo(_o); - return _o; - } - public void unpackTo(ServerInfosResponseT _o) { - String _oLocalIp = localIp(); - _o.setLocalIp(_oLocalIp); - } - public static int pack(FlatBufferBuilder builder, ServerInfosResponseT _o) { - if (_o == null) return 0; - int _localIp = _o.getLocalIp() == null ? 0 : builder.createString(_o.getLocalIp()); - return createServerInfosResponse( - builder, - _localIp); - } -} - +// 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.*; + +/** + * Holds the Server informations, this is a basic table holding various informations about the currently running server + * like its local ip address (usefull for standalone users so they can specify the ip of the server more easilly) and any more + * infos we might want to add in the future. (like java version, working dir, server version ....) + * This only holds the local ip for now. But there will be other informations added as we chose to display them on the gui for instance + */ +@SuppressWarnings("unused") +public final class ServerInfosResponse extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static ServerInfosResponse getRootAsServerInfosResponse(ByteBuffer _bb) { return getRootAsServerInfosResponse(_bb, new ServerInfosResponse()); } + public static ServerInfosResponse getRootAsServerInfosResponse(ByteBuffer _bb, ServerInfosResponse 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 ServerInfosResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String localIp() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer localIpAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer localIpInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + + public static int createServerInfosResponse(FlatBufferBuilder builder, + int localIpOffset) { + builder.startTable(1); + ServerInfosResponse.addLocalIp(builder, localIpOffset); + return ServerInfosResponse.endServerInfosResponse(builder); + } + + public static void startServerInfosResponse(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addLocalIp(FlatBufferBuilder builder, int localIpOffset) { builder.addOffset(0, localIpOffset, 0); } + public static int endServerInfosResponse(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 ServerInfosResponse get(int j) { return get(new ServerInfosResponse(), j); } + public ServerInfosResponse get(ServerInfosResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public ServerInfosResponseT unpack() { + ServerInfosResponseT _o = new ServerInfosResponseT(); + unpackTo(_o); + return _o; + } + public void unpackTo(ServerInfosResponseT _o) { + String _oLocalIp = localIp(); + _o.setLocalIp(_oLocalIp); + } + public static int pack(FlatBufferBuilder builder, ServerInfosResponseT _o) { + if (_o == null) return 0; + int _localIp = _o.getLocalIp() == null ? 0 : builder.createString(_o.getLocalIp()); + return createServerInfosResponse( + builder, + _localIp); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ServerInfosResponseT.java b/protocol/java/src/solarxr_protocol/rpc/ServerInfosResponseT.java index 0f248906..35c3145d 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ServerInfosResponseT.java +++ b/protocol/java/src/solarxr_protocol/rpc/ServerInfosResponseT.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 ServerInfosResponseT { - private String localIp; - - public String getLocalIp() { return localIp; } - - public void setLocalIp(String localIp) { this.localIp = localIp; } - - - public ServerInfosResponseT() { - this.localIp = 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 ServerInfosResponseT { + private String localIp; + + public String getLocalIp() { return localIp; } + + public void setLocalIp(String localIp) { this.localIp = localIp; } + + + public ServerInfosResponseT() { + this.localIp = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SetPauseTrackingRequest.java b/protocol/java/src/solarxr_protocol/rpc/SetPauseTrackingRequest.java index f645fdb3..59100674 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SetPauseTrackingRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/SetPauseTrackingRequest.java @@ -1,59 +1,59 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -@SuppressWarnings("unused") -public final class SetPauseTrackingRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static SetPauseTrackingRequest getRootAsSetPauseTrackingRequest(ByteBuffer _bb) { return getRootAsSetPauseTrackingRequest(_bb, new SetPauseTrackingRequest()); } - public static SetPauseTrackingRequest getRootAsSetPauseTrackingRequest(ByteBuffer _bb, SetPauseTrackingRequest 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 SetPauseTrackingRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - /** - * Pauses skeleton tracking if true, resumes skeleton tracking if false. - */ - public boolean pauseTracking() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static int createSetPauseTrackingRequest(FlatBufferBuilder builder, - boolean pauseTracking) { - builder.startTable(1); - SetPauseTrackingRequest.addPauseTracking(builder, pauseTracking); - return SetPauseTrackingRequest.endSetPauseTrackingRequest(builder); - } - - public static void startSetPauseTrackingRequest(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addPauseTracking(FlatBufferBuilder builder, boolean pauseTracking) { builder.addBoolean(0, pauseTracking, false); } - public static int endSetPauseTrackingRequest(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 SetPauseTrackingRequest get(int j) { return get(new SetPauseTrackingRequest(), j); } - public SetPauseTrackingRequest get(SetPauseTrackingRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public SetPauseTrackingRequestT unpack() { - SetPauseTrackingRequestT _o = new SetPauseTrackingRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(SetPauseTrackingRequestT _o) { - boolean _oPauseTracking = pauseTracking(); - _o.setPauseTracking(_oPauseTracking); - } - public static int pack(FlatBufferBuilder builder, SetPauseTrackingRequestT _o) { - if (_o == null) return 0; - return createSetPauseTrackingRequest( - builder, - _o.getPauseTracking()); - } -} - +// 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 SetPauseTrackingRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static SetPauseTrackingRequest getRootAsSetPauseTrackingRequest(ByteBuffer _bb) { return getRootAsSetPauseTrackingRequest(_bb, new SetPauseTrackingRequest()); } + public static SetPauseTrackingRequest getRootAsSetPauseTrackingRequest(ByteBuffer _bb, SetPauseTrackingRequest 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 SetPauseTrackingRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * Pauses skeleton tracking if true, resumes skeleton tracking if false. + */ + public boolean pauseTracking() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createSetPauseTrackingRequest(FlatBufferBuilder builder, + boolean pauseTracking) { + builder.startTable(1); + SetPauseTrackingRequest.addPauseTracking(builder, pauseTracking); + return SetPauseTrackingRequest.endSetPauseTrackingRequest(builder); + } + + public static void startSetPauseTrackingRequest(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addPauseTracking(FlatBufferBuilder builder, boolean pauseTracking) { builder.addBoolean(0, pauseTracking, false); } + public static int endSetPauseTrackingRequest(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 SetPauseTrackingRequest get(int j) { return get(new SetPauseTrackingRequest(), j); } + public SetPauseTrackingRequest get(SetPauseTrackingRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SetPauseTrackingRequestT unpack() { + SetPauseTrackingRequestT _o = new SetPauseTrackingRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SetPauseTrackingRequestT _o) { + boolean _oPauseTracking = pauseTracking(); + _o.setPauseTracking(_oPauseTracking); + } + public static int pack(FlatBufferBuilder builder, SetPauseTrackingRequestT _o) { + if (_o == null) return 0; + return createSetPauseTrackingRequest( + builder, + _o.getPauseTracking()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SetPauseTrackingRequestT.java b/protocol/java/src/solarxr_protocol/rpc/SetPauseTrackingRequestT.java index 8ecffa73..fdde71cb 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SetPauseTrackingRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SetPauseTrackingRequestT.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 SetPauseTrackingRequestT { - private boolean pauseTracking; - - public boolean getPauseTracking() { return pauseTracking; } - - public void setPauseTracking(boolean pauseTracking) { this.pauseTracking = pauseTracking; } - - - public SetPauseTrackingRequestT() { - this.pauseTracking = 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 SetPauseTrackingRequestT { + private boolean pauseTracking; + + public boolean getPauseTracking() { return pauseTracking; } + + public void setPauseTracking(boolean pauseTracking) { this.pauseTracking = pauseTracking; } + + + public SetPauseTrackingRequestT() { + this.pauseTracking = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SetWifiRequest.java b/protocol/java/src/solarxr_protocol/rpc/SetWifiRequest.java index 012c3812..ec025591 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_22_10_26(); } - 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_22_10_26(); } + 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 31ea985a..13a7d10c 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 123871ca..5ca6e657 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_22_10_26(); } - 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_22_10_26(); } + 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 3573f655..217246b1 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 bfd37c7c..f4f60fbb 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java @@ -1,139 +1,139 @@ -// 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_22_10_26(); } - 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.DriftCompensationSettings driftCompensation() { return driftCompensation(new solarxr_protocol.rpc.DriftCompensationSettings()); } - public solarxr_protocol.rpc.DriftCompensationSettings driftCompensation(solarxr_protocol.rpc.DriftCompensationSettings obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.OSCRouterSettings oscRouter() { return oscRouter(new solarxr_protocol.rpc.OSCRouterSettings()); } - public solarxr_protocol.rpc.OSCRouterSettings oscRouter(solarxr_protocol.rpc.OSCRouterSettings obj) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.VRCOSCSettings vrcOsc() { return vrcOsc(new solarxr_protocol.rpc.VRCOSCSettings()); } - public solarxr_protocol.rpc.VRCOSCSettings vrcOsc(solarxr_protocol.rpc.VRCOSCSettings obj) { int o = __offset(12); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.VMCOSCSettings vmcOsc() { return vmcOsc(new solarxr_protocol.rpc.VMCOSCSettings()); } - public solarxr_protocol.rpc.VMCOSCSettings vmcOsc(solarxr_protocol.rpc.VMCOSCSettings obj) { int o = __offset(14); 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(16); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.TapDetectionSettings tapDetectionSettings() { return tapDetectionSettings(new solarxr_protocol.rpc.TapDetectionSettings()); } - public solarxr_protocol.rpc.TapDetectionSettings tapDetectionSettings(solarxr_protocol.rpc.TapDetectionSettings obj) { int o = __offset(18); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.AutoBoneSettings autoBoneSettings() { return autoBoneSettings(new solarxr_protocol.rpc.AutoBoneSettings()); } - public solarxr_protocol.rpc.AutoBoneSettings autoBoneSettings(solarxr_protocol.rpc.AutoBoneSettings obj) { int o = __offset(20); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.ResetsSettings resetsSettings() { return resetsSettings(new solarxr_protocol.rpc.ResetsSettings()); } - public solarxr_protocol.rpc.ResetsSettings resetsSettings(solarxr_protocol.rpc.ResetsSettings obj) { int o = __offset(22); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - - public static int createSettingsResponse(FlatBufferBuilder builder, - int steamVrTrackersOffset, - int filteringOffset, - int driftCompensationOffset, - int oscRouterOffset, - int vrcOscOffset, - int vmcOscOffset, - int modelSettingsOffset, - int tapDetectionSettingsOffset, - int autoBoneSettingsOffset, - int resetsSettingsOffset) { - builder.startTable(10); - SettingsResponse.addResetsSettings(builder, resetsSettingsOffset); - SettingsResponse.addAutoBoneSettings(builder, autoBoneSettingsOffset); - SettingsResponse.addTapDetectionSettings(builder, tapDetectionSettingsOffset); - SettingsResponse.addModelSettings(builder, modelSettingsOffset); - SettingsResponse.addVmcOsc(builder, vmcOscOffset); - SettingsResponse.addVrcOsc(builder, vrcOscOffset); - SettingsResponse.addOscRouter(builder, oscRouterOffset); - SettingsResponse.addDriftCompensation(builder, driftCompensationOffset); - SettingsResponse.addFiltering(builder, filteringOffset); - SettingsResponse.addSteamVrTrackers(builder, steamVrTrackersOffset); - return SettingsResponse.endSettingsResponse(builder); - } - - public static void startSettingsResponse(FlatBufferBuilder builder) { builder.startTable(10); } - public static void addSteamVrTrackers(FlatBufferBuilder builder, int steamVrTrackersOffset) { builder.addOffset(0, steamVrTrackersOffset, 0); } - public static void addFiltering(FlatBufferBuilder builder, int filteringOffset) { builder.addOffset(1, filteringOffset, 0); } - public static void addDriftCompensation(FlatBufferBuilder builder, int driftCompensationOffset) { builder.addOffset(2, driftCompensationOffset, 0); } - public static void addOscRouter(FlatBufferBuilder builder, int oscRouterOffset) { builder.addOffset(3, oscRouterOffset, 0); } - public static void addVrcOsc(FlatBufferBuilder builder, int vrcOscOffset) { builder.addOffset(4, vrcOscOffset, 0); } - public static void addVmcOsc(FlatBufferBuilder builder, int vmcOscOffset) { builder.addOffset(5, vmcOscOffset, 0); } - public static void addModelSettings(FlatBufferBuilder builder, int modelSettingsOffset) { builder.addOffset(6, modelSettingsOffset, 0); } - public static void addTapDetectionSettings(FlatBufferBuilder builder, int tapDetectionSettingsOffset) { builder.addOffset(7, tapDetectionSettingsOffset, 0); } - public static void addAutoBoneSettings(FlatBufferBuilder builder, int autoBoneSettingsOffset) { builder.addOffset(8, autoBoneSettingsOffset, 0); } - public static void addResetsSettings(FlatBufferBuilder builder, int resetsSettingsOffset) { builder.addOffset(9, resetsSettingsOffset, 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 (driftCompensation() != null) _o.setDriftCompensation(driftCompensation().unpack()); - else _o.setDriftCompensation(null); - if (oscRouter() != null) _o.setOscRouter(oscRouter().unpack()); - else _o.setOscRouter(null); - if (vrcOsc() != null) _o.setVrcOsc(vrcOsc().unpack()); - else _o.setVrcOsc(null); - if (vmcOsc() != null) _o.setVmcOsc(vmcOsc().unpack()); - else _o.setVmcOsc(null); - if (modelSettings() != null) _o.setModelSettings(modelSettings().unpack()); - else _o.setModelSettings(null); - if (tapDetectionSettings() != null) _o.setTapDetectionSettings(tapDetectionSettings().unpack()); - else _o.setTapDetectionSettings(null); - if (autoBoneSettings() != null) _o.setAutoBoneSettings(autoBoneSettings().unpack()); - else _o.setAutoBoneSettings(null); - if (resetsSettings() != null) _o.setResetsSettings(resetsSettings().unpack()); - else _o.setResetsSettings(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 _driftCompensation = _o.getDriftCompensation() == null ? 0 : solarxr_protocol.rpc.DriftCompensationSettings.pack(builder, _o.getDriftCompensation()); - int _oscRouter = _o.getOscRouter() == null ? 0 : solarxr_protocol.rpc.OSCRouterSettings.pack(builder, _o.getOscRouter()); - int _vrcOsc = _o.getVrcOsc() == null ? 0 : solarxr_protocol.rpc.VRCOSCSettings.pack(builder, _o.getVrcOsc()); - int _vmcOsc = _o.getVmcOsc() == null ? 0 : solarxr_protocol.rpc.VMCOSCSettings.pack(builder, _o.getVmcOsc()); - int _modelSettings = _o.getModelSettings() == null ? 0 : solarxr_protocol.rpc.settings.ModelSettings.pack(builder, _o.getModelSettings()); - int _tapDetectionSettings = _o.getTapDetectionSettings() == null ? 0 : solarxr_protocol.rpc.TapDetectionSettings.pack(builder, _o.getTapDetectionSettings()); - int _autoBoneSettings = _o.getAutoBoneSettings() == null ? 0 : solarxr_protocol.rpc.AutoBoneSettings.pack(builder, _o.getAutoBoneSettings()); - int _resetsSettings = _o.getResetsSettings() == null ? 0 : solarxr_protocol.rpc.ResetsSettings.pack(builder, _o.getResetsSettings()); - return createSettingsResponse( - builder, - _steamVrTrackers, - _filtering, - _driftCompensation, - _oscRouter, - _vrcOsc, - _vmcOsc, - _modelSettings, - _tapDetectionSettings, - _autoBoneSettings, - _resetsSettings); - } -} - +// 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_22_10_26(); } + 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.DriftCompensationSettings driftCompensation() { return driftCompensation(new solarxr_protocol.rpc.DriftCompensationSettings()); } + public solarxr_protocol.rpc.DriftCompensationSettings driftCompensation(solarxr_protocol.rpc.DriftCompensationSettings obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.OSCRouterSettings oscRouter() { return oscRouter(new solarxr_protocol.rpc.OSCRouterSettings()); } + public solarxr_protocol.rpc.OSCRouterSettings oscRouter(solarxr_protocol.rpc.OSCRouterSettings obj) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.VRCOSCSettings vrcOsc() { return vrcOsc(new solarxr_protocol.rpc.VRCOSCSettings()); } + public solarxr_protocol.rpc.VRCOSCSettings vrcOsc(solarxr_protocol.rpc.VRCOSCSettings obj) { int o = __offset(12); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.VMCOSCSettings vmcOsc() { return vmcOsc(new solarxr_protocol.rpc.VMCOSCSettings()); } + public solarxr_protocol.rpc.VMCOSCSettings vmcOsc(solarxr_protocol.rpc.VMCOSCSettings obj) { int o = __offset(14); 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(16); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.TapDetectionSettings tapDetectionSettings() { return tapDetectionSettings(new solarxr_protocol.rpc.TapDetectionSettings()); } + public solarxr_protocol.rpc.TapDetectionSettings tapDetectionSettings(solarxr_protocol.rpc.TapDetectionSettings obj) { int o = __offset(18); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.AutoBoneSettings autoBoneSettings() { return autoBoneSettings(new solarxr_protocol.rpc.AutoBoneSettings()); } + public solarxr_protocol.rpc.AutoBoneSettings autoBoneSettings(solarxr_protocol.rpc.AutoBoneSettings obj) { int o = __offset(20); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.ResetsSettings resetsSettings() { return resetsSettings(new solarxr_protocol.rpc.ResetsSettings()); } + public solarxr_protocol.rpc.ResetsSettings resetsSettings(solarxr_protocol.rpc.ResetsSettings obj) { int o = __offset(22); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createSettingsResponse(FlatBufferBuilder builder, + int steamVrTrackersOffset, + int filteringOffset, + int driftCompensationOffset, + int oscRouterOffset, + int vrcOscOffset, + int vmcOscOffset, + int modelSettingsOffset, + int tapDetectionSettingsOffset, + int autoBoneSettingsOffset, + int resetsSettingsOffset) { + builder.startTable(10); + SettingsResponse.addResetsSettings(builder, resetsSettingsOffset); + SettingsResponse.addAutoBoneSettings(builder, autoBoneSettingsOffset); + SettingsResponse.addTapDetectionSettings(builder, tapDetectionSettingsOffset); + SettingsResponse.addModelSettings(builder, modelSettingsOffset); + SettingsResponse.addVmcOsc(builder, vmcOscOffset); + SettingsResponse.addVrcOsc(builder, vrcOscOffset); + SettingsResponse.addOscRouter(builder, oscRouterOffset); + SettingsResponse.addDriftCompensation(builder, driftCompensationOffset); + SettingsResponse.addFiltering(builder, filteringOffset); + SettingsResponse.addSteamVrTrackers(builder, steamVrTrackersOffset); + return SettingsResponse.endSettingsResponse(builder); + } + + public static void startSettingsResponse(FlatBufferBuilder builder) { builder.startTable(10); } + public static void addSteamVrTrackers(FlatBufferBuilder builder, int steamVrTrackersOffset) { builder.addOffset(0, steamVrTrackersOffset, 0); } + public static void addFiltering(FlatBufferBuilder builder, int filteringOffset) { builder.addOffset(1, filteringOffset, 0); } + public static void addDriftCompensation(FlatBufferBuilder builder, int driftCompensationOffset) { builder.addOffset(2, driftCompensationOffset, 0); } + public static void addOscRouter(FlatBufferBuilder builder, int oscRouterOffset) { builder.addOffset(3, oscRouterOffset, 0); } + public static void addVrcOsc(FlatBufferBuilder builder, int vrcOscOffset) { builder.addOffset(4, vrcOscOffset, 0); } + public static void addVmcOsc(FlatBufferBuilder builder, int vmcOscOffset) { builder.addOffset(5, vmcOscOffset, 0); } + public static void addModelSettings(FlatBufferBuilder builder, int modelSettingsOffset) { builder.addOffset(6, modelSettingsOffset, 0); } + public static void addTapDetectionSettings(FlatBufferBuilder builder, int tapDetectionSettingsOffset) { builder.addOffset(7, tapDetectionSettingsOffset, 0); } + public static void addAutoBoneSettings(FlatBufferBuilder builder, int autoBoneSettingsOffset) { builder.addOffset(8, autoBoneSettingsOffset, 0); } + public static void addResetsSettings(FlatBufferBuilder builder, int resetsSettingsOffset) { builder.addOffset(9, resetsSettingsOffset, 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 (driftCompensation() != null) _o.setDriftCompensation(driftCompensation().unpack()); + else _o.setDriftCompensation(null); + if (oscRouter() != null) _o.setOscRouter(oscRouter().unpack()); + else _o.setOscRouter(null); + if (vrcOsc() != null) _o.setVrcOsc(vrcOsc().unpack()); + else _o.setVrcOsc(null); + if (vmcOsc() != null) _o.setVmcOsc(vmcOsc().unpack()); + else _o.setVmcOsc(null); + if (modelSettings() != null) _o.setModelSettings(modelSettings().unpack()); + else _o.setModelSettings(null); + if (tapDetectionSettings() != null) _o.setTapDetectionSettings(tapDetectionSettings().unpack()); + else _o.setTapDetectionSettings(null); + if (autoBoneSettings() != null) _o.setAutoBoneSettings(autoBoneSettings().unpack()); + else _o.setAutoBoneSettings(null); + if (resetsSettings() != null) _o.setResetsSettings(resetsSettings().unpack()); + else _o.setResetsSettings(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 _driftCompensation = _o.getDriftCompensation() == null ? 0 : solarxr_protocol.rpc.DriftCompensationSettings.pack(builder, _o.getDriftCompensation()); + int _oscRouter = _o.getOscRouter() == null ? 0 : solarxr_protocol.rpc.OSCRouterSettings.pack(builder, _o.getOscRouter()); + int _vrcOsc = _o.getVrcOsc() == null ? 0 : solarxr_protocol.rpc.VRCOSCSettings.pack(builder, _o.getVrcOsc()); + int _vmcOsc = _o.getVmcOsc() == null ? 0 : solarxr_protocol.rpc.VMCOSCSettings.pack(builder, _o.getVmcOsc()); + int _modelSettings = _o.getModelSettings() == null ? 0 : solarxr_protocol.rpc.settings.ModelSettings.pack(builder, _o.getModelSettings()); + int _tapDetectionSettings = _o.getTapDetectionSettings() == null ? 0 : solarxr_protocol.rpc.TapDetectionSettings.pack(builder, _o.getTapDetectionSettings()); + int _autoBoneSettings = _o.getAutoBoneSettings() == null ? 0 : solarxr_protocol.rpc.AutoBoneSettings.pack(builder, _o.getAutoBoneSettings()); + int _resetsSettings = _o.getResetsSettings() == null ? 0 : solarxr_protocol.rpc.ResetsSettings.pack(builder, _o.getResetsSettings()); + return createSettingsResponse( + builder, + _steamVrTrackers, + _filtering, + _driftCompensation, + _oscRouter, + _vrcOsc, + _vmcOsc, + _modelSettings, + _tapDetectionSettings, + _autoBoneSettings, + _resetsSettings); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SettingsResponseT.java b/protocol/java/src/solarxr_protocol/rpc/SettingsResponseT.java index 7645145c..ff109b42 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SettingsResponseT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SettingsResponseT.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.*; - -public class SettingsResponseT { - private solarxr_protocol.rpc.SteamVRTrackersSettingT steamVrTrackers; - private solarxr_protocol.rpc.FilteringSettingsT filtering; - private solarxr_protocol.rpc.DriftCompensationSettingsT driftCompensation; - private solarxr_protocol.rpc.OSCRouterSettingsT oscRouter; - private solarxr_protocol.rpc.VRCOSCSettingsT vrcOsc; - private solarxr_protocol.rpc.VMCOSCSettingsT vmcOsc; - private solarxr_protocol.rpc.settings.ModelSettingsT modelSettings; - private solarxr_protocol.rpc.TapDetectionSettingsT tapDetectionSettings; - private solarxr_protocol.rpc.AutoBoneSettingsT autoBoneSettings; - private solarxr_protocol.rpc.ResetsSettingsT resetsSettings; - - 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.DriftCompensationSettingsT getDriftCompensation() { return driftCompensation; } - - public void setDriftCompensation(solarxr_protocol.rpc.DriftCompensationSettingsT driftCompensation) { this.driftCompensation = driftCompensation; } - - public solarxr_protocol.rpc.OSCRouterSettingsT getOscRouter() { return oscRouter; } - - public void setOscRouter(solarxr_protocol.rpc.OSCRouterSettingsT oscRouter) { this.oscRouter = oscRouter; } - - public solarxr_protocol.rpc.VRCOSCSettingsT getVrcOsc() { return vrcOsc; } - - public void setVrcOsc(solarxr_protocol.rpc.VRCOSCSettingsT vrcOsc) { this.vrcOsc = vrcOsc; } - - public solarxr_protocol.rpc.VMCOSCSettingsT getVmcOsc() { return vmcOsc; } - - public void setVmcOsc(solarxr_protocol.rpc.VMCOSCSettingsT vmcOsc) { this.vmcOsc = vmcOsc; } - - public solarxr_protocol.rpc.settings.ModelSettingsT getModelSettings() { return modelSettings; } - - public void setModelSettings(solarxr_protocol.rpc.settings.ModelSettingsT modelSettings) { this.modelSettings = modelSettings; } - - public solarxr_protocol.rpc.TapDetectionSettingsT getTapDetectionSettings() { return tapDetectionSettings; } - - public void setTapDetectionSettings(solarxr_protocol.rpc.TapDetectionSettingsT tapDetectionSettings) { this.tapDetectionSettings = tapDetectionSettings; } - - public solarxr_protocol.rpc.AutoBoneSettingsT getAutoBoneSettings() { return autoBoneSettings; } - - public void setAutoBoneSettings(solarxr_protocol.rpc.AutoBoneSettingsT autoBoneSettings) { this.autoBoneSettings = autoBoneSettings; } - - public solarxr_protocol.rpc.ResetsSettingsT getResetsSettings() { return resetsSettings; } - - public void setResetsSettings(solarxr_protocol.rpc.ResetsSettingsT resetsSettings) { this.resetsSettings = resetsSettings; } - - - public SettingsResponseT() { - this.steamVrTrackers = null; - this.filtering = null; - this.driftCompensation = null; - this.oscRouter = null; - this.vrcOsc = null; - this.vmcOsc = null; - this.modelSettings = null; - this.tapDetectionSettings = null; - this.autoBoneSettings = null; - this.resetsSettings = 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.DriftCompensationSettingsT driftCompensation; + private solarxr_protocol.rpc.OSCRouterSettingsT oscRouter; + private solarxr_protocol.rpc.VRCOSCSettingsT vrcOsc; + private solarxr_protocol.rpc.VMCOSCSettingsT vmcOsc; + private solarxr_protocol.rpc.settings.ModelSettingsT modelSettings; + private solarxr_protocol.rpc.TapDetectionSettingsT tapDetectionSettings; + private solarxr_protocol.rpc.AutoBoneSettingsT autoBoneSettings; + private solarxr_protocol.rpc.ResetsSettingsT resetsSettings; + + 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.DriftCompensationSettingsT getDriftCompensation() { return driftCompensation; } + + public void setDriftCompensation(solarxr_protocol.rpc.DriftCompensationSettingsT driftCompensation) { this.driftCompensation = driftCompensation; } + + public solarxr_protocol.rpc.OSCRouterSettingsT getOscRouter() { return oscRouter; } + + public void setOscRouter(solarxr_protocol.rpc.OSCRouterSettingsT oscRouter) { this.oscRouter = oscRouter; } + + public solarxr_protocol.rpc.VRCOSCSettingsT getVrcOsc() { return vrcOsc; } + + public void setVrcOsc(solarxr_protocol.rpc.VRCOSCSettingsT vrcOsc) { this.vrcOsc = vrcOsc; } + + public solarxr_protocol.rpc.VMCOSCSettingsT getVmcOsc() { return vmcOsc; } + + public void setVmcOsc(solarxr_protocol.rpc.VMCOSCSettingsT vmcOsc) { this.vmcOsc = vmcOsc; } + + public solarxr_protocol.rpc.settings.ModelSettingsT getModelSettings() { return modelSettings; } + + public void setModelSettings(solarxr_protocol.rpc.settings.ModelSettingsT modelSettings) { this.modelSettings = modelSettings; } + + public solarxr_protocol.rpc.TapDetectionSettingsT getTapDetectionSettings() { return tapDetectionSettings; } + + public void setTapDetectionSettings(solarxr_protocol.rpc.TapDetectionSettingsT tapDetectionSettings) { this.tapDetectionSettings = tapDetectionSettings; } + + public solarxr_protocol.rpc.AutoBoneSettingsT getAutoBoneSettings() { return autoBoneSettings; } + + public void setAutoBoneSettings(solarxr_protocol.rpc.AutoBoneSettingsT autoBoneSettings) { this.autoBoneSettings = autoBoneSettings; } + + public solarxr_protocol.rpc.ResetsSettingsT getResetsSettings() { return resetsSettings; } + + public void setResetsSettings(solarxr_protocol.rpc.ResetsSettingsT resetsSettings) { this.resetsSettings = resetsSettings; } + + + public SettingsResponseT() { + this.steamVrTrackers = null; + this.filtering = null; + this.driftCompensation = null; + this.oscRouter = null; + this.vrcOsc = null; + this.vmcOsc = null; + this.modelSettings = null; + this.tapDetectionSettings = null; + this.autoBoneSettings = null; + this.resetsSettings = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SkeletonBone.java b/protocol/java/src/solarxr_protocol/rpc/SkeletonBone.java index 8748a06b..0ffe49a7 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SkeletonBone.java +++ b/protocol/java/src/solarxr_protocol/rpc/SkeletonBone.java @@ -1,35 +1,35 @@ -// 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 CHEST = 3; - public static final int CHEST_OFFSET = 4; - public static final int WAIST = 5; - public static final int HIP = 6; - public static final int HIP_OFFSET = 7; - public static final int HIPS_WIDTH = 8; - public static final int UPPER_LEG = 9; - public static final int LOWER_LEG = 10; - public static final int FOOT_LENGTH = 11; - public static final int FOOT_SHIFT = 12; - public static final int SKELETON_OFFSET = 13; - public static final int SHOULDERS_DISTANCE = 14; - public static final int SHOULDERS_WIDTH = 15; - public static final int UPPER_ARM = 16; - public static final int LOWER_ARM = 17; - public static final int HAND_Y = 18; - public static final int HAND_Z = 19; - public static final int ELBOW_OFFSET = 20; - public static final int UPPER_CHEST = 21; - - public static final String[] names = { "NONE", "HEAD", "NECK", "CHEST", "CHEST_OFFSET", "WAIST", "HIP", "HIP_OFFSET", "HIPS_WIDTH", "UPPER_LEG", "LOWER_LEG", "FOOT_LENGTH", "FOOT_SHIFT", "SKELETON_OFFSET", "SHOULDERS_DISTANCE", "SHOULDERS_WIDTH", "UPPER_ARM", "LOWER_ARM", "HAND_Y", "HAND_Z", "ELBOW_OFFSET", "UPPER_CHEST", }; - - 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 CHEST = 3; + public static final int CHEST_OFFSET = 4; + public static final int WAIST = 5; + public static final int HIP = 6; + public static final int HIP_OFFSET = 7; + public static final int HIPS_WIDTH = 8; + public static final int UPPER_LEG = 9; + public static final int LOWER_LEG = 10; + public static final int FOOT_LENGTH = 11; + public static final int FOOT_SHIFT = 12; + public static final int SKELETON_OFFSET = 13; + public static final int SHOULDERS_DISTANCE = 14; + public static final int SHOULDERS_WIDTH = 15; + public static final int UPPER_ARM = 16; + public static final int LOWER_ARM = 17; + public static final int HAND_Y = 18; + public static final int HAND_Z = 19; + public static final int ELBOW_OFFSET = 20; + public static final int UPPER_CHEST = 21; + + public static final String[] names = { "NONE", "HEAD", "NECK", "CHEST", "CHEST_OFFSET", "WAIST", "HIP", "HIP_OFFSET", "HIPS_WIDTH", "UPPER_LEG", "LOWER_LEG", "FOOT_LENGTH", "FOOT_SHIFT", "SKELETON_OFFSET", "SHOULDERS_DISTANCE", "SHOULDERS_WIDTH", "UPPER_ARM", "LOWER_ARM", "HAND_Y", "HAND_Z", "ELBOW_OFFSET", "UPPER_CHEST", }; + + 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 bb11300e..5e882914 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_22_10_26(); } - 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_22_10_26(); } + 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 2ea638d6..4ea8fc95 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 ac7c8b31..38ec824e 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_22_10_26(); } - 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_22_10_26(); } + 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 4b98c43d..ca53bcbd 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 52abf593..891043b9 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_22_10_26(); } - 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_22_10_26(); } + 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 ff888802..69d2aacf 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 c81e6192..cad9eba5 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_22_10_26(); } - 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_22_10_26(); } + 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 d79a638a..9d2b4334 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/StartWifiProvisioningRequest.java b/protocol/java/src/solarxr_protocol/rpc/StartWifiProvisioningRequest.java index 38974d0c..4c29c524 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StartWifiProvisioningRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/StartWifiProvisioningRequest.java @@ -1,79 +1,79 @@ -// 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 StartWifiProvisioningRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static StartWifiProvisioningRequest getRootAsStartWifiProvisioningRequest(ByteBuffer _bb) { return getRootAsStartWifiProvisioningRequest(_bb, new StartWifiProvisioningRequest()); } - public static StartWifiProvisioningRequest getRootAsStartWifiProvisioningRequest(ByteBuffer _bb, StartWifiProvisioningRequest 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 StartWifiProvisioningRequest __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 String port() { int o = __offset(8); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer portAsByteBuffer() { return __vector_as_bytebuffer(8, 1); } - public ByteBuffer portInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 8, 1); } - - public static int createStartWifiProvisioningRequest(FlatBufferBuilder builder, - int ssidOffset, - int passwordOffset, - int portOffset) { - builder.startTable(3); - StartWifiProvisioningRequest.addPort(builder, portOffset); - StartWifiProvisioningRequest.addPassword(builder, passwordOffset); - StartWifiProvisioningRequest.addSsid(builder, ssidOffset); - return StartWifiProvisioningRequest.endStartWifiProvisioningRequest(builder); - } - - public static void startStartWifiProvisioningRequest(FlatBufferBuilder builder) { builder.startTable(3); } - 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 void addPort(FlatBufferBuilder builder, int portOffset) { builder.addOffset(2, portOffset, 0); } - public static int endStartWifiProvisioningRequest(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 StartWifiProvisioningRequest get(int j) { return get(new StartWifiProvisioningRequest(), j); } - public StartWifiProvisioningRequest get(StartWifiProvisioningRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public StartWifiProvisioningRequestT unpack() { - StartWifiProvisioningRequestT _o = new StartWifiProvisioningRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(StartWifiProvisioningRequestT _o) { - String _oSsid = ssid(); - _o.setSsid(_oSsid); - String _oPassword = password(); - _o.setPassword(_oPassword); - String _oPort = port(); - _o.setPort(_oPort); - } - public static int pack(FlatBufferBuilder builder, StartWifiProvisioningRequestT _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()); - int _port = _o.getPort() == null ? 0 : builder.createString(_o.getPort()); - return createStartWifiProvisioningRequest( - builder, - _ssid, - _password, - _port); - } -} - +// 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 StartWifiProvisioningRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static StartWifiProvisioningRequest getRootAsStartWifiProvisioningRequest(ByteBuffer _bb) { return getRootAsStartWifiProvisioningRequest(_bb, new StartWifiProvisioningRequest()); } + public static StartWifiProvisioningRequest getRootAsStartWifiProvisioningRequest(ByteBuffer _bb, StartWifiProvisioningRequest 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 StartWifiProvisioningRequest __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 String port() { int o = __offset(8); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer portAsByteBuffer() { return __vector_as_bytebuffer(8, 1); } + public ByteBuffer portInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 8, 1); } + + public static int createStartWifiProvisioningRequest(FlatBufferBuilder builder, + int ssidOffset, + int passwordOffset, + int portOffset) { + builder.startTable(3); + StartWifiProvisioningRequest.addPort(builder, portOffset); + StartWifiProvisioningRequest.addPassword(builder, passwordOffset); + StartWifiProvisioningRequest.addSsid(builder, ssidOffset); + return StartWifiProvisioningRequest.endStartWifiProvisioningRequest(builder); + } + + public static void startStartWifiProvisioningRequest(FlatBufferBuilder builder) { builder.startTable(3); } + 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 void addPort(FlatBufferBuilder builder, int portOffset) { builder.addOffset(2, portOffset, 0); } + public static int endStartWifiProvisioningRequest(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 StartWifiProvisioningRequest get(int j) { return get(new StartWifiProvisioningRequest(), j); } + public StartWifiProvisioningRequest get(StartWifiProvisioningRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public StartWifiProvisioningRequestT unpack() { + StartWifiProvisioningRequestT _o = new StartWifiProvisioningRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(StartWifiProvisioningRequestT _o) { + String _oSsid = ssid(); + _o.setSsid(_oSsid); + String _oPassword = password(); + _o.setPassword(_oPassword); + String _oPort = port(); + _o.setPort(_oPort); + } + public static int pack(FlatBufferBuilder builder, StartWifiProvisioningRequestT _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()); + int _port = _o.getPort() == null ? 0 : builder.createString(_o.getPort()); + return createStartWifiProvisioningRequest( + builder, + _ssid, + _password, + _port); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StartWifiProvisioningRequestT.java b/protocol/java/src/solarxr_protocol/rpc/StartWifiProvisioningRequestT.java index 941a6aeb..9a091ce9 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StartWifiProvisioningRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/StartWifiProvisioningRequestT.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 StartWifiProvisioningRequestT { - private String ssid; - private String password; - private String port; - - 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 String getPort() { return port; } - - public void setPort(String port) { this.port = port; } - - - public StartWifiProvisioningRequestT() { - this.ssid = null; - this.password = null; - this.port = 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 StartWifiProvisioningRequestT { + private String ssid; + private String password; + private String port; + + 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 String getPort() { return port; } + + public void setPort(String port) { this.port = port; } + + + public StartWifiProvisioningRequestT() { + this.ssid = null; + this.password = null; + this.port = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StatusData.java b/protocol/java/src/solarxr_protocol/rpc/StatusData.java index 624110c9..15d1abcc 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StatusData.java +++ b/protocol/java/src/solarxr_protocol/rpc/StatusData.java @@ -1,18 +1,18 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -@SuppressWarnings("unused") -public final class StatusData { - private StatusData() { } - public static final byte NONE = 0; - public static final byte StatusTrackerReset = 1; - public static final byte StatusTrackerError = 2; - public static final byte StatusSteamVRDisconnected = 3; - public static final byte StatusUnassignedHMD = 4; - - public static final String[] names = { "NONE", "StatusTrackerReset", "StatusTrackerError", "StatusSteamVRDisconnected", "StatusUnassignedHMD", }; - - 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 StatusData { + private StatusData() { } + public static final byte NONE = 0; + public static final byte StatusTrackerReset = 1; + public static final byte StatusTrackerError = 2; + public static final byte StatusSteamVRDisconnected = 3; + public static final byte StatusUnassignedHMD = 4; + + public static final String[] names = { "NONE", "StatusTrackerReset", "StatusTrackerError", "StatusSteamVRDisconnected", "StatusUnassignedHMD", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StatusDataUnion.java b/protocol/java/src/solarxr_protocol/rpc/StatusDataUnion.java index 506040e7..3fbe772a 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StatusDataUnion.java +++ b/protocol/java/src/solarxr_protocol/rpc/StatusDataUnion.java @@ -1,39 +1,39 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -import com.google.flatbuffers.FlatBufferBuilder; - -public class StatusDataUnion { - 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 StatusDataUnion() { - this.type = StatusData.NONE; - this.value = null; - } - - public solarxr_protocol.rpc.StatusTrackerResetT asStatusTrackerReset() { return (solarxr_protocol.rpc.StatusTrackerResetT) value; } - public solarxr_protocol.rpc.StatusTrackerErrorT asStatusTrackerError() { return (solarxr_protocol.rpc.StatusTrackerErrorT) value; } - public solarxr_protocol.rpc.StatusSteamVRDisconnectedT asStatusSteamVRDisconnected() { return (solarxr_protocol.rpc.StatusSteamVRDisconnectedT) value; } - public solarxr_protocol.rpc.StatusUnassignedHMDT asStatusUnassignedHMD() { return (solarxr_protocol.rpc.StatusUnassignedHMDT) value; } - - public static int pack(FlatBufferBuilder builder, StatusDataUnion _o) { - switch (_o.type) { - case StatusData.StatusTrackerReset: return solarxr_protocol.rpc.StatusTrackerReset.pack(builder, _o.asStatusTrackerReset()); - case StatusData.StatusTrackerError: return solarxr_protocol.rpc.StatusTrackerError.pack(builder, _o.asStatusTrackerError()); - case StatusData.StatusSteamVRDisconnected: return solarxr_protocol.rpc.StatusSteamVRDisconnected.pack(builder, _o.asStatusSteamVRDisconnected()); - case StatusData.StatusUnassignedHMD: return solarxr_protocol.rpc.StatusUnassignedHMD.pack(builder, _o.asStatusUnassignedHMD()); - default: return 0; - } - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import com.google.flatbuffers.FlatBufferBuilder; + +public class StatusDataUnion { + 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 StatusDataUnion() { + this.type = StatusData.NONE; + this.value = null; + } + + public solarxr_protocol.rpc.StatusTrackerResetT asStatusTrackerReset() { return (solarxr_protocol.rpc.StatusTrackerResetT) value; } + public solarxr_protocol.rpc.StatusTrackerErrorT asStatusTrackerError() { return (solarxr_protocol.rpc.StatusTrackerErrorT) value; } + public solarxr_protocol.rpc.StatusSteamVRDisconnectedT asStatusSteamVRDisconnected() { return (solarxr_protocol.rpc.StatusSteamVRDisconnectedT) value; } + public solarxr_protocol.rpc.StatusUnassignedHMDT asStatusUnassignedHMD() { return (solarxr_protocol.rpc.StatusUnassignedHMDT) value; } + + public static int pack(FlatBufferBuilder builder, StatusDataUnion _o) { + switch (_o.type) { + case StatusData.StatusTrackerReset: return solarxr_protocol.rpc.StatusTrackerReset.pack(builder, _o.asStatusTrackerReset()); + case StatusData.StatusTrackerError: return solarxr_protocol.rpc.StatusTrackerError.pack(builder, _o.asStatusTrackerError()); + case StatusData.StatusSteamVRDisconnected: return solarxr_protocol.rpc.StatusSteamVRDisconnected.pack(builder, _o.asStatusSteamVRDisconnected()); + case StatusData.StatusUnassignedHMD: return solarxr_protocol.rpc.StatusUnassignedHMD.pack(builder, _o.asStatusUnassignedHMD()); + default: return 0; + } + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StatusMessage.java b/protocol/java/src/solarxr_protocol/rpc/StatusMessage.java index 3337e3e7..fed8094a 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StatusMessage.java +++ b/protocol/java/src/solarxr_protocol/rpc/StatusMessage.java @@ -1,109 +1,109 @@ -// 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.*; - -/** - * An status is some kind of warning sent by the server, it's mainly made for - * showing problems with the server and need attention from the user. - */ -@SuppressWarnings("unused") -public final class StatusMessage extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static StatusMessage getRootAsStatusMessage(ByteBuffer _bb) { return getRootAsStatusMessage(_bb, new StatusMessage()); } - public static StatusMessage getRootAsStatusMessage(ByteBuffer _bb, StatusMessage 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 StatusMessage __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - /** - * The status ID - */ - public long id() { int o = __offset(4); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } - /** - * This should be prioritized in the GUI in some way if true - */ - public boolean prioritized() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public byte dataType() { int o = __offset(8); return o != 0 ? bb.get(o + bb_pos) : 0; } - public Table data(Table obj) { int o = __offset(10); return o != 0 ? __union(obj, o + bb_pos) : null; } - - public static int createStatusMessage(FlatBufferBuilder builder, - long id, - boolean prioritized, - byte dataType, - int dataOffset) { - builder.startTable(4); - StatusMessage.addData(builder, dataOffset); - StatusMessage.addId(builder, id); - StatusMessage.addDataType(builder, dataType); - StatusMessage.addPrioritized(builder, prioritized); - return StatusMessage.endStatusMessage(builder); - } - - public static void startStatusMessage(FlatBufferBuilder builder) { builder.startTable(4); } - public static void addId(FlatBufferBuilder builder, long id) { builder.addInt(0, (int) id, (int) 0L); } - public static void addPrioritized(FlatBufferBuilder builder, boolean prioritized) { builder.addBoolean(1, prioritized, false); } - public static void addDataType(FlatBufferBuilder builder, byte dataType) { builder.addByte(2, dataType, 0); } - public static void addData(FlatBufferBuilder builder, int dataOffset) { builder.addOffset(3, dataOffset, 0); } - public static int endStatusMessage(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 StatusMessage get(int j) { return get(new StatusMessage(), j); } - public StatusMessage get(StatusMessage obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public StatusMessageT unpack() { - StatusMessageT _o = new StatusMessageT(); - unpackTo(_o); - return _o; - } - public void unpackTo(StatusMessageT _o) { - long _oId = id(); - _o.setId(_oId); - boolean _oPrioritized = prioritized(); - _o.setPrioritized(_oPrioritized); - solarxr_protocol.rpc.StatusDataUnion _oData = new solarxr_protocol.rpc.StatusDataUnion(); - byte _oDataType = dataType(); - _oData.setType(_oDataType); - Table _oDataValue; - switch (_oDataType) { - case solarxr_protocol.rpc.StatusData.StatusTrackerReset: - _oDataValue = data(new solarxr_protocol.rpc.StatusTrackerReset()); - _oData.setValue(_oDataValue != null ? ((solarxr_protocol.rpc.StatusTrackerReset) _oDataValue).unpack() : null); - break; - case solarxr_protocol.rpc.StatusData.StatusTrackerError: - _oDataValue = data(new solarxr_protocol.rpc.StatusTrackerError()); - _oData.setValue(_oDataValue != null ? ((solarxr_protocol.rpc.StatusTrackerError) _oDataValue).unpack() : null); - break; - case solarxr_protocol.rpc.StatusData.StatusSteamVRDisconnected: - _oDataValue = data(new solarxr_protocol.rpc.StatusSteamVRDisconnected()); - _oData.setValue(_oDataValue != null ? ((solarxr_protocol.rpc.StatusSteamVRDisconnected) _oDataValue).unpack() : null); - break; - case solarxr_protocol.rpc.StatusData.StatusUnassignedHMD: - _oDataValue = data(new solarxr_protocol.rpc.StatusUnassignedHMD()); - _oData.setValue(_oDataValue != null ? ((solarxr_protocol.rpc.StatusUnassignedHMD) _oDataValue).unpack() : null); - break; - default: break; - } - _o.setData(_oData); - } - public static int pack(FlatBufferBuilder builder, StatusMessageT _o) { - if (_o == null) return 0; - byte _dataType = _o.getData() == null ? solarxr_protocol.rpc.StatusData.NONE : _o.getData().getType(); - int _data = _o.getData() == null ? 0 : solarxr_protocol.rpc.StatusDataUnion.pack(builder, _o.getData()); - return createStatusMessage( - builder, - _o.getId(), - _o.getPrioritized(), - _dataType, - _data); - } -} - +// 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.*; + +/** + * An status is some kind of warning sent by the server, it's mainly made for + * showing problems with the server and need attention from the user. + */ +@SuppressWarnings("unused") +public final class StatusMessage extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static StatusMessage getRootAsStatusMessage(ByteBuffer _bb) { return getRootAsStatusMessage(_bb, new StatusMessage()); } + public static StatusMessage getRootAsStatusMessage(ByteBuffer _bb, StatusMessage 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 StatusMessage __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * The status ID + */ + public long id() { int o = __offset(4); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } + /** + * This should be prioritized in the GUI in some way if true + */ + public boolean prioritized() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public byte dataType() { int o = __offset(8); return o != 0 ? bb.get(o + bb_pos) : 0; } + public Table data(Table obj) { int o = __offset(10); return o != 0 ? __union(obj, o + bb_pos) : null; } + + public static int createStatusMessage(FlatBufferBuilder builder, + long id, + boolean prioritized, + byte dataType, + int dataOffset) { + builder.startTable(4); + StatusMessage.addData(builder, dataOffset); + StatusMessage.addId(builder, id); + StatusMessage.addDataType(builder, dataType); + StatusMessage.addPrioritized(builder, prioritized); + return StatusMessage.endStatusMessage(builder); + } + + public static void startStatusMessage(FlatBufferBuilder builder) { builder.startTable(4); } + public static void addId(FlatBufferBuilder builder, long id) { builder.addInt(0, (int) id, (int) 0L); } + public static void addPrioritized(FlatBufferBuilder builder, boolean prioritized) { builder.addBoolean(1, prioritized, false); } + public static void addDataType(FlatBufferBuilder builder, byte dataType) { builder.addByte(2, dataType, 0); } + public static void addData(FlatBufferBuilder builder, int dataOffset) { builder.addOffset(3, dataOffset, 0); } + public static int endStatusMessage(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 StatusMessage get(int j) { return get(new StatusMessage(), j); } + public StatusMessage get(StatusMessage obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public StatusMessageT unpack() { + StatusMessageT _o = new StatusMessageT(); + unpackTo(_o); + return _o; + } + public void unpackTo(StatusMessageT _o) { + long _oId = id(); + _o.setId(_oId); + boolean _oPrioritized = prioritized(); + _o.setPrioritized(_oPrioritized); + solarxr_protocol.rpc.StatusDataUnion _oData = new solarxr_protocol.rpc.StatusDataUnion(); + byte _oDataType = dataType(); + _oData.setType(_oDataType); + Table _oDataValue; + switch (_oDataType) { + case solarxr_protocol.rpc.StatusData.StatusTrackerReset: + _oDataValue = data(new solarxr_protocol.rpc.StatusTrackerReset()); + _oData.setValue(_oDataValue != null ? ((solarxr_protocol.rpc.StatusTrackerReset) _oDataValue).unpack() : null); + break; + case solarxr_protocol.rpc.StatusData.StatusTrackerError: + _oDataValue = data(new solarxr_protocol.rpc.StatusTrackerError()); + _oData.setValue(_oDataValue != null ? ((solarxr_protocol.rpc.StatusTrackerError) _oDataValue).unpack() : null); + break; + case solarxr_protocol.rpc.StatusData.StatusSteamVRDisconnected: + _oDataValue = data(new solarxr_protocol.rpc.StatusSteamVRDisconnected()); + _oData.setValue(_oDataValue != null ? ((solarxr_protocol.rpc.StatusSteamVRDisconnected) _oDataValue).unpack() : null); + break; + case solarxr_protocol.rpc.StatusData.StatusUnassignedHMD: + _oDataValue = data(new solarxr_protocol.rpc.StatusUnassignedHMD()); + _oData.setValue(_oDataValue != null ? ((solarxr_protocol.rpc.StatusUnassignedHMD) _oDataValue).unpack() : null); + break; + default: break; + } + _o.setData(_oData); + } + public static int pack(FlatBufferBuilder builder, StatusMessageT _o) { + if (_o == null) return 0; + byte _dataType = _o.getData() == null ? solarxr_protocol.rpc.StatusData.NONE : _o.getData().getType(); + int _data = _o.getData() == null ? 0 : solarxr_protocol.rpc.StatusDataUnion.pack(builder, _o.getData()); + return createStatusMessage( + builder, + _o.getId(), + _o.getPrioritized(), + _dataType, + _data); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StatusMessageT.java b/protocol/java/src/solarxr_protocol/rpc/StatusMessageT.java index 5d2aa215..fe491d45 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StatusMessageT.java +++ b/protocol/java/src/solarxr_protocol/rpc/StatusMessageT.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 StatusMessageT { - private long id; - private boolean prioritized; - private solarxr_protocol.rpc.StatusDataUnion data; - - public long getId() { return id; } - - public void setId(long id) { this.id = id; } - - public boolean getPrioritized() { return prioritized; } - - public void setPrioritized(boolean prioritized) { this.prioritized = prioritized; } - - public solarxr_protocol.rpc.StatusDataUnion getData() { return data; } - - public void setData(solarxr_protocol.rpc.StatusDataUnion data) { this.data = data; } - - - public StatusMessageT() { - this.id = 0L; - this.prioritized = false; - this.data = 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 StatusMessageT { + private long id; + private boolean prioritized; + private solarxr_protocol.rpc.StatusDataUnion data; + + public long getId() { return id; } + + public void setId(long id) { this.id = id; } + + public boolean getPrioritized() { return prioritized; } + + public void setPrioritized(boolean prioritized) { this.prioritized = prioritized; } + + public solarxr_protocol.rpc.StatusDataUnion getData() { return data; } + + public void setData(solarxr_protocol.rpc.StatusDataUnion data) { this.data = data; } + + + public StatusMessageT() { + this.id = 0L; + this.prioritized = false; + this.data = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StatusSteamVRDisconnected.java b/protocol/java/src/solarxr_protocol/rpc/StatusSteamVRDisconnected.java index 51f65a63..f3f0a3e8 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StatusSteamVRDisconnected.java +++ b/protocol/java/src/solarxr_protocol/rpc/StatusSteamVRDisconnected.java @@ -1,65 +1,65 @@ -// 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.*; - -/** - * SteamVR bridge is disconnected - */ -@SuppressWarnings("unused") -public final class StatusSteamVRDisconnected extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static StatusSteamVRDisconnected getRootAsStatusSteamVRDisconnected(ByteBuffer _bb) { return getRootAsStatusSteamVRDisconnected(_bb, new StatusSteamVRDisconnected()); } - public static StatusSteamVRDisconnected getRootAsStatusSteamVRDisconnected(ByteBuffer _bb, StatusSteamVRDisconnected 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 StatusSteamVRDisconnected __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - /** - * Name of bridge in the server's config - */ - public String bridgeSettingsName() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer bridgeSettingsNameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } - public ByteBuffer bridgeSettingsNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } - - public static int createStatusSteamVRDisconnected(FlatBufferBuilder builder, - int bridgeSettingsNameOffset) { - builder.startTable(1); - StatusSteamVRDisconnected.addBridgeSettingsName(builder, bridgeSettingsNameOffset); - return StatusSteamVRDisconnected.endStatusSteamVRDisconnected(builder); - } - - public static void startStatusSteamVRDisconnected(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addBridgeSettingsName(FlatBufferBuilder builder, int bridgeSettingsNameOffset) { builder.addOffset(0, bridgeSettingsNameOffset, 0); } - public static int endStatusSteamVRDisconnected(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 StatusSteamVRDisconnected get(int j) { return get(new StatusSteamVRDisconnected(), j); } - public StatusSteamVRDisconnected get(StatusSteamVRDisconnected obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public StatusSteamVRDisconnectedT unpack() { - StatusSteamVRDisconnectedT _o = new StatusSteamVRDisconnectedT(); - unpackTo(_o); - return _o; - } - public void unpackTo(StatusSteamVRDisconnectedT _o) { - String _oBridgeSettingsName = bridgeSettingsName(); - _o.setBridgeSettingsName(_oBridgeSettingsName); - } - public static int pack(FlatBufferBuilder builder, StatusSteamVRDisconnectedT _o) { - if (_o == null) return 0; - int _bridgeSettingsName = _o.getBridgeSettingsName() == null ? 0 : builder.createString(_o.getBridgeSettingsName()); - return createStatusSteamVRDisconnected( - builder, - _bridgeSettingsName); - } -} - +// 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.*; + +/** + * SteamVR bridge is disconnected + */ +@SuppressWarnings("unused") +public final class StatusSteamVRDisconnected extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static StatusSteamVRDisconnected getRootAsStatusSteamVRDisconnected(ByteBuffer _bb) { return getRootAsStatusSteamVRDisconnected(_bb, new StatusSteamVRDisconnected()); } + public static StatusSteamVRDisconnected getRootAsStatusSteamVRDisconnected(ByteBuffer _bb, StatusSteamVRDisconnected 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 StatusSteamVRDisconnected __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * Name of bridge in the server's config + */ + public String bridgeSettingsName() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer bridgeSettingsNameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer bridgeSettingsNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + + public static int createStatusSteamVRDisconnected(FlatBufferBuilder builder, + int bridgeSettingsNameOffset) { + builder.startTable(1); + StatusSteamVRDisconnected.addBridgeSettingsName(builder, bridgeSettingsNameOffset); + return StatusSteamVRDisconnected.endStatusSteamVRDisconnected(builder); + } + + public static void startStatusSteamVRDisconnected(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addBridgeSettingsName(FlatBufferBuilder builder, int bridgeSettingsNameOffset) { builder.addOffset(0, bridgeSettingsNameOffset, 0); } + public static int endStatusSteamVRDisconnected(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 StatusSteamVRDisconnected get(int j) { return get(new StatusSteamVRDisconnected(), j); } + public StatusSteamVRDisconnected get(StatusSteamVRDisconnected obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public StatusSteamVRDisconnectedT unpack() { + StatusSteamVRDisconnectedT _o = new StatusSteamVRDisconnectedT(); + unpackTo(_o); + return _o; + } + public void unpackTo(StatusSteamVRDisconnectedT _o) { + String _oBridgeSettingsName = bridgeSettingsName(); + _o.setBridgeSettingsName(_oBridgeSettingsName); + } + public static int pack(FlatBufferBuilder builder, StatusSteamVRDisconnectedT _o) { + if (_o == null) return 0; + int _bridgeSettingsName = _o.getBridgeSettingsName() == null ? 0 : builder.createString(_o.getBridgeSettingsName()); + return createStatusSteamVRDisconnected( + builder, + _bridgeSettingsName); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StatusSteamVRDisconnectedT.java b/protocol/java/src/solarxr_protocol/rpc/StatusSteamVRDisconnectedT.java index f6db5871..c57e5fc4 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StatusSteamVRDisconnectedT.java +++ b/protocol/java/src/solarxr_protocol/rpc/StatusSteamVRDisconnectedT.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 StatusSteamVRDisconnectedT { - private String bridgeSettingsName; - - public String getBridgeSettingsName() { return bridgeSettingsName; } - - public void setBridgeSettingsName(String bridgeSettingsName) { this.bridgeSettingsName = bridgeSettingsName; } - - - public StatusSteamVRDisconnectedT() { - this.bridgeSettingsName = 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 StatusSteamVRDisconnectedT { + private String bridgeSettingsName; + + public String getBridgeSettingsName() { return bridgeSettingsName; } + + public void setBridgeSettingsName(String bridgeSettingsName) { this.bridgeSettingsName = bridgeSettingsName; } + + + public StatusSteamVRDisconnectedT() { + this.bridgeSettingsName = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StatusSystemFixed.java b/protocol/java/src/solarxr_protocol/rpc/StatusSystemFixed.java index 7ada2e10..247e06bf 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StatusSystemFixed.java +++ b/protocol/java/src/solarxr_protocol/rpc/StatusSystemFixed.java @@ -1,59 +1,59 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * When an status is fixed and it's removed, it's ID is sent - */ -@SuppressWarnings("unused") -public final class StatusSystemFixed extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static StatusSystemFixed getRootAsStatusSystemFixed(ByteBuffer _bb) { return getRootAsStatusSystemFixed(_bb, new StatusSystemFixed()); } - public static StatusSystemFixed getRootAsStatusSystemFixed(ByteBuffer _bb, StatusSystemFixed 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 StatusSystemFixed __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public long fixedStatusId() { int o = __offset(4); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } - - public static int createStatusSystemFixed(FlatBufferBuilder builder, - long fixedStatusId) { - builder.startTable(1); - StatusSystemFixed.addFixedStatusId(builder, fixedStatusId); - return StatusSystemFixed.endStatusSystemFixed(builder); - } - - public static void startStatusSystemFixed(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addFixedStatusId(FlatBufferBuilder builder, long fixedStatusId) { builder.addInt(0, (int) fixedStatusId, (int) 0L); } - public static int endStatusSystemFixed(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 StatusSystemFixed get(int j) { return get(new StatusSystemFixed(), j); } - public StatusSystemFixed get(StatusSystemFixed obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public StatusSystemFixedT unpack() { - StatusSystemFixedT _o = new StatusSystemFixedT(); - unpackTo(_o); - return _o; - } - public void unpackTo(StatusSystemFixedT _o) { - long _oFixedStatusId = fixedStatusId(); - _o.setFixedStatusId(_oFixedStatusId); - } - public static int pack(FlatBufferBuilder builder, StatusSystemFixedT _o) { - if (_o == null) return 0; - return createStatusSystemFixed( - builder, - _o.getFixedStatusId()); - } -} - +// 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.*; + +/** + * When an status is fixed and it's removed, it's ID is sent + */ +@SuppressWarnings("unused") +public final class StatusSystemFixed extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static StatusSystemFixed getRootAsStatusSystemFixed(ByteBuffer _bb) { return getRootAsStatusSystemFixed(_bb, new StatusSystemFixed()); } + public static StatusSystemFixed getRootAsStatusSystemFixed(ByteBuffer _bb, StatusSystemFixed 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 StatusSystemFixed __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long fixedStatusId() { int o = __offset(4); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } + + public static int createStatusSystemFixed(FlatBufferBuilder builder, + long fixedStatusId) { + builder.startTable(1); + StatusSystemFixed.addFixedStatusId(builder, fixedStatusId); + return StatusSystemFixed.endStatusSystemFixed(builder); + } + + public static void startStatusSystemFixed(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addFixedStatusId(FlatBufferBuilder builder, long fixedStatusId) { builder.addInt(0, (int) fixedStatusId, (int) 0L); } + public static int endStatusSystemFixed(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 StatusSystemFixed get(int j) { return get(new StatusSystemFixed(), j); } + public StatusSystemFixed get(StatusSystemFixed obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public StatusSystemFixedT unpack() { + StatusSystemFixedT _o = new StatusSystemFixedT(); + unpackTo(_o); + return _o; + } + public void unpackTo(StatusSystemFixedT _o) { + long _oFixedStatusId = fixedStatusId(); + _o.setFixedStatusId(_oFixedStatusId); + } + public static int pack(FlatBufferBuilder builder, StatusSystemFixedT _o) { + if (_o == null) return 0; + return createStatusSystemFixed( + builder, + _o.getFixedStatusId()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StatusSystemFixedT.java b/protocol/java/src/solarxr_protocol/rpc/StatusSystemFixedT.java index fe781195..01f77f47 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StatusSystemFixedT.java +++ b/protocol/java/src/solarxr_protocol/rpc/StatusSystemFixedT.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 StatusSystemFixedT { - private long fixedStatusId; - - public long getFixedStatusId() { return fixedStatusId; } - - public void setFixedStatusId(long fixedStatusId) { this.fixedStatusId = fixedStatusId; } - - - public StatusSystemFixedT() { - this.fixedStatusId = 0L; - } -} - +// 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 StatusSystemFixedT { + private long fixedStatusId; + + public long getFixedStatusId() { return fixedStatusId; } + + public void setFixedStatusId(long fixedStatusId) { this.fixedStatusId = fixedStatusId; } + + + public StatusSystemFixedT() { + this.fixedStatusId = 0L; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StatusSystemRequest.java b/protocol/java/src/solarxr_protocol/rpc/StatusSystemRequest.java index c2ba5121..961a895a 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StatusSystemRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/StatusSystemRequest.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.*; - -/** - * Request current statuses that we have - */ -@SuppressWarnings("unused") -public final class StatusSystemRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static StatusSystemRequest getRootAsStatusSystemRequest(ByteBuffer _bb) { return getRootAsStatusSystemRequest(_bb, new StatusSystemRequest()); } - public static StatusSystemRequest getRootAsStatusSystemRequest(ByteBuffer _bb, StatusSystemRequest 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 StatusSystemRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startStatusSystemRequest(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endStatusSystemRequest(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 StatusSystemRequest get(int j) { return get(new StatusSystemRequest(), j); } - public StatusSystemRequest get(StatusSystemRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public StatusSystemRequestT unpack() { - StatusSystemRequestT _o = new StatusSystemRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(StatusSystemRequestT _o) { - } - public static int pack(FlatBufferBuilder builder, StatusSystemRequestT _o) { - if (_o == null) return 0; - startStatusSystemRequest(builder); - return endStatusSystemRequest(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.*; + +/** + * Request current statuses that we have + */ +@SuppressWarnings("unused") +public final class StatusSystemRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static StatusSystemRequest getRootAsStatusSystemRequest(ByteBuffer _bb) { return getRootAsStatusSystemRequest(_bb, new StatusSystemRequest()); } + public static StatusSystemRequest getRootAsStatusSystemRequest(ByteBuffer _bb, StatusSystemRequest 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 StatusSystemRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startStatusSystemRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endStatusSystemRequest(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 StatusSystemRequest get(int j) { return get(new StatusSystemRequest(), j); } + public StatusSystemRequest get(StatusSystemRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public StatusSystemRequestT unpack() { + StatusSystemRequestT _o = new StatusSystemRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(StatusSystemRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, StatusSystemRequestT _o) { + if (_o == null) return 0; + startStatusSystemRequest(builder); + return endStatusSystemRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StatusSystemRequestT.java b/protocol/java/src/solarxr_protocol/rpc/StatusSystemRequestT.java index 6564046f..ad11a76f 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StatusSystemRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/StatusSystemRequestT.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 StatusSystemRequestT { - - - public StatusSystemRequestT() { - } -} - +// 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 StatusSystemRequestT { + + + public StatusSystemRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StatusSystemResponse.java b/protocol/java/src/solarxr_protocol/rpc/StatusSystemResponse.java index 8d9b9183..588cf274 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StatusSystemResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/StatusSystemResponse.java @@ -1,73 +1,73 @@ -// 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.*; - -/** - * Response containing all current valid statuses - */ -@SuppressWarnings("unused") -public final class StatusSystemResponse extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static StatusSystemResponse getRootAsStatusSystemResponse(ByteBuffer _bb) { return getRootAsStatusSystemResponse(_bb, new StatusSystemResponse()); } - public static StatusSystemResponse getRootAsStatusSystemResponse(ByteBuffer _bb, StatusSystemResponse 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 StatusSystemResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public solarxr_protocol.rpc.StatusMessage currentStatuses(int j) { return currentStatuses(new solarxr_protocol.rpc.StatusMessage(), j); } - public solarxr_protocol.rpc.StatusMessage currentStatuses(solarxr_protocol.rpc.StatusMessage obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } - public int currentStatusesLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } - public solarxr_protocol.rpc.StatusMessage.Vector currentStatusesVector() { return currentStatusesVector(new solarxr_protocol.rpc.StatusMessage.Vector()); } - public solarxr_protocol.rpc.StatusMessage.Vector currentStatusesVector(solarxr_protocol.rpc.StatusMessage.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } - - public static int createStatusSystemResponse(FlatBufferBuilder builder, - int currentStatusesOffset) { - builder.startTable(1); - StatusSystemResponse.addCurrentStatuses(builder, currentStatusesOffset); - return StatusSystemResponse.endStatusSystemResponse(builder); - } - - public static void startStatusSystemResponse(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addCurrentStatuses(FlatBufferBuilder builder, int currentStatusesOffset) { builder.addOffset(0, currentStatusesOffset, 0); } - public static int createCurrentStatusesVector(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 startCurrentStatusesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } - public static int endStatusSystemResponse(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 StatusSystemResponse get(int j) { return get(new StatusSystemResponse(), j); } - public StatusSystemResponse get(StatusSystemResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public StatusSystemResponseT unpack() { - StatusSystemResponseT _o = new StatusSystemResponseT(); - unpackTo(_o); - return _o; - } - public void unpackTo(StatusSystemResponseT _o) { - solarxr_protocol.rpc.StatusMessageT[] _oCurrentStatuses = new solarxr_protocol.rpc.StatusMessageT[currentStatusesLength()]; - for (int _j = 0; _j < currentStatusesLength(); ++_j) {_oCurrentStatuses[_j] = (currentStatuses(_j) != null ? currentStatuses(_j).unpack() : null);} - _o.setCurrentStatuses(_oCurrentStatuses); - } - public static int pack(FlatBufferBuilder builder, StatusSystemResponseT _o) { - if (_o == null) return 0; - int _currentStatuses = 0; - if (_o.getCurrentStatuses() != null) { - int[] __currentStatuses = new int[_o.getCurrentStatuses().length]; - int _j = 0; - for (solarxr_protocol.rpc.StatusMessageT _e : _o.getCurrentStatuses()) { __currentStatuses[_j] = solarxr_protocol.rpc.StatusMessage.pack(builder, _e); _j++;} - _currentStatuses = createCurrentStatusesVector(builder, __currentStatuses); - } - return createStatusSystemResponse( - builder, - _currentStatuses); - } -} - +// 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.*; + +/** + * Response containing all current valid statuses + */ +@SuppressWarnings("unused") +public final class StatusSystemResponse extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static StatusSystemResponse getRootAsStatusSystemResponse(ByteBuffer _bb) { return getRootAsStatusSystemResponse(_bb, new StatusSystemResponse()); } + public static StatusSystemResponse getRootAsStatusSystemResponse(ByteBuffer _bb, StatusSystemResponse 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 StatusSystemResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.rpc.StatusMessage currentStatuses(int j) { return currentStatuses(new solarxr_protocol.rpc.StatusMessage(), j); } + public solarxr_protocol.rpc.StatusMessage currentStatuses(solarxr_protocol.rpc.StatusMessage obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int currentStatusesLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public solarxr_protocol.rpc.StatusMessage.Vector currentStatusesVector() { return currentStatusesVector(new solarxr_protocol.rpc.StatusMessage.Vector()); } + public solarxr_protocol.rpc.StatusMessage.Vector currentStatusesVector(solarxr_protocol.rpc.StatusMessage.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + + public static int createStatusSystemResponse(FlatBufferBuilder builder, + int currentStatusesOffset) { + builder.startTable(1); + StatusSystemResponse.addCurrentStatuses(builder, currentStatusesOffset); + return StatusSystemResponse.endStatusSystemResponse(builder); + } + + public static void startStatusSystemResponse(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addCurrentStatuses(FlatBufferBuilder builder, int currentStatusesOffset) { builder.addOffset(0, currentStatusesOffset, 0); } + public static int createCurrentStatusesVector(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 startCurrentStatusesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endStatusSystemResponse(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 StatusSystemResponse get(int j) { return get(new StatusSystemResponse(), j); } + public StatusSystemResponse get(StatusSystemResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public StatusSystemResponseT unpack() { + StatusSystemResponseT _o = new StatusSystemResponseT(); + unpackTo(_o); + return _o; + } + public void unpackTo(StatusSystemResponseT _o) { + solarxr_protocol.rpc.StatusMessageT[] _oCurrentStatuses = new solarxr_protocol.rpc.StatusMessageT[currentStatusesLength()]; + for (int _j = 0; _j < currentStatusesLength(); ++_j) {_oCurrentStatuses[_j] = (currentStatuses(_j) != null ? currentStatuses(_j).unpack() : null);} + _o.setCurrentStatuses(_oCurrentStatuses); + } + public static int pack(FlatBufferBuilder builder, StatusSystemResponseT _o) { + if (_o == null) return 0; + int _currentStatuses = 0; + if (_o.getCurrentStatuses() != null) { + int[] __currentStatuses = new int[_o.getCurrentStatuses().length]; + int _j = 0; + for (solarxr_protocol.rpc.StatusMessageT _e : _o.getCurrentStatuses()) { __currentStatuses[_j] = solarxr_protocol.rpc.StatusMessage.pack(builder, _e); _j++;} + _currentStatuses = createCurrentStatusesVector(builder, __currentStatuses); + } + return createStatusSystemResponse( + builder, + _currentStatuses); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StatusSystemResponseT.java b/protocol/java/src/solarxr_protocol/rpc/StatusSystemResponseT.java index d6ff1dce..23374bd0 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StatusSystemResponseT.java +++ b/protocol/java/src/solarxr_protocol/rpc/StatusSystemResponseT.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 StatusSystemResponseT { - private solarxr_protocol.rpc.StatusMessageT[] currentStatuses; - - public solarxr_protocol.rpc.StatusMessageT[] getCurrentStatuses() { return currentStatuses; } - - public void setCurrentStatuses(solarxr_protocol.rpc.StatusMessageT[] currentStatuses) { this.currentStatuses = currentStatuses; } - - - public StatusSystemResponseT() { - this.currentStatuses = 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 StatusSystemResponseT { + private solarxr_protocol.rpc.StatusMessageT[] currentStatuses; + + public solarxr_protocol.rpc.StatusMessageT[] getCurrentStatuses() { return currentStatuses; } + + public void setCurrentStatuses(solarxr_protocol.rpc.StatusMessageT[] currentStatuses) { this.currentStatuses = currentStatuses; } + + + public StatusSystemResponseT() { + this.currentStatuses = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StatusSystemUpdate.java b/protocol/java/src/solarxr_protocol/rpc/StatusSystemUpdate.java index dbcef354..284f00e7 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StatusSystemUpdate.java +++ b/protocol/java/src/solarxr_protocol/rpc/StatusSystemUpdate.java @@ -1,61 +1,61 @@ -// 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.*; - -/** - * When a new status appears, it's sent alone - */ -@SuppressWarnings("unused") -public final class StatusSystemUpdate extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static StatusSystemUpdate getRootAsStatusSystemUpdate(ByteBuffer _bb) { return getRootAsStatusSystemUpdate(_bb, new StatusSystemUpdate()); } - public static StatusSystemUpdate getRootAsStatusSystemUpdate(ByteBuffer _bb, StatusSystemUpdate 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 StatusSystemUpdate __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public solarxr_protocol.rpc.StatusMessage newStatus() { return newStatus(new solarxr_protocol.rpc.StatusMessage()); } - public solarxr_protocol.rpc.StatusMessage newStatus(solarxr_protocol.rpc.StatusMessage obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - - public static int createStatusSystemUpdate(FlatBufferBuilder builder, - int newStatusOffset) { - builder.startTable(1); - StatusSystemUpdate.addNewStatus(builder, newStatusOffset); - return StatusSystemUpdate.endStatusSystemUpdate(builder); - } - - public static void startStatusSystemUpdate(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addNewStatus(FlatBufferBuilder builder, int newStatusOffset) { builder.addOffset(0, newStatusOffset, 0); } - public static int endStatusSystemUpdate(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 StatusSystemUpdate get(int j) { return get(new StatusSystemUpdate(), j); } - public StatusSystemUpdate get(StatusSystemUpdate obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public StatusSystemUpdateT unpack() { - StatusSystemUpdateT _o = new StatusSystemUpdateT(); - unpackTo(_o); - return _o; - } - public void unpackTo(StatusSystemUpdateT _o) { - if (newStatus() != null) _o.setNewStatus(newStatus().unpack()); - else _o.setNewStatus(null); - } - public static int pack(FlatBufferBuilder builder, StatusSystemUpdateT _o) { - if (_o == null) return 0; - int _newStatus = _o.getNewStatus() == null ? 0 : solarxr_protocol.rpc.StatusMessage.pack(builder, _o.getNewStatus()); - return createStatusSystemUpdate( - builder, - _newStatus); - } -} - +// 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.*; + +/** + * When a new status appears, it's sent alone + */ +@SuppressWarnings("unused") +public final class StatusSystemUpdate extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static StatusSystemUpdate getRootAsStatusSystemUpdate(ByteBuffer _bb) { return getRootAsStatusSystemUpdate(_bb, new StatusSystemUpdate()); } + public static StatusSystemUpdate getRootAsStatusSystemUpdate(ByteBuffer _bb, StatusSystemUpdate 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 StatusSystemUpdate __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.rpc.StatusMessage newStatus() { return newStatus(new solarxr_protocol.rpc.StatusMessage()); } + public solarxr_protocol.rpc.StatusMessage newStatus(solarxr_protocol.rpc.StatusMessage obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createStatusSystemUpdate(FlatBufferBuilder builder, + int newStatusOffset) { + builder.startTable(1); + StatusSystemUpdate.addNewStatus(builder, newStatusOffset); + return StatusSystemUpdate.endStatusSystemUpdate(builder); + } + + public static void startStatusSystemUpdate(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addNewStatus(FlatBufferBuilder builder, int newStatusOffset) { builder.addOffset(0, newStatusOffset, 0); } + public static int endStatusSystemUpdate(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 StatusSystemUpdate get(int j) { return get(new StatusSystemUpdate(), j); } + public StatusSystemUpdate get(StatusSystemUpdate obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public StatusSystemUpdateT unpack() { + StatusSystemUpdateT _o = new StatusSystemUpdateT(); + unpackTo(_o); + return _o; + } + public void unpackTo(StatusSystemUpdateT _o) { + if (newStatus() != null) _o.setNewStatus(newStatus().unpack()); + else _o.setNewStatus(null); + } + public static int pack(FlatBufferBuilder builder, StatusSystemUpdateT _o) { + if (_o == null) return 0; + int _newStatus = _o.getNewStatus() == null ? 0 : solarxr_protocol.rpc.StatusMessage.pack(builder, _o.getNewStatus()); + return createStatusSystemUpdate( + builder, + _newStatus); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StatusSystemUpdateT.java b/protocol/java/src/solarxr_protocol/rpc/StatusSystemUpdateT.java index c3a98fea..0c95f056 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StatusSystemUpdateT.java +++ b/protocol/java/src/solarxr_protocol/rpc/StatusSystemUpdateT.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 StatusSystemUpdateT { - private solarxr_protocol.rpc.StatusMessageT newStatus; - - public solarxr_protocol.rpc.StatusMessageT getNewStatus() { return newStatus; } - - public void setNewStatus(solarxr_protocol.rpc.StatusMessageT newStatus) { this.newStatus = newStatus; } - - - public StatusSystemUpdateT() { - this.newStatus = 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 StatusSystemUpdateT { + private solarxr_protocol.rpc.StatusMessageT newStatus; + + public solarxr_protocol.rpc.StatusMessageT getNewStatus() { return newStatus; } + + public void setNewStatus(solarxr_protocol.rpc.StatusMessageT newStatus) { this.newStatus = newStatus; } + + + public StatusSystemUpdateT() { + this.newStatus = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StatusTrackerError.java b/protocol/java/src/solarxr_protocol/rpc/StatusTrackerError.java index 964655f4..0c13ec28 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StatusTrackerError.java +++ b/protocol/java/src/solarxr_protocol/rpc/StatusTrackerError.java @@ -1,61 +1,61 @@ -// 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.*; - -/** - * Tracker has error state - */ -@SuppressWarnings("unused") -public final class StatusTrackerError extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static StatusTrackerError getRootAsStatusTrackerError(ByteBuffer _bb) { return getRootAsStatusTrackerError(_bb, new StatusTrackerError()); } - public static StatusTrackerError getRootAsStatusTrackerError(ByteBuffer _bb, StatusTrackerError 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 StatusTrackerError __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 static int createStatusTrackerError(FlatBufferBuilder builder, - int trackerIdOffset) { - builder.startTable(1); - StatusTrackerError.addTrackerId(builder, trackerIdOffset); - return StatusTrackerError.endStatusTrackerError(builder); - } - - public static void startStatusTrackerError(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addTrackerId(FlatBufferBuilder builder, int trackerIdOffset) { builder.addOffset(0, trackerIdOffset, 0); } - public static int endStatusTrackerError(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 StatusTrackerError get(int j) { return get(new StatusTrackerError(), j); } - public StatusTrackerError get(StatusTrackerError obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public StatusTrackerErrorT unpack() { - StatusTrackerErrorT _o = new StatusTrackerErrorT(); - unpackTo(_o); - return _o; - } - public void unpackTo(StatusTrackerErrorT _o) { - if (trackerId() != null) _o.setTrackerId(trackerId().unpack()); - else _o.setTrackerId(null); - } - public static int pack(FlatBufferBuilder builder, StatusTrackerErrorT _o) { - if (_o == null) return 0; - int _trackerId = _o.getTrackerId() == null ? 0 : solarxr_protocol.datatypes.TrackerId.pack(builder, _o.getTrackerId()); - return createStatusTrackerError( - builder, - _trackerId); - } -} - +// 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.*; + +/** + * Tracker has error state + */ +@SuppressWarnings("unused") +public final class StatusTrackerError extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static StatusTrackerError getRootAsStatusTrackerError(ByteBuffer _bb) { return getRootAsStatusTrackerError(_bb, new StatusTrackerError()); } + public static StatusTrackerError getRootAsStatusTrackerError(ByteBuffer _bb, StatusTrackerError 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 StatusTrackerError __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 static int createStatusTrackerError(FlatBufferBuilder builder, + int trackerIdOffset) { + builder.startTable(1); + StatusTrackerError.addTrackerId(builder, trackerIdOffset); + return StatusTrackerError.endStatusTrackerError(builder); + } + + public static void startStatusTrackerError(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addTrackerId(FlatBufferBuilder builder, int trackerIdOffset) { builder.addOffset(0, trackerIdOffset, 0); } + public static int endStatusTrackerError(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 StatusTrackerError get(int j) { return get(new StatusTrackerError(), j); } + public StatusTrackerError get(StatusTrackerError obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public StatusTrackerErrorT unpack() { + StatusTrackerErrorT _o = new StatusTrackerErrorT(); + unpackTo(_o); + return _o; + } + public void unpackTo(StatusTrackerErrorT _o) { + if (trackerId() != null) _o.setTrackerId(trackerId().unpack()); + else _o.setTrackerId(null); + } + public static int pack(FlatBufferBuilder builder, StatusTrackerErrorT _o) { + if (_o == null) return 0; + int _trackerId = _o.getTrackerId() == null ? 0 : solarxr_protocol.datatypes.TrackerId.pack(builder, _o.getTrackerId()); + return createStatusTrackerError( + builder, + _trackerId); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StatusTrackerErrorT.java b/protocol/java/src/solarxr_protocol/rpc/StatusTrackerErrorT.java index f3e8d4c9..822067d5 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StatusTrackerErrorT.java +++ b/protocol/java/src/solarxr_protocol/rpc/StatusTrackerErrorT.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 StatusTrackerErrorT { - private solarxr_protocol.datatypes.TrackerIdT trackerId; - - public solarxr_protocol.datatypes.TrackerIdT getTrackerId() { return trackerId; } - - public void setTrackerId(solarxr_protocol.datatypes.TrackerIdT trackerId) { this.trackerId = trackerId; } - - - public StatusTrackerErrorT() { - this.trackerId = 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 StatusTrackerErrorT { + private solarxr_protocol.datatypes.TrackerIdT trackerId; + + public solarxr_protocol.datatypes.TrackerIdT getTrackerId() { return trackerId; } + + public void setTrackerId(solarxr_protocol.datatypes.TrackerIdT trackerId) { this.trackerId = trackerId; } + + + public StatusTrackerErrorT() { + this.trackerId = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StatusTrackerReset.java b/protocol/java/src/solarxr_protocol/rpc/StatusTrackerReset.java index 8df87217..252c812d 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StatusTrackerReset.java +++ b/protocol/java/src/solarxr_protocol/rpc/StatusTrackerReset.java @@ -1,61 +1,61 @@ -// 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.*; - -/** - * Tracker requires full reset - */ -@SuppressWarnings("unused") -public final class StatusTrackerReset extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static StatusTrackerReset getRootAsStatusTrackerReset(ByteBuffer _bb) { return getRootAsStatusTrackerReset(_bb, new StatusTrackerReset()); } - public static StatusTrackerReset getRootAsStatusTrackerReset(ByteBuffer _bb, StatusTrackerReset 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 StatusTrackerReset __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 static int createStatusTrackerReset(FlatBufferBuilder builder, - int trackerIdOffset) { - builder.startTable(1); - StatusTrackerReset.addTrackerId(builder, trackerIdOffset); - return StatusTrackerReset.endStatusTrackerReset(builder); - } - - public static void startStatusTrackerReset(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addTrackerId(FlatBufferBuilder builder, int trackerIdOffset) { builder.addOffset(0, trackerIdOffset, 0); } - public static int endStatusTrackerReset(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 StatusTrackerReset get(int j) { return get(new StatusTrackerReset(), j); } - public StatusTrackerReset get(StatusTrackerReset obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public StatusTrackerResetT unpack() { - StatusTrackerResetT _o = new StatusTrackerResetT(); - unpackTo(_o); - return _o; - } - public void unpackTo(StatusTrackerResetT _o) { - if (trackerId() != null) _o.setTrackerId(trackerId().unpack()); - else _o.setTrackerId(null); - } - public static int pack(FlatBufferBuilder builder, StatusTrackerResetT _o) { - if (_o == null) return 0; - int _trackerId = _o.getTrackerId() == null ? 0 : solarxr_protocol.datatypes.TrackerId.pack(builder, _o.getTrackerId()); - return createStatusTrackerReset( - builder, - _trackerId); - } -} - +// 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.*; + +/** + * Tracker requires full reset + */ +@SuppressWarnings("unused") +public final class StatusTrackerReset extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static StatusTrackerReset getRootAsStatusTrackerReset(ByteBuffer _bb) { return getRootAsStatusTrackerReset(_bb, new StatusTrackerReset()); } + public static StatusTrackerReset getRootAsStatusTrackerReset(ByteBuffer _bb, StatusTrackerReset 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 StatusTrackerReset __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 static int createStatusTrackerReset(FlatBufferBuilder builder, + int trackerIdOffset) { + builder.startTable(1); + StatusTrackerReset.addTrackerId(builder, trackerIdOffset); + return StatusTrackerReset.endStatusTrackerReset(builder); + } + + public static void startStatusTrackerReset(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addTrackerId(FlatBufferBuilder builder, int trackerIdOffset) { builder.addOffset(0, trackerIdOffset, 0); } + public static int endStatusTrackerReset(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 StatusTrackerReset get(int j) { return get(new StatusTrackerReset(), j); } + public StatusTrackerReset get(StatusTrackerReset obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public StatusTrackerResetT unpack() { + StatusTrackerResetT _o = new StatusTrackerResetT(); + unpackTo(_o); + return _o; + } + public void unpackTo(StatusTrackerResetT _o) { + if (trackerId() != null) _o.setTrackerId(trackerId().unpack()); + else _o.setTrackerId(null); + } + public static int pack(FlatBufferBuilder builder, StatusTrackerResetT _o) { + if (_o == null) return 0; + int _trackerId = _o.getTrackerId() == null ? 0 : solarxr_protocol.datatypes.TrackerId.pack(builder, _o.getTrackerId()); + return createStatusTrackerReset( + builder, + _trackerId); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StatusTrackerResetT.java b/protocol/java/src/solarxr_protocol/rpc/StatusTrackerResetT.java index 270b2f4c..6f6ef832 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StatusTrackerResetT.java +++ b/protocol/java/src/solarxr_protocol/rpc/StatusTrackerResetT.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 StatusTrackerResetT { - private solarxr_protocol.datatypes.TrackerIdT trackerId; - - public solarxr_protocol.datatypes.TrackerIdT getTrackerId() { return trackerId; } - - public void setTrackerId(solarxr_protocol.datatypes.TrackerIdT trackerId) { this.trackerId = trackerId; } - - - public StatusTrackerResetT() { - this.trackerId = 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 StatusTrackerResetT { + private solarxr_protocol.datatypes.TrackerIdT trackerId; + + public solarxr_protocol.datatypes.TrackerIdT getTrackerId() { return trackerId; } + + public void setTrackerId(solarxr_protocol.datatypes.TrackerIdT trackerId) { this.trackerId = trackerId; } + + + public StatusTrackerResetT() { + this.trackerId = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StatusUnassignedHMD.java b/protocol/java/src/solarxr_protocol/rpc/StatusUnassignedHMD.java index a52e648b..6ed27713 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StatusUnassignedHMD.java +++ b/protocol/java/src/solarxr_protocol/rpc/StatusUnassignedHMD.java @@ -1,61 +1,61 @@ -// 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.*; - -/** - * There is an available HMD tracker and it's not assigned to head - */ -@SuppressWarnings("unused") -public final class StatusUnassignedHMD extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static StatusUnassignedHMD getRootAsStatusUnassignedHMD(ByteBuffer _bb) { return getRootAsStatusUnassignedHMD(_bb, new StatusUnassignedHMD()); } - public static StatusUnassignedHMD getRootAsStatusUnassignedHMD(ByteBuffer _bb, StatusUnassignedHMD 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 StatusUnassignedHMD __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 static int createStatusUnassignedHMD(FlatBufferBuilder builder, - int trackerIdOffset) { - builder.startTable(1); - StatusUnassignedHMD.addTrackerId(builder, trackerIdOffset); - return StatusUnassignedHMD.endStatusUnassignedHMD(builder); - } - - public static void startStatusUnassignedHMD(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addTrackerId(FlatBufferBuilder builder, int trackerIdOffset) { builder.addOffset(0, trackerIdOffset, 0); } - public static int endStatusUnassignedHMD(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 StatusUnassignedHMD get(int j) { return get(new StatusUnassignedHMD(), j); } - public StatusUnassignedHMD get(StatusUnassignedHMD obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public StatusUnassignedHMDT unpack() { - StatusUnassignedHMDT _o = new StatusUnassignedHMDT(); - unpackTo(_o); - return _o; - } - public void unpackTo(StatusUnassignedHMDT _o) { - if (trackerId() != null) _o.setTrackerId(trackerId().unpack()); - else _o.setTrackerId(null); - } - public static int pack(FlatBufferBuilder builder, StatusUnassignedHMDT _o) { - if (_o == null) return 0; - int _trackerId = _o.getTrackerId() == null ? 0 : solarxr_protocol.datatypes.TrackerId.pack(builder, _o.getTrackerId()); - return createStatusUnassignedHMD( - builder, - _trackerId); - } -} - +// 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.*; + +/** + * There is an available HMD tracker and it's not assigned to head + */ +@SuppressWarnings("unused") +public final class StatusUnassignedHMD extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static StatusUnassignedHMD getRootAsStatusUnassignedHMD(ByteBuffer _bb) { return getRootAsStatusUnassignedHMD(_bb, new StatusUnassignedHMD()); } + public static StatusUnassignedHMD getRootAsStatusUnassignedHMD(ByteBuffer _bb, StatusUnassignedHMD 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 StatusUnassignedHMD __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 static int createStatusUnassignedHMD(FlatBufferBuilder builder, + int trackerIdOffset) { + builder.startTable(1); + StatusUnassignedHMD.addTrackerId(builder, trackerIdOffset); + return StatusUnassignedHMD.endStatusUnassignedHMD(builder); + } + + public static void startStatusUnassignedHMD(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addTrackerId(FlatBufferBuilder builder, int trackerIdOffset) { builder.addOffset(0, trackerIdOffset, 0); } + public static int endStatusUnassignedHMD(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 StatusUnassignedHMD get(int j) { return get(new StatusUnassignedHMD(), j); } + public StatusUnassignedHMD get(StatusUnassignedHMD obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public StatusUnassignedHMDT unpack() { + StatusUnassignedHMDT _o = new StatusUnassignedHMDT(); + unpackTo(_o); + return _o; + } + public void unpackTo(StatusUnassignedHMDT _o) { + if (trackerId() != null) _o.setTrackerId(trackerId().unpack()); + else _o.setTrackerId(null); + } + public static int pack(FlatBufferBuilder builder, StatusUnassignedHMDT _o) { + if (_o == null) return 0; + int _trackerId = _o.getTrackerId() == null ? 0 : solarxr_protocol.datatypes.TrackerId.pack(builder, _o.getTrackerId()); + return createStatusUnassignedHMD( + builder, + _trackerId); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StatusUnassignedHMDT.java b/protocol/java/src/solarxr_protocol/rpc/StatusUnassignedHMDT.java index ba80aa42..9d0a9c93 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StatusUnassignedHMDT.java +++ b/protocol/java/src/solarxr_protocol/rpc/StatusUnassignedHMDT.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 StatusUnassignedHMDT { - private solarxr_protocol.datatypes.TrackerIdT trackerId; - - public solarxr_protocol.datatypes.TrackerIdT getTrackerId() { return trackerId; } - - public void setTrackerId(solarxr_protocol.datatypes.TrackerIdT trackerId) { this.trackerId = trackerId; } - - - public StatusUnassignedHMDT() { - this.trackerId = 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 StatusUnassignedHMDT { + private solarxr_protocol.datatypes.TrackerIdT trackerId; + + public solarxr_protocol.datatypes.TrackerIdT getTrackerId() { return trackerId; } + + public void setTrackerId(solarxr_protocol.datatypes.TrackerIdT trackerId) { this.trackerId = trackerId; } + + + public StatusUnassignedHMDT() { + this.trackerId = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSetting.java b/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSetting.java index 385d530f..aa39c0c0 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSetting.java +++ b/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSetting.java @@ -1,126 +1,126 @@ -// 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_22_10_26(); } - 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 automaticTrackerToggle() { int o = __offset(16); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean leftFoot() { int o = __offset(18); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean rightFoot() { int o = __offset(20); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean leftKnee() { int o = __offset(22); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean rightKnee() { int o = __offset(24); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean leftElbow() { int o = __offset(26); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean rightElbow() { int o = __offset(28); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean leftHand() { int o = __offset(30); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean rightHand() { int o = __offset(32); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static int createSteamVRTrackersSetting(FlatBufferBuilder builder, - boolean waist, - boolean chest, - boolean automaticTrackerToggle, - boolean leftFoot, - boolean rightFoot, - boolean leftKnee, - boolean rightKnee, - boolean leftElbow, - boolean rightElbow, - boolean leftHand, - boolean rightHand) { - builder.startTable(15); - SteamVRTrackersSetting.addRightHand(builder, rightHand); - SteamVRTrackersSetting.addLeftHand(builder, leftHand); - SteamVRTrackersSetting.addRightElbow(builder, rightElbow); - SteamVRTrackersSetting.addLeftElbow(builder, leftElbow); - SteamVRTrackersSetting.addRightKnee(builder, rightKnee); - SteamVRTrackersSetting.addLeftKnee(builder, leftKnee); - SteamVRTrackersSetting.addRightFoot(builder, rightFoot); - SteamVRTrackersSetting.addLeftFoot(builder, leftFoot); - SteamVRTrackersSetting.addAutomaticTrackerToggle(builder, automaticTrackerToggle); - SteamVRTrackersSetting.addChest(builder, chest); - SteamVRTrackersSetting.addWaist(builder, waist); - return SteamVRTrackersSetting.endSteamVRTrackersSetting(builder); - } - - public static void startSteamVRTrackersSetting(FlatBufferBuilder builder) { builder.startTable(15); } - 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 addAutomaticTrackerToggle(FlatBufferBuilder builder, boolean automaticTrackerToggle) { builder.addBoolean(6, automaticTrackerToggle, false); } - public static void addLeftFoot(FlatBufferBuilder builder, boolean leftFoot) { builder.addBoolean(7, leftFoot, false); } - public static void addRightFoot(FlatBufferBuilder builder, boolean rightFoot) { builder.addBoolean(8, rightFoot, false); } - public static void addLeftKnee(FlatBufferBuilder builder, boolean leftKnee) { builder.addBoolean(9, leftKnee, false); } - public static void addRightKnee(FlatBufferBuilder builder, boolean rightKnee) { builder.addBoolean(10, rightKnee, false); } - public static void addLeftElbow(FlatBufferBuilder builder, boolean leftElbow) { builder.addBoolean(11, leftElbow, false); } - public static void addRightElbow(FlatBufferBuilder builder, boolean rightElbow) { builder.addBoolean(12, rightElbow, false); } - public static void addLeftHand(FlatBufferBuilder builder, boolean leftHand) { builder.addBoolean(13, leftHand, false); } - public static void addRightHand(FlatBufferBuilder builder, boolean rightHand) { builder.addBoolean(14, rightHand, 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 _oAutomaticTrackerToggle = automaticTrackerToggle(); - _o.setAutomaticTrackerToggle(_oAutomaticTrackerToggle); - boolean _oLeftFoot = leftFoot(); - _o.setLeftFoot(_oLeftFoot); - boolean _oRightFoot = rightFoot(); - _o.setRightFoot(_oRightFoot); - boolean _oLeftKnee = leftKnee(); - _o.setLeftKnee(_oLeftKnee); - boolean _oRightKnee = rightKnee(); - _o.setRightKnee(_oRightKnee); - boolean _oLeftElbow = leftElbow(); - _o.setLeftElbow(_oLeftElbow); - boolean _oRightElbow = rightElbow(); - _o.setRightElbow(_oRightElbow); - boolean _oLeftHand = leftHand(); - _o.setLeftHand(_oLeftHand); - boolean _oRightHand = rightHand(); - _o.setRightHand(_oRightHand); - } - public static int pack(FlatBufferBuilder builder, SteamVRTrackersSettingT _o) { - if (_o == null) return 0; - return createSteamVRTrackersSetting( - builder, - _o.getWaist(), - _o.getChest(), - _o.getAutomaticTrackerToggle(), - _o.getLeftFoot(), - _o.getRightFoot(), - _o.getLeftKnee(), - _o.getRightKnee(), - _o.getLeftElbow(), - _o.getRightElbow(), - _o.getLeftHand(), - _o.getRightHand()); - } -} - +// 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_22_10_26(); } + 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 automaticTrackerToggle() { int o = __offset(16); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean leftFoot() { int o = __offset(18); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean rightFoot() { int o = __offset(20); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean leftKnee() { int o = __offset(22); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean rightKnee() { int o = __offset(24); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean leftElbow() { int o = __offset(26); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean rightElbow() { int o = __offset(28); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean leftHand() { int o = __offset(30); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean rightHand() { int o = __offset(32); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createSteamVRTrackersSetting(FlatBufferBuilder builder, + boolean waist, + boolean chest, + boolean automaticTrackerToggle, + boolean leftFoot, + boolean rightFoot, + boolean leftKnee, + boolean rightKnee, + boolean leftElbow, + boolean rightElbow, + boolean leftHand, + boolean rightHand) { + builder.startTable(15); + SteamVRTrackersSetting.addRightHand(builder, rightHand); + SteamVRTrackersSetting.addLeftHand(builder, leftHand); + SteamVRTrackersSetting.addRightElbow(builder, rightElbow); + SteamVRTrackersSetting.addLeftElbow(builder, leftElbow); + SteamVRTrackersSetting.addRightKnee(builder, rightKnee); + SteamVRTrackersSetting.addLeftKnee(builder, leftKnee); + SteamVRTrackersSetting.addRightFoot(builder, rightFoot); + SteamVRTrackersSetting.addLeftFoot(builder, leftFoot); + SteamVRTrackersSetting.addAutomaticTrackerToggle(builder, automaticTrackerToggle); + SteamVRTrackersSetting.addChest(builder, chest); + SteamVRTrackersSetting.addWaist(builder, waist); + return SteamVRTrackersSetting.endSteamVRTrackersSetting(builder); + } + + public static void startSteamVRTrackersSetting(FlatBufferBuilder builder) { builder.startTable(15); } + 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 addAutomaticTrackerToggle(FlatBufferBuilder builder, boolean automaticTrackerToggle) { builder.addBoolean(6, automaticTrackerToggle, false); } + public static void addLeftFoot(FlatBufferBuilder builder, boolean leftFoot) { builder.addBoolean(7, leftFoot, false); } + public static void addRightFoot(FlatBufferBuilder builder, boolean rightFoot) { builder.addBoolean(8, rightFoot, false); } + public static void addLeftKnee(FlatBufferBuilder builder, boolean leftKnee) { builder.addBoolean(9, leftKnee, false); } + public static void addRightKnee(FlatBufferBuilder builder, boolean rightKnee) { builder.addBoolean(10, rightKnee, false); } + public static void addLeftElbow(FlatBufferBuilder builder, boolean leftElbow) { builder.addBoolean(11, leftElbow, false); } + public static void addRightElbow(FlatBufferBuilder builder, boolean rightElbow) { builder.addBoolean(12, rightElbow, false); } + public static void addLeftHand(FlatBufferBuilder builder, boolean leftHand) { builder.addBoolean(13, leftHand, false); } + public static void addRightHand(FlatBufferBuilder builder, boolean rightHand) { builder.addBoolean(14, rightHand, 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 _oAutomaticTrackerToggle = automaticTrackerToggle(); + _o.setAutomaticTrackerToggle(_oAutomaticTrackerToggle); + boolean _oLeftFoot = leftFoot(); + _o.setLeftFoot(_oLeftFoot); + boolean _oRightFoot = rightFoot(); + _o.setRightFoot(_oRightFoot); + boolean _oLeftKnee = leftKnee(); + _o.setLeftKnee(_oLeftKnee); + boolean _oRightKnee = rightKnee(); + _o.setRightKnee(_oRightKnee); + boolean _oLeftElbow = leftElbow(); + _o.setLeftElbow(_oLeftElbow); + boolean _oRightElbow = rightElbow(); + _o.setRightElbow(_oRightElbow); + boolean _oLeftHand = leftHand(); + _o.setLeftHand(_oLeftHand); + boolean _oRightHand = rightHand(); + _o.setRightHand(_oRightHand); + } + public static int pack(FlatBufferBuilder builder, SteamVRTrackersSettingT _o) { + if (_o == null) return 0; + return createSteamVRTrackersSetting( + builder, + _o.getWaist(), + _o.getChest(), + _o.getAutomaticTrackerToggle(), + _o.getLeftFoot(), + _o.getRightFoot(), + _o.getLeftKnee(), + _o.getRightKnee(), + _o.getLeftElbow(), + _o.getRightElbow(), + _o.getLeftHand(), + _o.getRightHand()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSettingT.java b/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSettingT.java index ba1155a2..d742e4df 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSettingT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSettingT.java @@ -1,82 +1,82 @@ -// 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 automaticTrackerToggle; - private boolean leftFoot; - private boolean rightFoot; - private boolean leftKnee; - private boolean rightKnee; - private boolean leftElbow; - private boolean rightElbow; - private boolean leftHand; - private boolean rightHand; - - 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 getAutomaticTrackerToggle() { return automaticTrackerToggle; } - - public void setAutomaticTrackerToggle(boolean automaticTrackerToggle) { this.automaticTrackerToggle = automaticTrackerToggle; } - - public boolean getLeftFoot() { return leftFoot; } - - public void setLeftFoot(boolean leftFoot) { this.leftFoot = leftFoot; } - - public boolean getRightFoot() { return rightFoot; } - - public void setRightFoot(boolean rightFoot) { this.rightFoot = rightFoot; } - - public boolean getLeftKnee() { return leftKnee; } - - public void setLeftKnee(boolean leftKnee) { this.leftKnee = leftKnee; } - - public boolean getRightKnee() { return rightKnee; } - - public void setRightKnee(boolean rightKnee) { this.rightKnee = rightKnee; } - - public boolean getLeftElbow() { return leftElbow; } - - public void setLeftElbow(boolean leftElbow) { this.leftElbow = leftElbow; } - - public boolean getRightElbow() { return rightElbow; } - - public void setRightElbow(boolean rightElbow) { this.rightElbow = rightElbow; } - - public boolean getLeftHand() { return leftHand; } - - public void setLeftHand(boolean leftHand) { this.leftHand = leftHand; } - - public boolean getRightHand() { return rightHand; } - - public void setRightHand(boolean rightHand) { this.rightHand = rightHand; } - - - public SteamVRTrackersSettingT() { - this.waist = false; - this.chest = false; - this.automaticTrackerToggle = false; - this.leftFoot = false; - this.rightFoot = false; - this.leftKnee = false; - this.rightKnee = false; - this.leftElbow = false; - this.rightElbow = false; - this.leftHand = false; - this.rightHand = 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 automaticTrackerToggle; + private boolean leftFoot; + private boolean rightFoot; + private boolean leftKnee; + private boolean rightKnee; + private boolean leftElbow; + private boolean rightElbow; + private boolean leftHand; + private boolean rightHand; + + 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 getAutomaticTrackerToggle() { return automaticTrackerToggle; } + + public void setAutomaticTrackerToggle(boolean automaticTrackerToggle) { this.automaticTrackerToggle = automaticTrackerToggle; } + + public boolean getLeftFoot() { return leftFoot; } + + public void setLeftFoot(boolean leftFoot) { this.leftFoot = leftFoot; } + + public boolean getRightFoot() { return rightFoot; } + + public void setRightFoot(boolean rightFoot) { this.rightFoot = rightFoot; } + + public boolean getLeftKnee() { return leftKnee; } + + public void setLeftKnee(boolean leftKnee) { this.leftKnee = leftKnee; } + + public boolean getRightKnee() { return rightKnee; } + + public void setRightKnee(boolean rightKnee) { this.rightKnee = rightKnee; } + + public boolean getLeftElbow() { return leftElbow; } + + public void setLeftElbow(boolean leftElbow) { this.leftElbow = leftElbow; } + + public boolean getRightElbow() { return rightElbow; } + + public void setRightElbow(boolean rightElbow) { this.rightElbow = rightElbow; } + + public boolean getLeftHand() { return leftHand; } + + public void setLeftHand(boolean leftHand) { this.leftHand = leftHand; } + + public boolean getRightHand() { return rightHand; } + + public void setRightHand(boolean rightHand) { this.rightHand = rightHand; } + + + public SteamVRTrackersSettingT() { + this.waist = false; + this.chest = false; + this.automaticTrackerToggle = false; + this.leftFoot = false; + this.rightFoot = false; + this.leftKnee = false; + this.rightKnee = false; + this.leftElbow = false; + this.rightElbow = false; + this.leftHand = false; + this.rightHand = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StopWifiProvisioningRequest.java b/protocol/java/src/solarxr_protocol/rpc/StopWifiProvisioningRequest.java index 144a57e2..001891c7 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StopWifiProvisioningRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/StopWifiProvisioningRequest.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 StopWifiProvisioningRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static StopWifiProvisioningRequest getRootAsStopWifiProvisioningRequest(ByteBuffer _bb) { return getRootAsStopWifiProvisioningRequest(_bb, new StopWifiProvisioningRequest()); } - public static StopWifiProvisioningRequest getRootAsStopWifiProvisioningRequest(ByteBuffer _bb, StopWifiProvisioningRequest 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 StopWifiProvisioningRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startStopWifiProvisioningRequest(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endStopWifiProvisioningRequest(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 StopWifiProvisioningRequest get(int j) { return get(new StopWifiProvisioningRequest(), j); } - public StopWifiProvisioningRequest get(StopWifiProvisioningRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public StopWifiProvisioningRequestT unpack() { - StopWifiProvisioningRequestT _o = new StopWifiProvisioningRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(StopWifiProvisioningRequestT _o) { - } - public static int pack(FlatBufferBuilder builder, StopWifiProvisioningRequestT _o) { - if (_o == null) return 0; - startStopWifiProvisioningRequest(builder); - return endStopWifiProvisioningRequest(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 StopWifiProvisioningRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static StopWifiProvisioningRequest getRootAsStopWifiProvisioningRequest(ByteBuffer _bb) { return getRootAsStopWifiProvisioningRequest(_bb, new StopWifiProvisioningRequest()); } + public static StopWifiProvisioningRequest getRootAsStopWifiProvisioningRequest(ByteBuffer _bb, StopWifiProvisioningRequest 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 StopWifiProvisioningRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startStopWifiProvisioningRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endStopWifiProvisioningRequest(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 StopWifiProvisioningRequest get(int j) { return get(new StopWifiProvisioningRequest(), j); } + public StopWifiProvisioningRequest get(StopWifiProvisioningRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public StopWifiProvisioningRequestT unpack() { + StopWifiProvisioningRequestT _o = new StopWifiProvisioningRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(StopWifiProvisioningRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, StopWifiProvisioningRequestT _o) { + if (_o == null) return 0; + startStopWifiProvisioningRequest(builder); + return endStopWifiProvisioningRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StopWifiProvisioningRequestT.java b/protocol/java/src/solarxr_protocol/rpc/StopWifiProvisioningRequestT.java index b28c8a96..66ae769f 100644 --- a/protocol/java/src/solarxr_protocol/rpc/StopWifiProvisioningRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/StopWifiProvisioningRequestT.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 StopWifiProvisioningRequestT { - - - public StopWifiProvisioningRequestT() { - } -} - +// 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 StopWifiProvisioningRequestT { + + + public StopWifiProvisioningRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/TapDetectionSettings.java b/protocol/java/src/solarxr_protocol/rpc/TapDetectionSettings.java index caac8272..7eab533b 100644 --- a/protocol/java/src/solarxr_protocol/rpc/TapDetectionSettings.java +++ b/protocol/java/src/solarxr_protocol/rpc/TapDetectionSettings.java @@ -1,141 +1,141 @@ -// 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 TapDetectionSettings extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static TapDetectionSettings getRootAsTapDetectionSettings(ByteBuffer _bb) { return getRootAsTapDetectionSettings(_bb, new TapDetectionSettings()); } - public static TapDetectionSettings getRootAsTapDetectionSettings(ByteBuffer _bb, TapDetectionSettings 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 TapDetectionSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public boolean hasFullResetDelay() { return 0 != __offset(4); } - public float fullResetDelay() { int o = __offset(4); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - public boolean hasFullResetEnabled() { return 0 != __offset(6); } - public boolean fullResetEnabled() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasFullResetTaps() { return 0 != __offset(8); } - public int fullResetTaps() { int o = __offset(8); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - public boolean hasYawResetDelay() { return 0 != __offset(10); } - public float yawResetDelay() { int o = __offset(10); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - public boolean hasYawResetEnabled() { return 0 != __offset(12); } - public boolean yawResetEnabled() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasYawResetTaps() { return 0 != __offset(14); } - public int yawResetTaps() { int o = __offset(14); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - public boolean hasMountingResetDelay() { return 0 != __offset(16); } - public float mountingResetDelay() { int o = __offset(16); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - public boolean hasMountingResetEnabled() { return 0 != __offset(18); } - public boolean mountingResetEnabled() { int o = __offset(18); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasMountingResetTaps() { return 0 != __offset(20); } - public int mountingResetTaps() { int o = __offset(20); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - /** - * If true, disables reset behavior of tap detection and sends a - * TapDetectionSetupNotification, each time 2 taps are detected on any tracker - */ - public boolean hasSetupMode() { return 0 != __offset(22); } - public boolean setupMode() { int o = __offset(22); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasNumberTrackersOverThreshold() { return 0 != __offset(24); } - public int numberTrackersOverThreshold() { int o = __offset(24); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - - public static int createTapDetectionSettings(FlatBufferBuilder builder, - float fullResetDelay, - boolean fullResetEnabled, - int fullResetTaps, - float yawResetDelay, - boolean yawResetEnabled, - int yawResetTaps, - float mountingResetDelay, - boolean mountingResetEnabled, - int mountingResetTaps, - boolean setupMode, - int numberTrackersOverThreshold) { - builder.startTable(11); - TapDetectionSettings.addMountingResetDelay(builder, mountingResetDelay); - TapDetectionSettings.addYawResetDelay(builder, yawResetDelay); - TapDetectionSettings.addFullResetDelay(builder, fullResetDelay); - TapDetectionSettings.addNumberTrackersOverThreshold(builder, numberTrackersOverThreshold); - TapDetectionSettings.addSetupMode(builder, setupMode); - TapDetectionSettings.addMountingResetTaps(builder, mountingResetTaps); - TapDetectionSettings.addMountingResetEnabled(builder, mountingResetEnabled); - TapDetectionSettings.addYawResetTaps(builder, yawResetTaps); - TapDetectionSettings.addYawResetEnabled(builder, yawResetEnabled); - TapDetectionSettings.addFullResetTaps(builder, fullResetTaps); - TapDetectionSettings.addFullResetEnabled(builder, fullResetEnabled); - return TapDetectionSettings.endTapDetectionSettings(builder); - } - - public static void startTapDetectionSettings(FlatBufferBuilder builder) { builder.startTable(11); } - public static void addFullResetDelay(FlatBufferBuilder builder, float fullResetDelay) { builder.addFloat(0, fullResetDelay, 0f); } - public static void addFullResetEnabled(FlatBufferBuilder builder, boolean fullResetEnabled) { builder.addBoolean(1, fullResetEnabled, false); } - public static void addFullResetTaps(FlatBufferBuilder builder, int fullResetTaps) { builder.addByte(2, (byte) fullResetTaps, (byte) 0); } - public static void addYawResetDelay(FlatBufferBuilder builder, float yawResetDelay) { builder.addFloat(3, yawResetDelay, 0f); } - public static void addYawResetEnabled(FlatBufferBuilder builder, boolean yawResetEnabled) { builder.addBoolean(4, yawResetEnabled, false); } - public static void addYawResetTaps(FlatBufferBuilder builder, int yawResetTaps) { builder.addByte(5, (byte) yawResetTaps, (byte) 0); } - public static void addMountingResetDelay(FlatBufferBuilder builder, float mountingResetDelay) { builder.addFloat(6, mountingResetDelay, 0f); } - public static void addMountingResetEnabled(FlatBufferBuilder builder, boolean mountingResetEnabled) { builder.addBoolean(7, mountingResetEnabled, false); } - public static void addMountingResetTaps(FlatBufferBuilder builder, int mountingResetTaps) { builder.addByte(8, (byte) mountingResetTaps, (byte) 0); } - public static void addSetupMode(FlatBufferBuilder builder, boolean setupMode) { builder.addBoolean(9, setupMode, false); } - public static void addNumberTrackersOverThreshold(FlatBufferBuilder builder, int numberTrackersOverThreshold) { builder.addByte(10, (byte) numberTrackersOverThreshold, (byte) 0); } - public static int endTapDetectionSettings(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 TapDetectionSettings get(int j) { return get(new TapDetectionSettings(), j); } - public TapDetectionSettings get(TapDetectionSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public TapDetectionSettingsT unpack() { - TapDetectionSettingsT _o = new TapDetectionSettingsT(); - unpackTo(_o); - return _o; - } - public void unpackTo(TapDetectionSettingsT _o) { - Float _oFullResetDelay = hasFullResetDelay() ? fullResetDelay() : null; - _o.setFullResetDelay(_oFullResetDelay); - Boolean _oFullResetEnabled = hasFullResetEnabled() ? fullResetEnabled() : null; - _o.setFullResetEnabled(_oFullResetEnabled); - Integer _oFullResetTaps = hasFullResetTaps() ? fullResetTaps() : null; - _o.setFullResetTaps(_oFullResetTaps); - Float _oYawResetDelay = hasYawResetDelay() ? yawResetDelay() : null; - _o.setYawResetDelay(_oYawResetDelay); - Boolean _oYawResetEnabled = hasYawResetEnabled() ? yawResetEnabled() : null; - _o.setYawResetEnabled(_oYawResetEnabled); - Integer _oYawResetTaps = hasYawResetTaps() ? yawResetTaps() : null; - _o.setYawResetTaps(_oYawResetTaps); - Float _oMountingResetDelay = hasMountingResetDelay() ? mountingResetDelay() : null; - _o.setMountingResetDelay(_oMountingResetDelay); - Boolean _oMountingResetEnabled = hasMountingResetEnabled() ? mountingResetEnabled() : null; - _o.setMountingResetEnabled(_oMountingResetEnabled); - Integer _oMountingResetTaps = hasMountingResetTaps() ? mountingResetTaps() : null; - _o.setMountingResetTaps(_oMountingResetTaps); - Boolean _oSetupMode = hasSetupMode() ? setupMode() : null; - _o.setSetupMode(_oSetupMode); - Integer _oNumberTrackersOverThreshold = hasNumberTrackersOverThreshold() ? numberTrackersOverThreshold() : null; - _o.setNumberTrackersOverThreshold(_oNumberTrackersOverThreshold); - } - public static int pack(FlatBufferBuilder builder, TapDetectionSettingsT _o) { - if (_o == null) return 0; - return createTapDetectionSettings( - builder, - _o.getFullResetDelay(), - _o.getFullResetEnabled(), - _o.getFullResetTaps(), - _o.getYawResetDelay(), - _o.getYawResetEnabled(), - _o.getYawResetTaps(), - _o.getMountingResetDelay(), - _o.getMountingResetEnabled(), - _o.getMountingResetTaps(), - _o.getSetupMode(), - _o.getNumberTrackersOverThreshold()); - } -} - +// 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 TapDetectionSettings extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static TapDetectionSettings getRootAsTapDetectionSettings(ByteBuffer _bb) { return getRootAsTapDetectionSettings(_bb, new TapDetectionSettings()); } + public static TapDetectionSettings getRootAsTapDetectionSettings(ByteBuffer _bb, TapDetectionSettings 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 TapDetectionSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean hasFullResetDelay() { return 0 != __offset(4); } + public float fullResetDelay() { int o = __offset(4); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + public boolean hasFullResetEnabled() { return 0 != __offset(6); } + public boolean fullResetEnabled() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasFullResetTaps() { return 0 != __offset(8); } + public int fullResetTaps() { int o = __offset(8); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + public boolean hasYawResetDelay() { return 0 != __offset(10); } + public float yawResetDelay() { int o = __offset(10); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + public boolean hasYawResetEnabled() { return 0 != __offset(12); } + public boolean yawResetEnabled() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasYawResetTaps() { return 0 != __offset(14); } + public int yawResetTaps() { int o = __offset(14); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + public boolean hasMountingResetDelay() { return 0 != __offset(16); } + public float mountingResetDelay() { int o = __offset(16); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + public boolean hasMountingResetEnabled() { return 0 != __offset(18); } + public boolean mountingResetEnabled() { int o = __offset(18); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasMountingResetTaps() { return 0 != __offset(20); } + public int mountingResetTaps() { int o = __offset(20); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + /** + * If true, disables reset behavior of tap detection and sends a + * TapDetectionSetupNotification, each time 2 taps are detected on any tracker + */ + public boolean hasSetupMode() { return 0 != __offset(22); } + public boolean setupMode() { int o = __offset(22); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasNumberTrackersOverThreshold() { return 0 != __offset(24); } + public int numberTrackersOverThreshold() { int o = __offset(24); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + + public static int createTapDetectionSettings(FlatBufferBuilder builder, + float fullResetDelay, + boolean fullResetEnabled, + int fullResetTaps, + float yawResetDelay, + boolean yawResetEnabled, + int yawResetTaps, + float mountingResetDelay, + boolean mountingResetEnabled, + int mountingResetTaps, + boolean setupMode, + int numberTrackersOverThreshold) { + builder.startTable(11); + TapDetectionSettings.addMountingResetDelay(builder, mountingResetDelay); + TapDetectionSettings.addYawResetDelay(builder, yawResetDelay); + TapDetectionSettings.addFullResetDelay(builder, fullResetDelay); + TapDetectionSettings.addNumberTrackersOverThreshold(builder, numberTrackersOverThreshold); + TapDetectionSettings.addSetupMode(builder, setupMode); + TapDetectionSettings.addMountingResetTaps(builder, mountingResetTaps); + TapDetectionSettings.addMountingResetEnabled(builder, mountingResetEnabled); + TapDetectionSettings.addYawResetTaps(builder, yawResetTaps); + TapDetectionSettings.addYawResetEnabled(builder, yawResetEnabled); + TapDetectionSettings.addFullResetTaps(builder, fullResetTaps); + TapDetectionSettings.addFullResetEnabled(builder, fullResetEnabled); + return TapDetectionSettings.endTapDetectionSettings(builder); + } + + public static void startTapDetectionSettings(FlatBufferBuilder builder) { builder.startTable(11); } + public static void addFullResetDelay(FlatBufferBuilder builder, float fullResetDelay) { builder.addFloat(0, fullResetDelay, 0f); } + public static void addFullResetEnabled(FlatBufferBuilder builder, boolean fullResetEnabled) { builder.addBoolean(1, fullResetEnabled, false); } + public static void addFullResetTaps(FlatBufferBuilder builder, int fullResetTaps) { builder.addByte(2, (byte) fullResetTaps, (byte) 0); } + public static void addYawResetDelay(FlatBufferBuilder builder, float yawResetDelay) { builder.addFloat(3, yawResetDelay, 0f); } + public static void addYawResetEnabled(FlatBufferBuilder builder, boolean yawResetEnabled) { builder.addBoolean(4, yawResetEnabled, false); } + public static void addYawResetTaps(FlatBufferBuilder builder, int yawResetTaps) { builder.addByte(5, (byte) yawResetTaps, (byte) 0); } + public static void addMountingResetDelay(FlatBufferBuilder builder, float mountingResetDelay) { builder.addFloat(6, mountingResetDelay, 0f); } + public static void addMountingResetEnabled(FlatBufferBuilder builder, boolean mountingResetEnabled) { builder.addBoolean(7, mountingResetEnabled, false); } + public static void addMountingResetTaps(FlatBufferBuilder builder, int mountingResetTaps) { builder.addByte(8, (byte) mountingResetTaps, (byte) 0); } + public static void addSetupMode(FlatBufferBuilder builder, boolean setupMode) { builder.addBoolean(9, setupMode, false); } + public static void addNumberTrackersOverThreshold(FlatBufferBuilder builder, int numberTrackersOverThreshold) { builder.addByte(10, (byte) numberTrackersOverThreshold, (byte) 0); } + public static int endTapDetectionSettings(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 TapDetectionSettings get(int j) { return get(new TapDetectionSettings(), j); } + public TapDetectionSettings get(TapDetectionSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public TapDetectionSettingsT unpack() { + TapDetectionSettingsT _o = new TapDetectionSettingsT(); + unpackTo(_o); + return _o; + } + public void unpackTo(TapDetectionSettingsT _o) { + Float _oFullResetDelay = hasFullResetDelay() ? fullResetDelay() : null; + _o.setFullResetDelay(_oFullResetDelay); + Boolean _oFullResetEnabled = hasFullResetEnabled() ? fullResetEnabled() : null; + _o.setFullResetEnabled(_oFullResetEnabled); + Integer _oFullResetTaps = hasFullResetTaps() ? fullResetTaps() : null; + _o.setFullResetTaps(_oFullResetTaps); + Float _oYawResetDelay = hasYawResetDelay() ? yawResetDelay() : null; + _o.setYawResetDelay(_oYawResetDelay); + Boolean _oYawResetEnabled = hasYawResetEnabled() ? yawResetEnabled() : null; + _o.setYawResetEnabled(_oYawResetEnabled); + Integer _oYawResetTaps = hasYawResetTaps() ? yawResetTaps() : null; + _o.setYawResetTaps(_oYawResetTaps); + Float _oMountingResetDelay = hasMountingResetDelay() ? mountingResetDelay() : null; + _o.setMountingResetDelay(_oMountingResetDelay); + Boolean _oMountingResetEnabled = hasMountingResetEnabled() ? mountingResetEnabled() : null; + _o.setMountingResetEnabled(_oMountingResetEnabled); + Integer _oMountingResetTaps = hasMountingResetTaps() ? mountingResetTaps() : null; + _o.setMountingResetTaps(_oMountingResetTaps); + Boolean _oSetupMode = hasSetupMode() ? setupMode() : null; + _o.setSetupMode(_oSetupMode); + Integer _oNumberTrackersOverThreshold = hasNumberTrackersOverThreshold() ? numberTrackersOverThreshold() : null; + _o.setNumberTrackersOverThreshold(_oNumberTrackersOverThreshold); + } + public static int pack(FlatBufferBuilder builder, TapDetectionSettingsT _o) { + if (_o == null) return 0; + return createTapDetectionSettings( + builder, + _o.getFullResetDelay(), + _o.getFullResetEnabled(), + _o.getFullResetTaps(), + _o.getYawResetDelay(), + _o.getYawResetEnabled(), + _o.getYawResetTaps(), + _o.getMountingResetDelay(), + _o.getMountingResetEnabled(), + _o.getMountingResetTaps(), + _o.getSetupMode(), + _o.getNumberTrackersOverThreshold()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/TapDetectionSettingsT.java b/protocol/java/src/solarxr_protocol/rpc/TapDetectionSettingsT.java index 87c3d870..672fd765 100644 --- a/protocol/java/src/solarxr_protocol/rpc/TapDetectionSettingsT.java +++ b/protocol/java/src/solarxr_protocol/rpc/TapDetectionSettingsT.java @@ -1,82 +1,82 @@ -// 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 TapDetectionSettingsT { - private Float fullResetDelay; - private Boolean fullResetEnabled; - private Integer fullResetTaps; - private Float yawResetDelay; - private Boolean yawResetEnabled; - private Integer yawResetTaps; - private Float mountingResetDelay; - private Boolean mountingResetEnabled; - private Integer mountingResetTaps; - private Boolean setupMode; - private Integer numberTrackersOverThreshold; - - public Float getFullResetDelay() { return fullResetDelay; } - - public void setFullResetDelay(Float fullResetDelay) { this.fullResetDelay = fullResetDelay; } - - public Boolean getFullResetEnabled() { return fullResetEnabled; } - - public void setFullResetEnabled(Boolean fullResetEnabled) { this.fullResetEnabled = fullResetEnabled; } - - public Integer getFullResetTaps() { return fullResetTaps; } - - public void setFullResetTaps(Integer fullResetTaps) { this.fullResetTaps = fullResetTaps; } - - public Float getYawResetDelay() { return yawResetDelay; } - - public void setYawResetDelay(Float yawResetDelay) { this.yawResetDelay = yawResetDelay; } - - public Boolean getYawResetEnabled() { return yawResetEnabled; } - - public void setYawResetEnabled(Boolean yawResetEnabled) { this.yawResetEnabled = yawResetEnabled; } - - public Integer getYawResetTaps() { return yawResetTaps; } - - public void setYawResetTaps(Integer yawResetTaps) { this.yawResetTaps = yawResetTaps; } - - public Float getMountingResetDelay() { return mountingResetDelay; } - - public void setMountingResetDelay(Float mountingResetDelay) { this.mountingResetDelay = mountingResetDelay; } - - public Boolean getMountingResetEnabled() { return mountingResetEnabled; } - - public void setMountingResetEnabled(Boolean mountingResetEnabled) { this.mountingResetEnabled = mountingResetEnabled; } - - public Integer getMountingResetTaps() { return mountingResetTaps; } - - public void setMountingResetTaps(Integer mountingResetTaps) { this.mountingResetTaps = mountingResetTaps; } - - public Boolean getSetupMode() { return setupMode; } - - public void setSetupMode(Boolean setupMode) { this.setupMode = setupMode; } - - public Integer getNumberTrackersOverThreshold() { return numberTrackersOverThreshold; } - - public void setNumberTrackersOverThreshold(Integer numberTrackersOverThreshold) { this.numberTrackersOverThreshold = numberTrackersOverThreshold; } - - - public TapDetectionSettingsT() { - this.fullResetDelay = null; - this.fullResetEnabled = null; - this.fullResetTaps = null; - this.yawResetDelay = null; - this.yawResetEnabled = null; - this.yawResetTaps = null; - this.mountingResetDelay = null; - this.mountingResetEnabled = null; - this.mountingResetTaps = null; - this.setupMode = null; - this.numberTrackersOverThreshold = 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 TapDetectionSettingsT { + private Float fullResetDelay; + private Boolean fullResetEnabled; + private Integer fullResetTaps; + private Float yawResetDelay; + private Boolean yawResetEnabled; + private Integer yawResetTaps; + private Float mountingResetDelay; + private Boolean mountingResetEnabled; + private Integer mountingResetTaps; + private Boolean setupMode; + private Integer numberTrackersOverThreshold; + + public Float getFullResetDelay() { return fullResetDelay; } + + public void setFullResetDelay(Float fullResetDelay) { this.fullResetDelay = fullResetDelay; } + + public Boolean getFullResetEnabled() { return fullResetEnabled; } + + public void setFullResetEnabled(Boolean fullResetEnabled) { this.fullResetEnabled = fullResetEnabled; } + + public Integer getFullResetTaps() { return fullResetTaps; } + + public void setFullResetTaps(Integer fullResetTaps) { this.fullResetTaps = fullResetTaps; } + + public Float getYawResetDelay() { return yawResetDelay; } + + public void setYawResetDelay(Float yawResetDelay) { this.yawResetDelay = yawResetDelay; } + + public Boolean getYawResetEnabled() { return yawResetEnabled; } + + public void setYawResetEnabled(Boolean yawResetEnabled) { this.yawResetEnabled = yawResetEnabled; } + + public Integer getYawResetTaps() { return yawResetTaps; } + + public void setYawResetTaps(Integer yawResetTaps) { this.yawResetTaps = yawResetTaps; } + + public Float getMountingResetDelay() { return mountingResetDelay; } + + public void setMountingResetDelay(Float mountingResetDelay) { this.mountingResetDelay = mountingResetDelay; } + + public Boolean getMountingResetEnabled() { return mountingResetEnabled; } + + public void setMountingResetEnabled(Boolean mountingResetEnabled) { this.mountingResetEnabled = mountingResetEnabled; } + + public Integer getMountingResetTaps() { return mountingResetTaps; } + + public void setMountingResetTaps(Integer mountingResetTaps) { this.mountingResetTaps = mountingResetTaps; } + + public Boolean getSetupMode() { return setupMode; } + + public void setSetupMode(Boolean setupMode) { this.setupMode = setupMode; } + + public Integer getNumberTrackersOverThreshold() { return numberTrackersOverThreshold; } + + public void setNumberTrackersOverThreshold(Integer numberTrackersOverThreshold) { this.numberTrackersOverThreshold = numberTrackersOverThreshold; } + + + public TapDetectionSettingsT() { + this.fullResetDelay = null; + this.fullResetEnabled = null; + this.fullResetTaps = null; + this.yawResetDelay = null; + this.yawResetEnabled = null; + this.yawResetTaps = null; + this.mountingResetDelay = null; + this.mountingResetEnabled = null; + this.mountingResetTaps = null; + this.setupMode = null; + this.numberTrackersOverThreshold = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/TapDetectionSetupNotification.java b/protocol/java/src/solarxr_protocol/rpc/TapDetectionSetupNotification.java index 516a57da..dd41d96d 100644 --- a/protocol/java/src/solarxr_protocol/rpc/TapDetectionSetupNotification.java +++ b/protocol/java/src/solarxr_protocol/rpc/TapDetectionSetupNotification.java @@ -1,61 +1,61 @@ -// 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.*; - -/** - * See TapDetectionSettings::setup_mode - */ -@SuppressWarnings("unused") -public final class TapDetectionSetupNotification extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static TapDetectionSetupNotification getRootAsTapDetectionSetupNotification(ByteBuffer _bb) { return getRootAsTapDetectionSetupNotification(_bb, new TapDetectionSetupNotification()); } - public static TapDetectionSetupNotification getRootAsTapDetectionSetupNotification(ByteBuffer _bb, TapDetectionSetupNotification 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 TapDetectionSetupNotification __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 static int createTapDetectionSetupNotification(FlatBufferBuilder builder, - int trackerIdOffset) { - builder.startTable(1); - TapDetectionSetupNotification.addTrackerId(builder, trackerIdOffset); - return TapDetectionSetupNotification.endTapDetectionSetupNotification(builder); - } - - public static void startTapDetectionSetupNotification(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addTrackerId(FlatBufferBuilder builder, int trackerIdOffset) { builder.addOffset(0, trackerIdOffset, 0); } - public static int endTapDetectionSetupNotification(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 TapDetectionSetupNotification get(int j) { return get(new TapDetectionSetupNotification(), j); } - public TapDetectionSetupNotification get(TapDetectionSetupNotification obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public TapDetectionSetupNotificationT unpack() { - TapDetectionSetupNotificationT _o = new TapDetectionSetupNotificationT(); - unpackTo(_o); - return _o; - } - public void unpackTo(TapDetectionSetupNotificationT _o) { - if (trackerId() != null) _o.setTrackerId(trackerId().unpack()); - else _o.setTrackerId(null); - } - public static int pack(FlatBufferBuilder builder, TapDetectionSetupNotificationT _o) { - if (_o == null) return 0; - int _trackerId = _o.getTrackerId() == null ? 0 : solarxr_protocol.datatypes.TrackerId.pack(builder, _o.getTrackerId()); - return createTapDetectionSetupNotification( - builder, - _trackerId); - } -} - +// 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.*; + +/** + * See TapDetectionSettings::setup_mode + */ +@SuppressWarnings("unused") +public final class TapDetectionSetupNotification extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static TapDetectionSetupNotification getRootAsTapDetectionSetupNotification(ByteBuffer _bb) { return getRootAsTapDetectionSetupNotification(_bb, new TapDetectionSetupNotification()); } + public static TapDetectionSetupNotification getRootAsTapDetectionSetupNotification(ByteBuffer _bb, TapDetectionSetupNotification 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 TapDetectionSetupNotification __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 static int createTapDetectionSetupNotification(FlatBufferBuilder builder, + int trackerIdOffset) { + builder.startTable(1); + TapDetectionSetupNotification.addTrackerId(builder, trackerIdOffset); + return TapDetectionSetupNotification.endTapDetectionSetupNotification(builder); + } + + public static void startTapDetectionSetupNotification(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addTrackerId(FlatBufferBuilder builder, int trackerIdOffset) { builder.addOffset(0, trackerIdOffset, 0); } + public static int endTapDetectionSetupNotification(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 TapDetectionSetupNotification get(int j) { return get(new TapDetectionSetupNotification(), j); } + public TapDetectionSetupNotification get(TapDetectionSetupNotification obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public TapDetectionSetupNotificationT unpack() { + TapDetectionSetupNotificationT _o = new TapDetectionSetupNotificationT(); + unpackTo(_o); + return _o; + } + public void unpackTo(TapDetectionSetupNotificationT _o) { + if (trackerId() != null) _o.setTrackerId(trackerId().unpack()); + else _o.setTrackerId(null); + } + public static int pack(FlatBufferBuilder builder, TapDetectionSetupNotificationT _o) { + if (_o == null) return 0; + int _trackerId = _o.getTrackerId() == null ? 0 : solarxr_protocol.datatypes.TrackerId.pack(builder, _o.getTrackerId()); + return createTapDetectionSetupNotification( + builder, + _trackerId); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/TapDetectionSetupNotificationT.java b/protocol/java/src/solarxr_protocol/rpc/TapDetectionSetupNotificationT.java index 2742c1f9..c96a21ad 100644 --- a/protocol/java/src/solarxr_protocol/rpc/TapDetectionSetupNotificationT.java +++ b/protocol/java/src/solarxr_protocol/rpc/TapDetectionSetupNotificationT.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 TapDetectionSetupNotificationT { - private solarxr_protocol.datatypes.TrackerIdT trackerId; - - public solarxr_protocol.datatypes.TrackerIdT getTrackerId() { return trackerId; } - - public void setTrackerId(solarxr_protocol.datatypes.TrackerIdT trackerId) { this.trackerId = trackerId; } - - - public TapDetectionSetupNotificationT() { - this.trackerId = 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 TapDetectionSetupNotificationT { + private solarxr_protocol.datatypes.TrackerIdT trackerId; + + public solarxr_protocol.datatypes.TrackerIdT getTrackerId() { return trackerId; } + + public void setTrackerId(solarxr_protocol.datatypes.TrackerIdT trackerId) { this.trackerId = trackerId; } + + + public TapDetectionSetupNotificationT() { + this.trackerId = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateRequest.java b/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateRequest.java index b50e1d44..f05acbbf 100644 --- a/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateRequest.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 tracking pause - */ -@SuppressWarnings("unused") -public final class TrackingPauseStateRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static TrackingPauseStateRequest getRootAsTrackingPauseStateRequest(ByteBuffer _bb) { return getRootAsTrackingPauseStateRequest(_bb, new TrackingPauseStateRequest()); } - public static TrackingPauseStateRequest getRootAsTrackingPauseStateRequest(ByteBuffer _bb, TrackingPauseStateRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } - public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } - public TrackingPauseStateRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startTrackingPauseStateRequest(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endTrackingPauseStateRequest(FlatBufferBuilder builder) { - int o = builder.endTable(); - return o; - } - - public static final class Vector extends BaseVector { - public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } - - public TrackingPauseStateRequest get(int j) { return get(new TrackingPauseStateRequest(), j); } - public TrackingPauseStateRequest get(TrackingPauseStateRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public TrackingPauseStateRequestT unpack() { - TrackingPauseStateRequestT _o = new TrackingPauseStateRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(TrackingPauseStateRequestT _o) { - } - public static int pack(FlatBufferBuilder builder, TrackingPauseStateRequestT _o) { - if (_o == null) return 0; - startTrackingPauseStateRequest(builder); - return endTrackingPauseStateRequest(builder); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Requests the current state of tracking pause + */ +@SuppressWarnings("unused") +public final class TrackingPauseStateRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static TrackingPauseStateRequest getRootAsTrackingPauseStateRequest(ByteBuffer _bb) { return getRootAsTrackingPauseStateRequest(_bb, new TrackingPauseStateRequest()); } + public static TrackingPauseStateRequest getRootAsTrackingPauseStateRequest(ByteBuffer _bb, TrackingPauseStateRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public TrackingPauseStateRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startTrackingPauseStateRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endTrackingPauseStateRequest(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public TrackingPauseStateRequest get(int j) { return get(new TrackingPauseStateRequest(), j); } + public TrackingPauseStateRequest get(TrackingPauseStateRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public TrackingPauseStateRequestT unpack() { + TrackingPauseStateRequestT _o = new TrackingPauseStateRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(TrackingPauseStateRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, TrackingPauseStateRequestT _o) { + if (_o == null) return 0; + startTrackingPauseStateRequest(builder); + return endTrackingPauseStateRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateRequestT.java b/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateRequestT.java index c90894bf..946b2204 100644 --- a/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateRequestT.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 TrackingPauseStateRequestT { - - - public TrackingPauseStateRequestT() { - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class TrackingPauseStateRequestT { + + + public TrackingPauseStateRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateResponse.java b/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateResponse.java index c91ca8bd..229d0906 100644 --- a/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateResponse.java @@ -1,59 +1,59 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -@SuppressWarnings("unused") -public final class TrackingPauseStateResponse extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static TrackingPauseStateResponse getRootAsTrackingPauseStateResponse(ByteBuffer _bb) { return getRootAsTrackingPauseStateResponse(_bb, new TrackingPauseStateResponse()); } - public static TrackingPauseStateResponse getRootAsTrackingPauseStateResponse(ByteBuffer _bb, TrackingPauseStateResponse obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } - public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } - public TrackingPauseStateResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - /** - * Skeleton tracking is paused if true, skeleton tracking is unpaused if false. - */ - public boolean trackingPaused() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static int createTrackingPauseStateResponse(FlatBufferBuilder builder, - boolean trackingPaused) { - builder.startTable(1); - TrackingPauseStateResponse.addTrackingPaused(builder, trackingPaused); - return TrackingPauseStateResponse.endTrackingPauseStateResponse(builder); - } - - public static void startTrackingPauseStateResponse(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addTrackingPaused(FlatBufferBuilder builder, boolean trackingPaused) { builder.addBoolean(0, trackingPaused, false); } - public static int endTrackingPauseStateResponse(FlatBufferBuilder builder) { - int o = builder.endTable(); - return o; - } - - public static final class Vector extends BaseVector { - public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } - - public TrackingPauseStateResponse get(int j) { return get(new TrackingPauseStateResponse(), j); } - public TrackingPauseStateResponse get(TrackingPauseStateResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public TrackingPauseStateResponseT unpack() { - TrackingPauseStateResponseT _o = new TrackingPauseStateResponseT(); - unpackTo(_o); - return _o; - } - public void unpackTo(TrackingPauseStateResponseT _o) { - boolean _oTrackingPaused = trackingPaused(); - _o.setTrackingPaused(_oTrackingPaused); - } - public static int pack(FlatBufferBuilder builder, TrackingPauseStateResponseT _o) { - if (_o == null) return 0; - return createTrackingPauseStateResponse( - builder, - _o.getTrackingPaused()); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class TrackingPauseStateResponse extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static TrackingPauseStateResponse getRootAsTrackingPauseStateResponse(ByteBuffer _bb) { return getRootAsTrackingPauseStateResponse(_bb, new TrackingPauseStateResponse()); } + public static TrackingPauseStateResponse getRootAsTrackingPauseStateResponse(ByteBuffer _bb, TrackingPauseStateResponse obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public TrackingPauseStateResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * Skeleton tracking is paused if true, skeleton tracking is unpaused if false. + */ + public boolean trackingPaused() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createTrackingPauseStateResponse(FlatBufferBuilder builder, + boolean trackingPaused) { + builder.startTable(1); + TrackingPauseStateResponse.addTrackingPaused(builder, trackingPaused); + return TrackingPauseStateResponse.endTrackingPauseStateResponse(builder); + } + + public static void startTrackingPauseStateResponse(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addTrackingPaused(FlatBufferBuilder builder, boolean trackingPaused) { builder.addBoolean(0, trackingPaused, false); } + public static int endTrackingPauseStateResponse(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public TrackingPauseStateResponse get(int j) { return get(new TrackingPauseStateResponse(), j); } + public TrackingPauseStateResponse get(TrackingPauseStateResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public TrackingPauseStateResponseT unpack() { + TrackingPauseStateResponseT _o = new TrackingPauseStateResponseT(); + unpackTo(_o); + return _o; + } + public void unpackTo(TrackingPauseStateResponseT _o) { + boolean _oTrackingPaused = trackingPaused(); + _o.setTrackingPaused(_oTrackingPaused); + } + public static int pack(FlatBufferBuilder builder, TrackingPauseStateResponseT _o) { + if (_o == null) return 0; + return createTrackingPauseStateResponse( + builder, + _o.getTrackingPaused()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateResponseT.java b/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateResponseT.java index 2331b48d..cf9ecb56 100644 --- a/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateResponseT.java +++ b/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateResponseT.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 TrackingPauseStateResponseT { - private boolean trackingPaused; - - public boolean getTrackingPaused() { return trackingPaused; } - - public void setTrackingPaused(boolean trackingPaused) { this.trackingPaused = trackingPaused; } - - - public TrackingPauseStateResponseT() { - this.trackingPaused = 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 TrackingPauseStateResponseT { + private boolean trackingPaused; + + public boolean getTrackingPaused() { return trackingPaused; } + + public void setTrackingPaused(boolean trackingPaused) { this.trackingPaused = trackingPaused; } + + + public TrackingPauseStateResponseT() { + this.trackingPaused = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotification.java b/protocol/java/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotification.java index e0dab501..8187560b 100644 --- a/protocol/java/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotification.java +++ b/protocol/java/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotification.java @@ -1,64 +1,64 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * Server notifies connection of an unknown device. - * If the notification is no longer sent, it means the device connected to another - * server, got connected to this server or it was turned off. - */ -@SuppressWarnings("unused") -public final class UnknownDeviceHandshakeNotification extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static UnknownDeviceHandshakeNotification getRootAsUnknownDeviceHandshakeNotification(ByteBuffer _bb) { return getRootAsUnknownDeviceHandshakeNotification(_bb, new UnknownDeviceHandshakeNotification()); } - public static UnknownDeviceHandshakeNotification getRootAsUnknownDeviceHandshakeNotification(ByteBuffer _bb, UnknownDeviceHandshakeNotification obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } - public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } - public UnknownDeviceHandshakeNotification __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public String macAddress() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer macAddressAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } - public ByteBuffer macAddressInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } - - public static int createUnknownDeviceHandshakeNotification(FlatBufferBuilder builder, - int macAddressOffset) { - builder.startTable(1); - UnknownDeviceHandshakeNotification.addMacAddress(builder, macAddressOffset); - return UnknownDeviceHandshakeNotification.endUnknownDeviceHandshakeNotification(builder); - } - - public static void startUnknownDeviceHandshakeNotification(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addMacAddress(FlatBufferBuilder builder, int macAddressOffset) { builder.addOffset(0, macAddressOffset, 0); } - public static int endUnknownDeviceHandshakeNotification(FlatBufferBuilder builder) { - int o = builder.endTable(); - return o; - } - - public static final class Vector extends BaseVector { - public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } - - public UnknownDeviceHandshakeNotification get(int j) { return get(new UnknownDeviceHandshakeNotification(), j); } - public UnknownDeviceHandshakeNotification get(UnknownDeviceHandshakeNotification obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public UnknownDeviceHandshakeNotificationT unpack() { - UnknownDeviceHandshakeNotificationT _o = new UnknownDeviceHandshakeNotificationT(); - unpackTo(_o); - return _o; - } - public void unpackTo(UnknownDeviceHandshakeNotificationT _o) { - String _oMacAddress = macAddress(); - _o.setMacAddress(_oMacAddress); - } - public static int pack(FlatBufferBuilder builder, UnknownDeviceHandshakeNotificationT _o) { - if (_o == null) return 0; - int _macAddress = _o.getMacAddress() == null ? 0 : builder.createString(_o.getMacAddress()); - return createUnknownDeviceHandshakeNotification( - builder, - _macAddress); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Server notifies connection of an unknown device. + * If the notification is no longer sent, it means the device connected to another + * server, got connected to this server or it was turned off. + */ +@SuppressWarnings("unused") +public final class UnknownDeviceHandshakeNotification extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static UnknownDeviceHandshakeNotification getRootAsUnknownDeviceHandshakeNotification(ByteBuffer _bb) { return getRootAsUnknownDeviceHandshakeNotification(_bb, new UnknownDeviceHandshakeNotification()); } + public static UnknownDeviceHandshakeNotification getRootAsUnknownDeviceHandshakeNotification(ByteBuffer _bb, UnknownDeviceHandshakeNotification obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public UnknownDeviceHandshakeNotification __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String macAddress() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer macAddressAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer macAddressInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + + public static int createUnknownDeviceHandshakeNotification(FlatBufferBuilder builder, + int macAddressOffset) { + builder.startTable(1); + UnknownDeviceHandshakeNotification.addMacAddress(builder, macAddressOffset); + return UnknownDeviceHandshakeNotification.endUnknownDeviceHandshakeNotification(builder); + } + + public static void startUnknownDeviceHandshakeNotification(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addMacAddress(FlatBufferBuilder builder, int macAddressOffset) { builder.addOffset(0, macAddressOffset, 0); } + public static int endUnknownDeviceHandshakeNotification(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public UnknownDeviceHandshakeNotification get(int j) { return get(new UnknownDeviceHandshakeNotification(), j); } + public UnknownDeviceHandshakeNotification get(UnknownDeviceHandshakeNotification obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public UnknownDeviceHandshakeNotificationT unpack() { + UnknownDeviceHandshakeNotificationT _o = new UnknownDeviceHandshakeNotificationT(); + unpackTo(_o); + return _o; + } + public void unpackTo(UnknownDeviceHandshakeNotificationT _o) { + String _oMacAddress = macAddress(); + _o.setMacAddress(_oMacAddress); + } + public static int pack(FlatBufferBuilder builder, UnknownDeviceHandshakeNotificationT _o) { + if (_o == null) return 0; + int _macAddress = _o.getMacAddress() == null ? 0 : builder.createString(_o.getMacAddress()); + return createUnknownDeviceHandshakeNotification( + builder, + _macAddress); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotificationT.java b/protocol/java/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotificationT.java index 9d6ae747..e88df746 100644 --- a/protocol/java/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotificationT.java +++ b/protocol/java/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotificationT.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 UnknownDeviceHandshakeNotificationT { - private String macAddress; - - public String getMacAddress() { return macAddress; } - - public void setMacAddress(String macAddress) { this.macAddress = macAddress; } - - - public UnknownDeviceHandshakeNotificationT() { - this.macAddress = 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 UnknownDeviceHandshakeNotificationT { + private String macAddress; + + public String getMacAddress() { return macAddress; } + + public void setMacAddress(String macAddress) { this.macAddress = macAddress; } + + + public UnknownDeviceHandshakeNotificationT() { + this.macAddress = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/VMCOSCSettings.java b/protocol/java/src/solarxr_protocol/rpc/VMCOSCSettings.java index ecfcdd1b..75c1874d 100644 --- a/protocol/java/src/solarxr_protocol/rpc/VMCOSCSettings.java +++ b/protocol/java/src/solarxr_protocol/rpc/VMCOSCSettings.java @@ -1,85 +1,85 @@ -// 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.*; - -/** - * OSC Settings specific to VMC - */ -@SuppressWarnings("unused") -public final class VMCOSCSettings extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static VMCOSCSettings getRootAsVMCOSCSettings(ByteBuffer _bb) { return getRootAsVMCOSCSettings(_bb, new VMCOSCSettings()); } - public static VMCOSCSettings getRootAsVMCOSCSettings(ByteBuffer _bb, VMCOSCSettings 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 VMCOSCSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public solarxr_protocol.rpc.OSCSettings oscSettings() { return oscSettings(new solarxr_protocol.rpc.OSCSettings()); } - public solarxr_protocol.rpc.OSCSettings oscSettings(solarxr_protocol.rpc.OSCSettings obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public String vrmJson() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer vrmJsonAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } - public ByteBuffer vrmJsonInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } - public boolean anchorHip() { int o = __offset(8); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean mirrorTracking() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static int createVMCOSCSettings(FlatBufferBuilder builder, - int oscSettingsOffset, - int vrmJsonOffset, - boolean anchorHip, - boolean mirrorTracking) { - builder.startTable(4); - VMCOSCSettings.addVrmJson(builder, vrmJsonOffset); - VMCOSCSettings.addOscSettings(builder, oscSettingsOffset); - VMCOSCSettings.addMirrorTracking(builder, mirrorTracking); - VMCOSCSettings.addAnchorHip(builder, anchorHip); - return VMCOSCSettings.endVMCOSCSettings(builder); - } - - public static void startVMCOSCSettings(FlatBufferBuilder builder) { builder.startTable(4); } - public static void addOscSettings(FlatBufferBuilder builder, int oscSettingsOffset) { builder.addOffset(0, oscSettingsOffset, 0); } - public static void addVrmJson(FlatBufferBuilder builder, int vrmJsonOffset) { builder.addOffset(1, vrmJsonOffset, 0); } - public static void addAnchorHip(FlatBufferBuilder builder, boolean anchorHip) { builder.addBoolean(2, anchorHip, false); } - public static void addMirrorTracking(FlatBufferBuilder builder, boolean mirrorTracking) { builder.addBoolean(3, mirrorTracking, false); } - public static int endVMCOSCSettings(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 VMCOSCSettings get(int j) { return get(new VMCOSCSettings(), j); } - public VMCOSCSettings get(VMCOSCSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public VMCOSCSettingsT unpack() { - VMCOSCSettingsT _o = new VMCOSCSettingsT(); - unpackTo(_o); - return _o; - } - public void unpackTo(VMCOSCSettingsT _o) { - if (oscSettings() != null) _o.setOscSettings(oscSettings().unpack()); - else _o.setOscSettings(null); - String _oVrmJson = vrmJson(); - _o.setVrmJson(_oVrmJson); - boolean _oAnchorHip = anchorHip(); - _o.setAnchorHip(_oAnchorHip); - boolean _oMirrorTracking = mirrorTracking(); - _o.setMirrorTracking(_oMirrorTracking); - } - public static int pack(FlatBufferBuilder builder, VMCOSCSettingsT _o) { - if (_o == null) return 0; - int _oscSettings = _o.getOscSettings() == null ? 0 : solarxr_protocol.rpc.OSCSettings.pack(builder, _o.getOscSettings()); - int _vrmJson = _o.getVrmJson() == null ? 0 : builder.createString(_o.getVrmJson()); - return createVMCOSCSettings( - builder, - _oscSettings, - _vrmJson, - _o.getAnchorHip(), - _o.getMirrorTracking()); - } -} - +// 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.*; + +/** + * OSC Settings specific to VMC + */ +@SuppressWarnings("unused") +public final class VMCOSCSettings extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static VMCOSCSettings getRootAsVMCOSCSettings(ByteBuffer _bb) { return getRootAsVMCOSCSettings(_bb, new VMCOSCSettings()); } + public static VMCOSCSettings getRootAsVMCOSCSettings(ByteBuffer _bb, VMCOSCSettings 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 VMCOSCSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.rpc.OSCSettings oscSettings() { return oscSettings(new solarxr_protocol.rpc.OSCSettings()); } + public solarxr_protocol.rpc.OSCSettings oscSettings(solarxr_protocol.rpc.OSCSettings obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public String vrmJson() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer vrmJsonAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer vrmJsonInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + public boolean anchorHip() { int o = __offset(8); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean mirrorTracking() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createVMCOSCSettings(FlatBufferBuilder builder, + int oscSettingsOffset, + int vrmJsonOffset, + boolean anchorHip, + boolean mirrorTracking) { + builder.startTable(4); + VMCOSCSettings.addVrmJson(builder, vrmJsonOffset); + VMCOSCSettings.addOscSettings(builder, oscSettingsOffset); + VMCOSCSettings.addMirrorTracking(builder, mirrorTracking); + VMCOSCSettings.addAnchorHip(builder, anchorHip); + return VMCOSCSettings.endVMCOSCSettings(builder); + } + + public static void startVMCOSCSettings(FlatBufferBuilder builder) { builder.startTable(4); } + public static void addOscSettings(FlatBufferBuilder builder, int oscSettingsOffset) { builder.addOffset(0, oscSettingsOffset, 0); } + public static void addVrmJson(FlatBufferBuilder builder, int vrmJsonOffset) { builder.addOffset(1, vrmJsonOffset, 0); } + public static void addAnchorHip(FlatBufferBuilder builder, boolean anchorHip) { builder.addBoolean(2, anchorHip, false); } + public static void addMirrorTracking(FlatBufferBuilder builder, boolean mirrorTracking) { builder.addBoolean(3, mirrorTracking, false); } + public static int endVMCOSCSettings(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 VMCOSCSettings get(int j) { return get(new VMCOSCSettings(), j); } + public VMCOSCSettings get(VMCOSCSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public VMCOSCSettingsT unpack() { + VMCOSCSettingsT _o = new VMCOSCSettingsT(); + unpackTo(_o); + return _o; + } + public void unpackTo(VMCOSCSettingsT _o) { + if (oscSettings() != null) _o.setOscSettings(oscSettings().unpack()); + else _o.setOscSettings(null); + String _oVrmJson = vrmJson(); + _o.setVrmJson(_oVrmJson); + boolean _oAnchorHip = anchorHip(); + _o.setAnchorHip(_oAnchorHip); + boolean _oMirrorTracking = mirrorTracking(); + _o.setMirrorTracking(_oMirrorTracking); + } + public static int pack(FlatBufferBuilder builder, VMCOSCSettingsT _o) { + if (_o == null) return 0; + int _oscSettings = _o.getOscSettings() == null ? 0 : solarxr_protocol.rpc.OSCSettings.pack(builder, _o.getOscSettings()); + int _vrmJson = _o.getVrmJson() == null ? 0 : builder.createString(_o.getVrmJson()); + return createVMCOSCSettings( + builder, + _oscSettings, + _vrmJson, + _o.getAnchorHip(), + _o.getMirrorTracking()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/VMCOSCSettingsT.java b/protocol/java/src/solarxr_protocol/rpc/VMCOSCSettingsT.java index 46282b53..872c29de 100644 --- a/protocol/java/src/solarxr_protocol/rpc/VMCOSCSettingsT.java +++ b/protocol/java/src/solarxr_protocol/rpc/VMCOSCSettingsT.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 VMCOSCSettingsT { - private solarxr_protocol.rpc.OSCSettingsT oscSettings; - private String vrmJson; - private boolean anchorHip; - private boolean mirrorTracking; - - public solarxr_protocol.rpc.OSCSettingsT getOscSettings() { return oscSettings; } - - public void setOscSettings(solarxr_protocol.rpc.OSCSettingsT oscSettings) { this.oscSettings = oscSettings; } - - public String getVrmJson() { return vrmJson; } - - public void setVrmJson(String vrmJson) { this.vrmJson = vrmJson; } - - public boolean getAnchorHip() { return anchorHip; } - - public void setAnchorHip(boolean anchorHip) { this.anchorHip = anchorHip; } - - public boolean getMirrorTracking() { return mirrorTracking; } - - public void setMirrorTracking(boolean mirrorTracking) { this.mirrorTracking = mirrorTracking; } - - - public VMCOSCSettingsT() { - this.oscSettings = null; - this.vrmJson = null; - this.anchorHip = false; - this.mirrorTracking = 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 VMCOSCSettingsT { + private solarxr_protocol.rpc.OSCSettingsT oscSettings; + private String vrmJson; + private boolean anchorHip; + private boolean mirrorTracking; + + public solarxr_protocol.rpc.OSCSettingsT getOscSettings() { return oscSettings; } + + public void setOscSettings(solarxr_protocol.rpc.OSCSettingsT oscSettings) { this.oscSettings = oscSettings; } + + public String getVrmJson() { return vrmJson; } + + public void setVrmJson(String vrmJson) { this.vrmJson = vrmJson; } + + public boolean getAnchorHip() { return anchorHip; } + + public void setAnchorHip(boolean anchorHip) { this.anchorHip = anchorHip; } + + public boolean getMirrorTracking() { return mirrorTracking; } + + public void setMirrorTracking(boolean mirrorTracking) { this.mirrorTracking = mirrorTracking; } + + + public VMCOSCSettingsT() { + this.oscSettings = null; + this.vrmJson = null; + this.anchorHip = false; + this.mirrorTracking = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/VRCOSCSettings.java b/protocol/java/src/solarxr_protocol/rpc/VRCOSCSettings.java index a4fc49e4..f24df414 100644 --- a/protocol/java/src/solarxr_protocol/rpc/VRCOSCSettings.java +++ b/protocol/java/src/solarxr_protocol/rpc/VRCOSCSettings.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.*; - -/** - * OSC Settings specific to VRChat - */ -@SuppressWarnings("unused") -public final class VRCOSCSettings extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static VRCOSCSettings getRootAsVRCOSCSettings(ByteBuffer _bb) { return getRootAsVRCOSCSettings(_bb, new VRCOSCSettings()); } - public static VRCOSCSettings getRootAsVRCOSCSettings(ByteBuffer _bb, VRCOSCSettings 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 VRCOSCSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public solarxr_protocol.rpc.OSCSettings oscSettings() { return oscSettings(new solarxr_protocol.rpc.OSCSettings()); } - public solarxr_protocol.rpc.OSCSettings oscSettings(solarxr_protocol.rpc.OSCSettings obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.OSCTrackersSetting trackers() { return trackers(new solarxr_protocol.rpc.OSCTrackersSetting()); } - public solarxr_protocol.rpc.OSCTrackersSetting trackers(solarxr_protocol.rpc.OSCTrackersSetting obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - - public static int createVRCOSCSettings(FlatBufferBuilder builder, - int oscSettingsOffset, - int trackersOffset) { - builder.startTable(2); - VRCOSCSettings.addTrackers(builder, trackersOffset); - VRCOSCSettings.addOscSettings(builder, oscSettingsOffset); - return VRCOSCSettings.endVRCOSCSettings(builder); - } - - public static void startVRCOSCSettings(FlatBufferBuilder builder) { builder.startTable(2); } - public static void addOscSettings(FlatBufferBuilder builder, int oscSettingsOffset) { builder.addOffset(0, oscSettingsOffset, 0); } - public static void addTrackers(FlatBufferBuilder builder, int trackersOffset) { builder.addOffset(1, trackersOffset, 0); } - public static int endVRCOSCSettings(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 VRCOSCSettings get(int j) { return get(new VRCOSCSettings(), j); } - public VRCOSCSettings get(VRCOSCSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public VRCOSCSettingsT unpack() { - VRCOSCSettingsT _o = new VRCOSCSettingsT(); - unpackTo(_o); - return _o; - } - public void unpackTo(VRCOSCSettingsT _o) { - if (oscSettings() != null) _o.setOscSettings(oscSettings().unpack()); - else _o.setOscSettings(null); - if (trackers() != null) _o.setTrackers(trackers().unpack()); - else _o.setTrackers(null); - } - public static int pack(FlatBufferBuilder builder, VRCOSCSettingsT _o) { - if (_o == null) return 0; - int _oscSettings = _o.getOscSettings() == null ? 0 : solarxr_protocol.rpc.OSCSettings.pack(builder, _o.getOscSettings()); - int _trackers = _o.getTrackers() == null ? 0 : solarxr_protocol.rpc.OSCTrackersSetting.pack(builder, _o.getTrackers()); - return createVRCOSCSettings( - builder, - _oscSettings, - _trackers); - } -} - +// 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.*; + +/** + * OSC Settings specific to VRChat + */ +@SuppressWarnings("unused") +public final class VRCOSCSettings extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static VRCOSCSettings getRootAsVRCOSCSettings(ByteBuffer _bb) { return getRootAsVRCOSCSettings(_bb, new VRCOSCSettings()); } + public static VRCOSCSettings getRootAsVRCOSCSettings(ByteBuffer _bb, VRCOSCSettings 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 VRCOSCSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.rpc.OSCSettings oscSettings() { return oscSettings(new solarxr_protocol.rpc.OSCSettings()); } + public solarxr_protocol.rpc.OSCSettings oscSettings(solarxr_protocol.rpc.OSCSettings obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.OSCTrackersSetting trackers() { return trackers(new solarxr_protocol.rpc.OSCTrackersSetting()); } + public solarxr_protocol.rpc.OSCTrackersSetting trackers(solarxr_protocol.rpc.OSCTrackersSetting obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createVRCOSCSettings(FlatBufferBuilder builder, + int oscSettingsOffset, + int trackersOffset) { + builder.startTable(2); + VRCOSCSettings.addTrackers(builder, trackersOffset); + VRCOSCSettings.addOscSettings(builder, oscSettingsOffset); + return VRCOSCSettings.endVRCOSCSettings(builder); + } + + public static void startVRCOSCSettings(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addOscSettings(FlatBufferBuilder builder, int oscSettingsOffset) { builder.addOffset(0, oscSettingsOffset, 0); } + public static void addTrackers(FlatBufferBuilder builder, int trackersOffset) { builder.addOffset(1, trackersOffset, 0); } + public static int endVRCOSCSettings(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 VRCOSCSettings get(int j) { return get(new VRCOSCSettings(), j); } + public VRCOSCSettings get(VRCOSCSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public VRCOSCSettingsT unpack() { + VRCOSCSettingsT _o = new VRCOSCSettingsT(); + unpackTo(_o); + return _o; + } + public void unpackTo(VRCOSCSettingsT _o) { + if (oscSettings() != null) _o.setOscSettings(oscSettings().unpack()); + else _o.setOscSettings(null); + if (trackers() != null) _o.setTrackers(trackers().unpack()); + else _o.setTrackers(null); + } + public static int pack(FlatBufferBuilder builder, VRCOSCSettingsT _o) { + if (_o == null) return 0; + int _oscSettings = _o.getOscSettings() == null ? 0 : solarxr_protocol.rpc.OSCSettings.pack(builder, _o.getOscSettings()); + int _trackers = _o.getTrackers() == null ? 0 : solarxr_protocol.rpc.OSCTrackersSetting.pack(builder, _o.getTrackers()); + return createVRCOSCSettings( + builder, + _oscSettings, + _trackers); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/VRCOSCSettingsT.java b/protocol/java/src/solarxr_protocol/rpc/VRCOSCSettingsT.java index 10d12050..e86fe201 100644 --- a/protocol/java/src/solarxr_protocol/rpc/VRCOSCSettingsT.java +++ b/protocol/java/src/solarxr_protocol/rpc/VRCOSCSettingsT.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 VRCOSCSettingsT { - private solarxr_protocol.rpc.OSCSettingsT oscSettings; - private solarxr_protocol.rpc.OSCTrackersSettingT trackers; - - public solarxr_protocol.rpc.OSCSettingsT getOscSettings() { return oscSettings; } - - public void setOscSettings(solarxr_protocol.rpc.OSCSettingsT oscSettings) { this.oscSettings = oscSettings; } - - public solarxr_protocol.rpc.OSCTrackersSettingT getTrackers() { return trackers; } - - public void setTrackers(solarxr_protocol.rpc.OSCTrackersSettingT trackers) { this.trackers = trackers; } - - - public VRCOSCSettingsT() { - this.oscSettings = null; - this.trackers = 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 VRCOSCSettingsT { + private solarxr_protocol.rpc.OSCSettingsT oscSettings; + private solarxr_protocol.rpc.OSCTrackersSettingT trackers; + + public solarxr_protocol.rpc.OSCSettingsT getOscSettings() { return oscSettings; } + + public void setOscSettings(solarxr_protocol.rpc.OSCSettingsT oscSettings) { this.oscSettings = oscSettings; } + + public solarxr_protocol.rpc.OSCTrackersSettingT getTrackers() { return trackers; } + + public void setTrackers(solarxr_protocol.rpc.OSCTrackersSettingT trackers) { this.trackers = trackers; } + + + public VRCOSCSettingsT() { + this.oscSettings = null; + this.trackers = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/WifiProvisioningStatus.java b/protocol/java/src/solarxr_protocol/rpc/WifiProvisioningStatus.java index 089cd9cf..a8e0940d 100644 --- a/protocol/java/src/solarxr_protocol/rpc/WifiProvisioningStatus.java +++ b/protocol/java/src/solarxr_protocol/rpc/WifiProvisioningStatus.java @@ -1,21 +1,22 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -@SuppressWarnings("unused") -public final class WifiProvisioningStatus { - private WifiProvisioningStatus() { } - public static final int NONE = 0; - public static final int SERIAL_INIT = 1; - public static final int PROVISIONING = 2; - public static final int CONNECTING = 3; - public static final int CONNECTION_ERROR = 4; - public static final int LOOKING_FOR_SERVER = 5; - public static final int COULD_NOT_FIND_SERVER = 6; - public static final int DONE = 7; - - public static final String[] names = { "NONE", "SERIAL_INIT", "PROVISIONING", "CONNECTING", "CONNECTION_ERROR", "LOOKING_FOR_SERVER", "COULD_NOT_FIND_SERVER", "DONE", }; - - 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 WifiProvisioningStatus { + private WifiProvisioningStatus() { } + public static final int NONE = 0; + public static final int SERIAL_INIT = 1; + public static final int PROVISIONING = 2; + public static final int OPTAINING_MAC_ADDRESS = 3; + public static final int CONNECTING = 4; + public static final int CONNECTION_ERROR = 5; + public static final int LOOKING_FOR_SERVER = 6; + public static final int COULD_NOT_FIND_SERVER = 7; + public static final int DONE = 8; + + public static final String[] names = { "NONE", "SERIAL_INIT", "PROVISIONING", "OPTAINING_MAC_ADDRESS", "CONNECTING", "CONNECTION_ERROR", "LOOKING_FOR_SERVER", "COULD_NOT_FIND_SERVER", "DONE", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/WifiProvisioningStatusResponse.java b/protocol/java/src/solarxr_protocol/rpc/WifiProvisioningStatusResponse.java index a291bd17..bfe6ee70 100644 --- a/protocol/java/src/solarxr_protocol/rpc/WifiProvisioningStatusResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/WifiProvisioningStatusResponse.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 WifiProvisioningStatusResponse extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static WifiProvisioningStatusResponse getRootAsWifiProvisioningStatusResponse(ByteBuffer _bb) { return getRootAsWifiProvisioningStatusResponse(_bb, new WifiProvisioningStatusResponse()); } - public static WifiProvisioningStatusResponse getRootAsWifiProvisioningStatusResponse(ByteBuffer _bb, WifiProvisioningStatusResponse 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 WifiProvisioningStatusResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public int status() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - - public static int createWifiProvisioningStatusResponse(FlatBufferBuilder builder, - int status) { - builder.startTable(1); - WifiProvisioningStatusResponse.addStatus(builder, status); - return WifiProvisioningStatusResponse.endWifiProvisioningStatusResponse(builder); - } - - public static void startWifiProvisioningStatusResponse(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addStatus(FlatBufferBuilder builder, int status) { builder.addByte(0, (byte) status, (byte) 0); } - public static int endWifiProvisioningStatusResponse(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 WifiProvisioningStatusResponse get(int j) { return get(new WifiProvisioningStatusResponse(), j); } - public WifiProvisioningStatusResponse get(WifiProvisioningStatusResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public WifiProvisioningStatusResponseT unpack() { - WifiProvisioningStatusResponseT _o = new WifiProvisioningStatusResponseT(); - unpackTo(_o); - return _o; - } - public void unpackTo(WifiProvisioningStatusResponseT _o) { - int _oStatus = status(); - _o.setStatus(_oStatus); - } - public static int pack(FlatBufferBuilder builder, WifiProvisioningStatusResponseT _o) { - if (_o == null) return 0; - return createWifiProvisioningStatusResponse( - builder, - _o.getStatus()); - } -} - +// 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 WifiProvisioningStatusResponse extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static WifiProvisioningStatusResponse getRootAsWifiProvisioningStatusResponse(ByteBuffer _bb) { return getRootAsWifiProvisioningStatusResponse(_bb, new WifiProvisioningStatusResponse()); } + public static WifiProvisioningStatusResponse getRootAsWifiProvisioningStatusResponse(ByteBuffer _bb, WifiProvisioningStatusResponse 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 WifiProvisioningStatusResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int status() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + + public static int createWifiProvisioningStatusResponse(FlatBufferBuilder builder, + int status) { + builder.startTable(1); + WifiProvisioningStatusResponse.addStatus(builder, status); + return WifiProvisioningStatusResponse.endWifiProvisioningStatusResponse(builder); + } + + public static void startWifiProvisioningStatusResponse(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addStatus(FlatBufferBuilder builder, int status) { builder.addByte(0, (byte) status, (byte) 0); } + public static int endWifiProvisioningStatusResponse(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 WifiProvisioningStatusResponse get(int j) { return get(new WifiProvisioningStatusResponse(), j); } + public WifiProvisioningStatusResponse get(WifiProvisioningStatusResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public WifiProvisioningStatusResponseT unpack() { + WifiProvisioningStatusResponseT _o = new WifiProvisioningStatusResponseT(); + unpackTo(_o); + return _o; + } + public void unpackTo(WifiProvisioningStatusResponseT _o) { + int _oStatus = status(); + _o.setStatus(_oStatus); + } + public static int pack(FlatBufferBuilder builder, WifiProvisioningStatusResponseT _o) { + if (_o == null) return 0; + return createWifiProvisioningStatusResponse( + builder, + _o.getStatus()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/WifiProvisioningStatusResponseT.java b/protocol/java/src/solarxr_protocol/rpc/WifiProvisioningStatusResponseT.java index f8da048c..11042b9f 100644 --- a/protocol/java/src/solarxr_protocol/rpc/WifiProvisioningStatusResponseT.java +++ b/protocol/java/src/solarxr_protocol/rpc/WifiProvisioningStatusResponseT.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 WifiProvisioningStatusResponseT { - private int status; - - public int getStatus() { return status; } - - public void setStatus(int status) { this.status = status; } - - - public WifiProvisioningStatusResponseT() { - this.status = 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 WifiProvisioningStatusResponseT { + private int status; + + public int getStatus() { return status; } + + public void setStatus(int status) { this.status = status; } + + + public WifiProvisioningStatusResponseT() { + this.status = 0; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/settings/LegTweaksSettings.java b/protocol/java/src/solarxr_protocol/rpc/settings/LegTweaksSettings.java index 2752124c..77fdbdf2 100644 --- a/protocol/java/src/solarxr_protocol/rpc/settings/LegTweaksSettings.java +++ b/protocol/java/src/solarxr_protocol/rpc/settings/LegTweaksSettings.java @@ -1,57 +1,57 @@ -// 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.*; - -@SuppressWarnings("unused") -public final class LegTweaksSettings extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static LegTweaksSettings getRootAsLegTweaksSettings(ByteBuffer _bb) { return getRootAsLegTweaksSettings(_bb, new LegTweaksSettings()); } - public static LegTweaksSettings getRootAsLegTweaksSettings(ByteBuffer _bb, LegTweaksSettings 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 LegTweaksSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public boolean hasCorrectionStrength() { return 0 != __offset(4); } - public float correctionStrength() { int o = __offset(4); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - - public static int createLegTweaksSettings(FlatBufferBuilder builder, - float correctionStrength) { - builder.startTable(1); - LegTweaksSettings.addCorrectionStrength(builder, correctionStrength); - return LegTweaksSettings.endLegTweaksSettings(builder); - } - - public static void startLegTweaksSettings(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addCorrectionStrength(FlatBufferBuilder builder, float correctionStrength) { builder.addFloat(0, correctionStrength, 0f); } - public static int endLegTweaksSettings(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 LegTweaksSettings get(int j) { return get(new LegTweaksSettings(), j); } - public LegTweaksSettings get(LegTweaksSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public LegTweaksSettingsT unpack() { - LegTweaksSettingsT _o = new LegTweaksSettingsT(); - unpackTo(_o); - return _o; - } - public void unpackTo(LegTweaksSettingsT _o) { - Float _oCorrectionStrength = hasCorrectionStrength() ? correctionStrength() : null; - _o.setCorrectionStrength(_oCorrectionStrength); - } - public static int pack(FlatBufferBuilder builder, LegTweaksSettingsT _o) { - if (_o == null) return 0; - return createLegTweaksSettings( - builder, - _o.getCorrectionStrength()); - } -} - +// 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.*; + +@SuppressWarnings("unused") +public final class LegTweaksSettings extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static LegTweaksSettings getRootAsLegTweaksSettings(ByteBuffer _bb) { return getRootAsLegTweaksSettings(_bb, new LegTweaksSettings()); } + public static LegTweaksSettings getRootAsLegTweaksSettings(ByteBuffer _bb, LegTweaksSettings 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 LegTweaksSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean hasCorrectionStrength() { return 0 != __offset(4); } + public float correctionStrength() { int o = __offset(4); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + + public static int createLegTweaksSettings(FlatBufferBuilder builder, + float correctionStrength) { + builder.startTable(1); + LegTweaksSettings.addCorrectionStrength(builder, correctionStrength); + return LegTweaksSettings.endLegTweaksSettings(builder); + } + + public static void startLegTweaksSettings(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addCorrectionStrength(FlatBufferBuilder builder, float correctionStrength) { builder.addFloat(0, correctionStrength, 0f); } + public static int endLegTweaksSettings(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 LegTweaksSettings get(int j) { return get(new LegTweaksSettings(), j); } + public LegTweaksSettings get(LegTweaksSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public LegTweaksSettingsT unpack() { + LegTweaksSettingsT _o = new LegTweaksSettingsT(); + unpackTo(_o); + return _o; + } + public void unpackTo(LegTweaksSettingsT _o) { + Float _oCorrectionStrength = hasCorrectionStrength() ? correctionStrength() : null; + _o.setCorrectionStrength(_oCorrectionStrength); + } + public static int pack(FlatBufferBuilder builder, LegTweaksSettingsT _o) { + if (_o == null) return 0; + return createLegTweaksSettings( + builder, + _o.getCorrectionStrength()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/settings/LegTweaksSettingsT.java b/protocol/java/src/solarxr_protocol/rpc/settings/LegTweaksSettingsT.java index 8074919d..ca03d1c7 100644 --- a/protocol/java/src/solarxr_protocol/rpc/settings/LegTweaksSettingsT.java +++ b/protocol/java/src/solarxr_protocol/rpc/settings/LegTweaksSettingsT.java @@ -1,22 +1,22 @@ -// 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 LegTweaksSettingsT { - private Float correctionStrength; - - public Float getCorrectionStrength() { return correctionStrength; } - - public void setCorrectionStrength(Float correctionStrength) { this.correctionStrength = correctionStrength; } - - - public LegTweaksSettingsT() { - this.correctionStrength = 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 LegTweaksSettingsT { + private Float correctionStrength; + + public Float getCorrectionStrength() { return correctionStrength; } + + public void setCorrectionStrength(Float correctionStrength) { this.correctionStrength = correctionStrength; } + + + public LegTweaksSettingsT() { + this.correctionStrength = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/settings/ModelRatios.java b/protocol/java/src/solarxr_protocol/rpc/settings/ModelRatios.java index 9617d3bc..0192aefd 100644 --- a/protocol/java/src/solarxr_protocol/rpc/settings/ModelRatios.java +++ b/protocol/java/src/solarxr_protocol/rpc/settings/ModelRatios.java @@ -1,118 +1,118 @@ -// 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_22_10_26(); } - 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 lower leg'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; } - /** - * Upper leg's yaw and roll is set to the lower leg's when 1.0 - */ - public boolean hasInterpKneeAnkle() { return 0 != __offset(16); } - public float interpKneeAnkle() { int o = __offset(16); 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, - float interpKneeAnkle) { - builder.startTable(7); - ModelRatios.addInterpKneeAnkle(builder, interpKneeAnkle); - 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(7); } - 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 void addInterpKneeAnkle(FlatBufferBuilder builder, float interpKneeAnkle) { builder.addFloat(6, interpKneeAnkle, 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); - Float _oInterpKneeAnkle = hasInterpKneeAnkle() ? interpKneeAnkle() : null; - _o.setInterpKneeAnkle(_oInterpKneeAnkle); - } - 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(), - _o.getInterpKneeAnkle()); - } -} - +// 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_22_10_26(); } + 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 lower leg'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; } + /** + * Upper leg's yaw and roll is set to the lower leg's when 1.0 + */ + public boolean hasInterpKneeAnkle() { return 0 != __offset(16); } + public float interpKneeAnkle() { int o = __offset(16); 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, + float interpKneeAnkle) { + builder.startTable(7); + ModelRatios.addInterpKneeAnkle(builder, interpKneeAnkle); + 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(7); } + 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 void addInterpKneeAnkle(FlatBufferBuilder builder, float interpKneeAnkle) { builder.addFloat(6, interpKneeAnkle, 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); + Float _oInterpKneeAnkle = hasInterpKneeAnkle() ? interpKneeAnkle() : null; + _o.setInterpKneeAnkle(_oInterpKneeAnkle); + } + 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(), + _o.getInterpKneeAnkle()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/settings/ModelRatiosT.java b/protocol/java/src/solarxr_protocol/rpc/settings/ModelRatiosT.java index e5db3eb5..7d52c43f 100644 --- a/protocol/java/src/solarxr_protocol/rpc/settings/ModelRatiosT.java +++ b/protocol/java/src/solarxr_protocol/rpc/settings/ModelRatiosT.java @@ -1,58 +1,58 @@ -// 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; - private Float interpKneeAnkle; - - 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 Float getInterpKneeAnkle() { return interpKneeAnkle; } - - public void setInterpKneeAnkle(Float interpKneeAnkle) { this.interpKneeAnkle = interpKneeAnkle; } - - - public ModelRatiosT() { - this.imputeWaistFromChestHip = null; - this.imputeWaistFromChestLegs = null; - this.imputeHipFromChestLegs = null; - this.imputeHipFromWaistLegs = null; - this.interpHipLegs = null; - this.interpKneeTrackerAnkle = null; - this.interpKneeAnkle = 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; + private Float interpKneeAnkle; + + 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 Float getInterpKneeAnkle() { return interpKneeAnkle; } + + public void setInterpKneeAnkle(Float interpKneeAnkle) { this.interpKneeAnkle = interpKneeAnkle; } + + + public ModelRatiosT() { + this.imputeWaistFromChestHip = null; + this.imputeWaistFromChestLegs = null; + this.imputeHipFromChestLegs = null; + this.imputeHipFromWaistLegs = null; + this.interpHipLegs = null; + this.interpKneeTrackerAnkle = null; + this.interpKneeAnkle = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/settings/ModelSettings.java b/protocol/java/src/solarxr_protocol/rpc/settings/ModelSettings.java index 65c36f16..ea416a7d 100644 --- a/protocol/java/src/solarxr_protocol/rpc/settings/ModelSettings.java +++ b/protocol/java/src/solarxr_protocol/rpc/settings/ModelSettings.java @@ -1,79 +1,79 @@ -// 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_22_10_26(); } - 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 solarxr_protocol.rpc.settings.LegTweaksSettings legTweaks() { return legTweaks(new solarxr_protocol.rpc.settings.LegTweaksSettings()); } - public solarxr_protocol.rpc.settings.LegTweaksSettings legTweaks(solarxr_protocol.rpc.settings.LegTweaksSettings obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - - public static int createModelSettings(FlatBufferBuilder builder, - int togglesOffset, - int ratiosOffset, - int legTweaksOffset) { - builder.startTable(3); - ModelSettings.addLegTweaks(builder, legTweaksOffset); - ModelSettings.addRatios(builder, ratiosOffset); - ModelSettings.addToggles(builder, togglesOffset); - return ModelSettings.endModelSettings(builder); - } - - public static void startModelSettings(FlatBufferBuilder builder) { builder.startTable(3); } - 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 void addLegTweaks(FlatBufferBuilder builder, int legTweaksOffset) { builder.addOffset(2, legTweaksOffset, 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); - if (legTweaks() != null) _o.setLegTweaks(legTweaks().unpack()); - else _o.setLegTweaks(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()); - int _legTweaks = _o.getLegTweaks() == null ? 0 : solarxr_protocol.rpc.settings.LegTweaksSettings.pack(builder, _o.getLegTweaks()); - return createModelSettings( - builder, - _toggles, - _ratios, - _legTweaks); - } -} - +// 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_22_10_26(); } + 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 solarxr_protocol.rpc.settings.LegTweaksSettings legTweaks() { return legTweaks(new solarxr_protocol.rpc.settings.LegTweaksSettings()); } + public solarxr_protocol.rpc.settings.LegTweaksSettings legTweaks(solarxr_protocol.rpc.settings.LegTweaksSettings obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createModelSettings(FlatBufferBuilder builder, + int togglesOffset, + int ratiosOffset, + int legTweaksOffset) { + builder.startTable(3); + ModelSettings.addLegTweaks(builder, legTweaksOffset); + ModelSettings.addRatios(builder, ratiosOffset); + ModelSettings.addToggles(builder, togglesOffset); + return ModelSettings.endModelSettings(builder); + } + + public static void startModelSettings(FlatBufferBuilder builder) { builder.startTable(3); } + 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 void addLegTweaks(FlatBufferBuilder builder, int legTweaksOffset) { builder.addOffset(2, legTweaksOffset, 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); + if (legTweaks() != null) _o.setLegTweaks(legTweaks().unpack()); + else _o.setLegTweaks(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()); + int _legTweaks = _o.getLegTweaks() == null ? 0 : solarxr_protocol.rpc.settings.LegTweaksSettings.pack(builder, _o.getLegTweaks()); + return createModelSettings( + builder, + _toggles, + _ratios, + _legTweaks); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/settings/ModelSettingsT.java b/protocol/java/src/solarxr_protocol/rpc/settings/ModelSettingsT.java index 28aa6935..a7780d5f 100644 --- a/protocol/java/src/solarxr_protocol/rpc/settings/ModelSettingsT.java +++ b/protocol/java/src/solarxr_protocol/rpc/settings/ModelSettingsT.java @@ -1,34 +1,34 @@ -// 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; - private solarxr_protocol.rpc.settings.LegTweaksSettingsT legTweaks; - - 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 solarxr_protocol.rpc.settings.LegTweaksSettingsT getLegTweaks() { return legTweaks; } - - public void setLegTweaks(solarxr_protocol.rpc.settings.LegTweaksSettingsT legTweaks) { this.legTweaks = legTweaks; } - - - public ModelSettingsT() { - this.toggles = null; - this.ratios = null; - this.legTweaks = 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; + private solarxr_protocol.rpc.settings.LegTweaksSettingsT legTweaks; + + 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 solarxr_protocol.rpc.settings.LegTweaksSettingsT getLegTweaks() { return legTweaks; } + + public void setLegTweaks(solarxr_protocol.rpc.settings.LegTweaksSettingsT legTweaks) { this.legTweaks = legTweaks; } + + + public ModelSettingsT() { + this.toggles = null; + this.ratios = null; + this.legTweaks = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/settings/ModelToggles.java b/protocol/java/src/solarxr_protocol/rpc/settings/ModelToggles.java index 828f1612..31411f8a 100644 --- a/protocol/java/src/solarxr_protocol/rpc/settings/ModelToggles.java +++ b/protocol/java/src/solarxr_protocol/rpc/settings/ModelToggles.java @@ -1,140 +1,140 @@ -// 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_22_10_26(); } - 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 boolean hasViveEmulation() { return 0 != __offset(16); } - public boolean viveEmulation() { int o = __offset(16); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasToeSnap() { return 0 != __offset(18); } - public boolean toeSnap() { int o = __offset(18); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasFootPlant() { return 0 != __offset(20); } - public boolean footPlant() { int o = __offset(20); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasSelfLocalization() { return 0 != __offset(22); } - public boolean selfLocalization() { int o = __offset(22); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasUsePosition() { return 0 != __offset(24); } - public boolean usePosition() { int o = __offset(24); 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, - boolean viveEmulation, - boolean toeSnap, - boolean footPlant, - boolean selfLocalization, - boolean usePosition) { - builder.startTable(11); - ModelToggles.addUsePosition(builder, usePosition); - ModelToggles.addSelfLocalization(builder, selfLocalization); - ModelToggles.addFootPlant(builder, footPlant); - ModelToggles.addToeSnap(builder, toeSnap); - ModelToggles.addViveEmulation(builder, viveEmulation); - 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(11); } - 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 void addViveEmulation(FlatBufferBuilder builder, boolean viveEmulation) { builder.addBoolean(6, viveEmulation, false); } - public static void addToeSnap(FlatBufferBuilder builder, boolean toeSnap) { builder.addBoolean(7, toeSnap, false); } - public static void addFootPlant(FlatBufferBuilder builder, boolean footPlant) { builder.addBoolean(8, footPlant, false); } - public static void addSelfLocalization(FlatBufferBuilder builder, boolean selfLocalization) { builder.addBoolean(9, selfLocalization, false); } - public static void addUsePosition(FlatBufferBuilder builder, boolean usePosition) { builder.addBoolean(10, usePosition, 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); - Boolean _oViveEmulation = hasViveEmulation() ? viveEmulation() : null; - _o.setViveEmulation(_oViveEmulation); - Boolean _oToeSnap = hasToeSnap() ? toeSnap() : null; - _o.setToeSnap(_oToeSnap); - Boolean _oFootPlant = hasFootPlant() ? footPlant() : null; - _o.setFootPlant(_oFootPlant); - Boolean _oSelfLocalization = hasSelfLocalization() ? selfLocalization() : null; - _o.setSelfLocalization(_oSelfLocalization); - Boolean _oUsePosition = hasUsePosition() ? usePosition() : null; - _o.setUsePosition(_oUsePosition); - } - 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(), - _o.getViveEmulation(), - _o.getToeSnap(), - _o.getFootPlant(), - _o.getSelfLocalization(), - _o.getUsePosition()); - } -} - +// 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_22_10_26(); } + 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 boolean hasViveEmulation() { return 0 != __offset(16); } + public boolean viveEmulation() { int o = __offset(16); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasToeSnap() { return 0 != __offset(18); } + public boolean toeSnap() { int o = __offset(18); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasFootPlant() { return 0 != __offset(20); } + public boolean footPlant() { int o = __offset(20); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasSelfLocalization() { return 0 != __offset(22); } + public boolean selfLocalization() { int o = __offset(22); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasUsePosition() { return 0 != __offset(24); } + public boolean usePosition() { int o = __offset(24); 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, + boolean viveEmulation, + boolean toeSnap, + boolean footPlant, + boolean selfLocalization, + boolean usePosition) { + builder.startTable(11); + ModelToggles.addUsePosition(builder, usePosition); + ModelToggles.addSelfLocalization(builder, selfLocalization); + ModelToggles.addFootPlant(builder, footPlant); + ModelToggles.addToeSnap(builder, toeSnap); + ModelToggles.addViveEmulation(builder, viveEmulation); + 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(11); } + 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 void addViveEmulation(FlatBufferBuilder builder, boolean viveEmulation) { builder.addBoolean(6, viveEmulation, false); } + public static void addToeSnap(FlatBufferBuilder builder, boolean toeSnap) { builder.addBoolean(7, toeSnap, false); } + public static void addFootPlant(FlatBufferBuilder builder, boolean footPlant) { builder.addBoolean(8, footPlant, false); } + public static void addSelfLocalization(FlatBufferBuilder builder, boolean selfLocalization) { builder.addBoolean(9, selfLocalization, false); } + public static void addUsePosition(FlatBufferBuilder builder, boolean usePosition) { builder.addBoolean(10, usePosition, 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); + Boolean _oViveEmulation = hasViveEmulation() ? viveEmulation() : null; + _o.setViveEmulation(_oViveEmulation); + Boolean _oToeSnap = hasToeSnap() ? toeSnap() : null; + _o.setToeSnap(_oToeSnap); + Boolean _oFootPlant = hasFootPlant() ? footPlant() : null; + _o.setFootPlant(_oFootPlant); + Boolean _oSelfLocalization = hasSelfLocalization() ? selfLocalization() : null; + _o.setSelfLocalization(_oSelfLocalization); + Boolean _oUsePosition = hasUsePosition() ? usePosition() : null; + _o.setUsePosition(_oUsePosition); + } + 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(), + _o.getViveEmulation(), + _o.getToeSnap(), + _o.getFootPlant(), + _o.getSelfLocalization(), + _o.getUsePosition()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/settings/ModelTogglesT.java b/protocol/java/src/solarxr_protocol/rpc/settings/ModelTogglesT.java index 33d38d48..67b1cfc9 100644 --- a/protocol/java/src/solarxr_protocol/rpc/settings/ModelTogglesT.java +++ b/protocol/java/src/solarxr_protocol/rpc/settings/ModelTogglesT.java @@ -1,82 +1,82 @@ -// 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; - private Boolean viveEmulation; - private Boolean toeSnap; - private Boolean footPlant; - private Boolean selfLocalization; - private Boolean usePosition; - - 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 Boolean getViveEmulation() { return viveEmulation; } - - public void setViveEmulation(Boolean viveEmulation) { this.viveEmulation = viveEmulation; } - - public Boolean getToeSnap() { return toeSnap; } - - public void setToeSnap(Boolean toeSnap) { this.toeSnap = toeSnap; } - - public Boolean getFootPlant() { return footPlant; } - - public void setFootPlant(Boolean footPlant) { this.footPlant = footPlant; } - - public Boolean getSelfLocalization() { return selfLocalization; } - - public void setSelfLocalization(Boolean selfLocalization) { this.selfLocalization = selfLocalization; } - - public Boolean getUsePosition() { return usePosition; } - - public void setUsePosition(Boolean usePosition) { this.usePosition = usePosition; } - - - public ModelTogglesT() { - this.extendedSpine = null; - this.extendedPelvis = null; - this.extendedKnee = null; - this.forceArmsFromHmd = null; - this.floorClip = null; - this.skatingCorrection = null; - this.viveEmulation = null; - this.toeSnap = null; - this.footPlant = null; - this.selfLocalization = null; - this.usePosition = 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; + private Boolean viveEmulation; + private Boolean toeSnap; + private Boolean footPlant; + private Boolean selfLocalization; + private Boolean usePosition; + + 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 Boolean getViveEmulation() { return viveEmulation; } + + public void setViveEmulation(Boolean viveEmulation) { this.viveEmulation = viveEmulation; } + + public Boolean getToeSnap() { return toeSnap; } + + public void setToeSnap(Boolean toeSnap) { this.toeSnap = toeSnap; } + + public Boolean getFootPlant() { return footPlant; } + + public void setFootPlant(Boolean footPlant) { this.footPlant = footPlant; } + + public Boolean getSelfLocalization() { return selfLocalization; } + + public void setSelfLocalization(Boolean selfLocalization) { this.selfLocalization = selfLocalization; } + + public Boolean getUsePosition() { return usePosition; } + + public void setUsePosition(Boolean usePosition) { this.usePosition = usePosition; } + + + public ModelTogglesT() { + this.extendedSpine = null; + this.extendedPelvis = null; + this.extendedKnee = null; + this.forceArmsFromHmd = null; + this.floorClip = null; + this.skatingCorrection = null; + this.viveEmulation = null; + this.toeSnap = null; + this.footPlant = null; + this.selfLocalization = null; + this.usePosition = null; + } +} + diff --git a/protocol/kotlin/src/solarxr_protocol/MessageBundle.kt b/protocol/kotlin/src/solarxr_protocol/MessageBundle.kt index be2e44a3..fd0ed307 100644 --- a/protocol/kotlin/src/solarxr_protocol/MessageBundle.kt +++ b/protocol/kotlin/src/solarxr_protocol/MessageBundle.kt @@ -1,124 +1,124 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol - -import java.nio.* -import kotlin.math.sign -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. - */ -@Suppress("unused") -class MessageBundle : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : MessageBundle { - __init(_i, _bb) - return this - } - fun dataFeedMsgs(j: Int) : solarxr_protocol.data_feed.DataFeedMessageHeader? = dataFeedMsgs(solarxr_protocol.data_feed.DataFeedMessageHeader(), j) - fun dataFeedMsgs(obj: solarxr_protocol.data_feed.DataFeedMessageHeader, j: Int) : solarxr_protocol.data_feed.DataFeedMessageHeader? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(__vector(o) + j * 4), bb) - } else { - null - } - } - val dataFeedMsgsLength : Int - get() { - val o = __offset(4); return if (o != 0) __vector_len(o) else 0 - } - fun rpcMsgs(j: Int) : solarxr_protocol.rpc.RpcMessageHeader? = rpcMsgs(solarxr_protocol.rpc.RpcMessageHeader(), j) - fun rpcMsgs(obj: solarxr_protocol.rpc.RpcMessageHeader, j: Int) : solarxr_protocol.rpc.RpcMessageHeader? { - val o = __offset(6) - return if (o != 0) { - obj.__assign(__indirect(__vector(o) + j * 4), bb) - } else { - null - } - } - val rpcMsgsLength : Int - get() { - val o = __offset(6); return if (o != 0) __vector_len(o) else 0 - } - fun pubSubMsgs(j: Int) : solarxr_protocol.pub_sub.PubSubHeader? = pubSubMsgs(solarxr_protocol.pub_sub.PubSubHeader(), j) - fun pubSubMsgs(obj: solarxr_protocol.pub_sub.PubSubHeader, j: Int) : solarxr_protocol.pub_sub.PubSubHeader? { - val o = __offset(8) - return if (o != 0) { - obj.__assign(__indirect(__vector(o) + j * 4), bb) - } else { - null - } - } - val pubSubMsgsLength : Int - get() { - val o = __offset(8); return if (o != 0) __vector_len(o) else 0 - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsMessageBundle(_bb: ByteBuffer): MessageBundle = getRootAsMessageBundle(_bb, MessageBundle()) - @JvmStatic - fun getRootAsMessageBundle(_bb: ByteBuffer, obj: MessageBundle): MessageBundle { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createMessageBundle(builder: FlatBufferBuilder, dataFeedMsgsOffset: Int, rpcMsgsOffset: Int, pubSubMsgsOffset: Int) : Int { - builder.startTable(3) - addPubSubMsgs(builder, pubSubMsgsOffset) - addRpcMsgs(builder, rpcMsgsOffset) - addDataFeedMsgs(builder, dataFeedMsgsOffset) - return endMessageBundle(builder) - } - @JvmStatic - fun startMessageBundle(builder: FlatBufferBuilder) = builder.startTable(3) - @JvmStatic - fun addDataFeedMsgs(builder: FlatBufferBuilder, dataFeedMsgs: Int) = builder.addOffset(0, dataFeedMsgs, 0) - @JvmStatic - fun createDataFeedMsgsVector(builder: FlatBufferBuilder, data: IntArray) : Int { - builder.startVector(4, data.size, 4) - for (i in data.size - 1 downTo 0) { - builder.addOffset(data[i]) - } - return builder.endVector() - } - @JvmStatic - fun startDataFeedMsgsVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) - @JvmStatic - fun addRpcMsgs(builder: FlatBufferBuilder, rpcMsgs: Int) = builder.addOffset(1, rpcMsgs, 0) - @JvmStatic - fun createRpcMsgsVector(builder: FlatBufferBuilder, data: IntArray) : Int { - builder.startVector(4, data.size, 4) - for (i in data.size - 1 downTo 0) { - builder.addOffset(data[i]) - } - return builder.endVector() - } - @JvmStatic - fun startRpcMsgsVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) - @JvmStatic - fun addPubSubMsgs(builder: FlatBufferBuilder, pubSubMsgs: Int) = builder.addOffset(2, pubSubMsgs, 0) - @JvmStatic - fun createPubSubMsgsVector(builder: FlatBufferBuilder, data: IntArray) : Int { - builder.startVector(4, data.size, 4) - for (i in data.size - 1 downTo 0) { - builder.addOffset(data[i]) - } - return builder.endVector() - } - @JvmStatic - fun startPubSubMsgsVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) - @JvmStatic - fun endMessageBundle(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol + +import java.nio.* +import kotlin.math.sign +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. + */ +@Suppress("unused") +class MessageBundle : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : MessageBundle { + __init(_i, _bb) + return this + } + fun dataFeedMsgs(j: Int) : solarxr_protocol.data_feed.DataFeedMessageHeader? = dataFeedMsgs(solarxr_protocol.data_feed.DataFeedMessageHeader(), j) + fun dataFeedMsgs(obj: solarxr_protocol.data_feed.DataFeedMessageHeader, j: Int) : solarxr_protocol.data_feed.DataFeedMessageHeader? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(__vector(o) + j * 4), bb) + } else { + null + } + } + val dataFeedMsgsLength : Int + get() { + val o = __offset(4); return if (o != 0) __vector_len(o) else 0 + } + fun rpcMsgs(j: Int) : solarxr_protocol.rpc.RpcMessageHeader? = rpcMsgs(solarxr_protocol.rpc.RpcMessageHeader(), j) + fun rpcMsgs(obj: solarxr_protocol.rpc.RpcMessageHeader, j: Int) : solarxr_protocol.rpc.RpcMessageHeader? { + val o = __offset(6) + return if (o != 0) { + obj.__assign(__indirect(__vector(o) + j * 4), bb) + } else { + null + } + } + val rpcMsgsLength : Int + get() { + val o = __offset(6); return if (o != 0) __vector_len(o) else 0 + } + fun pubSubMsgs(j: Int) : solarxr_protocol.pub_sub.PubSubHeader? = pubSubMsgs(solarxr_protocol.pub_sub.PubSubHeader(), j) + fun pubSubMsgs(obj: solarxr_protocol.pub_sub.PubSubHeader, j: Int) : solarxr_protocol.pub_sub.PubSubHeader? { + val o = __offset(8) + return if (o != 0) { + obj.__assign(__indirect(__vector(o) + j * 4), bb) + } else { + null + } + } + val pubSubMsgsLength : Int + get() { + val o = __offset(8); return if (o != 0) __vector_len(o) else 0 + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsMessageBundle(_bb: ByteBuffer): MessageBundle = getRootAsMessageBundle(_bb, MessageBundle()) + @JvmStatic + fun getRootAsMessageBundle(_bb: ByteBuffer, obj: MessageBundle): MessageBundle { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createMessageBundle(builder: FlatBufferBuilder, dataFeedMsgsOffset: Int, rpcMsgsOffset: Int, pubSubMsgsOffset: Int) : Int { + builder.startTable(3) + addPubSubMsgs(builder, pubSubMsgsOffset) + addRpcMsgs(builder, rpcMsgsOffset) + addDataFeedMsgs(builder, dataFeedMsgsOffset) + return endMessageBundle(builder) + } + @JvmStatic + fun startMessageBundle(builder: FlatBufferBuilder) = builder.startTable(3) + @JvmStatic + fun addDataFeedMsgs(builder: FlatBufferBuilder, dataFeedMsgs: Int) = builder.addOffset(0, dataFeedMsgs, 0) + @JvmStatic + fun createDataFeedMsgsVector(builder: FlatBufferBuilder, data: IntArray) : Int { + builder.startVector(4, data.size, 4) + for (i in data.size - 1 downTo 0) { + builder.addOffset(data[i]) + } + return builder.endVector() + } + @JvmStatic + fun startDataFeedMsgsVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) + @JvmStatic + fun addRpcMsgs(builder: FlatBufferBuilder, rpcMsgs: Int) = builder.addOffset(1, rpcMsgs, 0) + @JvmStatic + fun createRpcMsgsVector(builder: FlatBufferBuilder, data: IntArray) : Int { + builder.startVector(4, data.size, 4) + for (i in data.size - 1 downTo 0) { + builder.addOffset(data[i]) + } + return builder.endVector() + } + @JvmStatic + fun startRpcMsgsVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) + @JvmStatic + fun addPubSubMsgs(builder: FlatBufferBuilder, pubSubMsgs: Int) = builder.addOffset(2, pubSubMsgs, 0) + @JvmStatic + fun createPubSubMsgsVector(builder: FlatBufferBuilder, data: IntArray) : Int { + builder.startVector(4, data.size, 4) + for (i in data.size - 1 downTo 0) { + builder.addOffset(data[i]) + } + return builder.endVector() + } + @JvmStatic + fun startPubSubMsgsVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) + @JvmStatic + fun endMessageBundle(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/data_feed/Bone.kt b/protocol/kotlin/src/solarxr_protocol/data_feed/Bone.kt index 30a30746..d16d6492 100644 --- a/protocol/kotlin/src/solarxr_protocol/data_feed/Bone.kt +++ b/protocol/kotlin/src/solarxr_protocol/data_feed/Bone.kt @@ -1,85 +1,85 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class Bone : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : Bone { - __init(_i, _bb) - return this - } - val bodyPart : UByte - get() { - val o = __offset(4) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - /** - * 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) - */ - val rotationG : solarxr_protocol.datatypes.math.Quat? get() = rotationG(solarxr_protocol.datatypes.math.Quat()) - fun rotationG(obj: solarxr_protocol.datatypes.math.Quat) : solarxr_protocol.datatypes.math.Quat? { - val o = __offset(6) - return if (o != 0) { - obj.__assign(o + bb_pos, bb) - } else { - null - } - } - val boneLength : Float - get() { - val o = __offset(8) - return if(o != 0) bb.getFloat(o + bb_pos) else 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. - */ - val headPositionG : solarxr_protocol.datatypes.math.Vec3f? get() = headPositionG(solarxr_protocol.datatypes.math.Vec3f()) - fun headPositionG(obj: solarxr_protocol.datatypes.math.Vec3f) : solarxr_protocol.datatypes.math.Vec3f? { - val o = __offset(10) - return if (o != 0) { - obj.__assign(o + bb_pos, bb) - } else { - null - } - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsBone(_bb: ByteBuffer): Bone = getRootAsBone(_bb, Bone()) - @JvmStatic - fun getRootAsBone(_bb: ByteBuffer, obj: Bone): Bone { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startBone(builder: FlatBufferBuilder) = builder.startTable(4) - @JvmStatic - fun addBodyPart(builder: FlatBufferBuilder, bodyPart: UByte) = builder.addByte(0, bodyPart.toByte(), 0) - @JvmStatic - fun addRotationG(builder: FlatBufferBuilder, rotationG: Int) = builder.addStruct(1, rotationG, 0) - @JvmStatic - fun addBoneLength(builder: FlatBufferBuilder, boneLength: Float) = builder.addFloat(2, boneLength, 0.0) - @JvmStatic - fun addHeadPositionG(builder: FlatBufferBuilder, headPositionG: Int) = builder.addStruct(3, headPositionG, 0) - @JvmStatic - fun endBone(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class Bone : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : Bone { + __init(_i, _bb) + return this + } + val bodyPart : UByte + get() { + val o = __offset(4) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + /** + * 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) + */ + val rotationG : solarxr_protocol.datatypes.math.Quat? get() = rotationG(solarxr_protocol.datatypes.math.Quat()) + fun rotationG(obj: solarxr_protocol.datatypes.math.Quat) : solarxr_protocol.datatypes.math.Quat? { + val o = __offset(6) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + val boneLength : Float + get() { + val o = __offset(8) + return if(o != 0) bb.getFloat(o + bb_pos) else 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. + */ + val headPositionG : solarxr_protocol.datatypes.math.Vec3f? get() = headPositionG(solarxr_protocol.datatypes.math.Vec3f()) + fun headPositionG(obj: solarxr_protocol.datatypes.math.Vec3f) : solarxr_protocol.datatypes.math.Vec3f? { + val o = __offset(10) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsBone(_bb: ByteBuffer): Bone = getRootAsBone(_bb, Bone()) + @JvmStatic + fun getRootAsBone(_bb: ByteBuffer, obj: Bone): Bone { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startBone(builder: FlatBufferBuilder) = builder.startTable(4) + @JvmStatic + fun addBodyPart(builder: FlatBufferBuilder, bodyPart: UByte) = builder.addByte(0, bodyPart.toByte(), 0) + @JvmStatic + fun addRotationG(builder: FlatBufferBuilder, rotationG: Int) = builder.addStruct(1, rotationG, 0) + @JvmStatic + fun addBoneLength(builder: FlatBufferBuilder, boneLength: Float) = builder.addFloat(2, boneLength, 0.0) + @JvmStatic + fun addHeadPositionG(builder: FlatBufferBuilder, headPositionG: Int) = builder.addStruct(3, headPositionG, 0) + @JvmStatic + fun endBone(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedConfig.kt b/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedConfig.kt index a6bd6b86..ae4b1f51 100644 --- a/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedConfig.kt +++ b/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedConfig.kt @@ -1,90 +1,90 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * All information related to the configuration of a data feed. This may be sent - * as part of a `StartFeed`. - */ -@Suppress("unused") -class DataFeedConfig : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : DataFeedConfig { - __init(_i, _bb) - return this - } - /** - * Minimum delay in milliseconds between new data updates. This value will be - * ignored when used for a `PollDataFeed`. - */ - val minimumTimeSinceLast : UShort - get() { - val o = __offset(4) - return if(o != 0) bb.getShort(o + bb_pos).toUShort() else 0u - } - val dataMask : solarxr_protocol.data_feed.device_data.DeviceDataMask? get() = dataMask(solarxr_protocol.data_feed.device_data.DeviceDataMask()) - fun dataMask(obj: solarxr_protocol.data_feed.device_data.DeviceDataMask) : solarxr_protocol.data_feed.device_data.DeviceDataMask? { - val o = __offset(6) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val syntheticTrackersMask : solarxr_protocol.data_feed.tracker.TrackerDataMask? get() = syntheticTrackersMask(solarxr_protocol.data_feed.tracker.TrackerDataMask()) - fun syntheticTrackersMask(obj: solarxr_protocol.data_feed.tracker.TrackerDataMask) : solarxr_protocol.data_feed.tracker.TrackerDataMask? { - val o = __offset(8) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val boneMask : Boolean - get() { - val o = __offset(10) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsDataFeedConfig(_bb: ByteBuffer): DataFeedConfig = getRootAsDataFeedConfig(_bb, DataFeedConfig()) - @JvmStatic - fun getRootAsDataFeedConfig(_bb: ByteBuffer, obj: DataFeedConfig): DataFeedConfig { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createDataFeedConfig(builder: FlatBufferBuilder, minimumTimeSinceLast: UShort, dataMaskOffset: Int, syntheticTrackersMaskOffset: Int, boneMask: Boolean) : Int { - builder.startTable(4) - addSyntheticTrackersMask(builder, syntheticTrackersMaskOffset) - addDataMask(builder, dataMaskOffset) - addMinimumTimeSinceLast(builder, minimumTimeSinceLast) - addBoneMask(builder, boneMask) - return endDataFeedConfig(builder) - } - @JvmStatic - fun startDataFeedConfig(builder: FlatBufferBuilder) = builder.startTable(4) - @JvmStatic - fun addMinimumTimeSinceLast(builder: FlatBufferBuilder, minimumTimeSinceLast: UShort) = builder.addShort(0, minimumTimeSinceLast.toShort(), 0) - @JvmStatic - fun addDataMask(builder: FlatBufferBuilder, dataMask: Int) = builder.addOffset(1, dataMask, 0) - @JvmStatic - fun addSyntheticTrackersMask(builder: FlatBufferBuilder, syntheticTrackersMask: Int) = builder.addOffset(2, syntheticTrackersMask, 0) - @JvmStatic - fun addBoneMask(builder: FlatBufferBuilder, boneMask: Boolean) = builder.addBoolean(3, boneMask, false) - @JvmStatic - fun endDataFeedConfig(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * All information related to the configuration of a data feed. This may be sent + * as part of a `StartFeed`. + */ +@Suppress("unused") +class DataFeedConfig : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : DataFeedConfig { + __init(_i, _bb) + return this + } + /** + * Minimum delay in milliseconds between new data updates. This value will be + * ignored when used for a `PollDataFeed`. + */ + val minimumTimeSinceLast : UShort + get() { + val o = __offset(4) + return if(o != 0) bb.getShort(o + bb_pos).toUShort() else 0u + } + val dataMask : solarxr_protocol.data_feed.device_data.DeviceDataMask? get() = dataMask(solarxr_protocol.data_feed.device_data.DeviceDataMask()) + fun dataMask(obj: solarxr_protocol.data_feed.device_data.DeviceDataMask) : solarxr_protocol.data_feed.device_data.DeviceDataMask? { + val o = __offset(6) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val syntheticTrackersMask : solarxr_protocol.data_feed.tracker.TrackerDataMask? get() = syntheticTrackersMask(solarxr_protocol.data_feed.tracker.TrackerDataMask()) + fun syntheticTrackersMask(obj: solarxr_protocol.data_feed.tracker.TrackerDataMask) : solarxr_protocol.data_feed.tracker.TrackerDataMask? { + val o = __offset(8) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val boneMask : Boolean + get() { + val o = __offset(10) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsDataFeedConfig(_bb: ByteBuffer): DataFeedConfig = getRootAsDataFeedConfig(_bb, DataFeedConfig()) + @JvmStatic + fun getRootAsDataFeedConfig(_bb: ByteBuffer, obj: DataFeedConfig): DataFeedConfig { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createDataFeedConfig(builder: FlatBufferBuilder, minimumTimeSinceLast: UShort, dataMaskOffset: Int, syntheticTrackersMaskOffset: Int, boneMask: Boolean) : Int { + builder.startTable(4) + addSyntheticTrackersMask(builder, syntheticTrackersMaskOffset) + addDataMask(builder, dataMaskOffset) + addMinimumTimeSinceLast(builder, minimumTimeSinceLast) + addBoneMask(builder, boneMask) + return endDataFeedConfig(builder) + } + @JvmStatic + fun startDataFeedConfig(builder: FlatBufferBuilder) = builder.startTable(4) + @JvmStatic + fun addMinimumTimeSinceLast(builder: FlatBufferBuilder, minimumTimeSinceLast: UShort) = builder.addShort(0, minimumTimeSinceLast.toShort(), 0) + @JvmStatic + fun addDataMask(builder: FlatBufferBuilder, dataMask: Int) = builder.addOffset(1, dataMask, 0) + @JvmStatic + fun addSyntheticTrackersMask(builder: FlatBufferBuilder, syntheticTrackersMask: Int) = builder.addOffset(2, syntheticTrackersMask, 0) + @JvmStatic + fun addBoneMask(builder: FlatBufferBuilder, boneMask: Boolean) = builder.addBoolean(3, boneMask, false) + @JvmStatic + fun endDataFeedConfig(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedMessage.kt b/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedMessage.kt index ca537607..58fa779b 100644 --- a/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedMessage.kt +++ b/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedMessage.kt @@ -1,17 +1,17 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed - -@Suppress("unused") -class DataFeedMessage private constructor() { - companion object { - const val NONE: UByte = 0u - const val PollDataFeed: UByte = 1u - const val StartDataFeed: UByte = 2u - const val DataFeedUpdate: UByte = 3u - const val DataFeedConfig: UByte = 4u - val names : Array = arrayOf("NONE", "PollDataFeed", "StartDataFeed", "DataFeedUpdate", "DataFeedConfig") - @JvmStatic - fun name(e: Int) : String = names[e] - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed + +@Suppress("unused") +class DataFeedMessage private constructor() { + companion object { + const val NONE: UByte = 0u + const val PollDataFeed: UByte = 1u + const val StartDataFeed: UByte = 2u + const val DataFeedUpdate: UByte = 3u + const val DataFeedConfig: UByte = 4u + val names : Array = arrayOf("NONE", "PollDataFeed", "StartDataFeed", "DataFeedUpdate", "DataFeedConfig") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedMessageHeader.kt b/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedMessageHeader.kt index 18b243e9..fb48a86c 100644 --- a/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedMessageHeader.kt +++ b/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedMessageHeader.kt @@ -1,56 +1,56 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class DataFeedMessageHeader : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : DataFeedMessageHeader { - __init(_i, _bb) - return this - } - val messageType : UByte - get() { - val o = __offset(4) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - fun message(obj: Table) : Table? { - val o = __offset(6); return if (o != 0) __union(obj, o + bb_pos) else null - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsDataFeedMessageHeader(_bb: ByteBuffer): DataFeedMessageHeader = getRootAsDataFeedMessageHeader(_bb, DataFeedMessageHeader()) - @JvmStatic - fun getRootAsDataFeedMessageHeader(_bb: ByteBuffer, obj: DataFeedMessageHeader): DataFeedMessageHeader { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createDataFeedMessageHeader(builder: FlatBufferBuilder, messageType: UByte, messageOffset: Int) : Int { - builder.startTable(2) - addMessage(builder, messageOffset) - addMessageType(builder, messageType) - return endDataFeedMessageHeader(builder) - } - @JvmStatic - fun startDataFeedMessageHeader(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addMessageType(builder: FlatBufferBuilder, messageType: UByte) = builder.addByte(0, messageType.toByte(), 0) - @JvmStatic - fun addMessage(builder: FlatBufferBuilder, message: Int) = builder.addOffset(1, message, 0) - @JvmStatic - fun endDataFeedMessageHeader(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class DataFeedMessageHeader : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : DataFeedMessageHeader { + __init(_i, _bb) + return this + } + val messageType : UByte + get() { + val o = __offset(4) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + fun message(obj: Table) : Table? { + val o = __offset(6); return if (o != 0) __union(obj, o + bb_pos) else null + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsDataFeedMessageHeader(_bb: ByteBuffer): DataFeedMessageHeader = getRootAsDataFeedMessageHeader(_bb, DataFeedMessageHeader()) + @JvmStatic + fun getRootAsDataFeedMessageHeader(_bb: ByteBuffer, obj: DataFeedMessageHeader): DataFeedMessageHeader { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createDataFeedMessageHeader(builder: FlatBufferBuilder, messageType: UByte, messageOffset: Int) : Int { + builder.startTable(2) + addMessage(builder, messageOffset) + addMessageType(builder, messageType) + return endDataFeedMessageHeader(builder) + } + @JvmStatic + fun startDataFeedMessageHeader(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addMessageType(builder: FlatBufferBuilder, messageType: UByte) = builder.addByte(0, messageType.toByte(), 0) + @JvmStatic + fun addMessage(builder: FlatBufferBuilder, message: Int) = builder.addOffset(1, message, 0) + @JvmStatic + fun endDataFeedMessageHeader(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedUpdate.kt b/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedUpdate.kt index 20387c06..1c87b6dd 100644 --- a/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedUpdate.kt +++ b/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedUpdate.kt @@ -1,132 +1,132 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed - -import java.nio.* -import kotlin.math.sign -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. - */ -@Suppress("unused") -class DataFeedUpdate : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : DataFeedUpdate { - __init(_i, _bb) - return this - } - fun devices(j: Int) : solarxr_protocol.data_feed.device_data.DeviceData? = devices(solarxr_protocol.data_feed.device_data.DeviceData(), j) - fun devices(obj: solarxr_protocol.data_feed.device_data.DeviceData, j: Int) : solarxr_protocol.data_feed.device_data.DeviceData? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(__vector(o) + j * 4), bb) - } else { - null - } - } - val devicesLength : Int - get() { - val o = __offset(4); return if (o != 0) __vector_len(o) else 0 - } - fun syntheticTrackers(j: Int) : solarxr_protocol.data_feed.tracker.TrackerData? = syntheticTrackers(solarxr_protocol.data_feed.tracker.TrackerData(), j) - fun syntheticTrackers(obj: solarxr_protocol.data_feed.tracker.TrackerData, j: Int) : solarxr_protocol.data_feed.tracker.TrackerData? { - val o = __offset(6) - return if (o != 0) { - obj.__assign(__indirect(__vector(o) + j * 4), bb) - } else { - null - } - } - val syntheticTrackersLength : Int - get() { - val o = __offset(6); return if (o != 0) __vector_len(o) else 0 - } - /** - * This must represent a set, where there is no more than one bone for a `BodyPart`. - */ - fun bones(j: Int) : solarxr_protocol.data_feed.Bone? = bones(solarxr_protocol.data_feed.Bone(), j) - fun bones(obj: solarxr_protocol.data_feed.Bone, j: Int) : solarxr_protocol.data_feed.Bone? { - val o = __offset(8) - return if (o != 0) { - obj.__assign(__indirect(__vector(o) + j * 4), bb) - } else { - null - } - } - val bonesLength : Int - get() { - val o = __offset(8); return if (o != 0) __vector_len(o) else 0 - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsDataFeedUpdate(_bb: ByteBuffer): DataFeedUpdate = getRootAsDataFeedUpdate(_bb, DataFeedUpdate()) - @JvmStatic - fun getRootAsDataFeedUpdate(_bb: ByteBuffer, obj: DataFeedUpdate): DataFeedUpdate { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createDataFeedUpdate(builder: FlatBufferBuilder, devicesOffset: Int, syntheticTrackersOffset: Int, bonesOffset: Int) : Int { - builder.startTable(3) - addBones(builder, bonesOffset) - addSyntheticTrackers(builder, syntheticTrackersOffset) - addDevices(builder, devicesOffset) - return endDataFeedUpdate(builder) - } - @JvmStatic - fun startDataFeedUpdate(builder: FlatBufferBuilder) = builder.startTable(3) - @JvmStatic - fun addDevices(builder: FlatBufferBuilder, devices: Int) = builder.addOffset(0, devices, 0) - @JvmStatic - fun createDevicesVector(builder: FlatBufferBuilder, data: IntArray) : Int { - builder.startVector(4, data.size, 4) - for (i in data.size - 1 downTo 0) { - builder.addOffset(data[i]) - } - return builder.endVector() - } - @JvmStatic - fun startDevicesVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) - @JvmStatic - fun addSyntheticTrackers(builder: FlatBufferBuilder, syntheticTrackers: Int) = builder.addOffset(1, syntheticTrackers, 0) - @JvmStatic - fun createSyntheticTrackersVector(builder: FlatBufferBuilder, data: IntArray) : Int { - builder.startVector(4, data.size, 4) - for (i in data.size - 1 downTo 0) { - builder.addOffset(data[i]) - } - return builder.endVector() - } - @JvmStatic - fun startSyntheticTrackersVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) - @JvmStatic - fun addBones(builder: FlatBufferBuilder, bones: Int) = builder.addOffset(2, bones, 0) - @JvmStatic - fun createBonesVector(builder: FlatBufferBuilder, data: IntArray) : Int { - builder.startVector(4, data.size, 4) - for (i in data.size - 1 downTo 0) { - builder.addOffset(data[i]) - } - return builder.endVector() - } - @JvmStatic - fun startBonesVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) - @JvmStatic - fun endDataFeedUpdate(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed + +import java.nio.* +import kotlin.math.sign +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. + */ +@Suppress("unused") +class DataFeedUpdate : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : DataFeedUpdate { + __init(_i, _bb) + return this + } + fun devices(j: Int) : solarxr_protocol.data_feed.device_data.DeviceData? = devices(solarxr_protocol.data_feed.device_data.DeviceData(), j) + fun devices(obj: solarxr_protocol.data_feed.device_data.DeviceData, j: Int) : solarxr_protocol.data_feed.device_data.DeviceData? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(__vector(o) + j * 4), bb) + } else { + null + } + } + val devicesLength : Int + get() { + val o = __offset(4); return if (o != 0) __vector_len(o) else 0 + } + fun syntheticTrackers(j: Int) : solarxr_protocol.data_feed.tracker.TrackerData? = syntheticTrackers(solarxr_protocol.data_feed.tracker.TrackerData(), j) + fun syntheticTrackers(obj: solarxr_protocol.data_feed.tracker.TrackerData, j: Int) : solarxr_protocol.data_feed.tracker.TrackerData? { + val o = __offset(6) + return if (o != 0) { + obj.__assign(__indirect(__vector(o) + j * 4), bb) + } else { + null + } + } + val syntheticTrackersLength : Int + get() { + val o = __offset(6); return if (o != 0) __vector_len(o) else 0 + } + /** + * This must represent a set, where there is no more than one bone for a `BodyPart`. + */ + fun bones(j: Int) : solarxr_protocol.data_feed.Bone? = bones(solarxr_protocol.data_feed.Bone(), j) + fun bones(obj: solarxr_protocol.data_feed.Bone, j: Int) : solarxr_protocol.data_feed.Bone? { + val o = __offset(8) + return if (o != 0) { + obj.__assign(__indirect(__vector(o) + j * 4), bb) + } else { + null + } + } + val bonesLength : Int + get() { + val o = __offset(8); return if (o != 0) __vector_len(o) else 0 + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsDataFeedUpdate(_bb: ByteBuffer): DataFeedUpdate = getRootAsDataFeedUpdate(_bb, DataFeedUpdate()) + @JvmStatic + fun getRootAsDataFeedUpdate(_bb: ByteBuffer, obj: DataFeedUpdate): DataFeedUpdate { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createDataFeedUpdate(builder: FlatBufferBuilder, devicesOffset: Int, syntheticTrackersOffset: Int, bonesOffset: Int) : Int { + builder.startTable(3) + addBones(builder, bonesOffset) + addSyntheticTrackers(builder, syntheticTrackersOffset) + addDevices(builder, devicesOffset) + return endDataFeedUpdate(builder) + } + @JvmStatic + fun startDataFeedUpdate(builder: FlatBufferBuilder) = builder.startTable(3) + @JvmStatic + fun addDevices(builder: FlatBufferBuilder, devices: Int) = builder.addOffset(0, devices, 0) + @JvmStatic + fun createDevicesVector(builder: FlatBufferBuilder, data: IntArray) : Int { + builder.startVector(4, data.size, 4) + for (i in data.size - 1 downTo 0) { + builder.addOffset(data[i]) + } + return builder.endVector() + } + @JvmStatic + fun startDevicesVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) + @JvmStatic + fun addSyntheticTrackers(builder: FlatBufferBuilder, syntheticTrackers: Int) = builder.addOffset(1, syntheticTrackers, 0) + @JvmStatic + fun createSyntheticTrackersVector(builder: FlatBufferBuilder, data: IntArray) : Int { + builder.startVector(4, data.size, 4) + for (i in data.size - 1 downTo 0) { + builder.addOffset(data[i]) + } + return builder.endVector() + } + @JvmStatic + fun startSyntheticTrackersVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) + @JvmStatic + fun addBones(builder: FlatBufferBuilder, bones: Int) = builder.addOffset(2, bones, 0) + @JvmStatic + fun createBonesVector(builder: FlatBufferBuilder, data: IntArray) : Int { + builder.startVector(4, data.size, 4) + for (i in data.size - 1 downTo 0) { + builder.addOffset(data[i]) + } + return builder.endVector() + } + @JvmStatic + fun startBonesVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) + @JvmStatic + fun endDataFeedUpdate(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/data_feed/PollDataFeed.kt b/protocol/kotlin/src/solarxr_protocol/data_feed/PollDataFeed.kt index 7f6086b7..d3dcccb3 100644 --- a/protocol/kotlin/src/solarxr_protocol/data_feed/PollDataFeed.kt +++ b/protocol/kotlin/src/solarxr_protocol/data_feed/PollDataFeed.kt @@ -1,58 +1,58 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Requests for a single `Update` to be sent. This is helpful when getting - * initial info about the device. - */ -@Suppress("unused") -class PollDataFeed : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : PollDataFeed { - __init(_i, _bb) - return this - } - val config : solarxr_protocol.data_feed.DataFeedConfig? get() = config(solarxr_protocol.data_feed.DataFeedConfig()) - fun config(obj: solarxr_protocol.data_feed.DataFeedConfig) : solarxr_protocol.data_feed.DataFeedConfig? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsPollDataFeed(_bb: ByteBuffer): PollDataFeed = getRootAsPollDataFeed(_bb, PollDataFeed()) - @JvmStatic - fun getRootAsPollDataFeed(_bb: ByteBuffer, obj: PollDataFeed): PollDataFeed { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createPollDataFeed(builder: FlatBufferBuilder, configOffset: Int) : Int { - builder.startTable(1) - addConfig(builder, configOffset) - return endPollDataFeed(builder) - } - @JvmStatic - fun startPollDataFeed(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addConfig(builder: FlatBufferBuilder, config: Int) = builder.addOffset(0, config, 0) - @JvmStatic - fun endPollDataFeed(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Requests for a single `Update` to be sent. This is helpful when getting + * initial info about the device. + */ +@Suppress("unused") +class PollDataFeed : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : PollDataFeed { + __init(_i, _bb) + return this + } + val config : solarxr_protocol.data_feed.DataFeedConfig? get() = config(solarxr_protocol.data_feed.DataFeedConfig()) + fun config(obj: solarxr_protocol.data_feed.DataFeedConfig) : solarxr_protocol.data_feed.DataFeedConfig? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsPollDataFeed(_bb: ByteBuffer): PollDataFeed = getRootAsPollDataFeed(_bb, PollDataFeed()) + @JvmStatic + fun getRootAsPollDataFeed(_bb: ByteBuffer, obj: PollDataFeed): PollDataFeed { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createPollDataFeed(builder: FlatBufferBuilder, configOffset: Int) : Int { + builder.startTable(1) + addConfig(builder, configOffset) + return endPollDataFeed(builder) + } + @JvmStatic + fun startPollDataFeed(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addConfig(builder: FlatBufferBuilder, config: Int) = builder.addOffset(0, config, 0) + @JvmStatic + fun endPollDataFeed(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/data_feed/StartDataFeed.kt b/protocol/kotlin/src/solarxr_protocol/data_feed/StartDataFeed.kt index eec7f5b6..6ec3f331 100644 --- a/protocol/kotlin/src/solarxr_protocol/data_feed/StartDataFeed.kt +++ b/protocol/kotlin/src/solarxr_protocol/data_feed/StartDataFeed.kt @@ -1,78 +1,78 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed - -import java.nio.* -import kotlin.math.sign -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. - */ -@Suppress("unused") -class StartDataFeed : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : StartDataFeed { - __init(_i, _bb) - return this - } - fun dataFeeds(j: Int) : solarxr_protocol.data_feed.DataFeedConfig? = dataFeeds(solarxr_protocol.data_feed.DataFeedConfig(), j) - fun dataFeeds(obj: solarxr_protocol.data_feed.DataFeedConfig, j: Int) : solarxr_protocol.data_feed.DataFeedConfig? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(__vector(o) + j * 4), bb) - } else { - null - } - } - val dataFeedsLength : Int - get() { - val o = __offset(4); return if (o != 0) __vector_len(o) else 0 - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsStartDataFeed(_bb: ByteBuffer): StartDataFeed = getRootAsStartDataFeed(_bb, StartDataFeed()) - @JvmStatic - fun getRootAsStartDataFeed(_bb: ByteBuffer, obj: StartDataFeed): StartDataFeed { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createStartDataFeed(builder: FlatBufferBuilder, dataFeedsOffset: Int) : Int { - builder.startTable(1) - addDataFeeds(builder, dataFeedsOffset) - return endStartDataFeed(builder) - } - @JvmStatic - fun startStartDataFeed(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addDataFeeds(builder: FlatBufferBuilder, dataFeeds: Int) = builder.addOffset(0, dataFeeds, 0) - @JvmStatic - fun createDataFeedsVector(builder: FlatBufferBuilder, data: IntArray) : Int { - builder.startVector(4, data.size, 4) - for (i in data.size - 1 downTo 0) { - builder.addOffset(data[i]) - } - return builder.endVector() - } - @JvmStatic - fun startDataFeedsVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) - @JvmStatic - fun endStartDataFeed(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed + +import java.nio.* +import kotlin.math.sign +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. + */ +@Suppress("unused") +class StartDataFeed : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : StartDataFeed { + __init(_i, _bb) + return this + } + fun dataFeeds(j: Int) : solarxr_protocol.data_feed.DataFeedConfig? = dataFeeds(solarxr_protocol.data_feed.DataFeedConfig(), j) + fun dataFeeds(obj: solarxr_protocol.data_feed.DataFeedConfig, j: Int) : solarxr_protocol.data_feed.DataFeedConfig? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(__vector(o) + j * 4), bb) + } else { + null + } + } + val dataFeedsLength : Int + get() { + val o = __offset(4); return if (o != 0) __vector_len(o) else 0 + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsStartDataFeed(_bb: ByteBuffer): StartDataFeed = getRootAsStartDataFeed(_bb, StartDataFeed()) + @JvmStatic + fun getRootAsStartDataFeed(_bb: ByteBuffer, obj: StartDataFeed): StartDataFeed { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createStartDataFeed(builder: FlatBufferBuilder, dataFeedsOffset: Int) : Int { + builder.startTable(1) + addDataFeeds(builder, dataFeedsOffset) + return endStartDataFeed(builder) + } + @JvmStatic + fun startStartDataFeed(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addDataFeeds(builder: FlatBufferBuilder, dataFeeds: Int) = builder.addOffset(0, dataFeeds, 0) + @JvmStatic + fun createDataFeedsVector(builder: FlatBufferBuilder, data: IntArray) : Int { + builder.startVector(4, data.size, 4) + for (i in data.size - 1 downTo 0) { + builder.addOffset(data[i]) + } + return builder.endVector() + } + @JvmStatic + fun startDataFeedsVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) + @JvmStatic + fun endStartDataFeed(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/data_feed/device_data/DeviceData.kt b/protocol/kotlin/src/solarxr_protocol/data_feed/device_data/DeviceData.kt index 7ea843d8..20ab4125 100644 --- a/protocol/kotlin/src/solarxr_protocol/data_feed/device_data/DeviceData.kt +++ b/protocol/kotlin/src/solarxr_protocol/data_feed/device_data/DeviceData.kt @@ -1,122 +1,122 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed.device_data - -import java.nio.* -import kotlin.math.sign -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. - */ -@Suppress("unused") -class DeviceData : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : DeviceData { - __init(_i, _bb) - return this - } - val id : solarxr_protocol.datatypes.DeviceId? get() = id(solarxr_protocol.datatypes.DeviceId()) - fun id(obj: solarxr_protocol.datatypes.DeviceId) : solarxr_protocol.datatypes.DeviceId? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(o + bb_pos, bb) - } else { - null - } - } - /** - * The dynamically changeable name of the device. This might be set by the - * user to help them remember which tracker is which. - */ - val customName : String? - get() { - val o = __offset(6) - return if (o != 0) __string(o + bb_pos) else null - } - val customNameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) - fun customNameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) - /** - * Mostly-static info about the device hardware - */ - val hardwareInfo : solarxr_protocol.datatypes.hardware_info.HardwareInfo? get() = hardwareInfo(solarxr_protocol.datatypes.hardware_info.HardwareInfo()) - fun hardwareInfo(obj: solarxr_protocol.datatypes.hardware_info.HardwareInfo) : solarxr_protocol.datatypes.hardware_info.HardwareInfo? { - val o = __offset(8) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - /** - * General info about the status of the device - */ - val hardwareStatus : solarxr_protocol.datatypes.hardware_info.HardwareStatus? get() = hardwareStatus(solarxr_protocol.datatypes.hardware_info.HardwareStatus()) - fun hardwareStatus(obj: solarxr_protocol.datatypes.hardware_info.HardwareStatus) : solarxr_protocol.datatypes.hardware_info.HardwareStatus? { - val o = __offset(10) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - /** - * Info about all trackers attached to this device - */ - fun trackers(j: Int) : solarxr_protocol.data_feed.tracker.TrackerData? = trackers(solarxr_protocol.data_feed.tracker.TrackerData(), j) - fun trackers(obj: solarxr_protocol.data_feed.tracker.TrackerData, j: Int) : solarxr_protocol.data_feed.tracker.TrackerData? { - val o = __offset(12) - return if (o != 0) { - obj.__assign(__indirect(__vector(o) + j * 4), bb) - } else { - null - } - } - val trackersLength : Int - get() { - val o = __offset(12); return if (o != 0) __vector_len(o) else 0 - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsDeviceData(_bb: ByteBuffer): DeviceData = getRootAsDeviceData(_bb, DeviceData()) - @JvmStatic - fun getRootAsDeviceData(_bb: ByteBuffer, obj: DeviceData): DeviceData { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startDeviceData(builder: FlatBufferBuilder) = builder.startTable(5) - @JvmStatic - fun addId(builder: FlatBufferBuilder, id: Int) = builder.addStruct(0, id, 0) - @JvmStatic - fun addCustomName(builder: FlatBufferBuilder, customName: Int) = builder.addOffset(1, customName, 0) - @JvmStatic - fun addHardwareInfo(builder: FlatBufferBuilder, hardwareInfo: Int) = builder.addOffset(2, hardwareInfo, 0) - @JvmStatic - fun addHardwareStatus(builder: FlatBufferBuilder, hardwareStatus: Int) = builder.addOffset(3, hardwareStatus, 0) - @JvmStatic - fun addTrackers(builder: FlatBufferBuilder, trackers: Int) = builder.addOffset(4, trackers, 0) - @JvmStatic - fun createTrackersVector(builder: FlatBufferBuilder, data: IntArray) : Int { - builder.startVector(4, data.size, 4) - for (i in data.size - 1 downTo 0) { - builder.addOffset(data[i]) - } - return builder.endVector() - } - @JvmStatic - fun startTrackersVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) - @JvmStatic - fun endDeviceData(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.device_data + +import java.nio.* +import kotlin.math.sign +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. + */ +@Suppress("unused") +class DeviceData : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : DeviceData { + __init(_i, _bb) + return this + } + val id : solarxr_protocol.datatypes.DeviceId? get() = id(solarxr_protocol.datatypes.DeviceId()) + fun id(obj: solarxr_protocol.datatypes.DeviceId) : solarxr_protocol.datatypes.DeviceId? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + /** + * The dynamically changeable name of the device. This might be set by the + * user to help them remember which tracker is which. + */ + val customName : String? + get() { + val o = __offset(6) + return if (o != 0) __string(o + bb_pos) else null + } + val customNameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) + fun customNameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) + /** + * Mostly-static info about the device hardware + */ + val hardwareInfo : solarxr_protocol.datatypes.hardware_info.HardwareInfo? get() = hardwareInfo(solarxr_protocol.datatypes.hardware_info.HardwareInfo()) + fun hardwareInfo(obj: solarxr_protocol.datatypes.hardware_info.HardwareInfo) : solarxr_protocol.datatypes.hardware_info.HardwareInfo? { + val o = __offset(8) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + /** + * General info about the status of the device + */ + val hardwareStatus : solarxr_protocol.datatypes.hardware_info.HardwareStatus? get() = hardwareStatus(solarxr_protocol.datatypes.hardware_info.HardwareStatus()) + fun hardwareStatus(obj: solarxr_protocol.datatypes.hardware_info.HardwareStatus) : solarxr_protocol.datatypes.hardware_info.HardwareStatus? { + val o = __offset(10) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + /** + * Info about all trackers attached to this device + */ + fun trackers(j: Int) : solarxr_protocol.data_feed.tracker.TrackerData? = trackers(solarxr_protocol.data_feed.tracker.TrackerData(), j) + fun trackers(obj: solarxr_protocol.data_feed.tracker.TrackerData, j: Int) : solarxr_protocol.data_feed.tracker.TrackerData? { + val o = __offset(12) + return if (o != 0) { + obj.__assign(__indirect(__vector(o) + j * 4), bb) + } else { + null + } + } + val trackersLength : Int + get() { + val o = __offset(12); return if (o != 0) __vector_len(o) else 0 + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsDeviceData(_bb: ByteBuffer): DeviceData = getRootAsDeviceData(_bb, DeviceData()) + @JvmStatic + fun getRootAsDeviceData(_bb: ByteBuffer, obj: DeviceData): DeviceData { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startDeviceData(builder: FlatBufferBuilder) = builder.startTable(5) + @JvmStatic + fun addId(builder: FlatBufferBuilder, id: Int) = builder.addStruct(0, id, 0) + @JvmStatic + fun addCustomName(builder: FlatBufferBuilder, customName: Int) = builder.addOffset(1, customName, 0) + @JvmStatic + fun addHardwareInfo(builder: FlatBufferBuilder, hardwareInfo: Int) = builder.addOffset(2, hardwareInfo, 0) + @JvmStatic + fun addHardwareStatus(builder: FlatBufferBuilder, hardwareStatus: Int) = builder.addOffset(3, hardwareStatus, 0) + @JvmStatic + fun addTrackers(builder: FlatBufferBuilder, trackers: Int) = builder.addOffset(4, trackers, 0) + @JvmStatic + fun createTrackersVector(builder: FlatBufferBuilder, data: IntArray) : Int { + builder.startVector(4, data.size, 4) + for (i in data.size - 1 downTo 0) { + builder.addOffset(data[i]) + } + return builder.endVector() + } + @JvmStatic + fun startTrackersVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) + @JvmStatic + fun endDeviceData(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/data_feed/device_data/DeviceDataMask.kt b/protocol/kotlin/src/solarxr_protocol/data_feed/device_data/DeviceDataMask.kt index 392aa827..da1d5a06 100644 --- a/protocol/kotlin/src/solarxr_protocol/data_feed/device_data/DeviceDataMask.kt +++ b/protocol/kotlin/src/solarxr_protocol/data_feed/device_data/DeviceDataMask.kt @@ -1,76 +1,76 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed.device_data - -import java.nio.* -import kotlin.math.sign -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. - */ -@Suppress("unused") -class DeviceDataMask : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : DeviceDataMask { - __init(_i, _bb) - return this - } - /** - * Which tracker data should be sent in this data feed - */ - val trackerData : solarxr_protocol.data_feed.tracker.TrackerDataMask? get() = trackerData(solarxr_protocol.data_feed.tracker.TrackerDataMask()) - fun trackerData(obj: solarxr_protocol.data_feed.tracker.TrackerDataMask) : solarxr_protocol.data_feed.tracker.TrackerDataMask? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - /** - * true if device data should be sent in this data feed - */ - val deviceData : Boolean - get() { - val o = __offset(6) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsDeviceDataMask(_bb: ByteBuffer): DeviceDataMask = getRootAsDeviceDataMask(_bb, DeviceDataMask()) - @JvmStatic - fun getRootAsDeviceDataMask(_bb: ByteBuffer, obj: DeviceDataMask): DeviceDataMask { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createDeviceDataMask(builder: FlatBufferBuilder, trackerDataOffset: Int, deviceData: Boolean) : Int { - builder.startTable(2) - addTrackerData(builder, trackerDataOffset) - addDeviceData(builder, deviceData) - return endDeviceDataMask(builder) - } - @JvmStatic - fun startDeviceDataMask(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addTrackerData(builder: FlatBufferBuilder, trackerData: Int) = builder.addOffset(0, trackerData, 0) - @JvmStatic - fun addDeviceData(builder: FlatBufferBuilder, deviceData: Boolean) = builder.addBoolean(1, deviceData, false) - @JvmStatic - fun endDeviceDataMask(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.device_data + +import java.nio.* +import kotlin.math.sign +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. + */ +@Suppress("unused") +class DeviceDataMask : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : DeviceDataMask { + __init(_i, _bb) + return this + } + /** + * Which tracker data should be sent in this data feed + */ + val trackerData : solarxr_protocol.data_feed.tracker.TrackerDataMask? get() = trackerData(solarxr_protocol.data_feed.tracker.TrackerDataMask()) + fun trackerData(obj: solarxr_protocol.data_feed.tracker.TrackerDataMask) : solarxr_protocol.data_feed.tracker.TrackerDataMask? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + /** + * true if device data should be sent in this data feed + */ + val deviceData : Boolean + get() { + val o = __offset(6) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsDeviceDataMask(_bb: ByteBuffer): DeviceDataMask = getRootAsDeviceDataMask(_bb, DeviceDataMask()) + @JvmStatic + fun getRootAsDeviceDataMask(_bb: ByteBuffer, obj: DeviceDataMask): DeviceDataMask { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createDeviceDataMask(builder: FlatBufferBuilder, trackerDataOffset: Int, deviceData: Boolean) : Int { + builder.startTable(2) + addTrackerData(builder, trackerDataOffset) + addDeviceData(builder, deviceData) + return endDeviceDataMask(builder) + } + @JvmStatic + fun startDeviceDataMask(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addTrackerData(builder: FlatBufferBuilder, trackerData: Int) = builder.addOffset(0, trackerData, 0) + @JvmStatic + fun addDeviceData(builder: FlatBufferBuilder, deviceData: Boolean) = builder.addBoolean(1, deviceData, false) + @JvmStatic + fun endDeviceDataMask(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/data_feed/tracker/TrackerData.kt b/protocol/kotlin/src/solarxr_protocol/data_feed/tracker/TrackerData.kt index 1aad8d36..083df43a 100644 --- a/protocol/kotlin/src/solarxr_protocol/data_feed/tracker/TrackerData.kt +++ b/protocol/kotlin/src/solarxr_protocol/data_feed/tracker/TrackerData.kt @@ -1,205 +1,205 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed.tracker - -import java.nio.* -import kotlin.math.sign -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. - */ -@Suppress("unused") -class TrackerData : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : TrackerData { - __init(_i, _bb) - return this - } - val trackerId : solarxr_protocol.datatypes.TrackerId? get() = trackerId(solarxr_protocol.datatypes.TrackerId()) - fun trackerId(obj: solarxr_protocol.datatypes.TrackerId) : solarxr_protocol.datatypes.TrackerId? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val info : solarxr_protocol.data_feed.tracker.TrackerInfo? get() = info(solarxr_protocol.data_feed.tracker.TrackerInfo()) - fun info(obj: solarxr_protocol.data_feed.tracker.TrackerInfo) : solarxr_protocol.data_feed.tracker.TrackerInfo? { - val o = __offset(6) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val status : UByte - get() { - val o = __offset(8) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - /** - * Sensor rotation after fusion - */ - val rotation : solarxr_protocol.datatypes.math.Quat? get() = rotation(solarxr_protocol.datatypes.math.Quat()) - fun rotation(obj: solarxr_protocol.datatypes.math.Quat) : solarxr_protocol.datatypes.math.Quat? { - val o = __offset(10) - return if (o != 0) { - obj.__assign(o + bb_pos, bb) - } else { - null - } - } - /** - * Position, in meters - */ - val position : solarxr_protocol.datatypes.math.Vec3f? get() = position(solarxr_protocol.datatypes.math.Vec3f()) - fun position(obj: solarxr_protocol.datatypes.math.Vec3f) : solarxr_protocol.datatypes.math.Vec3f? { - val o = __offset(12) - return if (o != 0) { - obj.__assign(o + bb_pos, bb) - } else { - null - } - } - /** - * Raw angular velocity, in euler angles, rad/s - */ - val rawAngularVelocity : solarxr_protocol.datatypes.math.Vec3f? get() = rawAngularVelocity(solarxr_protocol.datatypes.math.Vec3f()) - fun rawAngularVelocity(obj: solarxr_protocol.datatypes.math.Vec3f) : solarxr_protocol.datatypes.math.Vec3f? { - val o = __offset(14) - return if (o != 0) { - obj.__assign(o + bb_pos, bb) - } else { - null - } - } - /** - * Raw acceleration, in m/s^2 - */ - val rawAcceleration : solarxr_protocol.datatypes.math.Vec3f? get() = rawAcceleration(solarxr_protocol.datatypes.math.Vec3f()) - fun rawAcceleration(obj: solarxr_protocol.datatypes.math.Vec3f) : solarxr_protocol.datatypes.math.Vec3f? { - val o = __offset(16) - return if (o != 0) { - obj.__assign(o + bb_pos, bb) - } else { - null - } - } - /** - * Temperature, in degrees celsius - */ - val temp : solarxr_protocol.datatypes.Temperature? get() = temp(solarxr_protocol.datatypes.Temperature()) - fun temp(obj: solarxr_protocol.datatypes.Temperature) : solarxr_protocol.datatypes.Temperature? { - val o = __offset(18) - return if (o != 0) { - obj.__assign(o + bb_pos, bb) - } else { - null - } - } - /** - * Acceleration without gravity, in m/s^2 - */ - val linearAcceleration : solarxr_protocol.datatypes.math.Vec3f? get() = linearAcceleration(solarxr_protocol.datatypes.math.Vec3f()) - fun linearAcceleration(obj: solarxr_protocol.datatypes.math.Vec3f) : solarxr_protocol.datatypes.math.Vec3f? { - val o = __offset(20) - return if (o != 0) { - obj.__assign(o + bb_pos, bb) - } else { - null - } - } - /** - * Reference-adjusted rotation for IMU-only trackers (VR HMD yaw is used as a reset reference). - * In other words, a rotation that is aligned to a reliable source of rotation ((0, VR HMD YAW, 0)), - * triggered after user input (using reset buttons). - * This is a SlimeVR-specific field and computed exclusively by SlimeVR server. - * Includes: mounting orientation, full, quick and mounting reset adjustments. - * This rotation can be used to reconstruct a skeleton pose using forward kinematics. - */ - val rotationReferenceAdjusted : solarxr_protocol.datatypes.math.Quat? get() = rotationReferenceAdjusted(solarxr_protocol.datatypes.math.Quat()) - fun rotationReferenceAdjusted(obj: solarxr_protocol.datatypes.math.Quat) : solarxr_protocol.datatypes.math.Quat? { - val o = __offset(22) - return if (o != 0) { - obj.__assign(o + bb_pos, bb) - } else { - null - } - } - /** - * Zero-reference-adjusted rotation for IMU-only trackers (identity quaternion is used as a reset reference). - * In other words, a rotation that is aligned to a zero vector ((0, 0, 0)) by - * inverting the current rotation, triggered after user input (using reset buttons). - * This is a SlimeVR-specific field and computed exclusively by SlimeVR server. - * Includes: only full and quick reset adjustments. - * This rotation can be used in visualizations for IMU debugging. - */ - val rotationIdentityAdjusted : solarxr_protocol.datatypes.math.Quat? get() = rotationIdentityAdjusted(solarxr_protocol.datatypes.math.Quat()) - fun rotationIdentityAdjusted(obj: solarxr_protocol.datatypes.math.Quat) : solarxr_protocol.datatypes.math.Quat? { - val o = __offset(24) - return if (o != 0) { - obj.__assign(o + bb_pos, bb) - } else { - null - } - } - /** - * Data ticks per second, processed by SlimeVR server - */ - val tps : UShort? - get() { - val o = __offset(26) - return if(o != 0) bb.getShort(o + bb_pos).toUShort() else null - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsTrackerData(_bb: ByteBuffer): TrackerData = getRootAsTrackerData(_bb, TrackerData()) - @JvmStatic - fun getRootAsTrackerData(_bb: ByteBuffer, obj: TrackerData): TrackerData { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startTrackerData(builder: FlatBufferBuilder) = builder.startTable(12) - @JvmStatic - fun addTrackerId(builder: FlatBufferBuilder, trackerId: Int) = builder.addOffset(0, trackerId, 0) - @JvmStatic - fun addInfo(builder: FlatBufferBuilder, info: Int) = builder.addOffset(1, info, 0) - @JvmStatic - fun addStatus(builder: FlatBufferBuilder, status: UByte) = builder.addByte(2, status.toByte(), 0) - @JvmStatic - fun addRotation(builder: FlatBufferBuilder, rotation: Int) = builder.addStruct(3, rotation, 0) - @JvmStatic - fun addPosition(builder: FlatBufferBuilder, position: Int) = builder.addStruct(4, position, 0) - @JvmStatic - fun addRawAngularVelocity(builder: FlatBufferBuilder, rawAngularVelocity: Int) = builder.addStruct(5, rawAngularVelocity, 0) - @JvmStatic - fun addRawAcceleration(builder: FlatBufferBuilder, rawAcceleration: Int) = builder.addStruct(6, rawAcceleration, 0) - @JvmStatic - fun addTemp(builder: FlatBufferBuilder, temp: Int) = builder.addStruct(7, temp, 0) - @JvmStatic - fun addLinearAcceleration(builder: FlatBufferBuilder, linearAcceleration: Int) = builder.addStruct(8, linearAcceleration, 0) - @JvmStatic - fun addRotationReferenceAdjusted(builder: FlatBufferBuilder, rotationReferenceAdjusted: Int) = builder.addStruct(9, rotationReferenceAdjusted, 0) - @JvmStatic - fun addRotationIdentityAdjusted(builder: FlatBufferBuilder, rotationIdentityAdjusted: Int) = builder.addStruct(10, rotationIdentityAdjusted, 0) - @JvmStatic - fun addTps(builder: FlatBufferBuilder, tps: UShort) = builder.addShort(11, tps.toShort(), 0) - @JvmStatic - fun endTrackerData(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.tracker + +import java.nio.* +import kotlin.math.sign +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. + */ +@Suppress("unused") +class TrackerData : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : TrackerData { + __init(_i, _bb) + return this + } + val trackerId : solarxr_protocol.datatypes.TrackerId? get() = trackerId(solarxr_protocol.datatypes.TrackerId()) + fun trackerId(obj: solarxr_protocol.datatypes.TrackerId) : solarxr_protocol.datatypes.TrackerId? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val info : solarxr_protocol.data_feed.tracker.TrackerInfo? get() = info(solarxr_protocol.data_feed.tracker.TrackerInfo()) + fun info(obj: solarxr_protocol.data_feed.tracker.TrackerInfo) : solarxr_protocol.data_feed.tracker.TrackerInfo? { + val o = __offset(6) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val status : UByte + get() { + val o = __offset(8) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + /** + * Sensor rotation after fusion + */ + val rotation : solarxr_protocol.datatypes.math.Quat? get() = rotation(solarxr_protocol.datatypes.math.Quat()) + fun rotation(obj: solarxr_protocol.datatypes.math.Quat) : solarxr_protocol.datatypes.math.Quat? { + val o = __offset(10) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + /** + * Position, in meters + */ + val position : solarxr_protocol.datatypes.math.Vec3f? get() = position(solarxr_protocol.datatypes.math.Vec3f()) + fun position(obj: solarxr_protocol.datatypes.math.Vec3f) : solarxr_protocol.datatypes.math.Vec3f? { + val o = __offset(12) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + /** + * Raw angular velocity, in euler angles, rad/s + */ + val rawAngularVelocity : solarxr_protocol.datatypes.math.Vec3f? get() = rawAngularVelocity(solarxr_protocol.datatypes.math.Vec3f()) + fun rawAngularVelocity(obj: solarxr_protocol.datatypes.math.Vec3f) : solarxr_protocol.datatypes.math.Vec3f? { + val o = __offset(14) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + /** + * Raw acceleration, in m/s^2 + */ + val rawAcceleration : solarxr_protocol.datatypes.math.Vec3f? get() = rawAcceleration(solarxr_protocol.datatypes.math.Vec3f()) + fun rawAcceleration(obj: solarxr_protocol.datatypes.math.Vec3f) : solarxr_protocol.datatypes.math.Vec3f? { + val o = __offset(16) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + /** + * Temperature, in degrees celsius + */ + val temp : solarxr_protocol.datatypes.Temperature? get() = temp(solarxr_protocol.datatypes.Temperature()) + fun temp(obj: solarxr_protocol.datatypes.Temperature) : solarxr_protocol.datatypes.Temperature? { + val o = __offset(18) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + /** + * Acceleration without gravity, in m/s^2 + */ + val linearAcceleration : solarxr_protocol.datatypes.math.Vec3f? get() = linearAcceleration(solarxr_protocol.datatypes.math.Vec3f()) + fun linearAcceleration(obj: solarxr_protocol.datatypes.math.Vec3f) : solarxr_protocol.datatypes.math.Vec3f? { + val o = __offset(20) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + /** + * Reference-adjusted rotation for IMU-only trackers (VR HMD yaw is used as a reset reference). + * In other words, a rotation that is aligned to a reliable source of rotation ((0, VR HMD YAW, 0)), + * triggered after user input (using reset buttons). + * This is a SlimeVR-specific field and computed exclusively by SlimeVR server. + * Includes: mounting orientation, full, quick and mounting reset adjustments. + * This rotation can be used to reconstruct a skeleton pose using forward kinematics. + */ + val rotationReferenceAdjusted : solarxr_protocol.datatypes.math.Quat? get() = rotationReferenceAdjusted(solarxr_protocol.datatypes.math.Quat()) + fun rotationReferenceAdjusted(obj: solarxr_protocol.datatypes.math.Quat) : solarxr_protocol.datatypes.math.Quat? { + val o = __offset(22) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + /** + * Zero-reference-adjusted rotation for IMU-only trackers (identity quaternion is used as a reset reference). + * In other words, a rotation that is aligned to a zero vector ((0, 0, 0)) by + * inverting the current rotation, triggered after user input (using reset buttons). + * This is a SlimeVR-specific field and computed exclusively by SlimeVR server. + * Includes: only full and quick reset adjustments. + * This rotation can be used in visualizations for IMU debugging. + */ + val rotationIdentityAdjusted : solarxr_protocol.datatypes.math.Quat? get() = rotationIdentityAdjusted(solarxr_protocol.datatypes.math.Quat()) + fun rotationIdentityAdjusted(obj: solarxr_protocol.datatypes.math.Quat) : solarxr_protocol.datatypes.math.Quat? { + val o = __offset(24) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + /** + * Data ticks per second, processed by SlimeVR server + */ + val tps : UShort? + get() { + val o = __offset(26) + return if(o != 0) bb.getShort(o + bb_pos).toUShort() else null + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsTrackerData(_bb: ByteBuffer): TrackerData = getRootAsTrackerData(_bb, TrackerData()) + @JvmStatic + fun getRootAsTrackerData(_bb: ByteBuffer, obj: TrackerData): TrackerData { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startTrackerData(builder: FlatBufferBuilder) = builder.startTable(12) + @JvmStatic + fun addTrackerId(builder: FlatBufferBuilder, trackerId: Int) = builder.addOffset(0, trackerId, 0) + @JvmStatic + fun addInfo(builder: FlatBufferBuilder, info: Int) = builder.addOffset(1, info, 0) + @JvmStatic + fun addStatus(builder: FlatBufferBuilder, status: UByte) = builder.addByte(2, status.toByte(), 0) + @JvmStatic + fun addRotation(builder: FlatBufferBuilder, rotation: Int) = builder.addStruct(3, rotation, 0) + @JvmStatic + fun addPosition(builder: FlatBufferBuilder, position: Int) = builder.addStruct(4, position, 0) + @JvmStatic + fun addRawAngularVelocity(builder: FlatBufferBuilder, rawAngularVelocity: Int) = builder.addStruct(5, rawAngularVelocity, 0) + @JvmStatic + fun addRawAcceleration(builder: FlatBufferBuilder, rawAcceleration: Int) = builder.addStruct(6, rawAcceleration, 0) + @JvmStatic + fun addTemp(builder: FlatBufferBuilder, temp: Int) = builder.addStruct(7, temp, 0) + @JvmStatic + fun addLinearAcceleration(builder: FlatBufferBuilder, linearAcceleration: Int) = builder.addStruct(8, linearAcceleration, 0) + @JvmStatic + fun addRotationReferenceAdjusted(builder: FlatBufferBuilder, rotationReferenceAdjusted: Int) = builder.addStruct(9, rotationReferenceAdjusted, 0) + @JvmStatic + fun addRotationIdentityAdjusted(builder: FlatBufferBuilder, rotationIdentityAdjusted: Int) = builder.addStruct(10, rotationIdentityAdjusted, 0) + @JvmStatic + fun addTps(builder: FlatBufferBuilder, tps: UShort) = builder.addShort(11, tps.toShort(), 0) + @JvmStatic + fun endTrackerData(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/data_feed/tracker/TrackerDataMask.kt b/protocol/kotlin/src/solarxr_protocol/data_feed/tracker/TrackerDataMask.kt index 401615a4..106c0ddc 100644 --- a/protocol/kotlin/src/solarxr_protocol/data_feed/tracker/TrackerDataMask.kt +++ b/protocol/kotlin/src/solarxr_protocol/data_feed/tracker/TrackerDataMask.kt @@ -1,133 +1,133 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed.tracker - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * A mask of the different components in `TrackerComponent` - */ -@Suppress("unused") -class TrackerDataMask : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : TrackerDataMask { - __init(_i, _bb) - return this - } - val info : Boolean - get() { - val o = __offset(4) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val status : Boolean - get() { - val o = __offset(6) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val rotation : Boolean - get() { - val o = __offset(8) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val position : Boolean - get() { - val o = __offset(10) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val rawAngularVelocity : Boolean - get() { - val o = __offset(12) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val rawAcceleration : Boolean - get() { - val o = __offset(14) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val temp : Boolean - get() { - val o = __offset(16) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val linearAcceleration : Boolean - get() { - val o = __offset(18) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val rotationReferenceAdjusted : Boolean - get() { - val o = __offset(20) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val rotationIdentityAdjusted : Boolean - get() { - val o = __offset(22) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val tps : Boolean - get() { - val o = __offset(24) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsTrackerDataMask(_bb: ByteBuffer): TrackerDataMask = getRootAsTrackerDataMask(_bb, TrackerDataMask()) - @JvmStatic - fun getRootAsTrackerDataMask(_bb: ByteBuffer, obj: TrackerDataMask): TrackerDataMask { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createTrackerDataMask(builder: FlatBufferBuilder, info: Boolean, status: Boolean, rotation: Boolean, position: Boolean, rawAngularVelocity: Boolean, rawAcceleration: Boolean, temp: Boolean, linearAcceleration: Boolean, rotationReferenceAdjusted: Boolean, rotationIdentityAdjusted: Boolean, tps: Boolean) : Int { - builder.startTable(11) - addTps(builder, tps) - addRotationIdentityAdjusted(builder, rotationIdentityAdjusted) - addRotationReferenceAdjusted(builder, rotationReferenceAdjusted) - addLinearAcceleration(builder, linearAcceleration) - addTemp(builder, temp) - addRawAcceleration(builder, rawAcceleration) - addRawAngularVelocity(builder, rawAngularVelocity) - addPosition(builder, position) - addRotation(builder, rotation) - addStatus(builder, status) - addInfo(builder, info) - return endTrackerDataMask(builder) - } - @JvmStatic - fun startTrackerDataMask(builder: FlatBufferBuilder) = builder.startTable(11) - @JvmStatic - fun addInfo(builder: FlatBufferBuilder, info: Boolean) = builder.addBoolean(0, info, false) - @JvmStatic - fun addStatus(builder: FlatBufferBuilder, status: Boolean) = builder.addBoolean(1, status, false) - @JvmStatic - fun addRotation(builder: FlatBufferBuilder, rotation: Boolean) = builder.addBoolean(2, rotation, false) - @JvmStatic - fun addPosition(builder: FlatBufferBuilder, position: Boolean) = builder.addBoolean(3, position, false) - @JvmStatic - fun addRawAngularVelocity(builder: FlatBufferBuilder, rawAngularVelocity: Boolean) = builder.addBoolean(4, rawAngularVelocity, false) - @JvmStatic - fun addRawAcceleration(builder: FlatBufferBuilder, rawAcceleration: Boolean) = builder.addBoolean(5, rawAcceleration, false) - @JvmStatic - fun addTemp(builder: FlatBufferBuilder, temp: Boolean) = builder.addBoolean(6, temp, false) - @JvmStatic - fun addLinearAcceleration(builder: FlatBufferBuilder, linearAcceleration: Boolean) = builder.addBoolean(7, linearAcceleration, false) - @JvmStatic - fun addRotationReferenceAdjusted(builder: FlatBufferBuilder, rotationReferenceAdjusted: Boolean) = builder.addBoolean(8, rotationReferenceAdjusted, false) - @JvmStatic - fun addRotationIdentityAdjusted(builder: FlatBufferBuilder, rotationIdentityAdjusted: Boolean) = builder.addBoolean(9, rotationIdentityAdjusted, false) - @JvmStatic - fun addTps(builder: FlatBufferBuilder, tps: Boolean) = builder.addBoolean(10, tps, false) - @JvmStatic - fun endTrackerDataMask(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.tracker + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * A mask of the different components in `TrackerComponent` + */ +@Suppress("unused") +class TrackerDataMask : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : TrackerDataMask { + __init(_i, _bb) + return this + } + val info : Boolean + get() { + val o = __offset(4) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val status : Boolean + get() { + val o = __offset(6) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val rotation : Boolean + get() { + val o = __offset(8) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val position : Boolean + get() { + val o = __offset(10) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val rawAngularVelocity : Boolean + get() { + val o = __offset(12) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val rawAcceleration : Boolean + get() { + val o = __offset(14) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val temp : Boolean + get() { + val o = __offset(16) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val linearAcceleration : Boolean + get() { + val o = __offset(18) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val rotationReferenceAdjusted : Boolean + get() { + val o = __offset(20) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val rotationIdentityAdjusted : Boolean + get() { + val o = __offset(22) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val tps : Boolean + get() { + val o = __offset(24) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsTrackerDataMask(_bb: ByteBuffer): TrackerDataMask = getRootAsTrackerDataMask(_bb, TrackerDataMask()) + @JvmStatic + fun getRootAsTrackerDataMask(_bb: ByteBuffer, obj: TrackerDataMask): TrackerDataMask { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createTrackerDataMask(builder: FlatBufferBuilder, info: Boolean, status: Boolean, rotation: Boolean, position: Boolean, rawAngularVelocity: Boolean, rawAcceleration: Boolean, temp: Boolean, linearAcceleration: Boolean, rotationReferenceAdjusted: Boolean, rotationIdentityAdjusted: Boolean, tps: Boolean) : Int { + builder.startTable(11) + addTps(builder, tps) + addRotationIdentityAdjusted(builder, rotationIdentityAdjusted) + addRotationReferenceAdjusted(builder, rotationReferenceAdjusted) + addLinearAcceleration(builder, linearAcceleration) + addTemp(builder, temp) + addRawAcceleration(builder, rawAcceleration) + addRawAngularVelocity(builder, rawAngularVelocity) + addPosition(builder, position) + addRotation(builder, rotation) + addStatus(builder, status) + addInfo(builder, info) + return endTrackerDataMask(builder) + } + @JvmStatic + fun startTrackerDataMask(builder: FlatBufferBuilder) = builder.startTable(11) + @JvmStatic + fun addInfo(builder: FlatBufferBuilder, info: Boolean) = builder.addBoolean(0, info, false) + @JvmStatic + fun addStatus(builder: FlatBufferBuilder, status: Boolean) = builder.addBoolean(1, status, false) + @JvmStatic + fun addRotation(builder: FlatBufferBuilder, rotation: Boolean) = builder.addBoolean(2, rotation, false) + @JvmStatic + fun addPosition(builder: FlatBufferBuilder, position: Boolean) = builder.addBoolean(3, position, false) + @JvmStatic + fun addRawAngularVelocity(builder: FlatBufferBuilder, rawAngularVelocity: Boolean) = builder.addBoolean(4, rawAngularVelocity, false) + @JvmStatic + fun addRawAcceleration(builder: FlatBufferBuilder, rawAcceleration: Boolean) = builder.addBoolean(5, rawAcceleration, false) + @JvmStatic + fun addTemp(builder: FlatBufferBuilder, temp: Boolean) = builder.addBoolean(6, temp, false) + @JvmStatic + fun addLinearAcceleration(builder: FlatBufferBuilder, linearAcceleration: Boolean) = builder.addBoolean(7, linearAcceleration, false) + @JvmStatic + fun addRotationReferenceAdjusted(builder: FlatBufferBuilder, rotationReferenceAdjusted: Boolean) = builder.addBoolean(8, rotationReferenceAdjusted, false) + @JvmStatic + fun addRotationIdentityAdjusted(builder: FlatBufferBuilder, rotationIdentityAdjusted: Boolean) = builder.addBoolean(9, rotationIdentityAdjusted, false) + @JvmStatic + fun addTps(builder: FlatBufferBuilder, tps: Boolean) = builder.addBoolean(10, tps, false) + @JvmStatic + fun endTrackerDataMask(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/data_feed/tracker/TrackerInfo.kt b/protocol/kotlin/src/solarxr_protocol/data_feed/tracker/TrackerInfo.kt index adafbd7b..d257832a 100644 --- a/protocol/kotlin/src/solarxr_protocol/data_feed/tracker/TrackerInfo.kt +++ b/protocol/kotlin/src/solarxr_protocol/data_feed/tracker/TrackerInfo.kt @@ -1,175 +1,175 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed.tracker - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Static description of a tracker - */ -@Suppress("unused") -class TrackerInfo : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : TrackerInfo { - __init(_i, _bb) - return this - } - val imuType : UShort - get() { - val o = __offset(4) - return if(o != 0) bb.getShort(o + bb_pos).toUShort() else 0u - } - /** - * The user-assigned role of the tracker. - */ - val bodyPart : UByte - get() { - val o = __offset(6) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - /** - * average samples per second - */ - val pollRate : solarxr_protocol.datatypes.HzF32? get() = pollRate(solarxr_protocol.datatypes.HzF32()) - fun pollRate(obj: solarxr_protocol.datatypes.HzF32) : solarxr_protocol.datatypes.HzF32? { - val o = __offset(8) - return if (o != 0) { - obj.__assign(o + bb_pos, bb) - } else { - null - } - } - /** - * The orientation of the tracker when mounted on the body - */ - val mountingOrientation : solarxr_protocol.datatypes.math.Quat? get() = mountingOrientation(solarxr_protocol.datatypes.math.Quat()) - fun mountingOrientation(obj: solarxr_protocol.datatypes.math.Quat) : solarxr_protocol.datatypes.math.Quat? { - val o = __offset(10) - return if (o != 0) { - obj.__assign(o + bb_pos, bb) - } else { - null - } - } - /** - * Should the tracker's settings be editable by the user - */ - val editable : Boolean - get() { - val o = __offset(12) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - /** - * Indicates if the tracker is computed (solved position and rotation) - */ - val isComputed : Boolean - get() { - val o = __offset(14) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - /** - * Indicates if the tracker is using an IMU for its tracking data - */ - val isImu : Boolean - get() { - val o = __offset(16) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - /** - * A human-friendly name to display as the name of the tracker. - */ - val displayName : String? - get() { - val o = __offset(18) - return if (o != 0) __string(o + bb_pos) else null - } - val displayNameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(18, 1) - fun displayNameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 18, 1) - /** - * name to display as the name of the tracker set by the user - */ - val customName : String? - get() { - val o = __offset(20) - return if (o != 0) __string(o + bb_pos) else null - } - val customNameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(20, 1) - fun customNameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 20, 1) - /** - * Whether to allow yaw drift compensation for this tracker or not. - */ - val allowDriftCompensation : Boolean - get() { - val o = __offset(22) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - /** - * Mounting Reset orientation overrides the current `mounting_orientation` of - * the tracker, this orientation is not saved and needs to be calculated - * each time the server is ran - */ - val mountingResetOrientation : solarxr_protocol.datatypes.math.Quat? get() = mountingResetOrientation(solarxr_protocol.datatypes.math.Quat()) - fun mountingResetOrientation(obj: solarxr_protocol.datatypes.math.Quat) : solarxr_protocol.datatypes.math.Quat? { - val o = __offset(24) - return if (o != 0) { - obj.__assign(o + bb_pos, bb) - } else { - null - } - } - /** - * Indicates if the tracker is actually an HMD - */ - val isHmd : Boolean - get() { - val o = __offset(26) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsTrackerInfo(_bb: ByteBuffer): TrackerInfo = getRootAsTrackerInfo(_bb, TrackerInfo()) - @JvmStatic - fun getRootAsTrackerInfo(_bb: ByteBuffer, obj: TrackerInfo): TrackerInfo { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startTrackerInfo(builder: FlatBufferBuilder) = builder.startTable(12) - @JvmStatic - fun addImuType(builder: FlatBufferBuilder, imuType: UShort) = builder.addShort(0, imuType.toShort(), 0) - @JvmStatic - fun addBodyPart(builder: FlatBufferBuilder, bodyPart: UByte) = builder.addByte(1, bodyPart.toByte(), 0) - @JvmStatic - fun addPollRate(builder: FlatBufferBuilder, pollRate: Int) = builder.addStruct(2, pollRate, 0) - @JvmStatic - fun addMountingOrientation(builder: FlatBufferBuilder, mountingOrientation: Int) = builder.addStruct(3, mountingOrientation, 0) - @JvmStatic - fun addEditable(builder: FlatBufferBuilder, editable: Boolean) = builder.addBoolean(4, editable, false) - @JvmStatic - fun addIsComputed(builder: FlatBufferBuilder, isComputed: Boolean) = builder.addBoolean(5, isComputed, false) - @JvmStatic - fun addIsImu(builder: FlatBufferBuilder, isImu: Boolean) = builder.addBoolean(6, isImu, false) - @JvmStatic - fun addDisplayName(builder: FlatBufferBuilder, displayName: Int) = builder.addOffset(7, displayName, 0) - @JvmStatic - fun addCustomName(builder: FlatBufferBuilder, customName: Int) = builder.addOffset(8, customName, 0) - @JvmStatic - fun addAllowDriftCompensation(builder: FlatBufferBuilder, allowDriftCompensation: Boolean) = builder.addBoolean(9, allowDriftCompensation, false) - @JvmStatic - fun addMountingResetOrientation(builder: FlatBufferBuilder, mountingResetOrientation: Int) = builder.addStruct(10, mountingResetOrientation, 0) - @JvmStatic - fun addIsHmd(builder: FlatBufferBuilder, isHmd: Boolean) = builder.addBoolean(11, isHmd, false) - @JvmStatic - fun endTrackerInfo(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.tracker + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Static description of a tracker + */ +@Suppress("unused") +class TrackerInfo : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : TrackerInfo { + __init(_i, _bb) + return this + } + val imuType : UShort + get() { + val o = __offset(4) + return if(o != 0) bb.getShort(o + bb_pos).toUShort() else 0u + } + /** + * The user-assigned role of the tracker. + */ + val bodyPart : UByte + get() { + val o = __offset(6) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + /** + * average samples per second + */ + val pollRate : solarxr_protocol.datatypes.HzF32? get() = pollRate(solarxr_protocol.datatypes.HzF32()) + fun pollRate(obj: solarxr_protocol.datatypes.HzF32) : solarxr_protocol.datatypes.HzF32? { + val o = __offset(8) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + /** + * The orientation of the tracker when mounted on the body + */ + val mountingOrientation : solarxr_protocol.datatypes.math.Quat? get() = mountingOrientation(solarxr_protocol.datatypes.math.Quat()) + fun mountingOrientation(obj: solarxr_protocol.datatypes.math.Quat) : solarxr_protocol.datatypes.math.Quat? { + val o = __offset(10) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + /** + * Should the tracker's settings be editable by the user + */ + val editable : Boolean + get() { + val o = __offset(12) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + /** + * Indicates if the tracker is computed (solved position and rotation) + */ + val isComputed : Boolean + get() { + val o = __offset(14) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + /** + * Indicates if the tracker is using an IMU for its tracking data + */ + val isImu : Boolean + get() { + val o = __offset(16) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + /** + * A human-friendly name to display as the name of the tracker. + */ + val displayName : String? + get() { + val o = __offset(18) + return if (o != 0) __string(o + bb_pos) else null + } + val displayNameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(18, 1) + fun displayNameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 18, 1) + /** + * name to display as the name of the tracker set by the user + */ + val customName : String? + get() { + val o = __offset(20) + return if (o != 0) __string(o + bb_pos) else null + } + val customNameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(20, 1) + fun customNameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 20, 1) + /** + * Whether to allow yaw drift compensation for this tracker or not. + */ + val allowDriftCompensation : Boolean + get() { + val o = __offset(22) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + /** + * Mounting Reset orientation overrides the current `mounting_orientation` of + * the tracker, this orientation is not saved and needs to be calculated + * each time the server is ran + */ + val mountingResetOrientation : solarxr_protocol.datatypes.math.Quat? get() = mountingResetOrientation(solarxr_protocol.datatypes.math.Quat()) + fun mountingResetOrientation(obj: solarxr_protocol.datatypes.math.Quat) : solarxr_protocol.datatypes.math.Quat? { + val o = __offset(24) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + /** + * Indicates if the tracker is actually an HMD + */ + val isHmd : Boolean + get() { + val o = __offset(26) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsTrackerInfo(_bb: ByteBuffer): TrackerInfo = getRootAsTrackerInfo(_bb, TrackerInfo()) + @JvmStatic + fun getRootAsTrackerInfo(_bb: ByteBuffer, obj: TrackerInfo): TrackerInfo { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startTrackerInfo(builder: FlatBufferBuilder) = builder.startTable(12) + @JvmStatic + fun addImuType(builder: FlatBufferBuilder, imuType: UShort) = builder.addShort(0, imuType.toShort(), 0) + @JvmStatic + fun addBodyPart(builder: FlatBufferBuilder, bodyPart: UByte) = builder.addByte(1, bodyPart.toByte(), 0) + @JvmStatic + fun addPollRate(builder: FlatBufferBuilder, pollRate: Int) = builder.addStruct(2, pollRate, 0) + @JvmStatic + fun addMountingOrientation(builder: FlatBufferBuilder, mountingOrientation: Int) = builder.addStruct(3, mountingOrientation, 0) + @JvmStatic + fun addEditable(builder: FlatBufferBuilder, editable: Boolean) = builder.addBoolean(4, editable, false) + @JvmStatic + fun addIsComputed(builder: FlatBufferBuilder, isComputed: Boolean) = builder.addBoolean(5, isComputed, false) + @JvmStatic + fun addIsImu(builder: FlatBufferBuilder, isImu: Boolean) = builder.addBoolean(6, isImu, false) + @JvmStatic + fun addDisplayName(builder: FlatBufferBuilder, displayName: Int) = builder.addOffset(7, displayName, 0) + @JvmStatic + fun addCustomName(builder: FlatBufferBuilder, customName: Int) = builder.addOffset(8, customName, 0) + @JvmStatic + fun addAllowDriftCompensation(builder: FlatBufferBuilder, allowDriftCompensation: Boolean) = builder.addBoolean(9, allowDriftCompensation, false) + @JvmStatic + fun addMountingResetOrientation(builder: FlatBufferBuilder, mountingResetOrientation: Int) = builder.addStruct(10, mountingResetOrientation, 0) + @JvmStatic + fun addIsHmd(builder: FlatBufferBuilder, isHmd: Boolean) = builder.addBoolean(11, isHmd, false) + @JvmStatic + fun endTrackerInfo(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/BodyPart.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/BodyPart.kt index 14734b12..0c714e7e 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/BodyPart.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/BodyPart.kt @@ -1,39 +1,39 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes - -/** - * Different parts of the body. Maps to each possible non-tracker bone in the skeleton. - * These are *NOT* the trackers. - */ -@Suppress("unused") -class BodyPart private constructor() { - companion object { - const val NONE: UByte = 0u - const val HEAD: UByte = 1u - const val NECK: UByte = 2u - const val CHEST: UByte = 3u - const val WAIST: UByte = 4u - const val HIP: UByte = 5u - const val LEFTUPPERLEG: UByte = 6u - const val RIGHTUPPERLEG: UByte = 7u - const val LEFTLOWERLEG: UByte = 8u - const val RIGHTLOWERLEG: UByte = 9u - const val LEFTFOOT: UByte = 10u - const val RIGHTFOOT: UByte = 11u - const val LEFTLOWERARM: UByte = 14u - const val RIGHTLOWERARM: UByte = 15u - const val LEFTUPPERARM: UByte = 16u - const val RIGHTUPPERARM: UByte = 17u - const val LEFTHAND: UByte = 18u - const val RIGHTHAND: UByte = 19u - const val LEFTSHOULDER: UByte = 20u - const val RIGHTSHOULDER: UByte = 21u - const val UPPERCHEST: UByte = 22u - const val LEFTHIP: UByte = 23u - const val RIGHTHIP: UByte = 24u - val names : Array = arrayOf("NONE", "HEAD", "NECK", "CHEST", "WAIST", "HIP", "LEFT_UPPER_LEG", "RIGHT_UPPER_LEG", "LEFT_LOWER_LEG", "RIGHT_LOWER_LEG", "LEFT_FOOT", "RIGHT_FOOT", "", "", "LEFT_LOWER_ARM", "RIGHT_LOWER_ARM", "LEFT_UPPER_ARM", "RIGHT_UPPER_ARM", "LEFT_HAND", "RIGHT_HAND", "LEFT_SHOULDER", "RIGHT_SHOULDER", "UPPER_CHEST", "LEFT_HIP", "RIGHT_HIP") - @JvmStatic - fun name(e: Int) : String = names[e] - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes + +/** + * Different parts of the body. Maps to each possible non-tracker bone in the skeleton. + * These are *NOT* the trackers. + */ +@Suppress("unused") +class BodyPart private constructor() { + companion object { + const val NONE: UByte = 0u + const val HEAD: UByte = 1u + const val NECK: UByte = 2u + const val CHEST: UByte = 3u + const val WAIST: UByte = 4u + const val HIP: UByte = 5u + const val LEFTUPPERLEG: UByte = 6u + const val RIGHTUPPERLEG: UByte = 7u + const val LEFTLOWERLEG: UByte = 8u + const val RIGHTLOWERLEG: UByte = 9u + const val LEFTFOOT: UByte = 10u + const val RIGHTFOOT: UByte = 11u + const val LEFTLOWERARM: UByte = 14u + const val RIGHTLOWERARM: UByte = 15u + const val LEFTUPPERARM: UByte = 16u + const val RIGHTUPPERARM: UByte = 17u + const val LEFTHAND: UByte = 18u + const val RIGHTHAND: UByte = 19u + const val LEFTSHOULDER: UByte = 20u + const val RIGHTSHOULDER: UByte = 21u + const val UPPERCHEST: UByte = 22u + const val LEFTHIP: UByte = 23u + const val RIGHTHIP: UByte = 24u + val names : Array = arrayOf("NONE", "HEAD", "NECK", "CHEST", "WAIST", "HIP", "LEFT_UPPER_LEG", "RIGHT_UPPER_LEG", "LEFT_LOWER_LEG", "RIGHT_LOWER_LEG", "LEFT_FOOT", "RIGHT_FOOT", "", "", "LEFT_LOWER_ARM", "RIGHT_LOWER_ARM", "LEFT_UPPER_ARM", "RIGHT_UPPER_ARM", "LEFT_HAND", "RIGHT_HAND", "LEFT_SHOULDER", "RIGHT_SHOULDER", "UPPER_CHEST", "LEFT_HIP", "RIGHT_HIP") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/Bytes.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/Bytes.kt index a1866962..0b69804b 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/Bytes.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/Bytes.kt @@ -1,69 +1,69 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class Bytes : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : Bytes { - __init(_i, _bb) - return this - } - fun b(j: Int) : UByte { - val o = __offset(4) - return if (o != 0) { - bb.get(__vector(o) + j * 1).toUByte() - } else { - 0u - } - } - val bLength : Int - get() { - val o = __offset(4); return if (o != 0) __vector_len(o) else 0 - } - val bAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) - fun bInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsBytes(_bb: ByteBuffer): Bytes = getRootAsBytes(_bb, Bytes()) - @JvmStatic - fun getRootAsBytes(_bb: ByteBuffer, obj: Bytes): Bytes { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createBytes(builder: FlatBufferBuilder, bOffset: Int) : Int { - builder.startTable(1) - addB(builder, bOffset) - return endBytes(builder) - } - @JvmStatic - fun startBytes(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addB(builder: FlatBufferBuilder, b: Int) = builder.addOffset(0, b, 0) - @JvmStatic - fun createBVector(builder: FlatBufferBuilder, data: UByteArray) : Int { - builder.startVector(1, data.size, 1) - for (i in data.size - 1 downTo 0) { - builder.addByte(data[i].toByte()) - } - return builder.endVector() - } - @JvmStatic - fun startBVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(1, numElems, 1) - @JvmStatic - fun endBytes(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class Bytes : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : Bytes { + __init(_i, _bb) + return this + } + fun b(j: Int) : UByte { + val o = __offset(4) + return if (o != 0) { + bb.get(__vector(o) + j * 1).toUByte() + } else { + 0u + } + } + val bLength : Int + get() { + val o = __offset(4); return if (o != 0) __vector_len(o) else 0 + } + val bAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun bInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsBytes(_bb: ByteBuffer): Bytes = getRootAsBytes(_bb, Bytes()) + @JvmStatic + fun getRootAsBytes(_bb: ByteBuffer, obj: Bytes): Bytes { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createBytes(builder: FlatBufferBuilder, bOffset: Int) : Int { + builder.startTable(1) + addB(builder, bOffset) + return endBytes(builder) + } + @JvmStatic + fun startBytes(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addB(builder: FlatBufferBuilder, b: Int) = builder.addOffset(0, b, 0) + @JvmStatic + fun createBVector(builder: FlatBufferBuilder, data: UByteArray) : Int { + builder.startVector(1, data.size, 1) + for (i in data.size - 1 downTo 0) { + builder.addByte(data[i].toByte()) + } + return builder.endVector() + } + @JvmStatic + fun startBVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(1, numElems, 1) + @JvmStatic + fun endBytes(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/DeviceId.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/DeviceId.kt index 41a5c666..98a90cbb 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/DeviceId.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/DeviceId.kt @@ -1,32 +1,32 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * A unique ID for the device. IDs are not guaranteed to be the same after - * the connection is terminated. - */ -@Suppress("unused") -class DeviceId : Struct() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : DeviceId { - __init(_i, _bb) - return this - } - val id : UByte get() = bb.get(bb_pos + 0).toUByte() - companion object { - @JvmStatic - fun createDeviceId(builder: FlatBufferBuilder, id: UByte) : Int { - builder.prep(1, 1) - builder.putByte(id.toByte()) - return builder.offset() - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * A unique ID for the device. IDs are not guaranteed to be the same after + * the connection is terminated. + */ +@Suppress("unused") +class DeviceId : Struct() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : DeviceId { + __init(_i, _bb) + return this + } + val id : UByte get() = bb.get(bb_pos + 0).toUByte() + companion object { + @JvmStatic + fun createDeviceId(builder: FlatBufferBuilder, id: UByte) : Int { + builder.prep(1, 1) + builder.putByte(id.toByte()) + return builder.offset() + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/DeviceIdTable.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/DeviceIdTable.kt new file mode 100644 index 00000000..f8d31a4a --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/DeviceIdTable.kt @@ -0,0 +1,51 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * To be used inside unions + */ +@Suppress("unused") +class DeviceIdTable : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : DeviceIdTable { + __init(_i, _bb) + return this + } + val id : solarxr_protocol.datatypes.DeviceId? get() = id(solarxr_protocol.datatypes.DeviceId()) + fun id(obj: solarxr_protocol.datatypes.DeviceId) : solarxr_protocol.datatypes.DeviceId? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsDeviceIdTable(_bb: ByteBuffer): DeviceIdTable = getRootAsDeviceIdTable(_bb, DeviceIdTable()) + @JvmStatic + fun getRootAsDeviceIdTable(_bb: ByteBuffer, obj: DeviceIdTable): DeviceIdTable { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startDeviceIdTable(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addId(builder: FlatBufferBuilder, id: Int) = builder.addStruct(0, id, 0) + @JvmStatic + fun endDeviceIdTable(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/FilteringType.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/FilteringType.kt index bba3ceb5..9b38beba 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/FilteringType.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/FilteringType.kt @@ -1,18 +1,18 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes - -/** - * Used for filtering tracker rotations in software - */ -@Suppress("unused") -class FilteringType private constructor() { - companion object { - const val NONE: UByte = 0u - const val SMOOTHING: UByte = 1u - const val PREDICTION: UByte = 2u - val names : Array = arrayOf("NONE", "SMOOTHING", "PREDICTION") - @JvmStatic - fun name(e: Int) : String = names[e] - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes + +/** + * Used for filtering tracker rotations in software + */ +@Suppress("unused") +class FilteringType private constructor() { + companion object { + const val NONE: UByte = 0u + const val SMOOTHING: UByte = 1u + const val PREDICTION: UByte = 2u + val names : Array = arrayOf("NONE", "SMOOTHING", "PREDICTION") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/FirmwareErrorCode.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/FirmwareErrorCode.kt index 368d0827..f00092d7 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/FirmwareErrorCode.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/FirmwareErrorCode.kt @@ -1,19 +1,19 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes - -/** - * A list of error codes for error conditions on the device - */ -@Suppress("unused") -class FirmwareErrorCode private constructor() { - companion object { - const val Other: UByte = 0u - const val Disconnected: UByte = 1u - const val Occluded: UByte = 2u - const val ImuError: UByte = 3u - val names : Array = arrayOf("Other", "Disconnected", "Occluded", "ImuError") - @JvmStatic - fun name(e: Int) : String = 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 + */ +@Suppress("unused") +class FirmwareErrorCode private constructor() { + companion object { + const val Other: UByte = 0u + const val Disconnected: UByte = 1u + const val Occluded: UByte = 2u + const val ImuError: UByte = 3u + val names : Array = arrayOf("Other", "Disconnected", "Occluded", "ImuError") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/HzF32.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/HzF32.kt index 741cdf2b..e981e46b 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/HzF32.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/HzF32.kt @@ -1,31 +1,31 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Frequency as 32 bit float - */ -@Suppress("unused") -class HzF32 : Struct() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : HzF32 { - __init(_i, _bb) - return this - } - val f : Float get() = bb.getFloat(bb_pos + 0) - companion object { - @JvmStatic - fun createHzF32(builder: FlatBufferBuilder, f: Float) : Int { - builder.prep(4, 4) - builder.putFloat(f) - return builder.offset() - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Frequency as 32 bit float + */ +@Suppress("unused") +class HzF32 : Struct() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : HzF32 { + __init(_i, _bb) + return this + } + val f : Float get() = bb.getFloat(bb_pos + 0) + companion object { + @JvmStatic + fun createHzF32(builder: FlatBufferBuilder, f: Float) : Int { + builder.prep(4, 4) + builder.putFloat(f) + return builder.offset() + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/Ipv4Address.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/Ipv4Address.kt index 89cb17b2..c53bb6c6 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/Ipv4Address.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/Ipv4Address.kt @@ -1,32 +1,32 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes - -import java.nio.* -import kotlin.math.sign -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. - */ -@Suppress("unused") -class Ipv4Address : Struct() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : Ipv4Address { - __init(_i, _bb) - return this - } - val addr : UInt get() = bb.getInt(bb_pos + 0).toUInt() - companion object { - @JvmStatic - fun createIpv4Address(builder: FlatBufferBuilder, addr: UInt) : Int { - builder.prep(4, 4) - builder.putInt(addr.toInt()) - return builder.offset() - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes + +import java.nio.* +import kotlin.math.sign +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. + */ +@Suppress("unused") +class Ipv4Address : Struct() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : Ipv4Address { + __init(_i, _bb) + return this + } + val addr : UInt get() = bb.getInt(bb_pos + 0).toUInt() + companion object { + @JvmStatic + fun createIpv4Address(builder: FlatBufferBuilder, addr: UInt) : Int { + builder.prep(4, 4) + builder.putInt(addr.toInt()) + return builder.offset() + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/LogData.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/LogData.kt index 7976bfc7..1aabb8f1 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/LogData.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/LogData.kt @@ -1,82 +1,82 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * General purpose logging datatype - */ -@Suppress("unused") -class LogData : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : LogData { - __init(_i, _bb) - return this - } - val message : String? - get() { - val o = __offset(4) - return if (o != 0) __string(o + bb_pos) else null - } - val messageAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) - fun messageInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) - fun data(j: Int) : UByte { - val o = __offset(6) - return if (o != 0) { - bb.get(__vector(o) + j * 1).toUByte() - } else { - 0u - } - } - val dataLength : Int - get() { - val o = __offset(6); return if (o != 0) __vector_len(o) else 0 - } - val dataAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) - fun dataInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsLogData(_bb: ByteBuffer): LogData = getRootAsLogData(_bb, LogData()) - @JvmStatic - fun getRootAsLogData(_bb: ByteBuffer, obj: LogData): LogData { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createLogData(builder: FlatBufferBuilder, messageOffset: Int, dataOffset: Int) : Int { - builder.startTable(2) - addData(builder, dataOffset) - addMessage(builder, messageOffset) - return endLogData(builder) - } - @JvmStatic - fun startLogData(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addMessage(builder: FlatBufferBuilder, message: Int) = builder.addOffset(0, message, 0) - @JvmStatic - fun addData(builder: FlatBufferBuilder, data: Int) = builder.addOffset(1, data, 0) - @JvmStatic - fun createDataVector(builder: FlatBufferBuilder, data: UByteArray) : Int { - builder.startVector(1, data.size, 1) - for (i in data.size - 1 downTo 0) { - builder.addByte(data[i].toByte()) - } - return builder.endVector() - } - @JvmStatic - fun startDataVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(1, numElems, 1) - @JvmStatic - fun endLogData(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * General purpose logging datatype + */ +@Suppress("unused") +class LogData : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : LogData { + __init(_i, _bb) + return this + } + val message : String? + get() { + val o = __offset(4) + return if (o != 0) __string(o + bb_pos) else null + } + val messageAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun messageInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + fun data(j: Int) : UByte { + val o = __offset(6) + return if (o != 0) { + bb.get(__vector(o) + j * 1).toUByte() + } else { + 0u + } + } + val dataLength : Int + get() { + val o = __offset(6); return if (o != 0) __vector_len(o) else 0 + } + val dataAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) + fun dataInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsLogData(_bb: ByteBuffer): LogData = getRootAsLogData(_bb, LogData()) + @JvmStatic + fun getRootAsLogData(_bb: ByteBuffer, obj: LogData): LogData { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createLogData(builder: FlatBufferBuilder, messageOffset: Int, dataOffset: Int) : Int { + builder.startTable(2) + addData(builder, dataOffset) + addMessage(builder, messageOffset) + return endLogData(builder) + } + @JvmStatic + fun startLogData(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addMessage(builder: FlatBufferBuilder, message: Int) = builder.addOffset(0, message, 0) + @JvmStatic + fun addData(builder: FlatBufferBuilder, data: Int) = builder.addOffset(1, data, 0) + @JvmStatic + fun createDataVector(builder: FlatBufferBuilder, data: UByteArray) : Int { + builder.startVector(1, data.size, 1) + for (i in data.size - 1 downTo 0) { + builder.addByte(data[i].toByte()) + } + return builder.endVector() + } + @JvmStatic + fun startDataVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(1, numElems, 1) + @JvmStatic + fun endLogData(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/StringTable.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/StringTable.kt index a1606488..20bb6d58 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/StringTable.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/StringTable.kt @@ -1,52 +1,52 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class StringTable : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : StringTable { - __init(_i, _bb) - return this - } - val s : String? - get() { - val o = __offset(4) - return if (o != 0) __string(o + bb_pos) else null - } - val sAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) - fun sInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsStringTable(_bb: ByteBuffer): StringTable = getRootAsStringTable(_bb, StringTable()) - @JvmStatic - fun getRootAsStringTable(_bb: ByteBuffer, obj: StringTable): StringTable { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createStringTable(builder: FlatBufferBuilder, sOffset: Int) : Int { - builder.startTable(1) - addS(builder, sOffset) - return endStringTable(builder) - } - @JvmStatic - fun startStringTable(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addS(builder: FlatBufferBuilder, s: Int) = builder.addOffset(0, s, 0) - @JvmStatic - fun endStringTable(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class StringTable : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : StringTable { + __init(_i, _bb) + return this + } + val s : String? + get() { + val o = __offset(4) + return if (o != 0) __string(o + bb_pos) else null + } + val sAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun sInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsStringTable(_bb: ByteBuffer): StringTable = getRootAsStringTable(_bb, StringTable()) + @JvmStatic + fun getRootAsStringTable(_bb: ByteBuffer, obj: StringTable): StringTable { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createStringTable(builder: FlatBufferBuilder, sOffset: Int) : Int { + builder.startTable(1) + addS(builder, sOffset) + return endStringTable(builder) + } + @JvmStatic + fun startStringTable(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addS(builder: FlatBufferBuilder, s: Int) = builder.addOffset(0, s, 0) + @JvmStatic + fun endStringTable(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/Temperature.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/Temperature.kt index 62a15ec7..9cd804cd 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/Temperature.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/Temperature.kt @@ -1,31 +1,31 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Temperature in degrees celsius - */ -@Suppress("unused") -class Temperature : Struct() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : Temperature { - __init(_i, _bb) - return this - } - val temp : Float get() = bb.getFloat(bb_pos + 0) - companion object { - @JvmStatic - fun createTemperature(builder: FlatBufferBuilder, temp: Float) : Int { - builder.prep(4, 4) - builder.putFloat(temp) - return builder.offset() - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Temperature in degrees celsius + */ +@Suppress("unused") +class Temperature : Struct() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : Temperature { + __init(_i, _bb) + return this + } + val temp : Float get() = bb.getFloat(bb_pos + 0) + companion object { + @JvmStatic + fun createTemperature(builder: FlatBufferBuilder, temp: Float) : Int { + builder.prep(4, 4) + builder.putFloat(temp) + return builder.offset() + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/TrackerId.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/TrackerId.kt index 406ef782..8a3e8c28 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/TrackerId.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/TrackerId.kt @@ -1,62 +1,62 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class TrackerId : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : TrackerId { - __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`. - */ - val deviceId : solarxr_protocol.datatypes.DeviceId? get() = deviceId(solarxr_protocol.datatypes.DeviceId()) - fun deviceId(obj: solarxr_protocol.datatypes.DeviceId) : solarxr_protocol.datatypes.DeviceId? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(o + bb_pos, bb) - } else { - null - } - } - /** - * There are possibly multiple trackers per device. This identifies which one. - */ - val trackerNum : UByte - get() { - val o = __offset(6) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsTrackerId(_bb: ByteBuffer): TrackerId = getRootAsTrackerId(_bb, TrackerId()) - @JvmStatic - fun getRootAsTrackerId(_bb: ByteBuffer, obj: TrackerId): TrackerId { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startTrackerId(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addDeviceId(builder: FlatBufferBuilder, deviceId: Int) = builder.addStruct(0, deviceId, 0) - @JvmStatic - fun addTrackerNum(builder: FlatBufferBuilder, trackerNum: UByte) = builder.addByte(1, trackerNum.toByte(), 0) - @JvmStatic - fun endTrackerId(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class TrackerId : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : TrackerId { + __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`. + */ + val deviceId : solarxr_protocol.datatypes.DeviceId? get() = deviceId(solarxr_protocol.datatypes.DeviceId()) + fun deviceId(obj: solarxr_protocol.datatypes.DeviceId) : solarxr_protocol.datatypes.DeviceId? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + /** + * There are possibly multiple trackers per device. This identifies which one. + */ + val trackerNum : UByte + get() { + val o = __offset(6) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsTrackerId(_bb: ByteBuffer): TrackerId = getRootAsTrackerId(_bb, TrackerId()) + @JvmStatic + fun getRootAsTrackerId(_bb: ByteBuffer, obj: TrackerId): TrackerId { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startTrackerId(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addDeviceId(builder: FlatBufferBuilder, deviceId: Int) = builder.addStruct(0, deviceId, 0) + @JvmStatic + fun addTrackerNum(builder: FlatBufferBuilder, trackerNum: UByte) = builder.addByte(1, trackerNum.toByte(), 0) + @JvmStatic + fun endTrackerId(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/TrackerRole.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/TrackerRole.kt index 85b5d9d7..083f9324 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/TrackerRole.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/TrackerRole.kt @@ -1,40 +1,40 @@ -// 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. - */ -@Suppress("unused") -class TrackerRole private constructor() { - companion object { - const val NONE: UByte = 0u - const val WAIST: UByte = 1u - const val LEFTFOOT: UByte = 2u - const val RIGHTFOOT: UByte = 3u - const val CHEST: UByte = 4u - const val LEFTKNEE: UByte = 5u - const val RIGHTKNEE: UByte = 6u - const val LEFTELBOW: UByte = 7u - const val RIGHTELBOW: UByte = 8u - const val LEFTSHOULDER: UByte = 9u - const val RIGHTSHOULDER: UByte = 10u - const val LEFTHAND: UByte = 11u - const val RIGHTHAND: UByte = 12u - const val LEFTCONTROLLER: UByte = 13u - const val RIGHTCONTROLLER: UByte = 14u - const val HEAD: UByte = 15u - const val NECK: UByte = 16u - const val CAMERA: UByte = 17u - const val KEYBOARD: UByte = 18u - const val HMD: UByte = 19u - const val BEACON: UByte = 20u - const val GENERICCONTROLLER: UByte = 21u - val names : Array = arrayOf("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") - @JvmStatic - fun name(e: Int) : String = 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. + */ +@Suppress("unused") +class TrackerRole private constructor() { + companion object { + const val NONE: UByte = 0u + const val WAIST: UByte = 1u + const val LEFTFOOT: UByte = 2u + const val RIGHTFOOT: UByte = 3u + const val CHEST: UByte = 4u + const val LEFTKNEE: UByte = 5u + const val RIGHTKNEE: UByte = 6u + const val LEFTELBOW: UByte = 7u + const val RIGHTELBOW: UByte = 8u + const val LEFTSHOULDER: UByte = 9u + const val RIGHTSHOULDER: UByte = 10u + const val LEFTHAND: UByte = 11u + const val RIGHTHAND: UByte = 12u + const val LEFTCONTROLLER: UByte = 13u + const val RIGHTCONTROLLER: UByte = 14u + const val HEAD: UByte = 15u + const val NECK: UByte = 16u + const val CAMERA: UByte = 17u + const val KEYBOARD: UByte = 18u + const val HMD: UByte = 19u + const val BEACON: UByte = 20u + const val GENERICCONTROLLER: UByte = 21u + val names : Array = arrayOf("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") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/TrackerStatus.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/TrackerStatus.kt index dd5ed25a..0862c219 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/TrackerStatus.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/TrackerStatus.kt @@ -1,19 +1,19 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes - -@Suppress("unused") -class TrackerStatus private constructor() { - companion object { - const val NONE: UByte = 0u - const val DISCONNECTED: UByte = 1u - const val OK: UByte = 2u - const val BUSY: UByte = 3u - const val ERROR: UByte = 4u - const val OCCLUDED: UByte = 5u - const val TIMEDOUT: UByte = 6u - val names : Array = arrayOf("NONE", "DISCONNECTED", "OK", "BUSY", "ERROR", "OCCLUDED", "TIMED_OUT") - @JvmStatic - fun name(e: Int) : String = names[e] - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes + +@Suppress("unused") +class TrackerStatus private constructor() { + companion object { + const val NONE: UByte = 0u + const val DISCONNECTED: UByte = 1u + const val OK: UByte = 2u + const val BUSY: UByte = 3u + const val ERROR: UByte = 4u + const val OCCLUDED: UByte = 5u + const val TIMEDOUT: UByte = 6u + val names : Array = arrayOf("NONE", "DISCONNECTED", "OK", "BUSY", "ERROR", "OCCLUDED", "TIMED_OUT") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/TransactionId.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/TransactionId.kt index 84b1ff7f..bda2529f 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/TransactionId.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/TransactionId.kt @@ -1,31 +1,31 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class TransactionId : Struct() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : TransactionId { - __init(_i, _bb) - return this - } - /** - * This is expected to overflow, networking logic should handle this case. - */ - val id : UInt get() = bb.getInt(bb_pos + 0).toUInt() - companion object { - @JvmStatic - fun createTransactionId(builder: FlatBufferBuilder, id: UInt) : Int { - builder.prep(4, 4) - builder.putInt(id.toInt()) - return builder.offset() - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class TransactionId : Struct() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : TransactionId { + __init(_i, _bb) + return this + } + /** + * This is expected to overflow, networking logic should handle this case. + */ + val id : UInt get() = bb.getInt(bb_pos + 0).toUInt() + companion object { + @JvmStatic + fun createTransactionId(builder: FlatBufferBuilder, id: UInt) : Int { + builder.prep(4, 4) + builder.putInt(id.toInt()) + return builder.offset() + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/BoardType.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/BoardType.kt new file mode 100644 index 00000000..e382e5e6 --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/BoardType.kt @@ -0,0 +1,25 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.hardware_info + +@Suppress("unused") +class BoardType private constructor() { + companion object { + const val UNKNOWN: UShort = 0u + const val SLIMEVRLEGACY: UShort = 1u + const val SLIMEVRDEV: UShort = 2u + const val NODEMCU: UShort = 3u + const val CUSTOM: UShort = 4u + const val WROOM32: UShort = 5u + const val WEMOSD1MINI: UShort = 6u + const val TTGOTBASE: UShort = 7u + const val ESP01: UShort = 8u + const val SLIMEVR: UShort = 9u + const val LOLINC3MINI: UShort = 10u + const val BEETLE32C3: UShort = 11u + const val ES32C3DEVKITM1: UShort = 12u + val names : Array = arrayOf("UNKNOWN", "SLIMEVR_LEGACY", "SLIMEVR_DEV", "NODEMCU", "CUSTOM", "WROOM32", "WEMOSD1MINI", "TTGO_TBASE", "ESP01", "SLIMEVR", "LOLIN_C3_MINI", "BEETLE32C3", "ES32C3DEVKITM1") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/FirmwareStatusMask.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/FirmwareStatusMask.kt index a47552e6..8082f69e 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/FirmwareStatusMask.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/FirmwareStatusMask.kt @@ -1,101 +1,101 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.hardware_info - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * A mask of the data in `FirmwareStatus` - */ -@Suppress("unused") -class FirmwareStatusMask : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : FirmwareStatusMask { - __init(_i, _bb) - return this - } - val errorStatus : Boolean - get() { - val o = __offset(4) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val tps : Boolean - get() { - val o = __offset(6) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val ping : Boolean - get() { - val o = __offset(8) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val rssi : Boolean - get() { - val o = __offset(10) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val mcuTemp : Boolean - get() { - val o = __offset(12) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val batteryVoltage : Boolean - get() { - val o = __offset(14) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val batteryPctEstimate : Boolean - get() { - val o = __offset(16) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsFirmwareStatusMask(_bb: ByteBuffer): FirmwareStatusMask = getRootAsFirmwareStatusMask(_bb, FirmwareStatusMask()) - @JvmStatic - fun getRootAsFirmwareStatusMask(_bb: ByteBuffer, obj: FirmwareStatusMask): FirmwareStatusMask { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createFirmwareStatusMask(builder: FlatBufferBuilder, errorStatus: Boolean, tps: Boolean, ping: Boolean, rssi: Boolean, mcuTemp: Boolean, batteryVoltage: Boolean, batteryPctEstimate: Boolean) : Int { - builder.startTable(7) - addBatteryPctEstimate(builder, batteryPctEstimate) - addBatteryVoltage(builder, batteryVoltage) - addMcuTemp(builder, mcuTemp) - addRssi(builder, rssi) - addPing(builder, ping) - addTps(builder, tps) - addErrorStatus(builder, errorStatus) - return endFirmwareStatusMask(builder) - } - @JvmStatic - fun startFirmwareStatusMask(builder: FlatBufferBuilder) = builder.startTable(7) - @JvmStatic - fun addErrorStatus(builder: FlatBufferBuilder, errorStatus: Boolean) = builder.addBoolean(0, errorStatus, false) - @JvmStatic - fun addTps(builder: FlatBufferBuilder, tps: Boolean) = builder.addBoolean(1, tps, false) - @JvmStatic - fun addPing(builder: FlatBufferBuilder, ping: Boolean) = builder.addBoolean(2, ping, false) - @JvmStatic - fun addRssi(builder: FlatBufferBuilder, rssi: Boolean) = builder.addBoolean(3, rssi, false) - @JvmStatic - fun addMcuTemp(builder: FlatBufferBuilder, mcuTemp: Boolean) = builder.addBoolean(4, mcuTemp, false) - @JvmStatic - fun addBatteryVoltage(builder: FlatBufferBuilder, batteryVoltage: Boolean) = builder.addBoolean(5, batteryVoltage, false) - @JvmStatic - fun addBatteryPctEstimate(builder: FlatBufferBuilder, batteryPctEstimate: Boolean) = builder.addBoolean(6, batteryPctEstimate, false) - @JvmStatic - fun endFirmwareStatusMask(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.hardware_info + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * A mask of the data in `FirmwareStatus` + */ +@Suppress("unused") +class FirmwareStatusMask : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : FirmwareStatusMask { + __init(_i, _bb) + return this + } + val errorStatus : Boolean + get() { + val o = __offset(4) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val tps : Boolean + get() { + val o = __offset(6) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val ping : Boolean + get() { + val o = __offset(8) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val rssi : Boolean + get() { + val o = __offset(10) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val mcuTemp : Boolean + get() { + val o = __offset(12) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val batteryVoltage : Boolean + get() { + val o = __offset(14) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val batteryPctEstimate : Boolean + get() { + val o = __offset(16) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsFirmwareStatusMask(_bb: ByteBuffer): FirmwareStatusMask = getRootAsFirmwareStatusMask(_bb, FirmwareStatusMask()) + @JvmStatic + fun getRootAsFirmwareStatusMask(_bb: ByteBuffer, obj: FirmwareStatusMask): FirmwareStatusMask { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createFirmwareStatusMask(builder: FlatBufferBuilder, errorStatus: Boolean, tps: Boolean, ping: Boolean, rssi: Boolean, mcuTemp: Boolean, batteryVoltage: Boolean, batteryPctEstimate: Boolean) : Int { + builder.startTable(7) + addBatteryPctEstimate(builder, batteryPctEstimate) + addBatteryVoltage(builder, batteryVoltage) + addMcuTemp(builder, mcuTemp) + addRssi(builder, rssi) + addPing(builder, ping) + addTps(builder, tps) + addErrorStatus(builder, errorStatus) + return endFirmwareStatusMask(builder) + } + @JvmStatic + fun startFirmwareStatusMask(builder: FlatBufferBuilder) = builder.startTable(7) + @JvmStatic + fun addErrorStatus(builder: FlatBufferBuilder, errorStatus: Boolean) = builder.addBoolean(0, errorStatus, false) + @JvmStatic + fun addTps(builder: FlatBufferBuilder, tps: Boolean) = builder.addBoolean(1, tps, false) + @JvmStatic + fun addPing(builder: FlatBufferBuilder, ping: Boolean) = builder.addBoolean(2, ping, false) + @JvmStatic + fun addRssi(builder: FlatBufferBuilder, rssi: Boolean) = builder.addBoolean(3, rssi, false) + @JvmStatic + fun addMcuTemp(builder: FlatBufferBuilder, mcuTemp: Boolean) = builder.addBoolean(4, mcuTemp, false) + @JvmStatic + fun addBatteryVoltage(builder: FlatBufferBuilder, batteryVoltage: Boolean) = builder.addBoolean(5, batteryVoltage, false) + @JvmStatic + fun addBatteryPctEstimate(builder: FlatBufferBuilder, batteryPctEstimate: Boolean) = builder.addBoolean(6, batteryPctEstimate, false) + @JvmStatic + fun endFirmwareStatusMask(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/HardwareAddress.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/HardwareAddress.kt index fb4ed0c7..930f9bd5 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/HardwareAddress.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/HardwareAddress.kt @@ -1,33 +1,33 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.hardware_info - -import java.nio.* -import kotlin.math.sign -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. - */ -@Suppress("unused") -class HardwareAddress : Struct() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : HardwareAddress { - __init(_i, _bb) - return this - } - val addr : ULong get() = bb.getLong(bb_pos + 0).toULong() - companion object { - @JvmStatic - fun createHardwareAddress(builder: FlatBufferBuilder, addr: ULong) : Int { - builder.prep(8, 8) - builder.putLong(addr.toLong()) - return builder.offset() - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.hardware_info + +import java.nio.* +import kotlin.math.sign +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. + */ +@Suppress("unused") +class HardwareAddress : Struct() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : HardwareAddress { + __init(_i, _bb) + return this + } + val addr : ULong get() = bb.getLong(bb_pos + 0).toULong() + companion object { + @JvmStatic + fun createHardwareAddress(builder: FlatBufferBuilder, addr: ULong) : Int { + builder.prep(8, 8) + builder.putLong(addr.toLong()) + return builder.offset() + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/HardwareInfo.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/HardwareInfo.kt index 2b0dd080..d9473557 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/HardwareInfo.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/HardwareInfo.kt @@ -1,161 +1,174 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.hardware_info - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Mostly static info about the device's hardware/firmware. - */ -@Suppress("unused") -class HardwareInfo : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : HardwareInfo { - __init(_i, _bb) - return this - } - val mcuId : UShort - get() { - val o = __offset(4) - return if(o != 0) bb.getShort(o + bb_pos).toUShort() else 0u - } - /** - * A human-friendly name to display as the name of the device. - */ - val displayName : String? - get() { - val o = __offset(6) - return if (o != 0) __string(o + bb_pos) else null - } - val displayNameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) - fun displayNameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) - /** - * A human-friendly string for the device model. - */ - val model : String? - get() { - val o = __offset(8) - return if (o != 0) __string(o + bb_pos) else null - } - val modelAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(8, 1) - fun modelInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 8, 1) - /** - * A human-friendly string for the manufacturer of the device. - */ - val manufacturer : String? - get() { - val o = __offset(10) - return if (o != 0) __string(o + bb_pos) else null - } - val manufacturerAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(10, 1) - fun manufacturerInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 10, 1) - /** - * The hardware version of the device. For example, pcb version. - */ - val hardwareRevision : String? - get() { - val o = __offset(12) - return if (o != 0) __string(o + bb_pos) else null - } - val hardwareRevisionAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(12, 1) - fun hardwareRevisionInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 12, 1) - /** - * The version of the slimevr firmware that the device is running. - */ - val firmwareVersion : String? - get() { - val o = __offset(14) - return if (o != 0) __string(o + bb_pos) else null - } - val firmwareVersionAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(14, 1) - fun firmwareVersionInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 14, 1) - val hardwareAddress : solarxr_protocol.datatypes.hardware_info.HardwareAddress? get() = hardwareAddress(solarxr_protocol.datatypes.hardware_info.HardwareAddress()) - fun hardwareAddress(obj: solarxr_protocol.datatypes.hardware_info.HardwareAddress) : solarxr_protocol.datatypes.hardware_info.HardwareAddress? { - val o = __offset(16) - return if (o != 0) { - obj.__assign(o + bb_pos, bb) - } else { - null - } - } - val ipAddress : solarxr_protocol.datatypes.Ipv4Address? get() = ipAddress(solarxr_protocol.datatypes.Ipv4Address()) - fun ipAddress(obj: solarxr_protocol.datatypes.Ipv4Address) : solarxr_protocol.datatypes.Ipv4Address? { - val o = __offset(18) - return if (o != 0) { - obj.__assign(o + bb_pos, bb) - } else { - null - } - } - val boardType : String? - get() { - val o = __offset(20) - return if (o != 0) __string(o + bb_pos) else null - } - val boardTypeAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(20, 1) - fun boardTypeInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 20, 1) - /** - * A unique identifier for the device. Depending on the type of device it can be the MAC address, - * the IP address, or some other unique identifier like what USB device it is. - */ - val hardwareIdentifier : String? - get() { - val o = __offset(22) - return if (o != 0) __string(o + bb_pos) else null - } - val hardwareIdentifierAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(22, 1) - fun hardwareIdentifierInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 22, 1) - /** - * The version of the protocol it's using to communicate with server - */ - val networkProtocolVersion : UShort? - get() { - val o = __offset(24) - return if(o != 0) bb.getShort(o + bb_pos).toUShort() else null - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsHardwareInfo(_bb: ByteBuffer): HardwareInfo = getRootAsHardwareInfo(_bb, HardwareInfo()) - @JvmStatic - fun getRootAsHardwareInfo(_bb: ByteBuffer, obj: HardwareInfo): HardwareInfo { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startHardwareInfo(builder: FlatBufferBuilder) = builder.startTable(11) - @JvmStatic - fun addMcuId(builder: FlatBufferBuilder, mcuId: UShort) = builder.addShort(0, mcuId.toShort(), 0) - @JvmStatic - fun addDisplayName(builder: FlatBufferBuilder, displayName: Int) = builder.addOffset(1, displayName, 0) - @JvmStatic - fun addModel(builder: FlatBufferBuilder, model: Int) = builder.addOffset(2, model, 0) - @JvmStatic - fun addManufacturer(builder: FlatBufferBuilder, manufacturer: Int) = builder.addOffset(3, manufacturer, 0) - @JvmStatic - fun addHardwareRevision(builder: FlatBufferBuilder, hardwareRevision: Int) = builder.addOffset(4, hardwareRevision, 0) - @JvmStatic - fun addFirmwareVersion(builder: FlatBufferBuilder, firmwareVersion: Int) = builder.addOffset(5, firmwareVersion, 0) - @JvmStatic - fun addHardwareAddress(builder: FlatBufferBuilder, hardwareAddress: Int) = builder.addStruct(6, hardwareAddress, 0) - @JvmStatic - fun addIpAddress(builder: FlatBufferBuilder, ipAddress: Int) = builder.addStruct(7, ipAddress, 0) - @JvmStatic - fun addBoardType(builder: FlatBufferBuilder, boardType: Int) = builder.addOffset(8, boardType, 0) - @JvmStatic - fun addHardwareIdentifier(builder: FlatBufferBuilder, hardwareIdentifier: Int) = builder.addOffset(9, hardwareIdentifier, 0) - @JvmStatic - fun addNetworkProtocolVersion(builder: FlatBufferBuilder, networkProtocolVersion: UShort) = builder.addShort(10, networkProtocolVersion.toShort(), 0) - @JvmStatic - fun endHardwareInfo(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.hardware_info + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Mostly static info about the device's hardware/firmware. + */ +@Suppress("unused") +class HardwareInfo : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : HardwareInfo { + __init(_i, _bb) + return this + } + val mcuId : UShort + get() { + val o = __offset(4) + return if(o != 0) bb.getShort(o + bb_pos).toUShort() else 0u + } + /** + * A human-friendly name to display as the name of the device. + */ + val displayName : String? + get() { + val o = __offset(6) + return if (o != 0) __string(o + bb_pos) else null + } + val displayNameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) + fun displayNameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) + /** + * A human-friendly string for the device model. + */ + val model : String? + get() { + val o = __offset(8) + return if (o != 0) __string(o + bb_pos) else null + } + val modelAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(8, 1) + fun modelInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 8, 1) + /** + * A human-friendly string for the manufacturer of the device. + */ + val manufacturer : String? + get() { + val o = __offset(10) + return if (o != 0) __string(o + bb_pos) else null + } + val manufacturerAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(10, 1) + fun manufacturerInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 10, 1) + /** + * The hardware version of the device. For example, pcb version. + */ + val hardwareRevision : String? + get() { + val o = __offset(12) + return if (o != 0) __string(o + bb_pos) else null + } + val hardwareRevisionAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(12, 1) + fun hardwareRevisionInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 12, 1) + /** + * The version of the slimevr firmware that the device is running. + */ + val firmwareVersion : String? + get() { + val o = __offset(14) + return if (o != 0) __string(o + bb_pos) else null + } + val firmwareVersionAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(14, 1) + fun firmwareVersionInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 14, 1) + val hardwareAddress : solarxr_protocol.datatypes.hardware_info.HardwareAddress? get() = hardwareAddress(solarxr_protocol.datatypes.hardware_info.HardwareAddress()) + fun hardwareAddress(obj: solarxr_protocol.datatypes.hardware_info.HardwareAddress) : solarxr_protocol.datatypes.hardware_info.HardwareAddress? { + val o = __offset(16) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + val ipAddress : solarxr_protocol.datatypes.Ipv4Address? get() = ipAddress(solarxr_protocol.datatypes.Ipv4Address()) + fun ipAddress(obj: solarxr_protocol.datatypes.Ipv4Address) : solarxr_protocol.datatypes.Ipv4Address? { + val o = __offset(18) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + /** + * A board type string that can be used to name a board. if possible you should use official board type + */ + val boardType : String? + get() { + val o = __offset(20) + return if (o != 0) __string(o + bb_pos) else null + } + val boardTypeAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(20, 1) + fun boardTypeInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 20, 1) + /** + * An enum listing all the board types supported by the firmware + */ + val officialBoardType : UShort + get() { + val o = __offset(22) + return if(o != 0) bb.getShort(o + bb_pos).toUShort() else 0u + } + /** + * A unique identifier for the device. Depending on the type of device it can be the MAC address, + * the IP address, or some other unique identifier like what USB device it is. + */ + val hardwareIdentifier : String? + get() { + val o = __offset(24) + return if (o != 0) __string(o + bb_pos) else null + } + val hardwareIdentifierAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(24, 1) + fun hardwareIdentifierInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 24, 1) + /** + * The version of the protocol it's using to communicate with server + */ + val networkProtocolVersion : UShort? + get() { + val o = __offset(26) + return if(o != 0) bb.getShort(o + bb_pos).toUShort() else null + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsHardwareInfo(_bb: ByteBuffer): HardwareInfo = getRootAsHardwareInfo(_bb, HardwareInfo()) + @JvmStatic + fun getRootAsHardwareInfo(_bb: ByteBuffer, obj: HardwareInfo): HardwareInfo { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startHardwareInfo(builder: FlatBufferBuilder) = builder.startTable(12) + @JvmStatic + fun addMcuId(builder: FlatBufferBuilder, mcuId: UShort) = builder.addShort(0, mcuId.toShort(), 0) + @JvmStatic + fun addDisplayName(builder: FlatBufferBuilder, displayName: Int) = builder.addOffset(1, displayName, 0) + @JvmStatic + fun addModel(builder: FlatBufferBuilder, model: Int) = builder.addOffset(2, model, 0) + @JvmStatic + fun addManufacturer(builder: FlatBufferBuilder, manufacturer: Int) = builder.addOffset(3, manufacturer, 0) + @JvmStatic + fun addHardwareRevision(builder: FlatBufferBuilder, hardwareRevision: Int) = builder.addOffset(4, hardwareRevision, 0) + @JvmStatic + fun addFirmwareVersion(builder: FlatBufferBuilder, firmwareVersion: Int) = builder.addOffset(5, firmwareVersion, 0) + @JvmStatic + fun addHardwareAddress(builder: FlatBufferBuilder, hardwareAddress: Int) = builder.addStruct(6, hardwareAddress, 0) + @JvmStatic + fun addIpAddress(builder: FlatBufferBuilder, ipAddress: Int) = builder.addStruct(7, ipAddress, 0) + @JvmStatic + fun addBoardType(builder: FlatBufferBuilder, boardType: Int) = builder.addOffset(8, boardType, 0) + @JvmStatic + fun addOfficialBoardType(builder: FlatBufferBuilder, officialBoardType: UShort) = builder.addShort(9, officialBoardType.toShort(), 0) + @JvmStatic + fun addHardwareIdentifier(builder: FlatBufferBuilder, hardwareIdentifier: Int) = builder.addOffset(10, hardwareIdentifier, 0) + @JvmStatic + fun addNetworkProtocolVersion(builder: FlatBufferBuilder, networkProtocolVersion: UShort) = builder.addShort(11, networkProtocolVersion.toShort(), 0) + @JvmStatic + fun endHardwareInfo(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/HardwareStatus.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/HardwareStatus.kt index 52bc7843..7beac43c 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/HardwareStatus.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/HardwareStatus.kt @@ -1,111 +1,111 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.hardware_info - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Mostly-dynamic status info about a tracked device's firmware - */ -@Suppress("unused") -class HardwareStatus : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : HardwareStatus { - __init(_i, _bb) - return this - } - val errorStatus : UByte? - get() { - val o = __offset(4) - return if(o != 0) bb.get(o + bb_pos).toUByte() else null - } - val ping : UShort? - get() { - val o = __offset(8) - return if(o != 0) bb.getShort(o + bb_pos).toUShort() else null - } - /** - * “Received Signal Strength Indicator" between device and wifi adapter in dBm - */ - val rssi : Short? - get() { - val o = __offset(10) - return if(o != 0) bb.getShort(o + bb_pos) else null - } - /** - * Temperature in degrees celsius - */ - val mcuTemp : Float? - get() { - val o = __offset(12) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - val batteryVoltage : Float? - get() { - val o = __offset(14) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - val batteryPctEstimate : UByte? - get() { - val o = __offset(16) - return if(o != 0) bb.get(o + bb_pos).toUByte() else null - } - val logData : solarxr_protocol.datatypes.LogData? get() = logData(solarxr_protocol.datatypes.LogData()) - fun logData(obj: solarxr_protocol.datatypes.LogData) : solarxr_protocol.datatypes.LogData? { - val o = __offset(18) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsHardwareStatus(_bb: ByteBuffer): HardwareStatus = getRootAsHardwareStatus(_bb, HardwareStatus()) - @JvmStatic - fun getRootAsHardwareStatus(_bb: ByteBuffer, obj: HardwareStatus): HardwareStatus { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createHardwareStatus(builder: FlatBufferBuilder, errorStatus: UByte?, ping: UShort?, rssi: Short?, mcuTemp: Float?, batteryVoltage: Float?, batteryPctEstimate: UByte?, logDataOffset: Int) : Int { - builder.startTable(8) - addLogData(builder, logDataOffset) - batteryVoltage?.run { addBatteryVoltage(builder, batteryVoltage) } - mcuTemp?.run { addMcuTemp(builder, mcuTemp) } - rssi?.run { addRssi(builder, rssi) } - ping?.run { addPing(builder, ping) } - batteryPctEstimate?.run { addBatteryPctEstimate(builder, batteryPctEstimate) } - errorStatus?.run { addErrorStatus(builder, errorStatus) } - return endHardwareStatus(builder) - } - @JvmStatic - fun startHardwareStatus(builder: FlatBufferBuilder) = builder.startTable(8) - @JvmStatic - fun addErrorStatus(builder: FlatBufferBuilder, errorStatus: UByte) = builder.addByte(0, errorStatus.toByte(), 0) - @JvmStatic - fun addPing(builder: FlatBufferBuilder, ping: UShort) = builder.addShort(2, ping.toShort(), 0) - @JvmStatic - fun addRssi(builder: FlatBufferBuilder, rssi: Short) = builder.addShort(3, rssi, 0) - @JvmStatic - fun addMcuTemp(builder: FlatBufferBuilder, mcuTemp: Float) = builder.addFloat(4, mcuTemp, 0.0) - @JvmStatic - fun addBatteryVoltage(builder: FlatBufferBuilder, batteryVoltage: Float) = builder.addFloat(5, batteryVoltage, 0.0) - @JvmStatic - fun addBatteryPctEstimate(builder: FlatBufferBuilder, batteryPctEstimate: UByte) = builder.addByte(6, batteryPctEstimate.toByte(), 0) - @JvmStatic - fun addLogData(builder: FlatBufferBuilder, logData: Int) = builder.addOffset(7, logData, 0) - @JvmStatic - fun endHardwareStatus(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.hardware_info + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Mostly-dynamic status info about a tracked device's firmware + */ +@Suppress("unused") +class HardwareStatus : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : HardwareStatus { + __init(_i, _bb) + return this + } + val errorStatus : UByte? + get() { + val o = __offset(4) + return if(o != 0) bb.get(o + bb_pos).toUByte() else null + } + val ping : UShort? + get() { + val o = __offset(8) + return if(o != 0) bb.getShort(o + bb_pos).toUShort() else null + } + /** + * “Received Signal Strength Indicator" between device and wifi adapter in dBm + */ + val rssi : Short? + get() { + val o = __offset(10) + return if(o != 0) bb.getShort(o + bb_pos) else null + } + /** + * Temperature in degrees celsius + */ + val mcuTemp : Float? + get() { + val o = __offset(12) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + val batteryVoltage : Float? + get() { + val o = __offset(14) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + val batteryPctEstimate : UByte? + get() { + val o = __offset(16) + return if(o != 0) bb.get(o + bb_pos).toUByte() else null + } + val logData : solarxr_protocol.datatypes.LogData? get() = logData(solarxr_protocol.datatypes.LogData()) + fun logData(obj: solarxr_protocol.datatypes.LogData) : solarxr_protocol.datatypes.LogData? { + val o = __offset(18) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsHardwareStatus(_bb: ByteBuffer): HardwareStatus = getRootAsHardwareStatus(_bb, HardwareStatus()) + @JvmStatic + fun getRootAsHardwareStatus(_bb: ByteBuffer, obj: HardwareStatus): HardwareStatus { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createHardwareStatus(builder: FlatBufferBuilder, errorStatus: UByte?, ping: UShort?, rssi: Short?, mcuTemp: Float?, batteryVoltage: Float?, batteryPctEstimate: UByte?, logDataOffset: Int) : Int { + builder.startTable(8) + addLogData(builder, logDataOffset) + batteryVoltage?.run { addBatteryVoltage(builder, batteryVoltage) } + mcuTemp?.run { addMcuTemp(builder, mcuTemp) } + rssi?.run { addRssi(builder, rssi) } + ping?.run { addPing(builder, ping) } + batteryPctEstimate?.run { addBatteryPctEstimate(builder, batteryPctEstimate) } + errorStatus?.run { addErrorStatus(builder, errorStatus) } + return endHardwareStatus(builder) + } + @JvmStatic + fun startHardwareStatus(builder: FlatBufferBuilder) = builder.startTable(8) + @JvmStatic + fun addErrorStatus(builder: FlatBufferBuilder, errorStatus: UByte) = builder.addByte(0, errorStatus.toByte(), 0) + @JvmStatic + fun addPing(builder: FlatBufferBuilder, ping: UShort) = builder.addShort(2, ping.toShort(), 0) + @JvmStatic + fun addRssi(builder: FlatBufferBuilder, rssi: Short) = builder.addShort(3, rssi, 0) + @JvmStatic + fun addMcuTemp(builder: FlatBufferBuilder, mcuTemp: Float) = builder.addFloat(4, mcuTemp, 0.0) + @JvmStatic + fun addBatteryVoltage(builder: FlatBufferBuilder, batteryVoltage: Float) = builder.addFloat(5, batteryVoltage, 0.0) + @JvmStatic + fun addBatteryPctEstimate(builder: FlatBufferBuilder, batteryPctEstimate: UByte) = builder.addByte(6, batteryPctEstimate.toByte(), 0) + @JvmStatic + fun addLogData(builder: FlatBufferBuilder, logData: Int) = builder.addOffset(7, logData, 0) + @JvmStatic + fun endHardwareStatus(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/ImuType.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/ImuType.kt index e91a2d3b..f2dbdf2c 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/ImuType.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/ImuType.kt @@ -1,23 +1,23 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.hardware_info - -@Suppress("unused") -class ImuType private constructor() { - companion object { - const val Other: UShort = 0u - const val MPU9250: UShort = 1u - const val MPU6500: UShort = 2u - const val BNO080: UShort = 3u - const val BNO085: UShort = 4u - const val BNO055: UShort = 5u - const val MPU6050: UShort = 6u - const val BNO086: UShort = 7u - const val BMI160: UShort = 8u - const val ICM20948: UShort = 9u - const val ICM42688: UShort = 10u - val names : Array = arrayOf("Other", "MPU9250", "MPU6500", "BNO080", "BNO085", "BNO055", "MPU6050", "BNO086", "BMI160", "ICM20948", "ICM42688") - @JvmStatic - fun name(e: Int) : String = names[e] - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.hardware_info + +@Suppress("unused") +class ImuType private constructor() { + companion object { + const val Other: UShort = 0u + const val MPU9250: UShort = 1u + const val MPU6500: UShort = 2u + const val BNO080: UShort = 3u + const val BNO085: UShort = 4u + const val BNO055: UShort = 5u + const val MPU6050: UShort = 6u + const val BNO086: UShort = 7u + const val BMI160: UShort = 8u + const val ICM20948: UShort = 9u + const val ICM42688: UShort = 10u + val names : Array = arrayOf("Other", "MPU9250", "MPU6500", "BNO080", "BNO085", "BNO055", "MPU6050", "BNO086", "BMI160", "ICM20948", "ICM42688") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/McuType.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/McuType.kt index a74adde1..41a5dea9 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/McuType.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/McuType.kt @@ -1,18 +1,18 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.hardware_info - -@Suppress("unused") -class McuType private constructor() { - companion object { - const val Other: UShort = 0u - const val ESP8266: UShort = 1u - const val ESP32: UShort = 2u - const val OWOTRACKANDROID: UShort = 3u - const val WRANGLER: UShort = 4u - const val OWOTRACKIOS: UShort = 5u - const val ESP32C3: UShort = 6u - const val MOCOPI: UShort = 7u - const val DEVRESERVED: UShort = 250u - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.hardware_info + +@Suppress("unused") +class McuType private constructor() { + companion object { + const val Other: UShort = 0u + const val ESP8266: UShort = 1u + const val ESP32: UShort = 2u + const val OWOTRACKANDROID: UShort = 3u + const val WRANGLER: UShort = 4u + const val OWOTRACKIOS: UShort = 5u + const val ESP32C3: UShort = 6u + const val MOCOPI: UShort = 7u + const val DEVRESERVED: UShort = 250u + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/math/Quat.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/math/Quat.kt index f9dc0c1d..a7c05ef0 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/math/Quat.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/math/Quat.kt @@ -1,34 +1,34 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.math - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class Quat : Struct() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : Quat { - __init(_i, _bb) - return this - } - val x : Float get() = bb.getFloat(bb_pos + 0) - val y : Float get() = bb.getFloat(bb_pos + 4) - val z : Float get() = bb.getFloat(bb_pos + 8) - val w : Float get() = bb.getFloat(bb_pos + 12) - companion object { - @JvmStatic - fun createQuat(builder: FlatBufferBuilder, x: Float, y: Float, z: Float, w: Float) : Int { - builder.prep(4, 16) - builder.putFloat(w) - builder.putFloat(z) - builder.putFloat(y) - builder.putFloat(x) - return builder.offset() - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.math + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class Quat : Struct() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : Quat { + __init(_i, _bb) + return this + } + val x : Float get() = bb.getFloat(bb_pos + 0) + val y : Float get() = bb.getFloat(bb_pos + 4) + val z : Float get() = bb.getFloat(bb_pos + 8) + val w : Float get() = bb.getFloat(bb_pos + 12) + companion object { + @JvmStatic + fun createQuat(builder: FlatBufferBuilder, x: Float, y: Float, z: Float, w: Float) : Int { + builder.prep(4, 16) + builder.putFloat(w) + builder.putFloat(z) + builder.putFloat(y) + builder.putFloat(x) + return builder.offset() + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/math/Vec3f.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/math/Vec3f.kt index 6974a1ca..97edc77d 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/math/Vec3f.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/math/Vec3f.kt @@ -1,32 +1,32 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.math - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class Vec3f : Struct() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : Vec3f { - __init(_i, _bb) - return this - } - val x : Float get() = bb.getFloat(bb_pos + 0) - val y : Float get() = bb.getFloat(bb_pos + 4) - val z : Float get() = bb.getFloat(bb_pos + 8) - companion object { - @JvmStatic - fun createVec3f(builder: FlatBufferBuilder, x: Float, y: Float, z: Float) : Int { - builder.prep(4, 12) - builder.putFloat(z) - builder.putFloat(y) - builder.putFloat(x) - return builder.offset() - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.math + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class Vec3f : Struct() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : Vec3f { + __init(_i, _bb) + return this + } + val x : Float get() = bb.getFloat(bb_pos + 0) + val y : Float get() = bb.getFloat(bb_pos + 4) + val z : Float get() = bb.getFloat(bb_pos + 8) + companion object { + @JvmStatic + fun createVec3f(builder: FlatBufferBuilder, x: Float, y: Float, z: Float) : Int { + builder.prep(4, 12) + builder.putFloat(z) + builder.putFloat(y) + builder.putFloat(x) + return builder.offset() + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/pub_sub/KeyValues.kt b/protocol/kotlin/src/solarxr_protocol/pub_sub/KeyValues.kt index 7d82dc7a..254b0b01 100644 --- a/protocol/kotlin/src/solarxr_protocol/pub_sub/KeyValues.kt +++ b/protocol/kotlin/src/solarxr_protocol/pub_sub/KeyValues.kt @@ -1,92 +1,92 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.pub_sub - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class KeyValues : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : KeyValues { - __init(_i, _bb) - return this - } - fun keys(j: Int) : String? { - val o = __offset(4) - return if (o != 0) { - __string(__vector(o) + j * 4) - } else { - null - } - } - val keysLength : Int - get() { - val o = __offset(4); return if (o != 0) __vector_len(o) else 0 - } - fun values(j: Int) : String? { - val o = __offset(6) - return if (o != 0) { - __string(__vector(o) + j * 4) - } else { - null - } - } - val valuesLength : Int - get() { - val o = __offset(6); return if (o != 0) __vector_len(o) else 0 - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsKeyValues(_bb: ByteBuffer): KeyValues = getRootAsKeyValues(_bb, KeyValues()) - @JvmStatic - fun getRootAsKeyValues(_bb: ByteBuffer, obj: KeyValues): KeyValues { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createKeyValues(builder: FlatBufferBuilder, keysOffset: Int, valuesOffset: Int) : Int { - builder.startTable(2) - addValues(builder, valuesOffset) - addKeys(builder, keysOffset) - return endKeyValues(builder) - } - @JvmStatic - fun startKeyValues(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addKeys(builder: FlatBufferBuilder, keys: Int) = builder.addOffset(0, keys, 0) - @JvmStatic - fun createKeysVector(builder: FlatBufferBuilder, data: IntArray) : Int { - builder.startVector(4, data.size, 4) - for (i in data.size - 1 downTo 0) { - builder.addOffset(data[i]) - } - return builder.endVector() - } - @JvmStatic - fun startKeysVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) - @JvmStatic - fun addValues(builder: FlatBufferBuilder, values: Int) = builder.addOffset(1, values, 0) - @JvmStatic - fun createValuesVector(builder: FlatBufferBuilder, data: IntArray) : Int { - builder.startVector(4, data.size, 4) - for (i in data.size - 1 downTo 0) { - builder.addOffset(data[i]) - } - return builder.endVector() - } - @JvmStatic - fun startValuesVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) - @JvmStatic - fun endKeyValues(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class KeyValues : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : KeyValues { + __init(_i, _bb) + return this + } + fun keys(j: Int) : String? { + val o = __offset(4) + return if (o != 0) { + __string(__vector(o) + j * 4) + } else { + null + } + } + val keysLength : Int + get() { + val o = __offset(4); return if (o != 0) __vector_len(o) else 0 + } + fun values(j: Int) : String? { + val o = __offset(6) + return if (o != 0) { + __string(__vector(o) + j * 4) + } else { + null + } + } + val valuesLength : Int + get() { + val o = __offset(6); return if (o != 0) __vector_len(o) else 0 + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsKeyValues(_bb: ByteBuffer): KeyValues = getRootAsKeyValues(_bb, KeyValues()) + @JvmStatic + fun getRootAsKeyValues(_bb: ByteBuffer, obj: KeyValues): KeyValues { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createKeyValues(builder: FlatBufferBuilder, keysOffset: Int, valuesOffset: Int) : Int { + builder.startTable(2) + addValues(builder, valuesOffset) + addKeys(builder, keysOffset) + return endKeyValues(builder) + } + @JvmStatic + fun startKeyValues(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addKeys(builder: FlatBufferBuilder, keys: Int) = builder.addOffset(0, keys, 0) + @JvmStatic + fun createKeysVector(builder: FlatBufferBuilder, data: IntArray) : Int { + builder.startVector(4, data.size, 4) + for (i in data.size - 1 downTo 0) { + builder.addOffset(data[i]) + } + return builder.endVector() + } + @JvmStatic + fun startKeysVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) + @JvmStatic + fun addValues(builder: FlatBufferBuilder, values: Int) = builder.addOffset(1, values, 0) + @JvmStatic + fun createValuesVector(builder: FlatBufferBuilder, data: IntArray) : Int { + builder.startVector(4, data.size, 4) + for (i in data.size - 1 downTo 0) { + builder.addOffset(data[i]) + } + return builder.endVector() + } + @JvmStatic + fun startValuesVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) + @JvmStatic + fun endKeyValues(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/pub_sub/Message.kt b/protocol/kotlin/src/solarxr_protocol/pub_sub/Message.kt index 5a939e17..6b751da4 100644 --- a/protocol/kotlin/src/solarxr_protocol/pub_sub/Message.kt +++ b/protocol/kotlin/src/solarxr_protocol/pub_sub/Message.kt @@ -1,73 +1,73 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.pub_sub - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Data that is sent from publishers to subscribers - */ -@Suppress("unused") -class Message : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : Message { - __init(_i, _bb) - return this - } - val topicType : UByte - get() { - val o = __offset(4) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - fun topic(obj: Table) : Table? { - val o = __offset(6); return if (o != 0) __union(obj, o + bb_pos) else null - } - val payloadType : UByte - get() { - val o = __offset(8) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - fun payload(obj: Table) : Table? { - val o = __offset(10); return if (o != 0) __union(obj, o + bb_pos) else null - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsMessage(_bb: ByteBuffer): Message = getRootAsMessage(_bb, Message()) - @JvmStatic - fun getRootAsMessage(_bb: ByteBuffer, obj: Message): Message { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createMessage(builder: FlatBufferBuilder, topicType: UByte, topicOffset: Int, payloadType: UByte, payloadOffset: Int) : Int { - builder.startTable(4) - addPayload(builder, payloadOffset) - addTopic(builder, topicOffset) - addPayloadType(builder, payloadType) - addTopicType(builder, topicType) - return endMessage(builder) - } - @JvmStatic - fun startMessage(builder: FlatBufferBuilder) = builder.startTable(4) - @JvmStatic - fun addTopicType(builder: FlatBufferBuilder, topicType: UByte) = builder.addByte(0, topicType.toByte(), 0) - @JvmStatic - fun addTopic(builder: FlatBufferBuilder, topic: Int) = builder.addOffset(1, topic, 0) - @JvmStatic - fun addPayloadType(builder: FlatBufferBuilder, payloadType: UByte) = builder.addByte(2, payloadType.toByte(), 0) - @JvmStatic - fun addPayload(builder: FlatBufferBuilder, payload: Int) = builder.addOffset(3, payload, 0) - @JvmStatic - fun endMessage(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Data that is sent from publishers to subscribers + */ +@Suppress("unused") +class Message : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : Message { + __init(_i, _bb) + return this + } + val topicType : UByte + get() { + val o = __offset(4) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + fun topic(obj: Table) : Table? { + val o = __offset(6); return if (o != 0) __union(obj, o + bb_pos) else null + } + val payloadType : UByte + get() { + val o = __offset(8) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + fun payload(obj: Table) : Table? { + val o = __offset(10); return if (o != 0) __union(obj, o + bb_pos) else null + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsMessage(_bb: ByteBuffer): Message = getRootAsMessage(_bb, Message()) + @JvmStatic + fun getRootAsMessage(_bb: ByteBuffer, obj: Message): Message { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createMessage(builder: FlatBufferBuilder, topicType: UByte, topicOffset: Int, payloadType: UByte, payloadOffset: Int) : Int { + builder.startTable(4) + addPayload(builder, payloadOffset) + addTopic(builder, topicOffset) + addPayloadType(builder, payloadType) + addTopicType(builder, topicType) + return endMessage(builder) + } + @JvmStatic + fun startMessage(builder: FlatBufferBuilder) = builder.startTable(4) + @JvmStatic + fun addTopicType(builder: FlatBufferBuilder, topicType: UByte) = builder.addByte(0, topicType.toByte(), 0) + @JvmStatic + fun addTopic(builder: FlatBufferBuilder, topic: Int) = builder.addOffset(1, topic, 0) + @JvmStatic + fun addPayloadType(builder: FlatBufferBuilder, payloadType: UByte) = builder.addByte(2, payloadType.toByte(), 0) + @JvmStatic + fun addPayload(builder: FlatBufferBuilder, payload: Int) = builder.addOffset(3, payload, 0) + @JvmStatic + fun endMessage(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/pub_sub/Payload.kt b/protocol/kotlin/src/solarxr_protocol/pub_sub/Payload.kt index 0b6fdfdd..50278954 100644 --- a/protocol/kotlin/src/solarxr_protocol/pub_sub/Payload.kt +++ b/protocol/kotlin/src/solarxr_protocol/pub_sub/Payload.kt @@ -1,16 +1,16 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.pub_sub - -@Suppress("unused") -class Payload private constructor() { - companion object { - const val NONE: UByte = 0u - const val solarxrProtocolDatatypesStringTable: UByte = 1u - const val solarxrProtocolDatatypesBytes: UByte = 2u - const val KeyValues: UByte = 3u - val names : Array = arrayOf("NONE", "solarxr_protocol_datatypes_StringTable", "solarxr_protocol_datatypes_Bytes", "KeyValues") - @JvmStatic - fun name(e: Int) : String = names[e] - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub + +@Suppress("unused") +class Payload private constructor() { + companion object { + const val NONE: UByte = 0u + const val solarxrProtocolDatatypesStringTable: UByte = 1u + const val solarxrProtocolDatatypesBytes: UByte = 2u + const val KeyValues: UByte = 3u + val names : Array = arrayOf("NONE", "solarxr_protocol_datatypes_StringTable", "solarxr_protocol_datatypes_Bytes", "KeyValues") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/pub_sub/PubSubHeader.kt b/protocol/kotlin/src/solarxr_protocol/pub_sub/PubSubHeader.kt index fdec3b39..ea1aa2bb 100644 --- a/protocol/kotlin/src/solarxr_protocol/pub_sub/PubSubHeader.kt +++ b/protocol/kotlin/src/solarxr_protocol/pub_sub/PubSubHeader.kt @@ -1,56 +1,56 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.pub_sub - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class PubSubHeader : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : PubSubHeader { - __init(_i, _bb) - return this - } - val uType : UByte - get() { - val o = __offset(4) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - fun u(obj: Table) : Table? { - val o = __offset(6); return if (o != 0) __union(obj, o + bb_pos) else null - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsPubSubHeader(_bb: ByteBuffer): PubSubHeader = getRootAsPubSubHeader(_bb, PubSubHeader()) - @JvmStatic - fun getRootAsPubSubHeader(_bb: ByteBuffer, obj: PubSubHeader): PubSubHeader { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createPubSubHeader(builder: FlatBufferBuilder, uType: UByte, uOffset: Int) : Int { - builder.startTable(2) - addU(builder, uOffset) - addUType(builder, uType) - return endPubSubHeader(builder) - } - @JvmStatic - fun startPubSubHeader(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addUType(builder: FlatBufferBuilder, uType: UByte) = builder.addByte(0, uType.toByte(), 0) - @JvmStatic - fun addU(builder: FlatBufferBuilder, u: Int) = builder.addOffset(1, u, 0) - @JvmStatic - fun endPubSubHeader(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class PubSubHeader : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : PubSubHeader { + __init(_i, _bb) + return this + } + val uType : UByte + get() { + val o = __offset(4) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + fun u(obj: Table) : Table? { + val o = __offset(6); return if (o != 0) __union(obj, o + bb_pos) else null + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsPubSubHeader(_bb: ByteBuffer): PubSubHeader = getRootAsPubSubHeader(_bb, PubSubHeader()) + @JvmStatic + fun getRootAsPubSubHeader(_bb: ByteBuffer, obj: PubSubHeader): PubSubHeader { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createPubSubHeader(builder: FlatBufferBuilder, uType: UByte, uOffset: Int) : Int { + builder.startTable(2) + addU(builder, uOffset) + addUType(builder, uType) + return endPubSubHeader(builder) + } + @JvmStatic + fun startPubSubHeader(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addUType(builder: FlatBufferBuilder, uType: UByte) = builder.addByte(0, uType.toByte(), 0) + @JvmStatic + fun addU(builder: FlatBufferBuilder, u: Int) = builder.addOffset(1, u, 0) + @JvmStatic + fun endPubSubHeader(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/pub_sub/PubSubUnion.kt b/protocol/kotlin/src/solarxr_protocol/pub_sub/PubSubUnion.kt index c028e24f..356c3bf2 100644 --- a/protocol/kotlin/src/solarxr_protocol/pub_sub/PubSubUnion.kt +++ b/protocol/kotlin/src/solarxr_protocol/pub_sub/PubSubUnion.kt @@ -1,17 +1,17 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.pub_sub - -@Suppress("unused") -class PubSubUnion private constructor() { - companion object { - const val NONE: UByte = 0u - const val Message: UByte = 1u - const val SubscriptionRequest: UByte = 2u - const val TopicHandleRequest: UByte = 3u - const val TopicMapping: UByte = 4u - val names : Array = arrayOf("NONE", "Message", "SubscriptionRequest", "TopicHandleRequest", "TopicMapping") - @JvmStatic - fun name(e: Int) : String = names[e] - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub + +@Suppress("unused") +class PubSubUnion private constructor() { + companion object { + const val NONE: UByte = 0u + const val Message: UByte = 1u + const val SubscriptionRequest: UByte = 2u + const val TopicHandleRequest: UByte = 3u + const val TopicMapping: UByte = 4u + val names : Array = arrayOf("NONE", "Message", "SubscriptionRequest", "TopicHandleRequest", "TopicMapping") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/pub_sub/SubscriptionRequest.kt b/protocol/kotlin/src/solarxr_protocol/pub_sub/SubscriptionRequest.kt index 0abd13d7..bffb09d4 100644 --- a/protocol/kotlin/src/solarxr_protocol/pub_sub/SubscriptionRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/pub_sub/SubscriptionRequest.kt @@ -1,59 +1,59 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.pub_sub - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Requests a subscription to `topic`. Replies with a `TopicMapping`. - */ -@Suppress("unused") -class SubscriptionRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : SubscriptionRequest { - __init(_i, _bb) - return this - } - val topicType : UByte - get() { - val o = __offset(4) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - fun topic(obj: Table) : Table? { - val o = __offset(6); return if (o != 0) __union(obj, o + bb_pos) else null - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsSubscriptionRequest(_bb: ByteBuffer): SubscriptionRequest = getRootAsSubscriptionRequest(_bb, SubscriptionRequest()) - @JvmStatic - fun getRootAsSubscriptionRequest(_bb: ByteBuffer, obj: SubscriptionRequest): SubscriptionRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createSubscriptionRequest(builder: FlatBufferBuilder, topicType: UByte, topicOffset: Int) : Int { - builder.startTable(2) - addTopic(builder, topicOffset) - addTopicType(builder, topicType) - return endSubscriptionRequest(builder) - } - @JvmStatic - fun startSubscriptionRequest(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addTopicType(builder: FlatBufferBuilder, topicType: UByte) = builder.addByte(0, topicType.toByte(), 0) - @JvmStatic - fun addTopic(builder: FlatBufferBuilder, topic: Int) = builder.addOffset(1, topic, 0) - @JvmStatic - fun endSubscriptionRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Requests a subscription to `topic`. Replies with a `TopicMapping`. + */ +@Suppress("unused") +class SubscriptionRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SubscriptionRequest { + __init(_i, _bb) + return this + } + val topicType : UByte + get() { + val o = __offset(4) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + fun topic(obj: Table) : Table? { + val o = __offset(6); return if (o != 0) __union(obj, o + bb_pos) else null + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSubscriptionRequest(_bb: ByteBuffer): SubscriptionRequest = getRootAsSubscriptionRequest(_bb, SubscriptionRequest()) + @JvmStatic + fun getRootAsSubscriptionRequest(_bb: ByteBuffer, obj: SubscriptionRequest): SubscriptionRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createSubscriptionRequest(builder: FlatBufferBuilder, topicType: UByte, topicOffset: Int) : Int { + builder.startTable(2) + addTopic(builder, topicOffset) + addTopicType(builder, topicType) + return endSubscriptionRequest(builder) + } + @JvmStatic + fun startSubscriptionRequest(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addTopicType(builder: FlatBufferBuilder, topicType: UByte) = builder.addByte(0, topicType.toByte(), 0) + @JvmStatic + fun addTopic(builder: FlatBufferBuilder, topic: Int) = builder.addOffset(1, topic, 0) + @JvmStatic + fun endSubscriptionRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/pub_sub/Topic.kt b/protocol/kotlin/src/solarxr_protocol/pub_sub/Topic.kt index 78ef5083..29f47696 100644 --- a/protocol/kotlin/src/solarxr_protocol/pub_sub/Topic.kt +++ b/protocol/kotlin/src/solarxr_protocol/pub_sub/Topic.kt @@ -1,15 +1,15 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.pub_sub - -@Suppress("unused") -class Topic private constructor() { - companion object { - const val NONE: UByte = 0u - const val TopicHandle: UByte = 1u - const val TopicId: UByte = 2u - val names : Array = arrayOf("NONE", "TopicHandle", "TopicId") - @JvmStatic - fun name(e: Int) : String = names[e] - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub + +@Suppress("unused") +class Topic private constructor() { + companion object { + const val NONE: UByte = 0u + const val TopicHandle: UByte = 1u + const val TopicId: UByte = 2u + val names : Array = arrayOf("NONE", "TopicHandle", "TopicId") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/pub_sub/TopicHandle.kt b/protocol/kotlin/src/solarxr_protocol/pub_sub/TopicHandle.kt index 405f3dec..200fc7c6 100644 --- a/protocol/kotlin/src/solarxr_protocol/pub_sub/TopicHandle.kt +++ b/protocol/kotlin/src/solarxr_protocol/pub_sub/TopicHandle.kt @@ -1,54 +1,54 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.pub_sub - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * A handle for the topic, allows referencing a topic without sending a huge - * `TopicId`. - */ -@Suppress("unused") -class TopicHandle : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : TopicHandle { - __init(_i, _bb) - return this - } - val id : UShort - get() { - val o = __offset(4) - return if(o != 0) bb.getShort(o + bb_pos).toUShort() else 0u - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsTopicHandle(_bb: ByteBuffer): TopicHandle = getRootAsTopicHandle(_bb, TopicHandle()) - @JvmStatic - fun getRootAsTopicHandle(_bb: ByteBuffer, obj: TopicHandle): TopicHandle { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createTopicHandle(builder: FlatBufferBuilder, id: UShort) : Int { - builder.startTable(1) - addId(builder, id) - return endTopicHandle(builder) - } - @JvmStatic - fun startTopicHandle(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addId(builder: FlatBufferBuilder, id: UShort) = builder.addShort(0, id.toShort(), 0) - @JvmStatic - fun endTopicHandle(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * A handle for the topic, allows referencing a topic without sending a huge + * `TopicId`. + */ +@Suppress("unused") +class TopicHandle : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : TopicHandle { + __init(_i, _bb) + return this + } + val id : UShort + get() { + val o = __offset(4) + return if(o != 0) bb.getShort(o + bb_pos).toUShort() else 0u + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsTopicHandle(_bb: ByteBuffer): TopicHandle = getRootAsTopicHandle(_bb, TopicHandle()) + @JvmStatic + fun getRootAsTopicHandle(_bb: ByteBuffer, obj: TopicHandle): TopicHandle { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createTopicHandle(builder: FlatBufferBuilder, id: UShort) : Int { + builder.startTable(1) + addId(builder, id) + return endTopicHandle(builder) + } + @JvmStatic + fun startTopicHandle(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addId(builder: FlatBufferBuilder, id: UShort) = builder.addShort(0, id.toShort(), 0) + @JvmStatic + fun endTopicHandle(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/pub_sub/TopicHandleRequest.kt b/protocol/kotlin/src/solarxr_protocol/pub_sub/TopicHandleRequest.kt index 7ff6198a..ae843df7 100644 --- a/protocol/kotlin/src/solarxr_protocol/pub_sub/TopicHandleRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/pub_sub/TopicHandleRequest.kt @@ -1,58 +1,58 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.pub_sub - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Request to get the `FeatureHandle` from a `FeatureId`. This is useful for reducing - * bandwidth, since `FeatureId` can be large. - */ -@Suppress("unused") -class TopicHandleRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : TopicHandleRequest { - __init(_i, _bb) - return this - } - val id : solarxr_protocol.pub_sub.TopicId? get() = id(solarxr_protocol.pub_sub.TopicId()) - fun id(obj: solarxr_protocol.pub_sub.TopicId) : solarxr_protocol.pub_sub.TopicId? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsTopicHandleRequest(_bb: ByteBuffer): TopicHandleRequest = getRootAsTopicHandleRequest(_bb, TopicHandleRequest()) - @JvmStatic - fun getRootAsTopicHandleRequest(_bb: ByteBuffer, obj: TopicHandleRequest): TopicHandleRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createTopicHandleRequest(builder: FlatBufferBuilder, idOffset: Int) : Int { - builder.startTable(1) - addId(builder, idOffset) - return endTopicHandleRequest(builder) - } - @JvmStatic - fun startTopicHandleRequest(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addId(builder: FlatBufferBuilder, id: Int) = builder.addOffset(0, id, 0) - @JvmStatic - fun endTopicHandleRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Request to get the `FeatureHandle` from a `FeatureId`. This is useful for reducing + * bandwidth, since `FeatureId` can be large. + */ +@Suppress("unused") +class TopicHandleRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : TopicHandleRequest { + __init(_i, _bb) + return this + } + val id : solarxr_protocol.pub_sub.TopicId? get() = id(solarxr_protocol.pub_sub.TopicId()) + fun id(obj: solarxr_protocol.pub_sub.TopicId) : solarxr_protocol.pub_sub.TopicId? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsTopicHandleRequest(_bb: ByteBuffer): TopicHandleRequest = getRootAsTopicHandleRequest(_bb, TopicHandleRequest()) + @JvmStatic + fun getRootAsTopicHandleRequest(_bb: ByteBuffer, obj: TopicHandleRequest): TopicHandleRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createTopicHandleRequest(builder: FlatBufferBuilder, idOffset: Int) : Int { + builder.startTable(1) + addId(builder, idOffset) + return endTopicHandleRequest(builder) + } + @JvmStatic + fun startTopicHandleRequest(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addId(builder: FlatBufferBuilder, id: Int) = builder.addOffset(0, id, 0) + @JvmStatic + fun endTopicHandleRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/pub_sub/TopicId.kt b/protocol/kotlin/src/solarxr_protocol/pub_sub/TopicId.kt index e3ed16e6..826ba3ea 100644 --- a/protocol/kotlin/src/solarxr_protocol/pub_sub/TopicId.kt +++ b/protocol/kotlin/src/solarxr_protocol/pub_sub/TopicId.kt @@ -1,91 +1,91 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.pub_sub - -import java.nio.* -import kotlin.math.sign -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. - */ -@Suppress("unused") -class TopicId : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : TopicId { - __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. - */ - val organization : String? - get() { - val o = __offset(4) - return if (o != 0) __string(o + bb_pos) else null - } - val organizationAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) - fun organizationInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) - /** - * The name of the application/device. Should be unique within the organization. - */ - val appName : String? - get() { - val o = __offset(6) - return if (o != 0) __string(o + bb_pos) else null - } - val appNameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) - fun appNameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) - /** - * The name of the topic. Should be unique within the application. - */ - val topic : String? - get() { - val o = __offset(8) - return if (o != 0) __string(o + bb_pos) else null - } - val topicAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(8, 1) - fun topicInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 8, 1) - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsTopicId(_bb: ByteBuffer): TopicId = getRootAsTopicId(_bb, TopicId()) - @JvmStatic - fun getRootAsTopicId(_bb: ByteBuffer, obj: TopicId): TopicId { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createTopicId(builder: FlatBufferBuilder, organizationOffset: Int, appNameOffset: Int, topicOffset: Int) : Int { - builder.startTable(3) - addTopic(builder, topicOffset) - addAppName(builder, appNameOffset) - addOrganization(builder, organizationOffset) - return endTopicId(builder) - } - @JvmStatic - fun startTopicId(builder: FlatBufferBuilder) = builder.startTable(3) - @JvmStatic - fun addOrganization(builder: FlatBufferBuilder, organization: Int) = builder.addOffset(0, organization, 0) - @JvmStatic - fun addAppName(builder: FlatBufferBuilder, appName: Int) = builder.addOffset(1, appName, 0) - @JvmStatic - fun addTopic(builder: FlatBufferBuilder, topic: Int) = builder.addOffset(2, topic, 0) - @JvmStatic - fun endTopicId(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub + +import java.nio.* +import kotlin.math.sign +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. + */ +@Suppress("unused") +class TopicId : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : TopicId { + __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. + */ + val organization : String? + get() { + val o = __offset(4) + return if (o != 0) __string(o + bb_pos) else null + } + val organizationAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun organizationInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + /** + * The name of the application/device. Should be unique within the organization. + */ + val appName : String? + get() { + val o = __offset(6) + return if (o != 0) __string(o + bb_pos) else null + } + val appNameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) + fun appNameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) + /** + * The name of the topic. Should be unique within the application. + */ + val topic : String? + get() { + val o = __offset(8) + return if (o != 0) __string(o + bb_pos) else null + } + val topicAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(8, 1) + fun topicInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 8, 1) + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsTopicId(_bb: ByteBuffer): TopicId = getRootAsTopicId(_bb, TopicId()) + @JvmStatic + fun getRootAsTopicId(_bb: ByteBuffer, obj: TopicId): TopicId { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createTopicId(builder: FlatBufferBuilder, organizationOffset: Int, appNameOffset: Int, topicOffset: Int) : Int { + builder.startTable(3) + addTopic(builder, topicOffset) + addAppName(builder, appNameOffset) + addOrganization(builder, organizationOffset) + return endTopicId(builder) + } + @JvmStatic + fun startTopicId(builder: FlatBufferBuilder) = builder.startTable(3) + @JvmStatic + fun addOrganization(builder: FlatBufferBuilder, organization: Int) = builder.addOffset(0, organization, 0) + @JvmStatic + fun addAppName(builder: FlatBufferBuilder, appName: Int) = builder.addOffset(1, appName, 0) + @JvmStatic + fun addTopic(builder: FlatBufferBuilder, topic: Int) = builder.addOffset(2, topic, 0) + @JvmStatic + fun endTopicId(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/pub_sub/TopicMapping.kt b/protocol/kotlin/src/solarxr_protocol/pub_sub/TopicMapping.kt index 20369942..c1c9870e 100644 --- a/protocol/kotlin/src/solarxr_protocol/pub_sub/TopicMapping.kt +++ b/protocol/kotlin/src/solarxr_protocol/pub_sub/TopicMapping.kt @@ -1,69 +1,69 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.pub_sub - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Response for `TopicHandleRequest` or `SubscriptionRequest`. - */ -@Suppress("unused") -class TopicMapping : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : TopicMapping { - __init(_i, _bb) - return this - } - val id : solarxr_protocol.pub_sub.TopicId? get() = id(solarxr_protocol.pub_sub.TopicId()) - fun id(obj: solarxr_protocol.pub_sub.TopicId) : solarxr_protocol.pub_sub.TopicId? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val handle : solarxr_protocol.pub_sub.TopicHandle? get() = handle(solarxr_protocol.pub_sub.TopicHandle()) - fun handle(obj: solarxr_protocol.pub_sub.TopicHandle) : solarxr_protocol.pub_sub.TopicHandle? { - val o = __offset(6) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsTopicMapping(_bb: ByteBuffer): TopicMapping = getRootAsTopicMapping(_bb, TopicMapping()) - @JvmStatic - fun getRootAsTopicMapping(_bb: ByteBuffer, obj: TopicMapping): TopicMapping { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createTopicMapping(builder: FlatBufferBuilder, idOffset: Int, handleOffset: Int) : Int { - builder.startTable(2) - addHandle(builder, handleOffset) - addId(builder, idOffset) - return endTopicMapping(builder) - } - @JvmStatic - fun startTopicMapping(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addId(builder: FlatBufferBuilder, id: Int) = builder.addOffset(0, id, 0) - @JvmStatic - fun addHandle(builder: FlatBufferBuilder, handle: Int) = builder.addOffset(1, handle, 0) - @JvmStatic - fun endTopicMapping(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Response for `TopicHandleRequest` or `SubscriptionRequest`. + */ +@Suppress("unused") +class TopicMapping : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : TopicMapping { + __init(_i, _bb) + return this + } + val id : solarxr_protocol.pub_sub.TopicId? get() = id(solarxr_protocol.pub_sub.TopicId()) + fun id(obj: solarxr_protocol.pub_sub.TopicId) : solarxr_protocol.pub_sub.TopicId? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val handle : solarxr_protocol.pub_sub.TopicHandle? get() = handle(solarxr_protocol.pub_sub.TopicHandle()) + fun handle(obj: solarxr_protocol.pub_sub.TopicHandle) : solarxr_protocol.pub_sub.TopicHandle? { + val o = __offset(6) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsTopicMapping(_bb: ByteBuffer): TopicMapping = getRootAsTopicMapping(_bb, TopicMapping()) + @JvmStatic + fun getRootAsTopicMapping(_bb: ByteBuffer, obj: TopicMapping): TopicMapping { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createTopicMapping(builder: FlatBufferBuilder, idOffset: Int, handleOffset: Int) : Int { + builder.startTable(2) + addHandle(builder, handleOffset) + addId(builder, idOffset) + return endTopicMapping(builder) + } + @JvmStatic + fun startTopicMapping(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addId(builder: FlatBufferBuilder, id: Int) = builder.addOffset(0, id, 0) + @JvmStatic + fun addHandle(builder: FlatBufferBuilder, handle: Int) = builder.addOffset(1, handle, 0) + @JvmStatic + fun endTopicMapping(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/AddUnknownDeviceRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/AddUnknownDeviceRequest.kt index 7445f69a..7ddd2c0f 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/AddUnknownDeviceRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/AddUnknownDeviceRequest.kt @@ -1,52 +1,52 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class AddUnknownDeviceRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : AddUnknownDeviceRequest { - __init(_i, _bb) - return this - } - val macAddress : String? - get() { - val o = __offset(4) - return if (o != 0) __string(o + bb_pos) else null - } - val macAddressAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) - fun macAddressInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsAddUnknownDeviceRequest(_bb: ByteBuffer): AddUnknownDeviceRequest = getRootAsAddUnknownDeviceRequest(_bb, AddUnknownDeviceRequest()) - @JvmStatic - fun getRootAsAddUnknownDeviceRequest(_bb: ByteBuffer, obj: AddUnknownDeviceRequest): AddUnknownDeviceRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createAddUnknownDeviceRequest(builder: FlatBufferBuilder, macAddressOffset: Int) : Int { - builder.startTable(1) - addMacAddress(builder, macAddressOffset) - return endAddUnknownDeviceRequest(builder) - } - @JvmStatic - fun startAddUnknownDeviceRequest(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addMacAddress(builder: FlatBufferBuilder, macAddress: Int) = builder.addOffset(0, macAddress, 0) - @JvmStatic - fun endAddUnknownDeviceRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class AddUnknownDeviceRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : AddUnknownDeviceRequest { + __init(_i, _bb) + return this + } + val macAddress : String? + get() { + val o = __offset(4) + return if (o != 0) __string(o + bb_pos) else null + } + val macAddressAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun macAddressInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsAddUnknownDeviceRequest(_bb: ByteBuffer): AddUnknownDeviceRequest = getRootAsAddUnknownDeviceRequest(_bb, AddUnknownDeviceRequest()) + @JvmStatic + fun getRootAsAddUnknownDeviceRequest(_bb: ByteBuffer, obj: AddUnknownDeviceRequest): AddUnknownDeviceRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createAddUnknownDeviceRequest(builder: FlatBufferBuilder, macAddressOffset: Int) : Int { + builder.startTable(1) + addMacAddress(builder, macAddressOffset) + return endAddUnknownDeviceRequest(builder) + } + @JvmStatic + fun startAddUnknownDeviceRequest(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addMacAddress(builder: FlatBufferBuilder, macAddress: Int) = builder.addOffset(0, macAddress, 0) + @JvmStatic + fun endAddUnknownDeviceRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ArmsMountingResetMode.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ArmsMountingResetMode.kt index 2f64f8bf..f46f88bd 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/ArmsMountingResetMode.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ArmsMountingResetMode.kt @@ -1,28 +1,28 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -@Suppress("unused") -class ArmsMountingResetMode private constructor() { - companion object { - /** - * Upper arm going back and forearm going forward - */ - const val BACK: UByte = 0u - /** - * Arms going forward - */ - const val FORWARD: UByte = 1u - /** - * Arms going up to the sides into a tpose - */ - const val TPOSEUP: UByte = 2u - /** - * Arms going down to the sides from a tpose - */ - const val TPOSEDOWN: UByte = 3u - val names : Array = arrayOf("BACK", "FORWARD", "TPOSE_UP", "TPOSE_DOWN") - @JvmStatic - fun name(e: Int) : String = names[e] - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +@Suppress("unused") +class ArmsMountingResetMode private constructor() { + companion object { + /** + * Upper arm going back and forearm going forward + */ + const val BACK: UByte = 0u + /** + * Arms going forward + */ + const val FORWARD: UByte = 1u + /** + * Arms going up to the sides into a tpose + */ + const val TPOSEUP: UByte = 2u + /** + * Arms going down to the sides from a tpose + */ + const val TPOSEDOWN: UByte = 3u + val names : Array = arrayOf("BACK", "FORWARD", "TPOSE_UP", "TPOSE_DOWN") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/AssignTrackerRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/AssignTrackerRequest.kt index 3febae0f..26f7b97f 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/AssignTrackerRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/AssignTrackerRequest.kt @@ -1,82 +1,82 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class AssignTrackerRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : AssignTrackerRequest { - __init(_i, _bb) - return this - } - val trackerId : solarxr_protocol.datatypes.TrackerId? get() = trackerId(solarxr_protocol.datatypes.TrackerId()) - fun trackerId(obj: solarxr_protocol.datatypes.TrackerId) : solarxr_protocol.datatypes.TrackerId? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val bodyPosition : UByte - get() { - val o = __offset(6) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - val mountingOrientation : solarxr_protocol.datatypes.math.Quat? get() = mountingOrientation(solarxr_protocol.datatypes.math.Quat()) - fun mountingOrientation(obj: solarxr_protocol.datatypes.math.Quat) : solarxr_protocol.datatypes.math.Quat? { - val o = __offset(8) - return if (o != 0) { - obj.__assign(o + bb_pos, bb) - } else { - null - } - } - val displayName : String? - get() { - val o = __offset(10) - return if (o != 0) __string(o + bb_pos) else null - } - val displayNameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(10, 1) - fun displayNameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 10, 1) - val allowDriftCompensation : Boolean - get() { - val o = __offset(12) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsAssignTrackerRequest(_bb: ByteBuffer): AssignTrackerRequest = getRootAsAssignTrackerRequest(_bb, AssignTrackerRequest()) - @JvmStatic - fun getRootAsAssignTrackerRequest(_bb: ByteBuffer, obj: AssignTrackerRequest): AssignTrackerRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startAssignTrackerRequest(builder: FlatBufferBuilder) = builder.startTable(5) - @JvmStatic - fun addTrackerId(builder: FlatBufferBuilder, trackerId: Int) = builder.addOffset(0, trackerId, 0) - @JvmStatic - fun addBodyPosition(builder: FlatBufferBuilder, bodyPosition: UByte) = builder.addByte(1, bodyPosition.toByte(), 0) - @JvmStatic - fun addMountingOrientation(builder: FlatBufferBuilder, mountingOrientation: Int) = builder.addStruct(2, mountingOrientation, 0) - @JvmStatic - fun addDisplayName(builder: FlatBufferBuilder, displayName: Int) = builder.addOffset(3, displayName, 0) - @JvmStatic - fun addAllowDriftCompensation(builder: FlatBufferBuilder, allowDriftCompensation: Boolean) = builder.addBoolean(4, allowDriftCompensation, false) - @JvmStatic - fun endAssignTrackerRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class AssignTrackerRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : AssignTrackerRequest { + __init(_i, _bb) + return this + } + val trackerId : solarxr_protocol.datatypes.TrackerId? get() = trackerId(solarxr_protocol.datatypes.TrackerId()) + fun trackerId(obj: solarxr_protocol.datatypes.TrackerId) : solarxr_protocol.datatypes.TrackerId? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val bodyPosition : UByte + get() { + val o = __offset(6) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + val mountingOrientation : solarxr_protocol.datatypes.math.Quat? get() = mountingOrientation(solarxr_protocol.datatypes.math.Quat()) + fun mountingOrientation(obj: solarxr_protocol.datatypes.math.Quat) : solarxr_protocol.datatypes.math.Quat? { + val o = __offset(8) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + val displayName : String? + get() { + val o = __offset(10) + return if (o != 0) __string(o + bb_pos) else null + } + val displayNameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(10, 1) + fun displayNameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 10, 1) + val allowDriftCompensation : Boolean + get() { + val o = __offset(12) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsAssignTrackerRequest(_bb: ByteBuffer): AssignTrackerRequest = getRootAsAssignTrackerRequest(_bb, AssignTrackerRequest()) + @JvmStatic + fun getRootAsAssignTrackerRequest(_bb: ByteBuffer, obj: AssignTrackerRequest): AssignTrackerRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startAssignTrackerRequest(builder: FlatBufferBuilder) = builder.startTable(5) + @JvmStatic + fun addTrackerId(builder: FlatBufferBuilder, trackerId: Int) = builder.addOffset(0, trackerId, 0) + @JvmStatic + fun addBodyPosition(builder: FlatBufferBuilder, bodyPosition: UByte) = builder.addByte(1, bodyPosition.toByte(), 0) + @JvmStatic + fun addMountingOrientation(builder: FlatBufferBuilder, mountingOrientation: Int) = builder.addStruct(2, mountingOrientation, 0) + @JvmStatic + fun addDisplayName(builder: FlatBufferBuilder, displayName: Int) = builder.addOffset(3, displayName, 0) + @JvmStatic + fun addAllowDriftCompensation(builder: FlatBufferBuilder, allowDriftCompensation: Boolean) = builder.addBoolean(4, allowDriftCompensation, false) + @JvmStatic + fun endAssignTrackerRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneApplyRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneApplyRequest.kt index 6ab3ef3b..4b794f78 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneApplyRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneApplyRequest.kt @@ -1,40 +1,40 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Applies the estimated proportions - */ -@Suppress("unused") -class AutoBoneApplyRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : AutoBoneApplyRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsAutoBoneApplyRequest(_bb: ByteBuffer): AutoBoneApplyRequest = getRootAsAutoBoneApplyRequest(_bb, AutoBoneApplyRequest()) - @JvmStatic - fun getRootAsAutoBoneApplyRequest(_bb: ByteBuffer, obj: AutoBoneApplyRequest): AutoBoneApplyRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startAutoBoneApplyRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endAutoBoneApplyRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Applies the estimated proportions + */ +@Suppress("unused") +class AutoBoneApplyRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : AutoBoneApplyRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsAutoBoneApplyRequest(_bb: ByteBuffer): AutoBoneApplyRequest = getRootAsAutoBoneApplyRequest(_bb, AutoBoneApplyRequest()) + @JvmStatic + fun getRootAsAutoBoneApplyRequest(_bb: ByteBuffer, obj: AutoBoneApplyRequest): AutoBoneApplyRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startAutoBoneApplyRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endAutoBoneApplyRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneCancelRecordingRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneCancelRecordingRequest.kt index ee57c8bf..90929cf0 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneCancelRecordingRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneCancelRecordingRequest.kt @@ -1,40 +1,40 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Cancels the current recording, aborting the process and discarding the data - */ -@Suppress("unused") -class AutoBoneCancelRecordingRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : AutoBoneCancelRecordingRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsAutoBoneCancelRecordingRequest(_bb: ByteBuffer): AutoBoneCancelRecordingRequest = getRootAsAutoBoneCancelRecordingRequest(_bb, AutoBoneCancelRecordingRequest()) - @JvmStatic - fun getRootAsAutoBoneCancelRecordingRequest(_bb: ByteBuffer, obj: AutoBoneCancelRecordingRequest): AutoBoneCancelRecordingRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startAutoBoneCancelRecordingRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endAutoBoneCancelRecordingRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Cancels the current recording, aborting the process and discarding the data + */ +@Suppress("unused") +class AutoBoneCancelRecordingRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : AutoBoneCancelRecordingRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsAutoBoneCancelRecordingRequest(_bb: ByteBuffer): AutoBoneCancelRecordingRequest = getRootAsAutoBoneCancelRecordingRequest(_bb, AutoBoneCancelRecordingRequest()) + @JvmStatic + fun getRootAsAutoBoneCancelRecordingRequest(_bb: ByteBuffer, obj: AutoBoneCancelRecordingRequest): AutoBoneCancelRecordingRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startAutoBoneCancelRecordingRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endAutoBoneCancelRecordingRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneEpochResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneEpochResponse.kt index aed1e414..ec461989 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneEpochResponse.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneEpochResponse.kt @@ -1,98 +1,98 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class AutoBoneEpochResponse : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : AutoBoneEpochResponse { - __init(_i, _bb) - return this - } - val currentEpoch : UInt - get() { - val o = __offset(4) - return if(o != 0) bb.getInt(o + bb_pos).toUInt() else 0u - } - val totalEpochs : UInt - get() { - val o = __offset(6) - return if(o != 0) bb.getInt(o + bb_pos).toUInt() else 0u - } - /** - * The current error value. This can be any positive number, where lower is better. - */ - val epochError : Float - get() { - val o = __offset(8) - return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f - } - /** - * A list of the current estimated body proportions. - */ - fun adjustedSkeletonParts(j: Int) : solarxr_protocol.rpc.SkeletonPart? = adjustedSkeletonParts(solarxr_protocol.rpc.SkeletonPart(), j) - fun adjustedSkeletonParts(obj: solarxr_protocol.rpc.SkeletonPart, j: Int) : solarxr_protocol.rpc.SkeletonPart? { - val o = __offset(10) - return if (o != 0) { - obj.__assign(__indirect(__vector(o) + j * 4), bb) - } else { - null - } - } - val adjustedSkeletonPartsLength : Int - get() { - val o = __offset(10); return if (o != 0) __vector_len(o) else 0 - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsAutoBoneEpochResponse(_bb: ByteBuffer): AutoBoneEpochResponse = getRootAsAutoBoneEpochResponse(_bb, AutoBoneEpochResponse()) - @JvmStatic - fun getRootAsAutoBoneEpochResponse(_bb: ByteBuffer, obj: AutoBoneEpochResponse): AutoBoneEpochResponse { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createAutoBoneEpochResponse(builder: FlatBufferBuilder, currentEpoch: UInt, totalEpochs: UInt, epochError: Float, adjustedSkeletonPartsOffset: Int) : Int { - builder.startTable(4) - addAdjustedSkeletonParts(builder, adjustedSkeletonPartsOffset) - addEpochError(builder, epochError) - addTotalEpochs(builder, totalEpochs) - addCurrentEpoch(builder, currentEpoch) - return endAutoBoneEpochResponse(builder) - } - @JvmStatic - fun startAutoBoneEpochResponse(builder: FlatBufferBuilder) = builder.startTable(4) - @JvmStatic - fun addCurrentEpoch(builder: FlatBufferBuilder, currentEpoch: UInt) = builder.addInt(0, currentEpoch.toInt(), 0) - @JvmStatic - fun addTotalEpochs(builder: FlatBufferBuilder, totalEpochs: UInt) = builder.addInt(1, totalEpochs.toInt(), 0) - @JvmStatic - fun addEpochError(builder: FlatBufferBuilder, epochError: Float) = builder.addFloat(2, epochError, 0.0) - @JvmStatic - fun addAdjustedSkeletonParts(builder: FlatBufferBuilder, adjustedSkeletonParts: Int) = builder.addOffset(3, adjustedSkeletonParts, 0) - @JvmStatic - fun createAdjustedSkeletonPartsVector(builder: FlatBufferBuilder, data: IntArray) : Int { - builder.startVector(4, data.size, 4) - for (i in data.size - 1 downTo 0) { - builder.addOffset(data[i]) - } - return builder.endVector() - } - @JvmStatic - fun startAdjustedSkeletonPartsVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) - @JvmStatic - fun endAutoBoneEpochResponse(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class AutoBoneEpochResponse : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : AutoBoneEpochResponse { + __init(_i, _bb) + return this + } + val currentEpoch : UInt + get() { + val o = __offset(4) + return if(o != 0) bb.getInt(o + bb_pos).toUInt() else 0u + } + val totalEpochs : UInt + get() { + val o = __offset(6) + return if(o != 0) bb.getInt(o + bb_pos).toUInt() else 0u + } + /** + * The current error value. This can be any positive number, where lower is better. + */ + val epochError : Float + get() { + val o = __offset(8) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + /** + * A list of the current estimated body proportions. + */ + fun adjustedSkeletonParts(j: Int) : solarxr_protocol.rpc.SkeletonPart? = adjustedSkeletonParts(solarxr_protocol.rpc.SkeletonPart(), j) + fun adjustedSkeletonParts(obj: solarxr_protocol.rpc.SkeletonPart, j: Int) : solarxr_protocol.rpc.SkeletonPart? { + val o = __offset(10) + return if (o != 0) { + obj.__assign(__indirect(__vector(o) + j * 4), bb) + } else { + null + } + } + val adjustedSkeletonPartsLength : Int + get() { + val o = __offset(10); return if (o != 0) __vector_len(o) else 0 + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsAutoBoneEpochResponse(_bb: ByteBuffer): AutoBoneEpochResponse = getRootAsAutoBoneEpochResponse(_bb, AutoBoneEpochResponse()) + @JvmStatic + fun getRootAsAutoBoneEpochResponse(_bb: ByteBuffer, obj: AutoBoneEpochResponse): AutoBoneEpochResponse { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createAutoBoneEpochResponse(builder: FlatBufferBuilder, currentEpoch: UInt, totalEpochs: UInt, epochError: Float, adjustedSkeletonPartsOffset: Int) : Int { + builder.startTable(4) + addAdjustedSkeletonParts(builder, adjustedSkeletonPartsOffset) + addEpochError(builder, epochError) + addTotalEpochs(builder, totalEpochs) + addCurrentEpoch(builder, currentEpoch) + return endAutoBoneEpochResponse(builder) + } + @JvmStatic + fun startAutoBoneEpochResponse(builder: FlatBufferBuilder) = builder.startTable(4) + @JvmStatic + fun addCurrentEpoch(builder: FlatBufferBuilder, currentEpoch: UInt) = builder.addInt(0, currentEpoch.toInt(), 0) + @JvmStatic + fun addTotalEpochs(builder: FlatBufferBuilder, totalEpochs: UInt) = builder.addInt(1, totalEpochs.toInt(), 0) + @JvmStatic + fun addEpochError(builder: FlatBufferBuilder, epochError: Float) = builder.addFloat(2, epochError, 0.0) + @JvmStatic + fun addAdjustedSkeletonParts(builder: FlatBufferBuilder, adjustedSkeletonParts: Int) = builder.addOffset(3, adjustedSkeletonParts, 0) + @JvmStatic + fun createAdjustedSkeletonPartsVector(builder: FlatBufferBuilder, data: IntArray) : Int { + builder.startVector(4, data.size, 4) + for (i in data.size - 1 downTo 0) { + builder.addOffset(data[i]) + } + return builder.endVector() + } + @JvmStatic + fun startAdjustedSkeletonPartsVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) + @JvmStatic + fun endAutoBoneEpochResponse(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneProcessRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneProcessRequest.kt index 184caaa2..948875d7 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneProcessRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneProcessRequest.kt @@ -1,50 +1,50 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class AutoBoneProcessRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : AutoBoneProcessRequest { - __init(_i, _bb) - return this - } - val processType : UByte - get() { - val o = __offset(4) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsAutoBoneProcessRequest(_bb: ByteBuffer): AutoBoneProcessRequest = getRootAsAutoBoneProcessRequest(_bb, AutoBoneProcessRequest()) - @JvmStatic - fun getRootAsAutoBoneProcessRequest(_bb: ByteBuffer, obj: AutoBoneProcessRequest): AutoBoneProcessRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createAutoBoneProcessRequest(builder: FlatBufferBuilder, processType: UByte) : Int { - builder.startTable(1) - addProcessType(builder, processType) - return endAutoBoneProcessRequest(builder) - } - @JvmStatic - fun startAutoBoneProcessRequest(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addProcessType(builder: FlatBufferBuilder, processType: UByte) = builder.addByte(0, processType.toByte(), 0) - @JvmStatic - fun endAutoBoneProcessRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class AutoBoneProcessRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : AutoBoneProcessRequest { + __init(_i, _bb) + return this + } + val processType : UByte + get() { + val o = __offset(4) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsAutoBoneProcessRequest(_bb: ByteBuffer): AutoBoneProcessRequest = getRootAsAutoBoneProcessRequest(_bb, AutoBoneProcessRequest()) + @JvmStatic + fun getRootAsAutoBoneProcessRequest(_bb: ByteBuffer, obj: AutoBoneProcessRequest): AutoBoneProcessRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createAutoBoneProcessRequest(builder: FlatBufferBuilder, processType: UByte) : Int { + builder.startTable(1) + addProcessType(builder, processType) + return endAutoBoneProcessRequest(builder) + } + @JvmStatic + fun startAutoBoneProcessRequest(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addProcessType(builder: FlatBufferBuilder, processType: UByte) = builder.addByte(0, processType.toByte(), 0) + @JvmStatic + fun endAutoBoneProcessRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneProcessStatusResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneProcessStatusResponse.kt index 3b1cfe96..bd5f2e51 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneProcessStatusResponse.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneProcessStatusResponse.kt @@ -1,105 +1,105 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class AutoBoneProcessStatusResponse : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : AutoBoneProcessStatusResponse { - __init(_i, _bb) - return this - } - val processType : UByte - get() { - val o = __offset(4) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - /** - * The current count. This value is -1 if there is nothing to report. - */ - val current : UInt - get() { - val o = __offset(8) - return if(o != 0) bb.getInt(o + bb_pos).toUInt() else 0u - } - /** - * The total count. This value is -1 if there is nothing to report. - */ - val total : UInt - get() { - val o = __offset(10) - return if(o != 0) bb.getInt(o + bb_pos).toUInt() else 0u - } - /** - * True if the operation has completed with any result, successful or not. - */ - val completed : Boolean - get() { - val o = __offset(12) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - /** - * True if the completed operation was successful, only observe if `completed` is true. - */ - val success : Boolean - get() { - val o = __offset(14) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - /** - * The time remaining in seconds. This value is -1 if there is nothing to report. - */ - val eta : Float - get() { - val o = __offset(16) - return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsAutoBoneProcessStatusResponse(_bb: ByteBuffer): AutoBoneProcessStatusResponse = getRootAsAutoBoneProcessStatusResponse(_bb, AutoBoneProcessStatusResponse()) - @JvmStatic - fun getRootAsAutoBoneProcessStatusResponse(_bb: ByteBuffer, obj: AutoBoneProcessStatusResponse): AutoBoneProcessStatusResponse { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createAutoBoneProcessStatusResponse(builder: FlatBufferBuilder, processType: UByte, current: UInt, total: UInt, completed: Boolean, success: Boolean, eta: Float) : Int { - builder.startTable(7) - addEta(builder, eta) - addTotal(builder, total) - addCurrent(builder, current) - addSuccess(builder, success) - addCompleted(builder, completed) - addProcessType(builder, processType) - return endAutoBoneProcessStatusResponse(builder) - } - @JvmStatic - fun startAutoBoneProcessStatusResponse(builder: FlatBufferBuilder) = builder.startTable(7) - @JvmStatic - fun addProcessType(builder: FlatBufferBuilder, processType: UByte) = builder.addByte(0, processType.toByte(), 0) - @JvmStatic - fun addCurrent(builder: FlatBufferBuilder, current: UInt) = builder.addInt(2, current.toInt(), 0) - @JvmStatic - fun addTotal(builder: FlatBufferBuilder, total: UInt) = builder.addInt(3, total.toInt(), 0) - @JvmStatic - fun addCompleted(builder: FlatBufferBuilder, completed: Boolean) = builder.addBoolean(4, completed, false) - @JvmStatic - fun addSuccess(builder: FlatBufferBuilder, success: Boolean) = builder.addBoolean(5, success, false) - @JvmStatic - fun addEta(builder: FlatBufferBuilder, eta: Float) = builder.addFloat(6, eta, 0.0) - @JvmStatic - fun endAutoBoneProcessStatusResponse(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class AutoBoneProcessStatusResponse : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : AutoBoneProcessStatusResponse { + __init(_i, _bb) + return this + } + val processType : UByte + get() { + val o = __offset(4) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + /** + * The current count. This value is -1 if there is nothing to report. + */ + val current : UInt + get() { + val o = __offset(8) + return if(o != 0) bb.getInt(o + bb_pos).toUInt() else 0u + } + /** + * The total count. This value is -1 if there is nothing to report. + */ + val total : UInt + get() { + val o = __offset(10) + return if(o != 0) bb.getInt(o + bb_pos).toUInt() else 0u + } + /** + * True if the operation has completed with any result, successful or not. + */ + val completed : Boolean + get() { + val o = __offset(12) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + /** + * True if the completed operation was successful, only observe if `completed` is true. + */ + val success : Boolean + get() { + val o = __offset(14) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + /** + * The time remaining in seconds. This value is -1 if there is nothing to report. + */ + val eta : Float + get() { + val o = __offset(16) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsAutoBoneProcessStatusResponse(_bb: ByteBuffer): AutoBoneProcessStatusResponse = getRootAsAutoBoneProcessStatusResponse(_bb, AutoBoneProcessStatusResponse()) + @JvmStatic + fun getRootAsAutoBoneProcessStatusResponse(_bb: ByteBuffer, obj: AutoBoneProcessStatusResponse): AutoBoneProcessStatusResponse { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createAutoBoneProcessStatusResponse(builder: FlatBufferBuilder, processType: UByte, current: UInt, total: UInt, completed: Boolean, success: Boolean, eta: Float) : Int { + builder.startTable(7) + addEta(builder, eta) + addTotal(builder, total) + addCurrent(builder, current) + addSuccess(builder, success) + addCompleted(builder, completed) + addProcessType(builder, processType) + return endAutoBoneProcessStatusResponse(builder) + } + @JvmStatic + fun startAutoBoneProcessStatusResponse(builder: FlatBufferBuilder) = builder.startTable(7) + @JvmStatic + fun addProcessType(builder: FlatBufferBuilder, processType: UByte) = builder.addByte(0, processType.toByte(), 0) + @JvmStatic + fun addCurrent(builder: FlatBufferBuilder, current: UInt) = builder.addInt(2, current.toInt(), 0) + @JvmStatic + fun addTotal(builder: FlatBufferBuilder, total: UInt) = builder.addInt(3, total.toInt(), 0) + @JvmStatic + fun addCompleted(builder: FlatBufferBuilder, completed: Boolean) = builder.addBoolean(4, completed, false) + @JvmStatic + fun addSuccess(builder: FlatBufferBuilder, success: Boolean) = builder.addBoolean(5, success, false) + @JvmStatic + fun addEta(builder: FlatBufferBuilder, eta: Float) = builder.addFloat(6, eta, 0.0) + @JvmStatic + fun endAutoBoneProcessStatusResponse(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneProcessType.kt b/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneProcessType.kt index 91f2c614..6517e1e7 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneProcessType.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneProcessType.kt @@ -1,21 +1,21 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -@Suppress("unused") -class AutoBoneProcessType private constructor() { - companion object { - const val NONE: UByte = 0u - const val RECORD: UByte = 1u - const val SAVE: UByte = 2u - const val PROCESS: UByte = 3u - /** - * @deprecated - * Use AutoBoneApplyRequest instead - */ - const val APPLY: UByte = 4u - val names : Array = arrayOf("NONE", "RECORD", "SAVE", "PROCESS", "APPLY") - @JvmStatic - fun name(e: Int) : String = names[e] - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +@Suppress("unused") +class AutoBoneProcessType private constructor() { + companion object { + const val NONE: UByte = 0u + const val RECORD: UByte = 1u + const val SAVE: UByte = 2u + const val PROCESS: UByte = 3u + /** + * @deprecated + * Use AutoBoneApplyRequest instead + */ + const val APPLY: UByte = 4u + val names : Array = arrayOf("NONE", "RECORD", "SAVE", "PROCESS", "APPLY") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneSettings.kt b/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneSettings.kt index 56f9fb33..20579b40 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneSettings.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneSettings.kt @@ -1,237 +1,237 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * https://github.com/SlimeVR/SlimeVR-Server/blob/v0.8.3/server/src/main/java/dev/slimevr/config/AutoBoneConfig.kt - */ -@Suppress("unused") -class AutoBoneSettings : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : AutoBoneSettings { - __init(_i, _bb) - return this - } - val cursorIncrement : Int? - get() { - val o = __offset(4) - return if(o != 0) bb.getInt(o + bb_pos) else null - } - val minDataDistance : Int? - get() { - val o = __offset(6) - return if(o != 0) bb.getInt(o + bb_pos) else null - } - val maxDataDistance : Int? - get() { - val o = __offset(8) - return if(o != 0) bb.getInt(o + bb_pos) else null - } - val numEpochs : Int? - get() { - val o = __offset(10) - return if(o != 0) bb.getInt(o + bb_pos) else null - } - val printEveryNumEpochs : Int? - get() { - val o = __offset(12) - return if(o != 0) bb.getInt(o + bb_pos) else null - } - val initialAdjustRate : Float? - get() { - val o = __offset(14) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - val adjustRateDecay : Float? - get() { - val o = __offset(16) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - val slideErrorFactor : Float? - get() { - val o = __offset(18) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - val offsetSlideErrorFactor : Float? - get() { - val o = __offset(20) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - val footHeightOffsetErrorFactor : Float? - get() { - val o = __offset(22) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - val bodyProportionErrorFactor : Float? - get() { - val o = __offset(24) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - val heightErrorFactor : Float? - get() { - val o = __offset(26) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - val positionErrorFactor : Float? - get() { - val o = __offset(28) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - val positionOffsetErrorFactor : Float? - get() { - val o = __offset(30) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - val calcInitError : Boolean? - get() { - val o = __offset(32) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val targetHmdHeight : Float? - get() { - val o = __offset(34) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - val targetFullHeight : Float? - get() { - val o = __offset(36) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - val randomizeFrameOrder : Boolean? - get() { - val o = __offset(38) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val scaleEachStep : Boolean? - get() { - val o = __offset(40) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val sampleCount : Int? - get() { - val o = __offset(42) - return if(o != 0) bb.getInt(o + bb_pos) else null - } - val sampleRateMs : Long? - get() { - val o = __offset(44) - return if(o != 0) bb.getLong(o + bb_pos) else null - } - val saveRecordings : Boolean? - get() { - val o = __offset(46) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val useSkeletonHeight : Boolean? - get() { - val o = __offset(48) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val randSeed : Long? - get() { - val o = __offset(50) - return if(o != 0) bb.getLong(o + bb_pos) else null - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsAutoBoneSettings(_bb: ByteBuffer): AutoBoneSettings = getRootAsAutoBoneSettings(_bb, AutoBoneSettings()) - @JvmStatic - fun getRootAsAutoBoneSettings(_bb: ByteBuffer, obj: AutoBoneSettings): AutoBoneSettings { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createAutoBoneSettings(builder: FlatBufferBuilder, cursorIncrement: Int?, minDataDistance: Int?, maxDataDistance: Int?, numEpochs: Int?, printEveryNumEpochs: Int?, initialAdjustRate: Float?, adjustRateDecay: Float?, slideErrorFactor: Float?, offsetSlideErrorFactor: Float?, footHeightOffsetErrorFactor: Float?, bodyProportionErrorFactor: Float?, heightErrorFactor: Float?, positionErrorFactor: Float?, positionOffsetErrorFactor: Float?, calcInitError: Boolean?, targetHmdHeight: Float?, targetFullHeight: Float?, randomizeFrameOrder: Boolean?, scaleEachStep: Boolean?, sampleCount: Int?, sampleRateMs: Long?, saveRecordings: Boolean?, useSkeletonHeight: Boolean?, randSeed: Long?) : Int { - builder.startTable(24) - randSeed?.run { addRandSeed(builder, randSeed) } - sampleRateMs?.run { addSampleRateMs(builder, sampleRateMs) } - sampleCount?.run { addSampleCount(builder, sampleCount) } - targetFullHeight?.run { addTargetFullHeight(builder, targetFullHeight) } - targetHmdHeight?.run { addTargetHmdHeight(builder, targetHmdHeight) } - positionOffsetErrorFactor?.run { addPositionOffsetErrorFactor(builder, positionOffsetErrorFactor) } - positionErrorFactor?.run { addPositionErrorFactor(builder, positionErrorFactor) } - heightErrorFactor?.run { addHeightErrorFactor(builder, heightErrorFactor) } - bodyProportionErrorFactor?.run { addBodyProportionErrorFactor(builder, bodyProportionErrorFactor) } - footHeightOffsetErrorFactor?.run { addFootHeightOffsetErrorFactor(builder, footHeightOffsetErrorFactor) } - offsetSlideErrorFactor?.run { addOffsetSlideErrorFactor(builder, offsetSlideErrorFactor) } - slideErrorFactor?.run { addSlideErrorFactor(builder, slideErrorFactor) } - adjustRateDecay?.run { addAdjustRateDecay(builder, adjustRateDecay) } - initialAdjustRate?.run { addInitialAdjustRate(builder, initialAdjustRate) } - printEveryNumEpochs?.run { addPrintEveryNumEpochs(builder, printEveryNumEpochs) } - numEpochs?.run { addNumEpochs(builder, numEpochs) } - maxDataDistance?.run { addMaxDataDistance(builder, maxDataDistance) } - minDataDistance?.run { addMinDataDistance(builder, minDataDistance) } - cursorIncrement?.run { addCursorIncrement(builder, cursorIncrement) } - useSkeletonHeight?.run { addUseSkeletonHeight(builder, useSkeletonHeight) } - saveRecordings?.run { addSaveRecordings(builder, saveRecordings) } - scaleEachStep?.run { addScaleEachStep(builder, scaleEachStep) } - randomizeFrameOrder?.run { addRandomizeFrameOrder(builder, randomizeFrameOrder) } - calcInitError?.run { addCalcInitError(builder, calcInitError) } - return endAutoBoneSettings(builder) - } - @JvmStatic - fun startAutoBoneSettings(builder: FlatBufferBuilder) = builder.startTable(24) - @JvmStatic - fun addCursorIncrement(builder: FlatBufferBuilder, cursorIncrement: Int) = builder.addInt(0, cursorIncrement, 0) - @JvmStatic - fun addMinDataDistance(builder: FlatBufferBuilder, minDataDistance: Int) = builder.addInt(1, minDataDistance, 0) - @JvmStatic - fun addMaxDataDistance(builder: FlatBufferBuilder, maxDataDistance: Int) = builder.addInt(2, maxDataDistance, 0) - @JvmStatic - fun addNumEpochs(builder: FlatBufferBuilder, numEpochs: Int) = builder.addInt(3, numEpochs, 0) - @JvmStatic - fun addPrintEveryNumEpochs(builder: FlatBufferBuilder, printEveryNumEpochs: Int) = builder.addInt(4, printEveryNumEpochs, 0) - @JvmStatic - fun addInitialAdjustRate(builder: FlatBufferBuilder, initialAdjustRate: Float) = builder.addFloat(5, initialAdjustRate, 0.0) - @JvmStatic - fun addAdjustRateDecay(builder: FlatBufferBuilder, adjustRateDecay: Float) = builder.addFloat(6, adjustRateDecay, 0.0) - @JvmStatic - fun addSlideErrorFactor(builder: FlatBufferBuilder, slideErrorFactor: Float) = builder.addFloat(7, slideErrorFactor, 0.0) - @JvmStatic - fun addOffsetSlideErrorFactor(builder: FlatBufferBuilder, offsetSlideErrorFactor: Float) = builder.addFloat(8, offsetSlideErrorFactor, 0.0) - @JvmStatic - fun addFootHeightOffsetErrorFactor(builder: FlatBufferBuilder, footHeightOffsetErrorFactor: Float) = builder.addFloat(9, footHeightOffsetErrorFactor, 0.0) - @JvmStatic - fun addBodyProportionErrorFactor(builder: FlatBufferBuilder, bodyProportionErrorFactor: Float) = builder.addFloat(10, bodyProportionErrorFactor, 0.0) - @JvmStatic - fun addHeightErrorFactor(builder: FlatBufferBuilder, heightErrorFactor: Float) = builder.addFloat(11, heightErrorFactor, 0.0) - @JvmStatic - fun addPositionErrorFactor(builder: FlatBufferBuilder, positionErrorFactor: Float) = builder.addFloat(12, positionErrorFactor, 0.0) - @JvmStatic - fun addPositionOffsetErrorFactor(builder: FlatBufferBuilder, positionOffsetErrorFactor: Float) = builder.addFloat(13, positionOffsetErrorFactor, 0.0) - @JvmStatic - fun addCalcInitError(builder: FlatBufferBuilder, calcInitError: Boolean) = builder.addBoolean(14, calcInitError, false) - @JvmStatic - fun addTargetHmdHeight(builder: FlatBufferBuilder, targetHmdHeight: Float) = builder.addFloat(15, targetHmdHeight, 0.0) - @JvmStatic - fun addTargetFullHeight(builder: FlatBufferBuilder, targetFullHeight: Float) = builder.addFloat(16, targetFullHeight, 0.0) - @JvmStatic - fun addRandomizeFrameOrder(builder: FlatBufferBuilder, randomizeFrameOrder: Boolean) = builder.addBoolean(17, randomizeFrameOrder, false) - @JvmStatic - fun addScaleEachStep(builder: FlatBufferBuilder, scaleEachStep: Boolean) = builder.addBoolean(18, scaleEachStep, false) - @JvmStatic - fun addSampleCount(builder: FlatBufferBuilder, sampleCount: Int) = builder.addInt(19, sampleCount, 0) - @JvmStatic - fun addSampleRateMs(builder: FlatBufferBuilder, sampleRateMs: Long) = builder.addLong(20, sampleRateMs, 0) - @JvmStatic - fun addSaveRecordings(builder: FlatBufferBuilder, saveRecordings: Boolean) = builder.addBoolean(21, saveRecordings, false) - @JvmStatic - fun addUseSkeletonHeight(builder: FlatBufferBuilder, useSkeletonHeight: Boolean) = builder.addBoolean(22, useSkeletonHeight, false) - @JvmStatic - fun addRandSeed(builder: FlatBufferBuilder, randSeed: Long) = builder.addLong(23, randSeed, 0) - @JvmStatic - fun endAutoBoneSettings(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * https://github.com/SlimeVR/SlimeVR-Server/blob/v0.8.3/server/src/main/java/dev/slimevr/config/AutoBoneConfig.kt + */ +@Suppress("unused") +class AutoBoneSettings : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : AutoBoneSettings { + __init(_i, _bb) + return this + } + val cursorIncrement : Int? + get() { + val o = __offset(4) + return if(o != 0) bb.getInt(o + bb_pos) else null + } + val minDataDistance : Int? + get() { + val o = __offset(6) + return if(o != 0) bb.getInt(o + bb_pos) else null + } + val maxDataDistance : Int? + get() { + val o = __offset(8) + return if(o != 0) bb.getInt(o + bb_pos) else null + } + val numEpochs : Int? + get() { + val o = __offset(10) + return if(o != 0) bb.getInt(o + bb_pos) else null + } + val printEveryNumEpochs : Int? + get() { + val o = __offset(12) + return if(o != 0) bb.getInt(o + bb_pos) else null + } + val initialAdjustRate : Float? + get() { + val o = __offset(14) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + val adjustRateDecay : Float? + get() { + val o = __offset(16) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + val slideErrorFactor : Float? + get() { + val o = __offset(18) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + val offsetSlideErrorFactor : Float? + get() { + val o = __offset(20) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + val footHeightOffsetErrorFactor : Float? + get() { + val o = __offset(22) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + val bodyProportionErrorFactor : Float? + get() { + val o = __offset(24) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + val heightErrorFactor : Float? + get() { + val o = __offset(26) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + val positionErrorFactor : Float? + get() { + val o = __offset(28) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + val positionOffsetErrorFactor : Float? + get() { + val o = __offset(30) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + val calcInitError : Boolean? + get() { + val o = __offset(32) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val targetHmdHeight : Float? + get() { + val o = __offset(34) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + val targetFullHeight : Float? + get() { + val o = __offset(36) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + val randomizeFrameOrder : Boolean? + get() { + val o = __offset(38) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val scaleEachStep : Boolean? + get() { + val o = __offset(40) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val sampleCount : Int? + get() { + val o = __offset(42) + return if(o != 0) bb.getInt(o + bb_pos) else null + } + val sampleRateMs : Long? + get() { + val o = __offset(44) + return if(o != 0) bb.getLong(o + bb_pos) else null + } + val saveRecordings : Boolean? + get() { + val o = __offset(46) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val useSkeletonHeight : Boolean? + get() { + val o = __offset(48) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val randSeed : Long? + get() { + val o = __offset(50) + return if(o != 0) bb.getLong(o + bb_pos) else null + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsAutoBoneSettings(_bb: ByteBuffer): AutoBoneSettings = getRootAsAutoBoneSettings(_bb, AutoBoneSettings()) + @JvmStatic + fun getRootAsAutoBoneSettings(_bb: ByteBuffer, obj: AutoBoneSettings): AutoBoneSettings { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createAutoBoneSettings(builder: FlatBufferBuilder, cursorIncrement: Int?, minDataDistance: Int?, maxDataDistance: Int?, numEpochs: Int?, printEveryNumEpochs: Int?, initialAdjustRate: Float?, adjustRateDecay: Float?, slideErrorFactor: Float?, offsetSlideErrorFactor: Float?, footHeightOffsetErrorFactor: Float?, bodyProportionErrorFactor: Float?, heightErrorFactor: Float?, positionErrorFactor: Float?, positionOffsetErrorFactor: Float?, calcInitError: Boolean?, targetHmdHeight: Float?, targetFullHeight: Float?, randomizeFrameOrder: Boolean?, scaleEachStep: Boolean?, sampleCount: Int?, sampleRateMs: Long?, saveRecordings: Boolean?, useSkeletonHeight: Boolean?, randSeed: Long?) : Int { + builder.startTable(24) + randSeed?.run { addRandSeed(builder, randSeed) } + sampleRateMs?.run { addSampleRateMs(builder, sampleRateMs) } + sampleCount?.run { addSampleCount(builder, sampleCount) } + targetFullHeight?.run { addTargetFullHeight(builder, targetFullHeight) } + targetHmdHeight?.run { addTargetHmdHeight(builder, targetHmdHeight) } + positionOffsetErrorFactor?.run { addPositionOffsetErrorFactor(builder, positionOffsetErrorFactor) } + positionErrorFactor?.run { addPositionErrorFactor(builder, positionErrorFactor) } + heightErrorFactor?.run { addHeightErrorFactor(builder, heightErrorFactor) } + bodyProportionErrorFactor?.run { addBodyProportionErrorFactor(builder, bodyProportionErrorFactor) } + footHeightOffsetErrorFactor?.run { addFootHeightOffsetErrorFactor(builder, footHeightOffsetErrorFactor) } + offsetSlideErrorFactor?.run { addOffsetSlideErrorFactor(builder, offsetSlideErrorFactor) } + slideErrorFactor?.run { addSlideErrorFactor(builder, slideErrorFactor) } + adjustRateDecay?.run { addAdjustRateDecay(builder, adjustRateDecay) } + initialAdjustRate?.run { addInitialAdjustRate(builder, initialAdjustRate) } + printEveryNumEpochs?.run { addPrintEveryNumEpochs(builder, printEveryNumEpochs) } + numEpochs?.run { addNumEpochs(builder, numEpochs) } + maxDataDistance?.run { addMaxDataDistance(builder, maxDataDistance) } + minDataDistance?.run { addMinDataDistance(builder, minDataDistance) } + cursorIncrement?.run { addCursorIncrement(builder, cursorIncrement) } + useSkeletonHeight?.run { addUseSkeletonHeight(builder, useSkeletonHeight) } + saveRecordings?.run { addSaveRecordings(builder, saveRecordings) } + scaleEachStep?.run { addScaleEachStep(builder, scaleEachStep) } + randomizeFrameOrder?.run { addRandomizeFrameOrder(builder, randomizeFrameOrder) } + calcInitError?.run { addCalcInitError(builder, calcInitError) } + return endAutoBoneSettings(builder) + } + @JvmStatic + fun startAutoBoneSettings(builder: FlatBufferBuilder) = builder.startTable(24) + @JvmStatic + fun addCursorIncrement(builder: FlatBufferBuilder, cursorIncrement: Int) = builder.addInt(0, cursorIncrement, 0) + @JvmStatic + fun addMinDataDistance(builder: FlatBufferBuilder, minDataDistance: Int) = builder.addInt(1, minDataDistance, 0) + @JvmStatic + fun addMaxDataDistance(builder: FlatBufferBuilder, maxDataDistance: Int) = builder.addInt(2, maxDataDistance, 0) + @JvmStatic + fun addNumEpochs(builder: FlatBufferBuilder, numEpochs: Int) = builder.addInt(3, numEpochs, 0) + @JvmStatic + fun addPrintEveryNumEpochs(builder: FlatBufferBuilder, printEveryNumEpochs: Int) = builder.addInt(4, printEveryNumEpochs, 0) + @JvmStatic + fun addInitialAdjustRate(builder: FlatBufferBuilder, initialAdjustRate: Float) = builder.addFloat(5, initialAdjustRate, 0.0) + @JvmStatic + fun addAdjustRateDecay(builder: FlatBufferBuilder, adjustRateDecay: Float) = builder.addFloat(6, adjustRateDecay, 0.0) + @JvmStatic + fun addSlideErrorFactor(builder: FlatBufferBuilder, slideErrorFactor: Float) = builder.addFloat(7, slideErrorFactor, 0.0) + @JvmStatic + fun addOffsetSlideErrorFactor(builder: FlatBufferBuilder, offsetSlideErrorFactor: Float) = builder.addFloat(8, offsetSlideErrorFactor, 0.0) + @JvmStatic + fun addFootHeightOffsetErrorFactor(builder: FlatBufferBuilder, footHeightOffsetErrorFactor: Float) = builder.addFloat(9, footHeightOffsetErrorFactor, 0.0) + @JvmStatic + fun addBodyProportionErrorFactor(builder: FlatBufferBuilder, bodyProportionErrorFactor: Float) = builder.addFloat(10, bodyProportionErrorFactor, 0.0) + @JvmStatic + fun addHeightErrorFactor(builder: FlatBufferBuilder, heightErrorFactor: Float) = builder.addFloat(11, heightErrorFactor, 0.0) + @JvmStatic + fun addPositionErrorFactor(builder: FlatBufferBuilder, positionErrorFactor: Float) = builder.addFloat(12, positionErrorFactor, 0.0) + @JvmStatic + fun addPositionOffsetErrorFactor(builder: FlatBufferBuilder, positionOffsetErrorFactor: Float) = builder.addFloat(13, positionOffsetErrorFactor, 0.0) + @JvmStatic + fun addCalcInitError(builder: FlatBufferBuilder, calcInitError: Boolean) = builder.addBoolean(14, calcInitError, false) + @JvmStatic + fun addTargetHmdHeight(builder: FlatBufferBuilder, targetHmdHeight: Float) = builder.addFloat(15, targetHmdHeight, 0.0) + @JvmStatic + fun addTargetFullHeight(builder: FlatBufferBuilder, targetFullHeight: Float) = builder.addFloat(16, targetFullHeight, 0.0) + @JvmStatic + fun addRandomizeFrameOrder(builder: FlatBufferBuilder, randomizeFrameOrder: Boolean) = builder.addBoolean(17, randomizeFrameOrder, false) + @JvmStatic + fun addScaleEachStep(builder: FlatBufferBuilder, scaleEachStep: Boolean) = builder.addBoolean(18, scaleEachStep, false) + @JvmStatic + fun addSampleCount(builder: FlatBufferBuilder, sampleCount: Int) = builder.addInt(19, sampleCount, 0) + @JvmStatic + fun addSampleRateMs(builder: FlatBufferBuilder, sampleRateMs: Long) = builder.addLong(20, sampleRateMs, 0) + @JvmStatic + fun addSaveRecordings(builder: FlatBufferBuilder, saveRecordings: Boolean) = builder.addBoolean(21, saveRecordings, false) + @JvmStatic + fun addUseSkeletonHeight(builder: FlatBufferBuilder, useSkeletonHeight: Boolean) = builder.addBoolean(22, useSkeletonHeight, false) + @JvmStatic + fun addRandSeed(builder: FlatBufferBuilder, randSeed: Long) = builder.addLong(23, randSeed, 0) + @JvmStatic + fun endAutoBoneSettings(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneStopRecordingRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneStopRecordingRequest.kt index 20c3fbe7..6e19be4e 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneStopRecordingRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/AutoBoneStopRecordingRequest.kt @@ -1,40 +1,40 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Stops the current recording, using it as far as it has been recorded - */ -@Suppress("unused") -class AutoBoneStopRecordingRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : AutoBoneStopRecordingRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsAutoBoneStopRecordingRequest(_bb: ByteBuffer): AutoBoneStopRecordingRequest = getRootAsAutoBoneStopRecordingRequest(_bb, AutoBoneStopRecordingRequest()) - @JvmStatic - fun getRootAsAutoBoneStopRecordingRequest(_bb: ByteBuffer, obj: AutoBoneStopRecordingRequest): AutoBoneStopRecordingRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startAutoBoneStopRecordingRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endAutoBoneStopRecordingRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Stops the current recording, using it as far as it has been recorded + */ +@Suppress("unused") +class AutoBoneStopRecordingRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : AutoBoneStopRecordingRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsAutoBoneStopRecordingRequest(_bb: ByteBuffer): AutoBoneStopRecordingRequest = getRootAsAutoBoneStopRecordingRequest(_bb, AutoBoneStopRecordingRequest()) + @JvmStatic + fun getRootAsAutoBoneStopRecordingRequest(_bb: ByteBuffer, obj: AutoBoneStopRecordingRequest): AutoBoneStopRecordingRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startAutoBoneStopRecordingRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endAutoBoneStopRecordingRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ChangeSettingsRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ChangeSettingsRequest.kt index 11d50d47..cfa3d163 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/ChangeSettingsRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ChangeSettingsRequest.kt @@ -1,162 +1,162 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class ChangeSettingsRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : ChangeSettingsRequest { - __init(_i, _bb) - return this - } - val steamVrTrackers : solarxr_protocol.rpc.SteamVRTrackersSetting? get() = steamVrTrackers(solarxr_protocol.rpc.SteamVRTrackersSetting()) - fun steamVrTrackers(obj: solarxr_protocol.rpc.SteamVRTrackersSetting) : solarxr_protocol.rpc.SteamVRTrackersSetting? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val filtering : solarxr_protocol.rpc.FilteringSettings? get() = filtering(solarxr_protocol.rpc.FilteringSettings()) - fun filtering(obj: solarxr_protocol.rpc.FilteringSettings) : solarxr_protocol.rpc.FilteringSettings? { - val o = __offset(6) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val driftCompensation : solarxr_protocol.rpc.DriftCompensationSettings? get() = driftCompensation(solarxr_protocol.rpc.DriftCompensationSettings()) - fun driftCompensation(obj: solarxr_protocol.rpc.DriftCompensationSettings) : solarxr_protocol.rpc.DriftCompensationSettings? { - val o = __offset(8) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val oscRouter : solarxr_protocol.rpc.OSCRouterSettings? get() = oscRouter(solarxr_protocol.rpc.OSCRouterSettings()) - fun oscRouter(obj: solarxr_protocol.rpc.OSCRouterSettings) : solarxr_protocol.rpc.OSCRouterSettings? { - val o = __offset(10) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val vrcOsc : solarxr_protocol.rpc.VRCOSCSettings? get() = vrcOsc(solarxr_protocol.rpc.VRCOSCSettings()) - fun vrcOsc(obj: solarxr_protocol.rpc.VRCOSCSettings) : solarxr_protocol.rpc.VRCOSCSettings? { - val o = __offset(12) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val vmcOsc : solarxr_protocol.rpc.VMCOSCSettings? get() = vmcOsc(solarxr_protocol.rpc.VMCOSCSettings()) - fun vmcOsc(obj: solarxr_protocol.rpc.VMCOSCSettings) : solarxr_protocol.rpc.VMCOSCSettings? { - val o = __offset(14) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val modelSettings : solarxr_protocol.rpc.settings.ModelSettings? get() = modelSettings(solarxr_protocol.rpc.settings.ModelSettings()) - fun modelSettings(obj: solarxr_protocol.rpc.settings.ModelSettings) : solarxr_protocol.rpc.settings.ModelSettings? { - val o = __offset(16) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val tapDetectionSettings : solarxr_protocol.rpc.TapDetectionSettings? get() = tapDetectionSettings(solarxr_protocol.rpc.TapDetectionSettings()) - fun tapDetectionSettings(obj: solarxr_protocol.rpc.TapDetectionSettings) : solarxr_protocol.rpc.TapDetectionSettings? { - val o = __offset(18) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val autoBoneSettings : solarxr_protocol.rpc.AutoBoneSettings? get() = autoBoneSettings(solarxr_protocol.rpc.AutoBoneSettings()) - fun autoBoneSettings(obj: solarxr_protocol.rpc.AutoBoneSettings) : solarxr_protocol.rpc.AutoBoneSettings? { - val o = __offset(20) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val resetsSettings : solarxr_protocol.rpc.ResetsSettings? get() = resetsSettings(solarxr_protocol.rpc.ResetsSettings()) - fun resetsSettings(obj: solarxr_protocol.rpc.ResetsSettings) : solarxr_protocol.rpc.ResetsSettings? { - val o = __offset(22) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsChangeSettingsRequest(_bb: ByteBuffer): ChangeSettingsRequest = getRootAsChangeSettingsRequest(_bb, ChangeSettingsRequest()) - @JvmStatic - fun getRootAsChangeSettingsRequest(_bb: ByteBuffer, obj: ChangeSettingsRequest): ChangeSettingsRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createChangeSettingsRequest(builder: FlatBufferBuilder, steamVrTrackersOffset: Int, filteringOffset: Int, driftCompensationOffset: Int, oscRouterOffset: Int, vrcOscOffset: Int, vmcOscOffset: Int, modelSettingsOffset: Int, tapDetectionSettingsOffset: Int, autoBoneSettingsOffset: Int, resetsSettingsOffset: Int) : Int { - builder.startTable(10) - addResetsSettings(builder, resetsSettingsOffset) - addAutoBoneSettings(builder, autoBoneSettingsOffset) - addTapDetectionSettings(builder, tapDetectionSettingsOffset) - addModelSettings(builder, modelSettingsOffset) - addVmcOsc(builder, vmcOscOffset) - addVrcOsc(builder, vrcOscOffset) - addOscRouter(builder, oscRouterOffset) - addDriftCompensation(builder, driftCompensationOffset) - addFiltering(builder, filteringOffset) - addSteamVrTrackers(builder, steamVrTrackersOffset) - return endChangeSettingsRequest(builder) - } - @JvmStatic - fun startChangeSettingsRequest(builder: FlatBufferBuilder) = builder.startTable(10) - @JvmStatic - fun addSteamVrTrackers(builder: FlatBufferBuilder, steamVrTrackers: Int) = builder.addOffset(0, steamVrTrackers, 0) - @JvmStatic - fun addFiltering(builder: FlatBufferBuilder, filtering: Int) = builder.addOffset(1, filtering, 0) - @JvmStatic - fun addDriftCompensation(builder: FlatBufferBuilder, driftCompensation: Int) = builder.addOffset(2, driftCompensation, 0) - @JvmStatic - fun addOscRouter(builder: FlatBufferBuilder, oscRouter: Int) = builder.addOffset(3, oscRouter, 0) - @JvmStatic - fun addVrcOsc(builder: FlatBufferBuilder, vrcOsc: Int) = builder.addOffset(4, vrcOsc, 0) - @JvmStatic - fun addVmcOsc(builder: FlatBufferBuilder, vmcOsc: Int) = builder.addOffset(5, vmcOsc, 0) - @JvmStatic - fun addModelSettings(builder: FlatBufferBuilder, modelSettings: Int) = builder.addOffset(6, modelSettings, 0) - @JvmStatic - fun addTapDetectionSettings(builder: FlatBufferBuilder, tapDetectionSettings: Int) = builder.addOffset(7, tapDetectionSettings, 0) - @JvmStatic - fun addAutoBoneSettings(builder: FlatBufferBuilder, autoBoneSettings: Int) = builder.addOffset(8, autoBoneSettings, 0) - @JvmStatic - fun addResetsSettings(builder: FlatBufferBuilder, resetsSettings: Int) = builder.addOffset(9, resetsSettings, 0) - @JvmStatic - fun endChangeSettingsRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class ChangeSettingsRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : ChangeSettingsRequest { + __init(_i, _bb) + return this + } + val steamVrTrackers : solarxr_protocol.rpc.SteamVRTrackersSetting? get() = steamVrTrackers(solarxr_protocol.rpc.SteamVRTrackersSetting()) + fun steamVrTrackers(obj: solarxr_protocol.rpc.SteamVRTrackersSetting) : solarxr_protocol.rpc.SteamVRTrackersSetting? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val filtering : solarxr_protocol.rpc.FilteringSettings? get() = filtering(solarxr_protocol.rpc.FilteringSettings()) + fun filtering(obj: solarxr_protocol.rpc.FilteringSettings) : solarxr_protocol.rpc.FilteringSettings? { + val o = __offset(6) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val driftCompensation : solarxr_protocol.rpc.DriftCompensationSettings? get() = driftCompensation(solarxr_protocol.rpc.DriftCompensationSettings()) + fun driftCompensation(obj: solarxr_protocol.rpc.DriftCompensationSettings) : solarxr_protocol.rpc.DriftCompensationSettings? { + val o = __offset(8) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val oscRouter : solarxr_protocol.rpc.OSCRouterSettings? get() = oscRouter(solarxr_protocol.rpc.OSCRouterSettings()) + fun oscRouter(obj: solarxr_protocol.rpc.OSCRouterSettings) : solarxr_protocol.rpc.OSCRouterSettings? { + val o = __offset(10) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val vrcOsc : solarxr_protocol.rpc.VRCOSCSettings? get() = vrcOsc(solarxr_protocol.rpc.VRCOSCSettings()) + fun vrcOsc(obj: solarxr_protocol.rpc.VRCOSCSettings) : solarxr_protocol.rpc.VRCOSCSettings? { + val o = __offset(12) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val vmcOsc : solarxr_protocol.rpc.VMCOSCSettings? get() = vmcOsc(solarxr_protocol.rpc.VMCOSCSettings()) + fun vmcOsc(obj: solarxr_protocol.rpc.VMCOSCSettings) : solarxr_protocol.rpc.VMCOSCSettings? { + val o = __offset(14) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val modelSettings : solarxr_protocol.rpc.settings.ModelSettings? get() = modelSettings(solarxr_protocol.rpc.settings.ModelSettings()) + fun modelSettings(obj: solarxr_protocol.rpc.settings.ModelSettings) : solarxr_protocol.rpc.settings.ModelSettings? { + val o = __offset(16) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val tapDetectionSettings : solarxr_protocol.rpc.TapDetectionSettings? get() = tapDetectionSettings(solarxr_protocol.rpc.TapDetectionSettings()) + fun tapDetectionSettings(obj: solarxr_protocol.rpc.TapDetectionSettings) : solarxr_protocol.rpc.TapDetectionSettings? { + val o = __offset(18) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val autoBoneSettings : solarxr_protocol.rpc.AutoBoneSettings? get() = autoBoneSettings(solarxr_protocol.rpc.AutoBoneSettings()) + fun autoBoneSettings(obj: solarxr_protocol.rpc.AutoBoneSettings) : solarxr_protocol.rpc.AutoBoneSettings? { + val o = __offset(20) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val resetsSettings : solarxr_protocol.rpc.ResetsSettings? get() = resetsSettings(solarxr_protocol.rpc.ResetsSettings()) + fun resetsSettings(obj: solarxr_protocol.rpc.ResetsSettings) : solarxr_protocol.rpc.ResetsSettings? { + val o = __offset(22) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsChangeSettingsRequest(_bb: ByteBuffer): ChangeSettingsRequest = getRootAsChangeSettingsRequest(_bb, ChangeSettingsRequest()) + @JvmStatic + fun getRootAsChangeSettingsRequest(_bb: ByteBuffer, obj: ChangeSettingsRequest): ChangeSettingsRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createChangeSettingsRequest(builder: FlatBufferBuilder, steamVrTrackersOffset: Int, filteringOffset: Int, driftCompensationOffset: Int, oscRouterOffset: Int, vrcOscOffset: Int, vmcOscOffset: Int, modelSettingsOffset: Int, tapDetectionSettingsOffset: Int, autoBoneSettingsOffset: Int, resetsSettingsOffset: Int) : Int { + builder.startTable(10) + addResetsSettings(builder, resetsSettingsOffset) + addAutoBoneSettings(builder, autoBoneSettingsOffset) + addTapDetectionSettings(builder, tapDetectionSettingsOffset) + addModelSettings(builder, modelSettingsOffset) + addVmcOsc(builder, vmcOscOffset) + addVrcOsc(builder, vrcOscOffset) + addOscRouter(builder, oscRouterOffset) + addDriftCompensation(builder, driftCompensationOffset) + addFiltering(builder, filteringOffset) + addSteamVrTrackers(builder, steamVrTrackersOffset) + return endChangeSettingsRequest(builder) + } + @JvmStatic + fun startChangeSettingsRequest(builder: FlatBufferBuilder) = builder.startTable(10) + @JvmStatic + fun addSteamVrTrackers(builder: FlatBufferBuilder, steamVrTrackers: Int) = builder.addOffset(0, steamVrTrackers, 0) + @JvmStatic + fun addFiltering(builder: FlatBufferBuilder, filtering: Int) = builder.addOffset(1, filtering, 0) + @JvmStatic + fun addDriftCompensation(builder: FlatBufferBuilder, driftCompensation: Int) = builder.addOffset(2, driftCompensation, 0) + @JvmStatic + fun addOscRouter(builder: FlatBufferBuilder, oscRouter: Int) = builder.addOffset(3, oscRouter, 0) + @JvmStatic + fun addVrcOsc(builder: FlatBufferBuilder, vrcOsc: Int) = builder.addOffset(4, vrcOsc, 0) + @JvmStatic + fun addVmcOsc(builder: FlatBufferBuilder, vmcOsc: Int) = builder.addOffset(5, vmcOsc, 0) + @JvmStatic + fun addModelSettings(builder: FlatBufferBuilder, modelSettings: Int) = builder.addOffset(6, modelSettings, 0) + @JvmStatic + fun addTapDetectionSettings(builder: FlatBufferBuilder, tapDetectionSettings: Int) = builder.addOffset(7, tapDetectionSettings, 0) + @JvmStatic + fun addAutoBoneSettings(builder: FlatBufferBuilder, autoBoneSettings: Int) = builder.addOffset(8, autoBoneSettings, 0) + @JvmStatic + fun addResetsSettings(builder: FlatBufferBuilder, resetsSettings: Int) = builder.addOffset(9, resetsSettings, 0) + @JvmStatic + fun endChangeSettingsRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ChangeSkeletonConfigRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ChangeSkeletonConfigRequest.kt index c429bbf2..f1e52413 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/ChangeSkeletonConfigRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ChangeSkeletonConfigRequest.kt @@ -1,58 +1,58 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class ChangeSkeletonConfigRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : ChangeSkeletonConfigRequest { - __init(_i, _bb) - return this - } - val bone : UByte - get() { - val o = __offset(4) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - val value : Float - get() { - val o = __offset(6) - return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsChangeSkeletonConfigRequest(_bb: ByteBuffer): ChangeSkeletonConfigRequest = getRootAsChangeSkeletonConfigRequest(_bb, ChangeSkeletonConfigRequest()) - @JvmStatic - fun getRootAsChangeSkeletonConfigRequest(_bb: ByteBuffer, obj: ChangeSkeletonConfigRequest): ChangeSkeletonConfigRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createChangeSkeletonConfigRequest(builder: FlatBufferBuilder, bone: UByte, value: Float) : Int { - builder.startTable(2) - addValue(builder, value) - addBone(builder, bone) - return endChangeSkeletonConfigRequest(builder) - } - @JvmStatic - fun startChangeSkeletonConfigRequest(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addBone(builder: FlatBufferBuilder, bone: UByte) = builder.addByte(0, bone.toByte(), 0) - @JvmStatic - fun addValue(builder: FlatBufferBuilder, value: Float) = builder.addFloat(1, value, 0.0) - @JvmStatic - fun endChangeSkeletonConfigRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class ChangeSkeletonConfigRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : ChangeSkeletonConfigRequest { + __init(_i, _bb) + return this + } + val bone : UByte + get() { + val o = __offset(4) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + val value : Float + get() { + val o = __offset(6) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsChangeSkeletonConfigRequest(_bb: ByteBuffer): ChangeSkeletonConfigRequest = getRootAsChangeSkeletonConfigRequest(_bb, ChangeSkeletonConfigRequest()) + @JvmStatic + fun getRootAsChangeSkeletonConfigRequest(_bb: ByteBuffer, obj: ChangeSkeletonConfigRequest): ChangeSkeletonConfigRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createChangeSkeletonConfigRequest(builder: FlatBufferBuilder, bone: UByte, value: Float) : Int { + builder.startTable(2) + addValue(builder, value) + addBone(builder, bone) + return endChangeSkeletonConfigRequest(builder) + } + @JvmStatic + fun startChangeSkeletonConfigRequest(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addBone(builder: FlatBufferBuilder, bone: UByte) = builder.addByte(0, bone.toByte(), 0) + @JvmStatic + fun addValue(builder: FlatBufferBuilder, value: Float) = builder.addFloat(1, value, 0.0) + @JvmStatic + fun endChangeSkeletonConfigRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ClearDriftCompensationRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ClearDriftCompensationRequest.kt index c81fa0e4..3fbbb305 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/ClearDriftCompensationRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ClearDriftCompensationRequest.kt @@ -1,37 +1,37 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class ClearDriftCompensationRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : ClearDriftCompensationRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsClearDriftCompensationRequest(_bb: ByteBuffer): ClearDriftCompensationRequest = getRootAsClearDriftCompensationRequest(_bb, ClearDriftCompensationRequest()) - @JvmStatic - fun getRootAsClearDriftCompensationRequest(_bb: ByteBuffer, obj: ClearDriftCompensationRequest): ClearDriftCompensationRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startClearDriftCompensationRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endClearDriftCompensationRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class ClearDriftCompensationRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : ClearDriftCompensationRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsClearDriftCompensationRequest(_bb: ByteBuffer): ClearDriftCompensationRequest = getRootAsClearDriftCompensationRequest(_bb, ClearDriftCompensationRequest()) + @JvmStatic + fun getRootAsClearDriftCompensationRequest(_bb: ByteBuffer, obj: ClearDriftCompensationRequest): ClearDriftCompensationRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startClearDriftCompensationRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endClearDriftCompensationRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ClearMountingResetRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ClearMountingResetRequest.kt index 49b6d9e4..8c30a9c8 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/ClearMountingResetRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ClearMountingResetRequest.kt @@ -1,40 +1,40 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Clears mounting reset data, defaulting to the manually set mounting orientations - */ -@Suppress("unused") -class ClearMountingResetRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : ClearMountingResetRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsClearMountingResetRequest(_bb: ByteBuffer): ClearMountingResetRequest = getRootAsClearMountingResetRequest(_bb, ClearMountingResetRequest()) - @JvmStatic - fun getRootAsClearMountingResetRequest(_bb: ByteBuffer, obj: ClearMountingResetRequest): ClearMountingResetRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startClearMountingResetRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endClearMountingResetRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Clears mounting reset data, defaulting to the manually set mounting orientations + */ +@Suppress("unused") +class ClearMountingResetRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : ClearMountingResetRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsClearMountingResetRequest(_bb: ByteBuffer): ClearMountingResetRequest = getRootAsClearMountingResetRequest(_bb, ClearMountingResetRequest()) + @JvmStatic + fun getRootAsClearMountingResetRequest(_bb: ByteBuffer, obj: ClearMountingResetRequest): ClearMountingResetRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startClearMountingResetRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endClearMountingResetRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/CloseSerialRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/CloseSerialRequest.kt index c1bd9a19..e0129a0a 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/CloseSerialRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/CloseSerialRequest.kt @@ -1,37 +1,37 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class CloseSerialRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : CloseSerialRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsCloseSerialRequest(_bb: ByteBuffer): CloseSerialRequest = getRootAsCloseSerialRequest(_bb, CloseSerialRequest()) - @JvmStatic - fun getRootAsCloseSerialRequest(_bb: ByteBuffer, obj: CloseSerialRequest): CloseSerialRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startCloseSerialRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endCloseSerialRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class CloseSerialRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : CloseSerialRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsCloseSerialRequest(_bb: ByteBuffer): CloseSerialRequest = getRootAsCloseSerialRequest(_bb, CloseSerialRequest()) + @JvmStatic + fun getRootAsCloseSerialRequest(_bb: ByteBuffer, obj: CloseSerialRequest): CloseSerialRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startCloseSerialRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endCloseSerialRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ComputerDirectory.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ComputerDirectory.kt index 91540aa3..26cdd6fd 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/ComputerDirectory.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ComputerDirectory.kt @@ -1,16 +1,16 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -/** - * Common folders often used in computers for storing files - */ -@Suppress("unused") -class ComputerDirectory private constructor() { - companion object { - const val Documents: UByte = 0u - val names : Array = arrayOf("Documents") - @JvmStatic - fun name(e: Int) : String = names[e] - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +/** + * Common folders often used in computers for storing files + */ +@Suppress("unused") +class ComputerDirectory private constructor() { + companion object { + const val Documents: UByte = 0u + val names : Array = arrayOf("Documents") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/DriftCompensationSettings.kt b/protocol/kotlin/src/solarxr_protocol/rpc/DriftCompensationSettings.kt index 587f3005..2f70b18a 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/DriftCompensationSettings.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/DriftCompensationSettings.kt @@ -1,75 +1,75 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Settings related to IMU yaw drift compensation - */ -@Suppress("unused") -class DriftCompensationSettings : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : DriftCompensationSettings { - __init(_i, _bb) - return this - } - val enabled : Boolean - get() { - val o = __offset(4) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - /** - * 0 to 1. A higher value results in more yaw drift compensation - */ - val amount : Float - get() { - val o = __offset(6) - return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f - } - /** - * Number of previous resets to take into account when calculating yaw drift - */ - val maxResets : UShort - get() { - val o = __offset(8) - return if(o != 0) bb.getShort(o + bb_pos).toUShort() else 0u - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsDriftCompensationSettings(_bb: ByteBuffer): DriftCompensationSettings = getRootAsDriftCompensationSettings(_bb, DriftCompensationSettings()) - @JvmStatic - fun getRootAsDriftCompensationSettings(_bb: ByteBuffer, obj: DriftCompensationSettings): DriftCompensationSettings { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createDriftCompensationSettings(builder: FlatBufferBuilder, enabled: Boolean, amount: Float, maxResets: UShort) : Int { - builder.startTable(3) - addAmount(builder, amount) - addMaxResets(builder, maxResets) - addEnabled(builder, enabled) - return endDriftCompensationSettings(builder) - } - @JvmStatic - fun startDriftCompensationSettings(builder: FlatBufferBuilder) = builder.startTable(3) - @JvmStatic - fun addEnabled(builder: FlatBufferBuilder, enabled: Boolean) = builder.addBoolean(0, enabled, false) - @JvmStatic - fun addAmount(builder: FlatBufferBuilder, amount: Float) = builder.addFloat(1, amount, 0.0) - @JvmStatic - fun addMaxResets(builder: FlatBufferBuilder, maxResets: UShort) = builder.addShort(2, maxResets.toShort(), 0) - @JvmStatic - fun endDriftCompensationSettings(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Settings related to IMU yaw drift compensation + */ +@Suppress("unused") +class DriftCompensationSettings : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : DriftCompensationSettings { + __init(_i, _bb) + return this + } + val enabled : Boolean + get() { + val o = __offset(4) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + /** + * 0 to 1. A higher value results in more yaw drift compensation + */ + val amount : Float + get() { + val o = __offset(6) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + /** + * Number of previous resets to take into account when calculating yaw drift + */ + val maxResets : UShort + get() { + val o = __offset(8) + return if(o != 0) bb.getShort(o + bb_pos).toUShort() else 0u + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsDriftCompensationSettings(_bb: ByteBuffer): DriftCompensationSettings = getRootAsDriftCompensationSettings(_bb, DriftCompensationSettings()) + @JvmStatic + fun getRootAsDriftCompensationSettings(_bb: ByteBuffer, obj: DriftCompensationSettings): DriftCompensationSettings { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createDriftCompensationSettings(builder: FlatBufferBuilder, enabled: Boolean, amount: Float, maxResets: UShort) : Int { + builder.startTable(3) + addAmount(builder, amount) + addMaxResets(builder, maxResets) + addEnabled(builder, enabled) + return endDriftCompensationSettings(builder) + } + @JvmStatic + fun startDriftCompensationSettings(builder: FlatBufferBuilder) = builder.startTable(3) + @JvmStatic + fun addEnabled(builder: FlatBufferBuilder, enabled: Boolean) = builder.addBoolean(0, enabled, false) + @JvmStatic + fun addAmount(builder: FlatBufferBuilder, amount: Float) = builder.addFloat(1, amount, 0.0) + @JvmStatic + fun addMaxResets(builder: FlatBufferBuilder, maxResets: UShort) = builder.addShort(2, maxResets.toShort(), 0) + @JvmStatic + fun endDriftCompensationSettings(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/FilteringSettings.kt b/protocol/kotlin/src/solarxr_protocol/rpc/FilteringSettings.kt index c2bd3e37..f25befb2 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/FilteringSettings.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/FilteringSettings.kt @@ -1,61 +1,61 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class FilteringSettings : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : FilteringSettings { - __init(_i, _bb) - return this - } - val type : UByte - get() { - val o = __offset(4) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - /** - * 0 to 1. A higher value results in more smoothing or prediction - */ - val amount : Float - get() { - val o = __offset(6) - return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsFilteringSettings(_bb: ByteBuffer): FilteringSettings = getRootAsFilteringSettings(_bb, FilteringSettings()) - @JvmStatic - fun getRootAsFilteringSettings(_bb: ByteBuffer, obj: FilteringSettings): FilteringSettings { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createFilteringSettings(builder: FlatBufferBuilder, type: UByte, amount: Float) : Int { - builder.startTable(2) - addAmount(builder, amount) - addType(builder, type) - return endFilteringSettings(builder) - } - @JvmStatic - fun startFilteringSettings(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addType(builder: FlatBufferBuilder, type: UByte) = builder.addByte(0, type.toByte(), 0) - @JvmStatic - fun addAmount(builder: FlatBufferBuilder, amount: Float) = builder.addFloat(1, amount, 0.0) - @JvmStatic - fun endFilteringSettings(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class FilteringSettings : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : FilteringSettings { + __init(_i, _bb) + return this + } + val type : UByte + get() { + val o = __offset(4) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + /** + * 0 to 1. A higher value results in more smoothing or prediction + */ + val amount : Float + get() { + val o = __offset(6) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsFilteringSettings(_bb: ByteBuffer): FilteringSettings = getRootAsFilteringSettings(_bb, FilteringSettings()) + @JvmStatic + fun getRootAsFilteringSettings(_bb: ByteBuffer, obj: FilteringSettings): FilteringSettings { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createFilteringSettings(builder: FlatBufferBuilder, type: UByte, amount: Float) : Int { + builder.startTable(2) + addAmount(builder, amount) + addType(builder, type) + return endFilteringSettings(builder) + } + @JvmStatic + fun startFilteringSettings(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addType(builder: FlatBufferBuilder, type: UByte) = builder.addByte(0, type.toByte(), 0) + @JvmStatic + fun addAmount(builder: FlatBufferBuilder, amount: Float) = builder.addFloat(1, amount, 0.0) + @JvmStatic + fun endFilteringSettings(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/FirmwarePart.kt b/protocol/kotlin/src/solarxr_protocol/rpc/FirmwarePart.kt new file mode 100644 index 00000000..b8582e2f --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/FirmwarePart.kt @@ -0,0 +1,67 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class FirmwarePart : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : FirmwarePart { + __init(_i, _bb) + return this + } + /** + * Url of the firmware bin to download + */ + val url : String? + get() { + val o = __offset(4) + return if (o != 0) __string(o + bb_pos) else null + } + val urlAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun urlInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + /** + * Offset of the firmware, used when flashing to the mcu, it indicates where to write this file in memory + * Will be ignored in the case of OTA flashing + */ + val offset : UInt + get() { + val o = __offset(6) + return if(o != 0) bb.getInt(o + bb_pos).toUInt() else 0u + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsFirmwarePart(_bb: ByteBuffer): FirmwarePart = getRootAsFirmwarePart(_bb, FirmwarePart()) + @JvmStatic + fun getRootAsFirmwarePart(_bb: ByteBuffer, obj: FirmwarePart): FirmwarePart { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createFirmwarePart(builder: FlatBufferBuilder, urlOffset: Int, offset: UInt) : Int { + builder.startTable(2) + addOffset(builder, offset) + addUrl(builder, urlOffset) + return endFirmwarePart(builder) + } + @JvmStatic + fun startFirmwarePart(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addUrl(builder: FlatBufferBuilder, url: Int) = builder.addOffset(0, url, 0) + @JvmStatic + fun addOffset(builder: FlatBufferBuilder, offset: UInt) = builder.addInt(1, offset.toInt(), 0) + @JvmStatic + fun endFirmwarePart(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/FirmwareUpdateDeviceId.kt b/protocol/kotlin/src/solarxr_protocol/rpc/FirmwareUpdateDeviceId.kt new file mode 100644 index 00000000..29f1610e --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/FirmwareUpdateDeviceId.kt @@ -0,0 +1,15 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +@Suppress("unused") +class FirmwareUpdateDeviceId private constructor() { + companion object { + const val NONE: UByte = 0u + const val solarxrProtocolDatatypesDeviceIdTable: UByte = 1u + const val SerialDevicePort: UByte = 2u + val names : Array = arrayOf("NONE", "solarxr_protocol_datatypes_DeviceIdTable", "SerialDevicePort") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/FirmwareUpdateMethod.kt b/protocol/kotlin/src/solarxr_protocol/rpc/FirmwareUpdateMethod.kt new file mode 100644 index 00000000..f9cfb075 --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/FirmwareUpdateMethod.kt @@ -0,0 +1,15 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +@Suppress("unused") +class FirmwareUpdateMethod private constructor() { + companion object { + const val NONE: UByte = 0u + const val OTAFirmwareUpdate: UByte = 1u + const val SerialFirmwareUpdate: UByte = 2u + val names : Array = arrayOf("NONE", "OTAFirmwareUpdate", "SerialFirmwareUpdate") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/FirmwareUpdateRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/FirmwareUpdateRequest.kt new file mode 100644 index 00000000..d6320fdb --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/FirmwareUpdateRequest.kt @@ -0,0 +1,56 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class FirmwareUpdateRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : FirmwareUpdateRequest { + __init(_i, _bb) + return this + } + val methodType : UByte + get() { + val o = __offset(4) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + fun method(obj: Table) : Table? { + val o = __offset(6); return if (o != 0) __union(obj, o + bb_pos) else null + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsFirmwareUpdateRequest(_bb: ByteBuffer): FirmwareUpdateRequest = getRootAsFirmwareUpdateRequest(_bb, FirmwareUpdateRequest()) + @JvmStatic + fun getRootAsFirmwareUpdateRequest(_bb: ByteBuffer, obj: FirmwareUpdateRequest): FirmwareUpdateRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createFirmwareUpdateRequest(builder: FlatBufferBuilder, methodType: UByte, methodOffset: Int) : Int { + builder.startTable(2) + addMethod(builder, methodOffset) + addMethodType(builder, methodType) + return endFirmwareUpdateRequest(builder) + } + @JvmStatic + fun startFirmwareUpdateRequest(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addMethodType(builder: FlatBufferBuilder, methodType: UByte) = builder.addByte(0, methodType.toByte(), 0) + @JvmStatic + fun addMethod(builder: FlatBufferBuilder, method: Int) = builder.addOffset(1, method, 0) + @JvmStatic + fun endFirmwareUpdateRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/FirmwareUpdateStatus.kt b/protocol/kotlin/src/solarxr_protocol/rpc/FirmwareUpdateStatus.kt new file mode 100644 index 00000000..c663f678 --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/FirmwareUpdateStatus.kt @@ -0,0 +1,72 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +@Suppress("unused") +class FirmwareUpdateStatus private constructor() { + companion object { + /** + * The server is downloading the firmware + */ + const val DOWNLOADING: UByte = 0u + /** + * The server is waiting for the tracker to be rebooted by the user + * Note that is is not the same as REBOOTING + */ + const val NEEDMANUALREBOOT: UByte = 1u + /** + * The server tries to authenticate with the MCU + */ + const val AUTHENTICATING: UByte = 2u + /** + * The server is uploading the firmware to the Device + */ + const val UPLOADING: UByte = 3u + /** + * The serial flasher tries to sync with the MCU + * You can use this event to prompt the user to press the boot btn + */ + const val SYNCINGWITHMCU: UByte = 4u + /** + * The MCU is rebooting + */ + const val REBOOTING: UByte = 5u + /** + * The server is provisioning the tracker + */ + const val PROVISIONING: UByte = 6u + const val DONE: UByte = 7u + /** + * Could not find the device + */ + const val ERRORDEVICENOTFOUND: UByte = 8u + /** + * The operation timed out, > 1min + */ + const val ERRORTIMEOUT: UByte = 9u + /** + * The firmware download failed + */ + const val ERRORDOWNLOADFAILED: UByte = 10u + /** + * The server could not authenticate with the MCU + */ + const val ERRORAUTHENTICATIONFAILED: UByte = 11u + /** + * Could not upload the firmware to the MUC + */ + const val ERRORUPLOADFAILED: UByte = 12u + /** + * The provision of the tracker failed, usually wifi credentials + */ + const val ERRORPROVISIONINGFAILED: UByte = 13u + /** + * An unsupported Flashing method was used + */ + const val ERRORUNSUPPORTEDMETHOD: UByte = 14u + const val ERRORUNKNOWN: UByte = 15u + val names : Array = arrayOf("DOWNLOADING", "NEED_MANUAL_REBOOT", "AUTHENTICATING", "UPLOADING", "SYNCING_WITH_MCU", "REBOOTING", "PROVISIONING", "DONE", "ERROR_DEVICE_NOT_FOUND", "ERROR_TIMEOUT", "ERROR_DOWNLOAD_FAILED", "ERROR_AUTHENTICATION_FAILED", "ERROR_UPLOAD_FAILED", "ERROR_PROVISIONING_FAILED", "ERROR_UNSUPPORTED_METHOD", "ERROR_UNKNOWN") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/FirmwareUpdateStatusResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/FirmwareUpdateStatusResponse.kt new file mode 100644 index 00000000..23cdcb78 --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/FirmwareUpdateStatusResponse.kt @@ -0,0 +1,75 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class FirmwareUpdateStatusResponse : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : FirmwareUpdateStatusResponse { + __init(_i, _bb) + return this + } + val deviceIdType : UByte + get() { + val o = __offset(4) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + fun deviceId(obj: Table) : Table? { + val o = __offset(6); return if (o != 0) __union(obj, o + bb_pos) else null + } + val status : UByte + get() { + val o = __offset(8) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + /** + * from 0 to 100 + */ + val progress : Byte + get() { + val o = __offset(10) + return if(o != 0) bb.get(o + bb_pos) else 0 + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsFirmwareUpdateStatusResponse(_bb: ByteBuffer): FirmwareUpdateStatusResponse = getRootAsFirmwareUpdateStatusResponse(_bb, FirmwareUpdateStatusResponse()) + @JvmStatic + fun getRootAsFirmwareUpdateStatusResponse(_bb: ByteBuffer, obj: FirmwareUpdateStatusResponse): FirmwareUpdateStatusResponse { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createFirmwareUpdateStatusResponse(builder: FlatBufferBuilder, deviceIdType: UByte, deviceIdOffset: Int, status: UByte, progress: Byte) : Int { + builder.startTable(4) + addDeviceId(builder, deviceIdOffset) + addProgress(builder, progress) + addStatus(builder, status) + addDeviceIdType(builder, deviceIdType) + return endFirmwareUpdateStatusResponse(builder) + } + @JvmStatic + fun startFirmwareUpdateStatusResponse(builder: FlatBufferBuilder) = builder.startTable(4) + @JvmStatic + fun addDeviceIdType(builder: FlatBufferBuilder, deviceIdType: UByte) = builder.addByte(0, deviceIdType.toByte(), 0) + @JvmStatic + fun addDeviceId(builder: FlatBufferBuilder, deviceId: Int) = builder.addOffset(1, deviceId, 0) + @JvmStatic + fun addStatus(builder: FlatBufferBuilder, status: UByte) = builder.addByte(2, status.toByte(), 0) + @JvmStatic + fun addProgress(builder: FlatBufferBuilder, progress: Byte) = builder.addByte(3, progress, 0) + @JvmStatic + fun endFirmwareUpdateStatusResponse(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/FirmwareUpdateStopQueuesRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/FirmwareUpdateStopQueuesRequest.kt new file mode 100644 index 00000000..53e928de --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/FirmwareUpdateStopQueuesRequest.kt @@ -0,0 +1,37 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class FirmwareUpdateStopQueuesRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : FirmwareUpdateStopQueuesRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsFirmwareUpdateStopQueuesRequest(_bb: ByteBuffer): FirmwareUpdateStopQueuesRequest = getRootAsFirmwareUpdateStopQueuesRequest(_bb, FirmwareUpdateStopQueuesRequest()) + @JvmStatic + fun getRootAsFirmwareUpdateStopQueuesRequest(_bb: ByteBuffer, obj: FirmwareUpdateStopQueuesRequest): FirmwareUpdateStopQueuesRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startFirmwareUpdateStopQueuesRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endFirmwareUpdateStopQueuesRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ForgetDeviceRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ForgetDeviceRequest.kt index 5060d710..e1d67baa 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/ForgetDeviceRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ForgetDeviceRequest.kt @@ -1,52 +1,52 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class ForgetDeviceRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : ForgetDeviceRequest { - __init(_i, _bb) - return this - } - val macAddress : String? - get() { - val o = __offset(4) - return if (o != 0) __string(o + bb_pos) else null - } - val macAddressAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) - fun macAddressInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsForgetDeviceRequest(_bb: ByteBuffer): ForgetDeviceRequest = getRootAsForgetDeviceRequest(_bb, ForgetDeviceRequest()) - @JvmStatic - fun getRootAsForgetDeviceRequest(_bb: ByteBuffer, obj: ForgetDeviceRequest): ForgetDeviceRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createForgetDeviceRequest(builder: FlatBufferBuilder, macAddressOffset: Int) : Int { - builder.startTable(1) - addMacAddress(builder, macAddressOffset) - return endForgetDeviceRequest(builder) - } - @JvmStatic - fun startForgetDeviceRequest(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addMacAddress(builder: FlatBufferBuilder, macAddress: Int) = builder.addOffset(0, macAddress, 0) - @JvmStatic - fun endForgetDeviceRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class ForgetDeviceRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : ForgetDeviceRequest { + __init(_i, _bb) + return this + } + val macAddress : String? + get() { + val o = __offset(4) + return if (o != 0) __string(o + bb_pos) else null + } + val macAddressAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun macAddressInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsForgetDeviceRequest(_bb: ByteBuffer): ForgetDeviceRequest = getRootAsForgetDeviceRequest(_bb, ForgetDeviceRequest()) + @JvmStatic + fun getRootAsForgetDeviceRequest(_bb: ByteBuffer, obj: ForgetDeviceRequest): ForgetDeviceRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createForgetDeviceRequest(builder: FlatBufferBuilder, macAddressOffset: Int) : Int { + builder.startTable(1) + addMacAddress(builder, macAddressOffset) + return endForgetDeviceRequest(builder) + } + @JvmStatic + fun startForgetDeviceRequest(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addMacAddress(builder: FlatBufferBuilder, macAddress: Int) = builder.addOffset(0, macAddress, 0) + @JvmStatic + fun endForgetDeviceRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/HeartbeatRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/HeartbeatRequest.kt index 09b71013..f6440c58 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/HeartbeatRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/HeartbeatRequest.kt @@ -1,37 +1,37 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class HeartbeatRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : HeartbeatRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsHeartbeatRequest(_bb: ByteBuffer): HeartbeatRequest = getRootAsHeartbeatRequest(_bb, HeartbeatRequest()) - @JvmStatic - fun getRootAsHeartbeatRequest(_bb: ByteBuffer, obj: HeartbeatRequest): HeartbeatRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startHeartbeatRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endHeartbeatRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class HeartbeatRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : HeartbeatRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsHeartbeatRequest(_bb: ByteBuffer): HeartbeatRequest = getRootAsHeartbeatRequest(_bb, HeartbeatRequest()) + @JvmStatic + fun getRootAsHeartbeatRequest(_bb: ByteBuffer, obj: HeartbeatRequest): HeartbeatRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startHeartbeatRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endHeartbeatRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/HeartbeatResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/HeartbeatResponse.kt index 8ddc4c2d..1e7d71cf 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/HeartbeatResponse.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/HeartbeatResponse.kt @@ -1,37 +1,37 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class HeartbeatResponse : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : HeartbeatResponse { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsHeartbeatResponse(_bb: ByteBuffer): HeartbeatResponse = getRootAsHeartbeatResponse(_bb, HeartbeatResponse()) - @JvmStatic - fun getRootAsHeartbeatResponse(_bb: ByteBuffer, obj: HeartbeatResponse): HeartbeatResponse { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startHeartbeatResponse(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endHeartbeatResponse(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class HeartbeatResponse : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : HeartbeatResponse { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsHeartbeatResponse(_bb: ByteBuffer): HeartbeatResponse = getRootAsHeartbeatResponse(_bb, HeartbeatResponse()) + @JvmStatic + fun getRootAsHeartbeatResponse(_bb: ByteBuffer, obj: HeartbeatResponse): HeartbeatResponse { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startHeartbeatResponse(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endHeartbeatResponse(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/HeightRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/HeightRequest.kt index f7305eab..8f062102 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/HeightRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/HeightRequest.kt @@ -1,37 +1,37 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class HeightRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : HeightRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsHeightRequest(_bb: ByteBuffer): HeightRequest = getRootAsHeightRequest(_bb, HeightRequest()) - @JvmStatic - fun getRootAsHeightRequest(_bb: ByteBuffer, obj: HeightRequest): HeightRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startHeightRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endHeightRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class HeightRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : HeightRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsHeightRequest(_bb: ByteBuffer): HeightRequest = getRootAsHeightRequest(_bb, HeightRequest()) + @JvmStatic + fun getRootAsHeightRequest(_bb: ByteBuffer, obj: HeightRequest): HeightRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startHeightRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endHeightRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/HeightResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/HeightResponse.kt index d907446e..41f1c7a5 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/HeightResponse.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/HeightResponse.kt @@ -1,61 +1,61 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Returns the current HMD height and returns an estimated full height (user height) - */ -@Suppress("unused") -class HeightResponse : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : HeightResponse { - __init(_i, _bb) - return this - } - val hmdHeight : Float - get() { - val o = __offset(4) - return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f - } - val estimatedFullHeight : Float - get() { - val o = __offset(6) - return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsHeightResponse(_bb: ByteBuffer): HeightResponse = getRootAsHeightResponse(_bb, HeightResponse()) - @JvmStatic - fun getRootAsHeightResponse(_bb: ByteBuffer, obj: HeightResponse): HeightResponse { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createHeightResponse(builder: FlatBufferBuilder, hmdHeight: Float, estimatedFullHeight: Float) : Int { - builder.startTable(2) - addEstimatedFullHeight(builder, estimatedFullHeight) - addHmdHeight(builder, hmdHeight) - return endHeightResponse(builder) - } - @JvmStatic - fun startHeightResponse(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addHmdHeight(builder: FlatBufferBuilder, hmdHeight: Float) = builder.addFloat(0, hmdHeight, 0.0) - @JvmStatic - fun addEstimatedFullHeight(builder: FlatBufferBuilder, estimatedFullHeight: Float) = builder.addFloat(1, estimatedFullHeight, 0.0) - @JvmStatic - fun endHeightResponse(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Returns the current HMD height and returns an estimated full height (user height) + */ +@Suppress("unused") +class HeightResponse : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : HeightResponse { + __init(_i, _bb) + return this + } + val hmdHeight : Float + get() { + val o = __offset(4) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + val estimatedFullHeight : Float + get() { + val o = __offset(6) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsHeightResponse(_bb: ByteBuffer): HeightResponse = getRootAsHeightResponse(_bb, HeightResponse()) + @JvmStatic + fun getRootAsHeightResponse(_bb: ByteBuffer, obj: HeightResponse): HeightResponse { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createHeightResponse(builder: FlatBufferBuilder, hmdHeight: Float, estimatedFullHeight: Float) : Int { + builder.startTable(2) + addEstimatedFullHeight(builder, estimatedFullHeight) + addHmdHeight(builder, hmdHeight) + return endHeightResponse(builder) + } + @JvmStatic + fun startHeightResponse(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addHmdHeight(builder: FlatBufferBuilder, hmdHeight: Float) = builder.addFloat(0, hmdHeight, 0.0) + @JvmStatic + fun addEstimatedFullHeight(builder: FlatBufferBuilder, estimatedFullHeight: Float) = builder.addFloat(1, estimatedFullHeight, 0.0) + @JvmStatic + fun endHeightResponse(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/LegTweaksTmpChange.kt b/protocol/kotlin/src/solarxr_protocol/rpc/LegTweaksTmpChange.kt index 39319711..8b865e66 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/LegTweaksTmpChange.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/LegTweaksTmpChange.kt @@ -1,78 +1,78 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Makes a temporary change to legtweaks. This is not saved to disk, and can be - * cleared with `LegTweaksTmpClear` - */ -@Suppress("unused") -class LegTweaksTmpChange : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : LegTweaksTmpChange { - __init(_i, _bb) - return this - } - val floorClip : Boolean? - get() { - val o = __offset(4) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val skatingCorrection : Boolean? - get() { - val o = __offset(6) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val toeSnap : Boolean? - get() { - val o = __offset(8) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val footPlant : Boolean? - get() { - val o = __offset(10) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsLegTweaksTmpChange(_bb: ByteBuffer): LegTweaksTmpChange = getRootAsLegTweaksTmpChange(_bb, LegTweaksTmpChange()) - @JvmStatic - fun getRootAsLegTweaksTmpChange(_bb: ByteBuffer, obj: LegTweaksTmpChange): LegTweaksTmpChange { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createLegTweaksTmpChange(builder: FlatBufferBuilder, floorClip: Boolean?, skatingCorrection: Boolean?, toeSnap: Boolean?, footPlant: Boolean?) : Int { - builder.startTable(4) - footPlant?.run { addFootPlant(builder, footPlant) } - toeSnap?.run { addToeSnap(builder, toeSnap) } - skatingCorrection?.run { addSkatingCorrection(builder, skatingCorrection) } - floorClip?.run { addFloorClip(builder, floorClip) } - return endLegTweaksTmpChange(builder) - } - @JvmStatic - fun startLegTweaksTmpChange(builder: FlatBufferBuilder) = builder.startTable(4) - @JvmStatic - fun addFloorClip(builder: FlatBufferBuilder, floorClip: Boolean) = builder.addBoolean(0, floorClip, false) - @JvmStatic - fun addSkatingCorrection(builder: FlatBufferBuilder, skatingCorrection: Boolean) = builder.addBoolean(1, skatingCorrection, false) - @JvmStatic - fun addToeSnap(builder: FlatBufferBuilder, toeSnap: Boolean) = builder.addBoolean(2, toeSnap, false) - @JvmStatic - fun addFootPlant(builder: FlatBufferBuilder, footPlant: Boolean) = builder.addBoolean(3, footPlant, false) - @JvmStatic - fun endLegTweaksTmpChange(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Makes a temporary change to legtweaks. This is not saved to disk, and can be + * cleared with `LegTweaksTmpClear` + */ +@Suppress("unused") +class LegTweaksTmpChange : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : LegTweaksTmpChange { + __init(_i, _bb) + return this + } + val floorClip : Boolean? + get() { + val o = __offset(4) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val skatingCorrection : Boolean? + get() { + val o = __offset(6) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val toeSnap : Boolean? + get() { + val o = __offset(8) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val footPlant : Boolean? + get() { + val o = __offset(10) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsLegTweaksTmpChange(_bb: ByteBuffer): LegTweaksTmpChange = getRootAsLegTweaksTmpChange(_bb, LegTweaksTmpChange()) + @JvmStatic + fun getRootAsLegTweaksTmpChange(_bb: ByteBuffer, obj: LegTweaksTmpChange): LegTweaksTmpChange { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createLegTweaksTmpChange(builder: FlatBufferBuilder, floorClip: Boolean?, skatingCorrection: Boolean?, toeSnap: Boolean?, footPlant: Boolean?) : Int { + builder.startTable(4) + footPlant?.run { addFootPlant(builder, footPlant) } + toeSnap?.run { addToeSnap(builder, toeSnap) } + skatingCorrection?.run { addSkatingCorrection(builder, skatingCorrection) } + floorClip?.run { addFloorClip(builder, floorClip) } + return endLegTweaksTmpChange(builder) + } + @JvmStatic + fun startLegTweaksTmpChange(builder: FlatBufferBuilder) = builder.startTable(4) + @JvmStatic + fun addFloorClip(builder: FlatBufferBuilder, floorClip: Boolean) = builder.addBoolean(0, floorClip, false) + @JvmStatic + fun addSkatingCorrection(builder: FlatBufferBuilder, skatingCorrection: Boolean) = builder.addBoolean(1, skatingCorrection, false) + @JvmStatic + fun addToeSnap(builder: FlatBufferBuilder, toeSnap: Boolean) = builder.addBoolean(2, toeSnap, false) + @JvmStatic + fun addFootPlant(builder: FlatBufferBuilder, footPlant: Boolean) = builder.addBoolean(3, footPlant, false) + @JvmStatic + fun endLegTweaksTmpChange(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/LegTweaksTmpClear.kt b/protocol/kotlin/src/solarxr_protocol/rpc/LegTweaksTmpClear.kt index 9e935a29..01a2be83 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/LegTweaksTmpClear.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/LegTweaksTmpClear.kt @@ -1,78 +1,78 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Clears the legtweaks temprorary state back to what the config has. - * Setting a field to `true` will reset that field. - */ -@Suppress("unused") -class LegTweaksTmpClear : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : LegTweaksTmpClear { - __init(_i, _bb) - return this - } - val floorClip : Boolean - get() { - val o = __offset(4) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val skatingCorrection : Boolean - get() { - val o = __offset(6) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val toeSnap : Boolean - get() { - val o = __offset(8) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val footPlant : Boolean - get() { - val o = __offset(10) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsLegTweaksTmpClear(_bb: ByteBuffer): LegTweaksTmpClear = getRootAsLegTweaksTmpClear(_bb, LegTweaksTmpClear()) - @JvmStatic - fun getRootAsLegTweaksTmpClear(_bb: ByteBuffer, obj: LegTweaksTmpClear): LegTweaksTmpClear { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createLegTweaksTmpClear(builder: FlatBufferBuilder, floorClip: Boolean, skatingCorrection: Boolean, toeSnap: Boolean, footPlant: Boolean) : Int { - builder.startTable(4) - addFootPlant(builder, footPlant) - addToeSnap(builder, toeSnap) - addSkatingCorrection(builder, skatingCorrection) - addFloorClip(builder, floorClip) - return endLegTweaksTmpClear(builder) - } - @JvmStatic - fun startLegTweaksTmpClear(builder: FlatBufferBuilder) = builder.startTable(4) - @JvmStatic - fun addFloorClip(builder: FlatBufferBuilder, floorClip: Boolean) = builder.addBoolean(0, floorClip, false) - @JvmStatic - fun addSkatingCorrection(builder: FlatBufferBuilder, skatingCorrection: Boolean) = builder.addBoolean(1, skatingCorrection, false) - @JvmStatic - fun addToeSnap(builder: FlatBufferBuilder, toeSnap: Boolean) = builder.addBoolean(2, toeSnap, false) - @JvmStatic - fun addFootPlant(builder: FlatBufferBuilder, footPlant: Boolean) = builder.addBoolean(3, footPlant, false) - @JvmStatic - fun endLegTweaksTmpClear(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Clears the legtweaks temprorary state back to what the config has. + * Setting a field to `true` will reset that field. + */ +@Suppress("unused") +class LegTweaksTmpClear : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : LegTweaksTmpClear { + __init(_i, _bb) + return this + } + val floorClip : Boolean + get() { + val o = __offset(4) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val skatingCorrection : Boolean + get() { + val o = __offset(6) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val toeSnap : Boolean + get() { + val o = __offset(8) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val footPlant : Boolean + get() { + val o = __offset(10) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsLegTweaksTmpClear(_bb: ByteBuffer): LegTweaksTmpClear = getRootAsLegTweaksTmpClear(_bb, LegTweaksTmpClear()) + @JvmStatic + fun getRootAsLegTweaksTmpClear(_bb: ByteBuffer, obj: LegTweaksTmpClear): LegTweaksTmpClear { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createLegTweaksTmpClear(builder: FlatBufferBuilder, floorClip: Boolean, skatingCorrection: Boolean, toeSnap: Boolean, footPlant: Boolean) : Int { + builder.startTable(4) + addFootPlant(builder, footPlant) + addToeSnap(builder, toeSnap) + addSkatingCorrection(builder, skatingCorrection) + addFloorClip(builder, floorClip) + return endLegTweaksTmpClear(builder) + } + @JvmStatic + fun startLegTweaksTmpClear(builder: FlatBufferBuilder) = builder.startTable(4) + @JvmStatic + fun addFloorClip(builder: FlatBufferBuilder, floorClip: Boolean) = builder.addBoolean(0, floorClip, false) + @JvmStatic + fun addSkatingCorrection(builder: FlatBufferBuilder, skatingCorrection: Boolean) = builder.addBoolean(1, skatingCorrection, false) + @JvmStatic + fun addToeSnap(builder: FlatBufferBuilder, toeSnap: Boolean) = builder.addBoolean(2, toeSnap, false) + @JvmStatic + fun addFootPlant(builder: FlatBufferBuilder, footPlant: Boolean) = builder.addBoolean(3, footPlant, false) + @JvmStatic + fun endLegTweaksTmpClear(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/NewSerialDeviceResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/NewSerialDeviceResponse.kt index 5df5f36a..79863280 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/NewSerialDeviceResponse.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/NewSerialDeviceResponse.kt @@ -1,54 +1,54 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class NewSerialDeviceResponse : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : NewSerialDeviceResponse { - __init(_i, _bb) - return this - } - val device : solarxr_protocol.rpc.SerialDevice? get() = device(solarxr_protocol.rpc.SerialDevice()) - fun device(obj: solarxr_protocol.rpc.SerialDevice) : solarxr_protocol.rpc.SerialDevice? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsNewSerialDeviceResponse(_bb: ByteBuffer): NewSerialDeviceResponse = getRootAsNewSerialDeviceResponse(_bb, NewSerialDeviceResponse()) - @JvmStatic - fun getRootAsNewSerialDeviceResponse(_bb: ByteBuffer, obj: NewSerialDeviceResponse): NewSerialDeviceResponse { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createNewSerialDeviceResponse(builder: FlatBufferBuilder, deviceOffset: Int) : Int { - builder.startTable(1) - addDevice(builder, deviceOffset) - return endNewSerialDeviceResponse(builder) - } - @JvmStatic - fun startNewSerialDeviceResponse(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addDevice(builder: FlatBufferBuilder, device: Int) = builder.addOffset(0, device, 0) - @JvmStatic - fun endNewSerialDeviceResponse(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class NewSerialDeviceResponse : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : NewSerialDeviceResponse { + __init(_i, _bb) + return this + } + val device : solarxr_protocol.rpc.SerialDevice? get() = device(solarxr_protocol.rpc.SerialDevice()) + fun device(obj: solarxr_protocol.rpc.SerialDevice) : solarxr_protocol.rpc.SerialDevice? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsNewSerialDeviceResponse(_bb: ByteBuffer): NewSerialDeviceResponse = getRootAsNewSerialDeviceResponse(_bb, NewSerialDeviceResponse()) + @JvmStatic + fun getRootAsNewSerialDeviceResponse(_bb: ByteBuffer, obj: NewSerialDeviceResponse): NewSerialDeviceResponse { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createNewSerialDeviceResponse(builder: FlatBufferBuilder, deviceOffset: Int) : Int { + builder.startTable(1) + addDevice(builder, deviceOffset) + return endNewSerialDeviceResponse(builder) + } + @JvmStatic + fun startNewSerialDeviceResponse(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addDevice(builder: FlatBufferBuilder, device: Int) = builder.addOffset(0, device, 0) + @JvmStatic + fun endNewSerialDeviceResponse(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/OSCRouterSettings.kt b/protocol/kotlin/src/solarxr_protocol/rpc/OSCRouterSettings.kt index 230e4612..12149506 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/OSCRouterSettings.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/OSCRouterSettings.kt @@ -1,57 +1,57 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * OSC router forwards messages it receives, to allow the usage of multiple OSC programs for the same app. - */ -@Suppress("unused") -class OSCRouterSettings : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : OSCRouterSettings { - __init(_i, _bb) - return this - } - val oscSettings : solarxr_protocol.rpc.OSCSettings? get() = oscSettings(solarxr_protocol.rpc.OSCSettings()) - fun oscSettings(obj: solarxr_protocol.rpc.OSCSettings) : solarxr_protocol.rpc.OSCSettings? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsOSCRouterSettings(_bb: ByteBuffer): OSCRouterSettings = getRootAsOSCRouterSettings(_bb, OSCRouterSettings()) - @JvmStatic - fun getRootAsOSCRouterSettings(_bb: ByteBuffer, obj: OSCRouterSettings): OSCRouterSettings { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createOSCRouterSettings(builder: FlatBufferBuilder, oscSettingsOffset: Int) : Int { - builder.startTable(1) - addOscSettings(builder, oscSettingsOffset) - return endOSCRouterSettings(builder) - } - @JvmStatic - fun startOSCRouterSettings(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addOscSettings(builder: FlatBufferBuilder, oscSettings: Int) = builder.addOffset(0, oscSettings, 0) - @JvmStatic - fun endOSCRouterSettings(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * OSC router forwards messages it receives, to allow the usage of multiple OSC programs for the same app. + */ +@Suppress("unused") +class OSCRouterSettings : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : OSCRouterSettings { + __init(_i, _bb) + return this + } + val oscSettings : solarxr_protocol.rpc.OSCSettings? get() = oscSettings(solarxr_protocol.rpc.OSCSettings()) + fun oscSettings(obj: solarxr_protocol.rpc.OSCSettings) : solarxr_protocol.rpc.OSCSettings? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsOSCRouterSettings(_bb: ByteBuffer): OSCRouterSettings = getRootAsOSCRouterSettings(_bb, OSCRouterSettings()) + @JvmStatic + fun getRootAsOSCRouterSettings(_bb: ByteBuffer, obj: OSCRouterSettings): OSCRouterSettings { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createOSCRouterSettings(builder: FlatBufferBuilder, oscSettingsOffset: Int) : Int { + builder.startTable(1) + addOscSettings(builder, oscSettingsOffset) + return endOSCRouterSettings(builder) + } + @JvmStatic + fun startOSCRouterSettings(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addOscSettings(builder: FlatBufferBuilder, oscSettings: Int) = builder.addOffset(0, oscSettings, 0) + @JvmStatic + fun endOSCRouterSettings(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/OSCSettings.kt b/protocol/kotlin/src/solarxr_protocol/rpc/OSCSettings.kt index e942d084..32d10a0f 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/OSCSettings.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/OSCSettings.kt @@ -1,79 +1,79 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * OSC Settings that are used in *any* osc application. - */ -@Suppress("unused") -class OSCSettings : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : OSCSettings { - __init(_i, _bb) - return this - } - val enabled : Boolean - get() { - val o = __offset(4) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val portIn : UShort - get() { - val o = __offset(6) - return if(o != 0) bb.getShort(o + bb_pos).toUShort() else 0u - } - val portOut : UShort - get() { - val o = __offset(8) - return if(o != 0) bb.getShort(o + bb_pos).toUShort() else 0u - } - val address : String? - get() { - val o = __offset(10) - return if (o != 0) __string(o + bb_pos) else null - } - val addressAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(10, 1) - fun addressInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 10, 1) - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsOSCSettings(_bb: ByteBuffer): OSCSettings = getRootAsOSCSettings(_bb, OSCSettings()) - @JvmStatic - fun getRootAsOSCSettings(_bb: ByteBuffer, obj: OSCSettings): OSCSettings { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createOSCSettings(builder: FlatBufferBuilder, enabled: Boolean, portIn: UShort, portOut: UShort, addressOffset: Int) : Int { - builder.startTable(4) - addAddress(builder, addressOffset) - addPortOut(builder, portOut) - addPortIn(builder, portIn) - addEnabled(builder, enabled) - return endOSCSettings(builder) - } - @JvmStatic - fun startOSCSettings(builder: FlatBufferBuilder) = builder.startTable(4) - @JvmStatic - fun addEnabled(builder: FlatBufferBuilder, enabled: Boolean) = builder.addBoolean(0, enabled, false) - @JvmStatic - fun addPortIn(builder: FlatBufferBuilder, portIn: UShort) = builder.addShort(1, portIn.toShort(), 0) - @JvmStatic - fun addPortOut(builder: FlatBufferBuilder, portOut: UShort) = builder.addShort(2, portOut.toShort(), 0) - @JvmStatic - fun addAddress(builder: FlatBufferBuilder, address: Int) = builder.addOffset(3, address, 0) - @JvmStatic - fun endOSCSettings(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * OSC Settings that are used in *any* osc application. + */ +@Suppress("unused") +class OSCSettings : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : OSCSettings { + __init(_i, _bb) + return this + } + val enabled : Boolean + get() { + val o = __offset(4) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val portIn : UShort + get() { + val o = __offset(6) + return if(o != 0) bb.getShort(o + bb_pos).toUShort() else 0u + } + val portOut : UShort + get() { + val o = __offset(8) + return if(o != 0) bb.getShort(o + bb_pos).toUShort() else 0u + } + val address : String? + get() { + val o = __offset(10) + return if (o != 0) __string(o + bb_pos) else null + } + val addressAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(10, 1) + fun addressInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 10, 1) + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsOSCSettings(_bb: ByteBuffer): OSCSettings = getRootAsOSCSettings(_bb, OSCSettings()) + @JvmStatic + fun getRootAsOSCSettings(_bb: ByteBuffer, obj: OSCSettings): OSCSettings { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createOSCSettings(builder: FlatBufferBuilder, enabled: Boolean, portIn: UShort, portOut: UShort, addressOffset: Int) : Int { + builder.startTable(4) + addAddress(builder, addressOffset) + addPortOut(builder, portOut) + addPortIn(builder, portIn) + addEnabled(builder, enabled) + return endOSCSettings(builder) + } + @JvmStatic + fun startOSCSettings(builder: FlatBufferBuilder) = builder.startTable(4) + @JvmStatic + fun addEnabled(builder: FlatBufferBuilder, enabled: Boolean) = builder.addBoolean(0, enabled, false) + @JvmStatic + fun addPortIn(builder: FlatBufferBuilder, portIn: UShort) = builder.addShort(1, portIn.toShort(), 0) + @JvmStatic + fun addPortOut(builder: FlatBufferBuilder, portOut: UShort) = builder.addShort(2, portOut.toShort(), 0) + @JvmStatic + fun addAddress(builder: FlatBufferBuilder, address: Int) = builder.addOffset(3, address, 0) + @JvmStatic + fun endOSCSettings(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/OSCTrackersSetting.kt b/protocol/kotlin/src/solarxr_protocol/rpc/OSCTrackersSetting.kt index f179aca3..6db7d38b 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/OSCTrackersSetting.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/OSCTrackersSetting.kt @@ -1,98 +1,98 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class OSCTrackersSetting : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : OSCTrackersSetting { - __init(_i, _bb) - return this - } - val head : Boolean - get() { - val o = __offset(4) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val chest : Boolean - get() { - val o = __offset(6) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val waist : Boolean - get() { - val o = __offset(8) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val knees : Boolean - get() { - val o = __offset(10) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val feet : Boolean - get() { - val o = __offset(12) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val elbows : Boolean - get() { - val o = __offset(14) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val hands : Boolean - get() { - val o = __offset(16) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsOSCTrackersSetting(_bb: ByteBuffer): OSCTrackersSetting = getRootAsOSCTrackersSetting(_bb, OSCTrackersSetting()) - @JvmStatic - fun getRootAsOSCTrackersSetting(_bb: ByteBuffer, obj: OSCTrackersSetting): OSCTrackersSetting { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createOSCTrackersSetting(builder: FlatBufferBuilder, head: Boolean, chest: Boolean, waist: Boolean, knees: Boolean, feet: Boolean, elbows: Boolean, hands: Boolean) : Int { - builder.startTable(7) - addHands(builder, hands) - addElbows(builder, elbows) - addFeet(builder, feet) - addKnees(builder, knees) - addWaist(builder, waist) - addChest(builder, chest) - addHead(builder, head) - return endOSCTrackersSetting(builder) - } - @JvmStatic - fun startOSCTrackersSetting(builder: FlatBufferBuilder) = builder.startTable(7) - @JvmStatic - fun addHead(builder: FlatBufferBuilder, head: Boolean) = builder.addBoolean(0, head, false) - @JvmStatic - fun addChest(builder: FlatBufferBuilder, chest: Boolean) = builder.addBoolean(1, chest, false) - @JvmStatic - fun addWaist(builder: FlatBufferBuilder, waist: Boolean) = builder.addBoolean(2, waist, false) - @JvmStatic - fun addKnees(builder: FlatBufferBuilder, knees: Boolean) = builder.addBoolean(3, knees, false) - @JvmStatic - fun addFeet(builder: FlatBufferBuilder, feet: Boolean) = builder.addBoolean(4, feet, false) - @JvmStatic - fun addElbows(builder: FlatBufferBuilder, elbows: Boolean) = builder.addBoolean(5, elbows, false) - @JvmStatic - fun addHands(builder: FlatBufferBuilder, hands: Boolean) = builder.addBoolean(6, hands, false) - @JvmStatic - fun endOSCTrackersSetting(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class OSCTrackersSetting : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : OSCTrackersSetting { + __init(_i, _bb) + return this + } + val head : Boolean + get() { + val o = __offset(4) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val chest : Boolean + get() { + val o = __offset(6) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val waist : Boolean + get() { + val o = __offset(8) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val knees : Boolean + get() { + val o = __offset(10) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val feet : Boolean + get() { + val o = __offset(12) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val elbows : Boolean + get() { + val o = __offset(14) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val hands : Boolean + get() { + val o = __offset(16) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsOSCTrackersSetting(_bb: ByteBuffer): OSCTrackersSetting = getRootAsOSCTrackersSetting(_bb, OSCTrackersSetting()) + @JvmStatic + fun getRootAsOSCTrackersSetting(_bb: ByteBuffer, obj: OSCTrackersSetting): OSCTrackersSetting { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createOSCTrackersSetting(builder: FlatBufferBuilder, head: Boolean, chest: Boolean, waist: Boolean, knees: Boolean, feet: Boolean, elbows: Boolean, hands: Boolean) : Int { + builder.startTable(7) + addHands(builder, hands) + addElbows(builder, elbows) + addFeet(builder, feet) + addKnees(builder, knees) + addWaist(builder, waist) + addChest(builder, chest) + addHead(builder, head) + return endOSCTrackersSetting(builder) + } + @JvmStatic + fun startOSCTrackersSetting(builder: FlatBufferBuilder) = builder.startTable(7) + @JvmStatic + fun addHead(builder: FlatBufferBuilder, head: Boolean) = builder.addBoolean(0, head, false) + @JvmStatic + fun addChest(builder: FlatBufferBuilder, chest: Boolean) = builder.addBoolean(1, chest, false) + @JvmStatic + fun addWaist(builder: FlatBufferBuilder, waist: Boolean) = builder.addBoolean(2, waist, false) + @JvmStatic + fun addKnees(builder: FlatBufferBuilder, knees: Boolean) = builder.addBoolean(3, knees, false) + @JvmStatic + fun addFeet(builder: FlatBufferBuilder, feet: Boolean) = builder.addBoolean(4, feet, false) + @JvmStatic + fun addElbows(builder: FlatBufferBuilder, elbows: Boolean) = builder.addBoolean(5, elbows, false) + @JvmStatic + fun addHands(builder: FlatBufferBuilder, hands: Boolean) = builder.addBoolean(6, hands, false) + @JvmStatic + fun endOSCTrackersSetting(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/OTAFirmwareUpdate.kt b/protocol/kotlin/src/solarxr_protocol/rpc/OTAFirmwareUpdate.kt new file mode 100644 index 00000000..549196af --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/OTAFirmwareUpdate.kt @@ -0,0 +1,65 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class OTAFirmwareUpdate : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : OTAFirmwareUpdate { + __init(_i, _bb) + return this + } + /** + * id of the device, this refer to the actual DeviceId from the protocol + */ + val deviceId : solarxr_protocol.datatypes.DeviceId? get() = deviceId(solarxr_protocol.datatypes.DeviceId()) + fun deviceId(obj: solarxr_protocol.datatypes.DeviceId) : solarxr_protocol.datatypes.DeviceId? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + /** + * A table containing the url and offset of the firmware bin file + */ + val firmwarePart : solarxr_protocol.rpc.FirmwarePart? get() = firmwarePart(solarxr_protocol.rpc.FirmwarePart()) + fun firmwarePart(obj: solarxr_protocol.rpc.FirmwarePart) : solarxr_protocol.rpc.FirmwarePart? { + val o = __offset(6) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsOTAFirmwareUpdate(_bb: ByteBuffer): OTAFirmwareUpdate = getRootAsOTAFirmwareUpdate(_bb, OTAFirmwareUpdate()) + @JvmStatic + fun getRootAsOTAFirmwareUpdate(_bb: ByteBuffer, obj: OTAFirmwareUpdate): OTAFirmwareUpdate { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startOTAFirmwareUpdate(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addDeviceId(builder: FlatBufferBuilder, deviceId: Int) = builder.addStruct(0, deviceId, 0) + @JvmStatic + fun addFirmwarePart(builder: FlatBufferBuilder, firmwarePart: Int) = builder.addOffset(1, firmwarePart, 0) + @JvmStatic + fun endOTAFirmwareUpdate(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/OpenSerialRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/OpenSerialRequest.kt index f462fc11..de21313d 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/OpenSerialRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/OpenSerialRequest.kt @@ -1,63 +1,63 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class OpenSerialRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : OpenSerialRequest { - __init(_i, _bb) - return this - } - /** - * Automaticaly pick the first serial device available - */ - val auto : Boolean - get() { - val o = __offset(4) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val port : String? - get() { - val o = __offset(6) - return if (o != 0) __string(o + bb_pos) else null - } - val portAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) - fun portInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsOpenSerialRequest(_bb: ByteBuffer): OpenSerialRequest = getRootAsOpenSerialRequest(_bb, OpenSerialRequest()) - @JvmStatic - fun getRootAsOpenSerialRequest(_bb: ByteBuffer, obj: OpenSerialRequest): OpenSerialRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createOpenSerialRequest(builder: FlatBufferBuilder, auto: Boolean, portOffset: Int) : Int { - builder.startTable(2) - addPort(builder, portOffset) - addAuto(builder, auto) - return endOpenSerialRequest(builder) - } - @JvmStatic - fun startOpenSerialRequest(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addAuto(builder: FlatBufferBuilder, auto: Boolean) = builder.addBoolean(0, auto, false) - @JvmStatic - fun addPort(builder: FlatBufferBuilder, port: Int) = builder.addOffset(1, port, 0) - @JvmStatic - fun endOpenSerialRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class OpenSerialRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : OpenSerialRequest { + __init(_i, _bb) + return this + } + /** + * Automaticaly pick the first serial device available + */ + val auto : Boolean + get() { + val o = __offset(4) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val port : String? + get() { + val o = __offset(6) + return if (o != 0) __string(o + bb_pos) else null + } + val portAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) + fun portInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsOpenSerialRequest(_bb: ByteBuffer): OpenSerialRequest = getRootAsOpenSerialRequest(_bb, OpenSerialRequest()) + @JvmStatic + fun getRootAsOpenSerialRequest(_bb: ByteBuffer, obj: OpenSerialRequest): OpenSerialRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createOpenSerialRequest(builder: FlatBufferBuilder, auto: Boolean, portOffset: Int) : Int { + builder.startTable(2) + addPort(builder, portOffset) + addAuto(builder, auto) + return endOpenSerialRequest(builder) + } + @JvmStatic + fun startOpenSerialRequest(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addAuto(builder: FlatBufferBuilder, auto: Boolean) = builder.addBoolean(0, auto, false) + @JvmStatic + fun addPort(builder: FlatBufferBuilder, port: Int) = builder.addOffset(1, port, 0) + @JvmStatic + fun endOpenSerialRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/OverlayDisplayModeChangeRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/OverlayDisplayModeChangeRequest.kt index f2cb40df..7f0389c6 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/OverlayDisplayModeChangeRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/OverlayDisplayModeChangeRequest.kt @@ -1,61 +1,61 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Changes the state of the overlay's display mode. - */ -@Suppress("unused") -class OverlayDisplayModeChangeRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : OverlayDisplayModeChangeRequest { - __init(_i, _bb) - return this - } - val isVisible : Boolean? - get() { - val o = __offset(4) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val isMirrored : Boolean? - get() { - val o = __offset(6) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsOverlayDisplayModeChangeRequest(_bb: ByteBuffer): OverlayDisplayModeChangeRequest = getRootAsOverlayDisplayModeChangeRequest(_bb, OverlayDisplayModeChangeRequest()) - @JvmStatic - fun getRootAsOverlayDisplayModeChangeRequest(_bb: ByteBuffer, obj: OverlayDisplayModeChangeRequest): OverlayDisplayModeChangeRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createOverlayDisplayModeChangeRequest(builder: FlatBufferBuilder, isVisible: Boolean?, isMirrored: Boolean?) : Int { - builder.startTable(2) - isMirrored?.run { addIsMirrored(builder, isMirrored) } - isVisible?.run { addIsVisible(builder, isVisible) } - return endOverlayDisplayModeChangeRequest(builder) - } - @JvmStatic - fun startOverlayDisplayModeChangeRequest(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addIsVisible(builder: FlatBufferBuilder, isVisible: Boolean) = builder.addBoolean(0, isVisible, false) - @JvmStatic - fun addIsMirrored(builder: FlatBufferBuilder, isMirrored: Boolean) = builder.addBoolean(1, isMirrored, false) - @JvmStatic - fun endOverlayDisplayModeChangeRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Changes the state of the overlay's display mode. + */ +@Suppress("unused") +class OverlayDisplayModeChangeRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : OverlayDisplayModeChangeRequest { + __init(_i, _bb) + return this + } + val isVisible : Boolean? + get() { + val o = __offset(4) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val isMirrored : Boolean? + get() { + val o = __offset(6) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsOverlayDisplayModeChangeRequest(_bb: ByteBuffer): OverlayDisplayModeChangeRequest = getRootAsOverlayDisplayModeChangeRequest(_bb, OverlayDisplayModeChangeRequest()) + @JvmStatic + fun getRootAsOverlayDisplayModeChangeRequest(_bb: ByteBuffer, obj: OverlayDisplayModeChangeRequest): OverlayDisplayModeChangeRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createOverlayDisplayModeChangeRequest(builder: FlatBufferBuilder, isVisible: Boolean?, isMirrored: Boolean?) : Int { + builder.startTable(2) + isMirrored?.run { addIsMirrored(builder, isMirrored) } + isVisible?.run { addIsVisible(builder, isVisible) } + return endOverlayDisplayModeChangeRequest(builder) + } + @JvmStatic + fun startOverlayDisplayModeChangeRequest(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addIsVisible(builder: FlatBufferBuilder, isVisible: Boolean) = builder.addBoolean(0, isVisible, false) + @JvmStatic + fun addIsMirrored(builder: FlatBufferBuilder, isMirrored: Boolean) = builder.addBoolean(1, isMirrored, false) + @JvmStatic + fun endOverlayDisplayModeChangeRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/OverlayDisplayModeRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/OverlayDisplayModeRequest.kt index 0d5b619a..4bc1b014 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/OverlayDisplayModeRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/OverlayDisplayModeRequest.kt @@ -1,40 +1,40 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Requests the current state of `OverlayDisplayModeResponse`. - */ -@Suppress("unused") -class OverlayDisplayModeRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : OverlayDisplayModeRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsOverlayDisplayModeRequest(_bb: ByteBuffer): OverlayDisplayModeRequest = getRootAsOverlayDisplayModeRequest(_bb, OverlayDisplayModeRequest()) - @JvmStatic - fun getRootAsOverlayDisplayModeRequest(_bb: ByteBuffer, obj: OverlayDisplayModeRequest): OverlayDisplayModeRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startOverlayDisplayModeRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endOverlayDisplayModeRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Requests the current state of `OverlayDisplayModeResponse`. + */ +@Suppress("unused") +class OverlayDisplayModeRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : OverlayDisplayModeRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsOverlayDisplayModeRequest(_bb: ByteBuffer): OverlayDisplayModeRequest = getRootAsOverlayDisplayModeRequest(_bb, OverlayDisplayModeRequest()) + @JvmStatic + fun getRootAsOverlayDisplayModeRequest(_bb: ByteBuffer, obj: OverlayDisplayModeRequest): OverlayDisplayModeRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startOverlayDisplayModeRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endOverlayDisplayModeRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/OverlayDisplayModeResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/OverlayDisplayModeResponse.kt index 8730be56..7d560970 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/OverlayDisplayModeResponse.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/OverlayDisplayModeResponse.kt @@ -1,61 +1,61 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * The current state of the overlay's display mode. - */ -@Suppress("unused") -class OverlayDisplayModeResponse : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : OverlayDisplayModeResponse { - __init(_i, _bb) - return this - } - val isVisible : Boolean - get() { - val o = __offset(4) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val isMirrored : Boolean - get() { - val o = __offset(6) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsOverlayDisplayModeResponse(_bb: ByteBuffer): OverlayDisplayModeResponse = getRootAsOverlayDisplayModeResponse(_bb, OverlayDisplayModeResponse()) - @JvmStatic - fun getRootAsOverlayDisplayModeResponse(_bb: ByteBuffer, obj: OverlayDisplayModeResponse): OverlayDisplayModeResponse { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createOverlayDisplayModeResponse(builder: FlatBufferBuilder, isVisible: Boolean, isMirrored: Boolean) : Int { - builder.startTable(2) - addIsMirrored(builder, isMirrored) - addIsVisible(builder, isVisible) - return endOverlayDisplayModeResponse(builder) - } - @JvmStatic - fun startOverlayDisplayModeResponse(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addIsVisible(builder: FlatBufferBuilder, isVisible: Boolean) = builder.addBoolean(0, isVisible, false) - @JvmStatic - fun addIsMirrored(builder: FlatBufferBuilder, isMirrored: Boolean) = builder.addBoolean(1, isMirrored, false) - @JvmStatic - fun endOverlayDisplayModeResponse(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * The current state of the overlay's display mode. + */ +@Suppress("unused") +class OverlayDisplayModeResponse : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : OverlayDisplayModeResponse { + __init(_i, _bb) + return this + } + val isVisible : Boolean + get() { + val o = __offset(4) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val isMirrored : Boolean + get() { + val o = __offset(6) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsOverlayDisplayModeResponse(_bb: ByteBuffer): OverlayDisplayModeResponse = getRootAsOverlayDisplayModeResponse(_bb, OverlayDisplayModeResponse()) + @JvmStatic + fun getRootAsOverlayDisplayModeResponse(_bb: ByteBuffer, obj: OverlayDisplayModeResponse): OverlayDisplayModeResponse { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createOverlayDisplayModeResponse(builder: FlatBufferBuilder, isVisible: Boolean, isMirrored: Boolean) : Int { + builder.startTable(2) + addIsMirrored(builder, isMirrored) + addIsVisible(builder, isVisible) + return endOverlayDisplayModeResponse(builder) + } + @JvmStatic + fun startOverlayDisplayModeResponse(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addIsVisible(builder: FlatBufferBuilder, isVisible: Boolean) = builder.addBoolean(0, isVisible, false) + @JvmStatic + fun addIsMirrored(builder: FlatBufferBuilder, isMirrored: Boolean) = builder.addBoolean(1, isMirrored, false) + @JvmStatic + fun endOverlayDisplayModeResponse(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/RecordBVHRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/RecordBVHRequest.kt index f6d5cfc6..d5414df9 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/RecordBVHRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/RecordBVHRequest.kt @@ -1,50 +1,50 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class RecordBVHRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : RecordBVHRequest { - __init(_i, _bb) - return this - } - val stop : Boolean - get() { - val o = __offset(4) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsRecordBVHRequest(_bb: ByteBuffer): RecordBVHRequest = getRootAsRecordBVHRequest(_bb, RecordBVHRequest()) - @JvmStatic - fun getRootAsRecordBVHRequest(_bb: ByteBuffer, obj: RecordBVHRequest): RecordBVHRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createRecordBVHRequest(builder: FlatBufferBuilder, stop: Boolean) : Int { - builder.startTable(1) - addStop(builder, stop) - return endRecordBVHRequest(builder) - } - @JvmStatic - fun startRecordBVHRequest(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addStop(builder: FlatBufferBuilder, stop: Boolean) = builder.addBoolean(0, stop, false) - @JvmStatic - fun endRecordBVHRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class RecordBVHRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : RecordBVHRequest { + __init(_i, _bb) + return this + } + val stop : Boolean + get() { + val o = __offset(4) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsRecordBVHRequest(_bb: ByteBuffer): RecordBVHRequest = getRootAsRecordBVHRequest(_bb, RecordBVHRequest()) + @JvmStatic + fun getRootAsRecordBVHRequest(_bb: ByteBuffer, obj: RecordBVHRequest): RecordBVHRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createRecordBVHRequest(builder: FlatBufferBuilder, stop: Boolean) : Int { + builder.startTable(1) + addStop(builder, stop) + return endRecordBVHRequest(builder) + } + @JvmStatic + fun startRecordBVHRequest(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addStop(builder: FlatBufferBuilder, stop: Boolean) = builder.addBoolean(0, stop, false) + @JvmStatic + fun endRecordBVHRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/RecordBVHStatus.kt b/protocol/kotlin/src/solarxr_protocol/rpc/RecordBVHStatus.kt index ba5499e3..61c82026 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/RecordBVHStatus.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/RecordBVHStatus.kt @@ -1,50 +1,50 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class RecordBVHStatus : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : RecordBVHStatus { - __init(_i, _bb) - return this - } - val recording : Boolean - get() { - val o = __offset(4) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsRecordBVHStatus(_bb: ByteBuffer): RecordBVHStatus = getRootAsRecordBVHStatus(_bb, RecordBVHStatus()) - @JvmStatic - fun getRootAsRecordBVHStatus(_bb: ByteBuffer, obj: RecordBVHStatus): RecordBVHStatus { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createRecordBVHStatus(builder: FlatBufferBuilder, recording: Boolean) : Int { - builder.startTable(1) - addRecording(builder, recording) - return endRecordBVHStatus(builder) - } - @JvmStatic - fun startRecordBVHStatus(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addRecording(builder: FlatBufferBuilder, recording: Boolean) = builder.addBoolean(0, recording, false) - @JvmStatic - fun endRecordBVHStatus(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class RecordBVHStatus : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : RecordBVHStatus { + __init(_i, _bb) + return this + } + val recording : Boolean + get() { + val o = __offset(4) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsRecordBVHStatus(_bb: ByteBuffer): RecordBVHStatus = getRootAsRecordBVHStatus(_bb, RecordBVHStatus()) + @JvmStatic + fun getRootAsRecordBVHStatus(_bb: ByteBuffer, obj: RecordBVHStatus): RecordBVHStatus { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createRecordBVHStatus(builder: FlatBufferBuilder, recording: Boolean) : Int { + builder.startTable(1) + addRecording(builder, recording) + return endRecordBVHStatus(builder) + } + @JvmStatic + fun startRecordBVHStatus(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addRecording(builder: FlatBufferBuilder, recording: Boolean) = builder.addBoolean(0, recording, false) + @JvmStatic + fun endRecordBVHStatus(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ResetRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ResetRequest.kt index 43b6616c..80f4f688 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/ResetRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ResetRequest.kt @@ -1,50 +1,50 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class ResetRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : ResetRequest { - __init(_i, _bb) - return this - } - val resetType : UByte - get() { - val o = __offset(4) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsResetRequest(_bb: ByteBuffer): ResetRequest = getRootAsResetRequest(_bb, ResetRequest()) - @JvmStatic - fun getRootAsResetRequest(_bb: ByteBuffer, obj: ResetRequest): ResetRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createResetRequest(builder: FlatBufferBuilder, resetType: UByte) : Int { - builder.startTable(1) - addResetType(builder, resetType) - return endResetRequest(builder) - } - @JvmStatic - fun startResetRequest(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addResetType(builder: FlatBufferBuilder, resetType: UByte) = builder.addByte(0, resetType.toByte(), 0) - @JvmStatic - fun endResetRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class ResetRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : ResetRequest { + __init(_i, _bb) + return this + } + val resetType : UByte + get() { + val o = __offset(4) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsResetRequest(_bb: ByteBuffer): ResetRequest = getRootAsResetRequest(_bb, ResetRequest()) + @JvmStatic + fun getRootAsResetRequest(_bb: ByteBuffer, obj: ResetRequest): ResetRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createResetRequest(builder: FlatBufferBuilder, resetType: UByte) : Int { + builder.startTable(1) + addResetType(builder, resetType) + return endResetRequest(builder) + } + @JvmStatic + fun startResetRequest(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addResetType(builder: FlatBufferBuilder, resetType: UByte) = builder.addByte(0, resetType.toByte(), 0) + @JvmStatic + fun endResetRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ResetResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ResetResponse.kt index 687153f1..4e4e5832 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/ResetResponse.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ResetResponse.kt @@ -1,58 +1,58 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class ResetResponse : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : ResetResponse { - __init(_i, _bb) - return this - } - val resetType : UByte - get() { - val o = __offset(4) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - val status : UByte - get() { - val o = __offset(6) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsResetResponse(_bb: ByteBuffer): ResetResponse = getRootAsResetResponse(_bb, ResetResponse()) - @JvmStatic - fun getRootAsResetResponse(_bb: ByteBuffer, obj: ResetResponse): ResetResponse { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createResetResponse(builder: FlatBufferBuilder, resetType: UByte, status: UByte) : Int { - builder.startTable(2) - addStatus(builder, status) - addResetType(builder, resetType) - return endResetResponse(builder) - } - @JvmStatic - fun startResetResponse(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addResetType(builder: FlatBufferBuilder, resetType: UByte) = builder.addByte(0, resetType.toByte(), 0) - @JvmStatic - fun addStatus(builder: FlatBufferBuilder, status: UByte) = builder.addByte(1, status.toByte(), 0) - @JvmStatic - fun endResetResponse(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class ResetResponse : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : ResetResponse { + __init(_i, _bb) + return this + } + val resetType : UByte + get() { + val o = __offset(4) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + val status : UByte + get() { + val o = __offset(6) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsResetResponse(_bb: ByteBuffer): ResetResponse = getRootAsResetResponse(_bb, ResetResponse()) + @JvmStatic + fun getRootAsResetResponse(_bb: ByteBuffer, obj: ResetResponse): ResetResponse { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createResetResponse(builder: FlatBufferBuilder, resetType: UByte, status: UByte) : Int { + builder.startTable(2) + addStatus(builder, status) + addResetType(builder, resetType) + return endResetResponse(builder) + } + @JvmStatic + fun startResetResponse(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addResetType(builder: FlatBufferBuilder, resetType: UByte) = builder.addByte(0, resetType.toByte(), 0) + @JvmStatic + fun addStatus(builder: FlatBufferBuilder, status: UByte) = builder.addByte(1, status.toByte(), 0) + @JvmStatic + fun endResetResponse(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ResetStatus.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ResetStatus.kt index a15b278b..72576692 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/ResetStatus.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ResetStatus.kt @@ -1,14 +1,14 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -@Suppress("unused") -class ResetStatus private constructor() { - companion object { - const val STARTED: UByte = 0u - const val FINISHED: UByte = 1u - val names : Array = arrayOf("STARTED", "FINISHED") - @JvmStatic - fun name(e: Int) : String = names[e] - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +@Suppress("unused") +class ResetStatus private constructor() { + companion object { + const val STARTED: UByte = 0u + const val FINISHED: UByte = 1u + val names : Array = arrayOf("STARTED", "FINISHED") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ResetType.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ResetType.kt index 00cc7ac9..bf89b38f 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/ResetType.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ResetType.kt @@ -1,18 +1,18 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -@Suppress("unused") -class ResetType private constructor() { - companion object { - const val Yaw: UByte = 0u - const val Full: UByte = 1u - /** - * Second pose for calibrating mounting rotation - */ - const val Mounting: UByte = 2u - val names : Array = arrayOf("Yaw", "Full", "Mounting") - @JvmStatic - fun name(e: Int) : String = names[e] - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +@Suppress("unused") +class ResetType private constructor() { + companion object { + const val Yaw: UByte = 0u + const val Full: UByte = 1u + /** + * Second pose for calibrating mounting rotation + */ + const val Mounting: UByte = 2u + val names : Array = arrayOf("Yaw", "Full", "Mounting") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ResetsSettings.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ResetsSettings.kt index 1ff79fa1..b5193c2c 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/ResetsSettings.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ResetsSettings.kt @@ -1,82 +1,82 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class ResetsSettings : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : ResetsSettings { - __init(_i, _bb) - return this - } - val resetMountingFeet : Boolean - get() { - val o = __offset(4) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val armsMountingResetMode : UByte - get() { - val o = __offset(6) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - val yawResetSmoothTime : Float - get() { - val o = __offset(8) - return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f - } - val saveMountingReset : Boolean - get() { - val o = __offset(10) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val resetHmdPitch : Boolean - get() { - val o = __offset(12) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsResetsSettings(_bb: ByteBuffer): ResetsSettings = getRootAsResetsSettings(_bb, ResetsSettings()) - @JvmStatic - fun getRootAsResetsSettings(_bb: ByteBuffer, obj: ResetsSettings): ResetsSettings { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createResetsSettings(builder: FlatBufferBuilder, resetMountingFeet: Boolean, armsMountingResetMode: UByte, yawResetSmoothTime: Float, saveMountingReset: Boolean, resetHmdPitch: Boolean) : Int { - builder.startTable(5) - addYawResetSmoothTime(builder, yawResetSmoothTime) - addResetHmdPitch(builder, resetHmdPitch) - addSaveMountingReset(builder, saveMountingReset) - addArmsMountingResetMode(builder, armsMountingResetMode) - addResetMountingFeet(builder, resetMountingFeet) - return endResetsSettings(builder) - } - @JvmStatic - fun startResetsSettings(builder: FlatBufferBuilder) = builder.startTable(5) - @JvmStatic - fun addResetMountingFeet(builder: FlatBufferBuilder, resetMountingFeet: Boolean) = builder.addBoolean(0, resetMountingFeet, false) - @JvmStatic - fun addArmsMountingResetMode(builder: FlatBufferBuilder, armsMountingResetMode: UByte) = builder.addByte(1, armsMountingResetMode.toByte(), 0) - @JvmStatic - fun addYawResetSmoothTime(builder: FlatBufferBuilder, yawResetSmoothTime: Float) = builder.addFloat(2, yawResetSmoothTime, 0.0) - @JvmStatic - fun addSaveMountingReset(builder: FlatBufferBuilder, saveMountingReset: Boolean) = builder.addBoolean(3, saveMountingReset, false) - @JvmStatic - fun addResetHmdPitch(builder: FlatBufferBuilder, resetHmdPitch: Boolean) = builder.addBoolean(4, resetHmdPitch, false) - @JvmStatic - fun endResetsSettings(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class ResetsSettings : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : ResetsSettings { + __init(_i, _bb) + return this + } + val resetMountingFeet : Boolean + get() { + val o = __offset(4) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val armsMountingResetMode : UByte + get() { + val o = __offset(6) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + val yawResetSmoothTime : Float + get() { + val o = __offset(8) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + val saveMountingReset : Boolean + get() { + val o = __offset(10) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val resetHmdPitch : Boolean + get() { + val o = __offset(12) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsResetsSettings(_bb: ByteBuffer): ResetsSettings = getRootAsResetsSettings(_bb, ResetsSettings()) + @JvmStatic + fun getRootAsResetsSettings(_bb: ByteBuffer, obj: ResetsSettings): ResetsSettings { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createResetsSettings(builder: FlatBufferBuilder, resetMountingFeet: Boolean, armsMountingResetMode: UByte, yawResetSmoothTime: Float, saveMountingReset: Boolean, resetHmdPitch: Boolean) : Int { + builder.startTable(5) + addYawResetSmoothTime(builder, yawResetSmoothTime) + addResetHmdPitch(builder, resetHmdPitch) + addSaveMountingReset(builder, saveMountingReset) + addArmsMountingResetMode(builder, armsMountingResetMode) + addResetMountingFeet(builder, resetMountingFeet) + return endResetsSettings(builder) + } + @JvmStatic + fun startResetsSettings(builder: FlatBufferBuilder) = builder.startTable(5) + @JvmStatic + fun addResetMountingFeet(builder: FlatBufferBuilder, resetMountingFeet: Boolean) = builder.addBoolean(0, resetMountingFeet, false) + @JvmStatic + fun addArmsMountingResetMode(builder: FlatBufferBuilder, armsMountingResetMode: UByte) = builder.addByte(1, armsMountingResetMode.toByte(), 0) + @JvmStatic + fun addYawResetSmoothTime(builder: FlatBufferBuilder, yawResetSmoothTime: Float) = builder.addFloat(2, yawResetSmoothTime, 0.0) + @JvmStatic + fun addSaveMountingReset(builder: FlatBufferBuilder, saveMountingReset: Boolean) = builder.addBoolean(3, saveMountingReset, false) + @JvmStatic + fun addResetHmdPitch(builder: FlatBufferBuilder, resetHmdPitch: Boolean) = builder.addBoolean(4, resetHmdPitch, false) + @JvmStatic + fun endResetsSettings(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt b/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt index b3c846a5..7d83901e 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt @@ -1,70 +1,73 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -@Suppress("unused") -class RpcMessage private constructor() { - companion object { - const val NONE: UByte = 0u - const val HeartbeatRequest: UByte = 1u - const val HeartbeatResponse: UByte = 2u - const val ResetRequest: UByte = 3u - const val ResetResponse: UByte = 4u - const val AssignTrackerRequest: UByte = 5u - const val SettingsRequest: UByte = 6u - const val SettingsResponse: UByte = 7u - const val ChangeSettingsRequest: UByte = 8u - const val ClearDriftCompensationRequest: UByte = 9u - const val RecordBVHRequest: UByte = 10u - const val RecordBVHStatus: UByte = 11u - const val SkeletonConfigRequest: UByte = 12u - const val ChangeSkeletonConfigRequest: UByte = 13u - const val SkeletonResetAllRequest: UByte = 14u - const val SkeletonConfigResponse: UByte = 15u - const val OpenSerialRequest: UByte = 16u - const val CloseSerialRequest: UByte = 17u - const val SetWifiRequest: UByte = 18u - const val SerialUpdateResponse: UByte = 19u - const val AutoBoneProcessRequest: UByte = 20u - const val AutoBoneProcessStatusResponse: UByte = 21u - const val AutoBoneEpochResponse: UByte = 22u - const val OverlayDisplayModeRequest: UByte = 23u - const val OverlayDisplayModeChangeRequest: UByte = 24u - const val OverlayDisplayModeResponse: UByte = 25u - const val SerialTrackerRebootRequest: UByte = 26u - const val SerialTrackerGetInfoRequest: UByte = 27u - const val SerialTrackerFactoryResetRequest: UByte = 28u - const val SerialDevicesRequest: UByte = 29u - const val SerialDevicesResponse: UByte = 30u - const val NewSerialDeviceResponse: UByte = 31u - const val StartWifiProvisioningRequest: UByte = 32u - const val StopWifiProvisioningRequest: UByte = 33u - const val WifiProvisioningStatusResponse: UByte = 34u - const val ServerInfosRequest: UByte = 35u - const val ServerInfosResponse: UByte = 36u - const val LegTweaksTmpChange: UByte = 37u - const val LegTweaksTmpClear: UByte = 38u - const val TapDetectionSetupNotification: UByte = 39u - const val SetPauseTrackingRequest: UByte = 40u - const val StatusSystemRequest: UByte = 41u - const val StatusSystemResponse: UByte = 42u - const val StatusSystemUpdate: UByte = 43u - const val StatusSystemFixed: UByte = 44u - const val ClearMountingResetRequest: UByte = 45u - const val HeightRequest: UByte = 46u - const val HeightResponse: UByte = 47u - const val AutoBoneApplyRequest: UByte = 48u - const val AutoBoneStopRecordingRequest: UByte = 49u - const val AutoBoneCancelRecordingRequest: UByte = 50u - const val SaveFileNotification: UByte = 51u - const val TrackingPauseStateRequest: UByte = 52u - const val TrackingPauseStateResponse: UByte = 53u - const val SerialTrackerGetWifiScanRequest: UByte = 54u - const val UnknownDeviceHandshakeNotification: UByte = 55u - const val AddUnknownDeviceRequest: UByte = 56u - const val ForgetDeviceRequest: UByte = 57u - val names : Array = arrayOf("NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", "TrackingPauseStateRequest", "TrackingPauseStateResponse", "SerialTrackerGetWifiScanRequest", "UnknownDeviceHandshakeNotification", "AddUnknownDeviceRequest", "ForgetDeviceRequest") - @JvmStatic - fun name(e: Int) : String = names[e] - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +@Suppress("unused") +class RpcMessage private constructor() { + companion object { + const val NONE: UByte = 0u + const val HeartbeatRequest: UByte = 1u + const val HeartbeatResponse: UByte = 2u + const val ResetRequest: UByte = 3u + const val ResetResponse: UByte = 4u + const val AssignTrackerRequest: UByte = 5u + const val SettingsRequest: UByte = 6u + const val SettingsResponse: UByte = 7u + const val ChangeSettingsRequest: UByte = 8u + const val ClearDriftCompensationRequest: UByte = 9u + const val RecordBVHRequest: UByte = 10u + const val RecordBVHStatus: UByte = 11u + const val SkeletonConfigRequest: UByte = 12u + const val ChangeSkeletonConfigRequest: UByte = 13u + const val SkeletonResetAllRequest: UByte = 14u + const val SkeletonConfigResponse: UByte = 15u + const val OpenSerialRequest: UByte = 16u + const val CloseSerialRequest: UByte = 17u + const val SetWifiRequest: UByte = 18u + const val SerialUpdateResponse: UByte = 19u + const val AutoBoneProcessRequest: UByte = 20u + const val AutoBoneProcessStatusResponse: UByte = 21u + const val AutoBoneEpochResponse: UByte = 22u + const val OverlayDisplayModeRequest: UByte = 23u + const val OverlayDisplayModeChangeRequest: UByte = 24u + const val OverlayDisplayModeResponse: UByte = 25u + const val SerialTrackerRebootRequest: UByte = 26u + const val SerialTrackerGetInfoRequest: UByte = 27u + const val SerialTrackerFactoryResetRequest: UByte = 28u + const val SerialDevicesRequest: UByte = 29u + const val SerialDevicesResponse: UByte = 30u + const val NewSerialDeviceResponse: UByte = 31u + const val StartWifiProvisioningRequest: UByte = 32u + const val StopWifiProvisioningRequest: UByte = 33u + const val WifiProvisioningStatusResponse: UByte = 34u + const val ServerInfosRequest: UByte = 35u + const val ServerInfosResponse: UByte = 36u + const val LegTweaksTmpChange: UByte = 37u + const val LegTweaksTmpClear: UByte = 38u + const val TapDetectionSetupNotification: UByte = 39u + const val SetPauseTrackingRequest: UByte = 40u + const val StatusSystemRequest: UByte = 41u + const val StatusSystemResponse: UByte = 42u + const val StatusSystemUpdate: UByte = 43u + const val StatusSystemFixed: UByte = 44u + const val ClearMountingResetRequest: UByte = 45u + const val HeightRequest: UByte = 46u + const val HeightResponse: UByte = 47u + const val AutoBoneApplyRequest: UByte = 48u + const val AutoBoneStopRecordingRequest: UByte = 49u + const val AutoBoneCancelRecordingRequest: UByte = 50u + const val SaveFileNotification: UByte = 51u + const val TrackingPauseStateRequest: UByte = 52u + const val TrackingPauseStateResponse: UByte = 53u + const val SerialTrackerGetWifiScanRequest: UByte = 54u + const val UnknownDeviceHandshakeNotification: UByte = 55u + const val AddUnknownDeviceRequest: UByte = 56u + const val ForgetDeviceRequest: UByte = 57u + const val FirmwareUpdateRequest: UByte = 58u + const val FirmwareUpdateStatusResponse: UByte = 59u + const val FirmwareUpdateStopQueuesRequest: UByte = 60u + val names : Array = arrayOf("NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", "TrackingPauseStateRequest", "TrackingPauseStateResponse", "SerialTrackerGetWifiScanRequest", "UnknownDeviceHandshakeNotification", "AddUnknownDeviceRequest", "ForgetDeviceRequest", "FirmwareUpdateRequest", "FirmwareUpdateStatusResponse", "FirmwareUpdateStopQueuesRequest") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessageHeader.kt b/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessageHeader.kt index 9756bbe4..1e06e9d0 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessageHeader.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessageHeader.kt @@ -1,64 +1,64 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class RpcMessageHeader : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : RpcMessageHeader { - __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. - */ - val txId : solarxr_protocol.datatypes.TransactionId? get() = txId(solarxr_protocol.datatypes.TransactionId()) - fun txId(obj: solarxr_protocol.datatypes.TransactionId) : solarxr_protocol.datatypes.TransactionId? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(o + bb_pos, bb) - } else { - null - } - } - val messageType : UByte - get() { - val o = __offset(6) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - fun message(obj: Table) : Table? { - val o = __offset(8); return if (o != 0) __union(obj, o + bb_pos) else null - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsRpcMessageHeader(_bb: ByteBuffer): RpcMessageHeader = getRootAsRpcMessageHeader(_bb, RpcMessageHeader()) - @JvmStatic - fun getRootAsRpcMessageHeader(_bb: ByteBuffer, obj: RpcMessageHeader): RpcMessageHeader { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startRpcMessageHeader(builder: FlatBufferBuilder) = builder.startTable(3) - @JvmStatic - fun addTxId(builder: FlatBufferBuilder, txId: Int) = builder.addStruct(0, txId, 0) - @JvmStatic - fun addMessageType(builder: FlatBufferBuilder, messageType: UByte) = builder.addByte(1, messageType.toByte(), 0) - @JvmStatic - fun addMessage(builder: FlatBufferBuilder, message: Int) = builder.addOffset(2, message, 0) - @JvmStatic - fun endRpcMessageHeader(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class RpcMessageHeader : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : RpcMessageHeader { + __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. + */ + val txId : solarxr_protocol.datatypes.TransactionId? get() = txId(solarxr_protocol.datatypes.TransactionId()) + fun txId(obj: solarxr_protocol.datatypes.TransactionId) : solarxr_protocol.datatypes.TransactionId? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(o + bb_pos, bb) + } else { + null + } + } + val messageType : UByte + get() { + val o = __offset(6) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + fun message(obj: Table) : Table? { + val o = __offset(8); return if (o != 0) __union(obj, o + bb_pos) else null + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsRpcMessageHeader(_bb: ByteBuffer): RpcMessageHeader = getRootAsRpcMessageHeader(_bb, RpcMessageHeader()) + @JvmStatic + fun getRootAsRpcMessageHeader(_bb: ByteBuffer, obj: RpcMessageHeader): RpcMessageHeader { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startRpcMessageHeader(builder: FlatBufferBuilder) = builder.startTable(3) + @JvmStatic + fun addTxId(builder: FlatBufferBuilder, txId: Int) = builder.addStruct(0, txId, 0) + @JvmStatic + fun addMessageType(builder: FlatBufferBuilder, messageType: UByte) = builder.addByte(1, messageType.toByte(), 0) + @JvmStatic + fun addMessage(builder: FlatBufferBuilder, message: Int) = builder.addOffset(2, message, 0) + @JvmStatic + fun endRpcMessageHeader(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SaveFileNotification.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SaveFileNotification.kt index da35d2a7..c2683078 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SaveFileNotification.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SaveFileNotification.kt @@ -1,125 +1,125 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Used for the server to save a file and have it prompt in the user side - */ -@Suppress("unused") -class SaveFileNotification : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : SaveFileNotification { - __init(_i, _bb) - return this - } - /** - * Binary data of the file - */ - fun data(j: Int) : UByte { - val o = __offset(4) - return if (o != 0) { - bb.get(__vector(o) + j * 1).toUByte() - } else { - 0u - } - } - val dataLength : Int - get() { - val o = __offset(4); return if (o != 0) __vector_len(o) else 0 - } - val dataAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) - fun dataInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) - /** - * MIME type of file if one exists, use `file_extension` otherwise - */ - val mimeType : String? - get() { - val o = __offset(6) - return if (o != 0) __string(o + bb_pos) else null - } - val mimeTypeAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) - fun mimeTypeInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) - /** - * Use MIME type preferably if one exists - */ - val fileExtension : String? - get() { - val o = __offset(8) - return if (o != 0) __string(o + bb_pos) else null - } - val fileExtensionAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(8, 1) - fun fileExtensionInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 8, 1) - /** - * Directory recommended to save the file on - */ - val expectedDir : UByte? - get() { - val o = __offset(10) - return if(o != 0) bb.get(o + bb_pos).toUByte() else null - } - /** - * Recommended filename - */ - val expectedFilename : String? - get() { - val o = __offset(12) - return if (o != 0) __string(o + bb_pos) else null - } - val expectedFilenameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(12, 1) - fun expectedFilenameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 12, 1) - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsSaveFileNotification(_bb: ByteBuffer): SaveFileNotification = getRootAsSaveFileNotification(_bb, SaveFileNotification()) - @JvmStatic - fun getRootAsSaveFileNotification(_bb: ByteBuffer, obj: SaveFileNotification): SaveFileNotification { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createSaveFileNotification(builder: FlatBufferBuilder, dataOffset: Int, mimeTypeOffset: Int, fileExtensionOffset: Int, expectedDir: UByte?, expectedFilenameOffset: Int) : Int { - builder.startTable(5) - addExpectedFilename(builder, expectedFilenameOffset) - addFileExtension(builder, fileExtensionOffset) - addMimeType(builder, mimeTypeOffset) - addData(builder, dataOffset) - expectedDir?.run { addExpectedDir(builder, expectedDir) } - return endSaveFileNotification(builder) - } - @JvmStatic - fun startSaveFileNotification(builder: FlatBufferBuilder) = builder.startTable(5) - @JvmStatic - fun addData(builder: FlatBufferBuilder, data: Int) = builder.addOffset(0, data, 0) - @JvmStatic - fun createDataVector(builder: FlatBufferBuilder, data: UByteArray) : Int { - builder.startVector(1, data.size, 1) - for (i in data.size - 1 downTo 0) { - builder.addByte(data[i].toByte()) - } - return builder.endVector() - } - @JvmStatic - fun startDataVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(1, numElems, 1) - @JvmStatic - fun addMimeType(builder: FlatBufferBuilder, mimeType: Int) = builder.addOffset(1, mimeType, 0) - @JvmStatic - fun addFileExtension(builder: FlatBufferBuilder, fileExtension: Int) = builder.addOffset(2, fileExtension, 0) - @JvmStatic - fun addExpectedDir(builder: FlatBufferBuilder, expectedDir: UByte) = builder.addByte(3, expectedDir.toByte(), 0) - @JvmStatic - fun addExpectedFilename(builder: FlatBufferBuilder, expectedFilename: Int) = builder.addOffset(4, expectedFilename, 0) - @JvmStatic - fun endSaveFileNotification(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Used for the server to save a file and have it prompt in the user side + */ +@Suppress("unused") +class SaveFileNotification : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SaveFileNotification { + __init(_i, _bb) + return this + } + /** + * Binary data of the file + */ + fun data(j: Int) : UByte { + val o = __offset(4) + return if (o != 0) { + bb.get(__vector(o) + j * 1).toUByte() + } else { + 0u + } + } + val dataLength : Int + get() { + val o = __offset(4); return if (o != 0) __vector_len(o) else 0 + } + val dataAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun dataInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + /** + * MIME type of file if one exists, use `file_extension` otherwise + */ + val mimeType : String? + get() { + val o = __offset(6) + return if (o != 0) __string(o + bb_pos) else null + } + val mimeTypeAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) + fun mimeTypeInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) + /** + * Use MIME type preferably if one exists + */ + val fileExtension : String? + get() { + val o = __offset(8) + return if (o != 0) __string(o + bb_pos) else null + } + val fileExtensionAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(8, 1) + fun fileExtensionInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 8, 1) + /** + * Directory recommended to save the file on + */ + val expectedDir : UByte? + get() { + val o = __offset(10) + return if(o != 0) bb.get(o + bb_pos).toUByte() else null + } + /** + * Recommended filename + */ + val expectedFilename : String? + get() { + val o = __offset(12) + return if (o != 0) __string(o + bb_pos) else null + } + val expectedFilenameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(12, 1) + fun expectedFilenameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 12, 1) + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSaveFileNotification(_bb: ByteBuffer): SaveFileNotification = getRootAsSaveFileNotification(_bb, SaveFileNotification()) + @JvmStatic + fun getRootAsSaveFileNotification(_bb: ByteBuffer, obj: SaveFileNotification): SaveFileNotification { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createSaveFileNotification(builder: FlatBufferBuilder, dataOffset: Int, mimeTypeOffset: Int, fileExtensionOffset: Int, expectedDir: UByte?, expectedFilenameOffset: Int) : Int { + builder.startTable(5) + addExpectedFilename(builder, expectedFilenameOffset) + addFileExtension(builder, fileExtensionOffset) + addMimeType(builder, mimeTypeOffset) + addData(builder, dataOffset) + expectedDir?.run { addExpectedDir(builder, expectedDir) } + return endSaveFileNotification(builder) + } + @JvmStatic + fun startSaveFileNotification(builder: FlatBufferBuilder) = builder.startTable(5) + @JvmStatic + fun addData(builder: FlatBufferBuilder, data: Int) = builder.addOffset(0, data, 0) + @JvmStatic + fun createDataVector(builder: FlatBufferBuilder, data: UByteArray) : Int { + builder.startVector(1, data.size, 1) + for (i in data.size - 1 downTo 0) { + builder.addByte(data[i].toByte()) + } + return builder.endVector() + } + @JvmStatic + fun startDataVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(1, numElems, 1) + @JvmStatic + fun addMimeType(builder: FlatBufferBuilder, mimeType: Int) = builder.addOffset(1, mimeType, 0) + @JvmStatic + fun addFileExtension(builder: FlatBufferBuilder, fileExtension: Int) = builder.addOffset(2, fileExtension, 0) + @JvmStatic + fun addExpectedDir(builder: FlatBufferBuilder, expectedDir: UByte) = builder.addByte(3, expectedDir.toByte(), 0) + @JvmStatic + fun addExpectedFilename(builder: FlatBufferBuilder, expectedFilename: Int) = builder.addOffset(4, expectedFilename, 0) + @JvmStatic + fun endSaveFileNotification(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SerialDevice.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SerialDevice.kt index 429d5678..a4656a0e 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SerialDevice.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SerialDevice.kt @@ -1,62 +1,62 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class SerialDevice : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : SerialDevice { - __init(_i, _bb) - return this - } - val port : String? - get() { - val o = __offset(4) - return if (o != 0) __string(o + bb_pos) else null - } - val portAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) - fun portInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) - val name : String? - get() { - val o = __offset(6) - return if (o != 0) __string(o + bb_pos) else null - } - val nameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) - fun nameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsSerialDevice(_bb: ByteBuffer): SerialDevice = getRootAsSerialDevice(_bb, SerialDevice()) - @JvmStatic - fun getRootAsSerialDevice(_bb: ByteBuffer, obj: SerialDevice): SerialDevice { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createSerialDevice(builder: FlatBufferBuilder, portOffset: Int, nameOffset: Int) : Int { - builder.startTable(2) - addName(builder, nameOffset) - addPort(builder, portOffset) - return endSerialDevice(builder) - } - @JvmStatic - fun startSerialDevice(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addPort(builder: FlatBufferBuilder, port: Int) = builder.addOffset(0, port, 0) - @JvmStatic - fun addName(builder: FlatBufferBuilder, name: Int) = builder.addOffset(1, name, 0) - @JvmStatic - fun endSerialDevice(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class SerialDevice : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SerialDevice { + __init(_i, _bb) + return this + } + val port : String? + get() { + val o = __offset(4) + return if (o != 0) __string(o + bb_pos) else null + } + val portAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun portInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + val name : String? + get() { + val o = __offset(6) + return if (o != 0) __string(o + bb_pos) else null + } + val nameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) + fun nameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSerialDevice(_bb: ByteBuffer): SerialDevice = getRootAsSerialDevice(_bb, SerialDevice()) + @JvmStatic + fun getRootAsSerialDevice(_bb: ByteBuffer, obj: SerialDevice): SerialDevice { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createSerialDevice(builder: FlatBufferBuilder, portOffset: Int, nameOffset: Int) : Int { + builder.startTable(2) + addName(builder, nameOffset) + addPort(builder, portOffset) + return endSerialDevice(builder) + } + @JvmStatic + fun startSerialDevice(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addPort(builder: FlatBufferBuilder, port: Int) = builder.addOffset(0, port, 0) + @JvmStatic + fun addName(builder: FlatBufferBuilder, name: Int) = builder.addOffset(1, name, 0) + @JvmStatic + fun endSerialDevice(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SerialDevicePort.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SerialDevicePort.kt new file mode 100644 index 00000000..db68ba88 --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SerialDevicePort.kt @@ -0,0 +1,52 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class SerialDevicePort : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SerialDevicePort { + __init(_i, _bb) + return this + } + val port : String? + get() { + val o = __offset(4) + return if (o != 0) __string(o + bb_pos) else null + } + val portAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun portInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSerialDevicePort(_bb: ByteBuffer): SerialDevicePort = getRootAsSerialDevicePort(_bb, SerialDevicePort()) + @JvmStatic + fun getRootAsSerialDevicePort(_bb: ByteBuffer, obj: SerialDevicePort): SerialDevicePort { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createSerialDevicePort(builder: FlatBufferBuilder, portOffset: Int) : Int { + builder.startTable(1) + addPort(builder, portOffset) + return endSerialDevicePort(builder) + } + @JvmStatic + fun startSerialDevicePort(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addPort(builder: FlatBufferBuilder, port: Int) = builder.addOffset(0, port, 0) + @JvmStatic + fun endSerialDevicePort(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SerialDevicesRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SerialDevicesRequest.kt index 591883e7..6d6b7065 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SerialDevicesRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SerialDevicesRequest.kt @@ -1,37 +1,37 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class SerialDevicesRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : SerialDevicesRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsSerialDevicesRequest(_bb: ByteBuffer): SerialDevicesRequest = getRootAsSerialDevicesRequest(_bb, SerialDevicesRequest()) - @JvmStatic - fun getRootAsSerialDevicesRequest(_bb: ByteBuffer, obj: SerialDevicesRequest): SerialDevicesRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startSerialDevicesRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endSerialDevicesRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class SerialDevicesRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SerialDevicesRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSerialDevicesRequest(_bb: ByteBuffer): SerialDevicesRequest = getRootAsSerialDevicesRequest(_bb, SerialDevicesRequest()) + @JvmStatic + fun getRootAsSerialDevicesRequest(_bb: ByteBuffer, obj: SerialDevicesRequest): SerialDevicesRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startSerialDevicesRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endSerialDevicesRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SerialDevicesResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SerialDevicesResponse.kt index acef65b9..1469d874 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SerialDevicesResponse.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SerialDevicesResponse.kt @@ -1,68 +1,68 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class SerialDevicesResponse : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : SerialDevicesResponse { - __init(_i, _bb) - return this - } - fun devices(j: Int) : solarxr_protocol.rpc.SerialDevice? = devices(solarxr_protocol.rpc.SerialDevice(), j) - fun devices(obj: solarxr_protocol.rpc.SerialDevice, j: Int) : solarxr_protocol.rpc.SerialDevice? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(__vector(o) + j * 4), bb) - } else { - null - } - } - val devicesLength : Int - get() { - val o = __offset(4); return if (o != 0) __vector_len(o) else 0 - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsSerialDevicesResponse(_bb: ByteBuffer): SerialDevicesResponse = getRootAsSerialDevicesResponse(_bb, SerialDevicesResponse()) - @JvmStatic - fun getRootAsSerialDevicesResponse(_bb: ByteBuffer, obj: SerialDevicesResponse): SerialDevicesResponse { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createSerialDevicesResponse(builder: FlatBufferBuilder, devicesOffset: Int) : Int { - builder.startTable(1) - addDevices(builder, devicesOffset) - return endSerialDevicesResponse(builder) - } - @JvmStatic - fun startSerialDevicesResponse(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addDevices(builder: FlatBufferBuilder, devices: Int) = builder.addOffset(0, devices, 0) - @JvmStatic - fun createDevicesVector(builder: FlatBufferBuilder, data: IntArray) : Int { - builder.startVector(4, data.size, 4) - for (i in data.size - 1 downTo 0) { - builder.addOffset(data[i]) - } - return builder.endVector() - } - @JvmStatic - fun startDevicesVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) - @JvmStatic - fun endSerialDevicesResponse(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class SerialDevicesResponse : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SerialDevicesResponse { + __init(_i, _bb) + return this + } + fun devices(j: Int) : solarxr_protocol.rpc.SerialDevice? = devices(solarxr_protocol.rpc.SerialDevice(), j) + fun devices(obj: solarxr_protocol.rpc.SerialDevice, j: Int) : solarxr_protocol.rpc.SerialDevice? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(__vector(o) + j * 4), bb) + } else { + null + } + } + val devicesLength : Int + get() { + val o = __offset(4); return if (o != 0) __vector_len(o) else 0 + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSerialDevicesResponse(_bb: ByteBuffer): SerialDevicesResponse = getRootAsSerialDevicesResponse(_bb, SerialDevicesResponse()) + @JvmStatic + fun getRootAsSerialDevicesResponse(_bb: ByteBuffer, obj: SerialDevicesResponse): SerialDevicesResponse { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createSerialDevicesResponse(builder: FlatBufferBuilder, devicesOffset: Int) : Int { + builder.startTable(1) + addDevices(builder, devicesOffset) + return endSerialDevicesResponse(builder) + } + @JvmStatic + fun startSerialDevicesResponse(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addDevices(builder: FlatBufferBuilder, devices: Int) = builder.addOffset(0, devices, 0) + @JvmStatic + fun createDevicesVector(builder: FlatBufferBuilder, data: IntArray) : Int { + builder.startVector(4, data.size, 4) + for (i in data.size - 1 downTo 0) { + builder.addOffset(data[i]) + } + return builder.endVector() + } + @JvmStatic + fun startDevicesVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) + @JvmStatic + fun endSerialDevicesResponse(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SerialFirmwareUpdate.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SerialFirmwareUpdate.kt new file mode 100644 index 00000000..16a0804d --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SerialFirmwareUpdate.kt @@ -0,0 +1,122 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class SerialFirmwareUpdate : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SerialFirmwareUpdate { + __init(_i, _bb) + return this + } + /** + * id of the device, this refer to a serial port id + */ + val deviceId : solarxr_protocol.rpc.SerialDevicePort? get() = deviceId(solarxr_protocol.rpc.SerialDevicePort()) + fun deviceId(obj: solarxr_protocol.rpc.SerialDevicePort) : solarxr_protocol.rpc.SerialDevicePort? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + /** + * Will make the server ask for the tracker to be manually rebooted by the user + * after the tracker is done flashing + */ + val needManualReboot : Boolean + get() { + val o = __offset(6) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + /** + * Credentials to provision after the flashing + * Only used with Serial flashing, because OTA is already connected to the wifi + */ + val ssid : String? + get() { + val o = __offset(8) + return if (o != 0) __string(o + bb_pos) else null + } + val ssidAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(8, 1) + fun ssidInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 8, 1) + val password : String? + get() { + val o = __offset(10) + return if (o != 0) __string(o + bb_pos) else null + } + val passwordAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(10, 1) + fun passwordInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 10, 1) + /** + * A list of urls and offsets of the different firmware files to flash + */ + fun firmwarePart(j: Int) : solarxr_protocol.rpc.FirmwarePart? = firmwarePart(solarxr_protocol.rpc.FirmwarePart(), j) + fun firmwarePart(obj: solarxr_protocol.rpc.FirmwarePart, j: Int) : solarxr_protocol.rpc.FirmwarePart? { + val o = __offset(12) + return if (o != 0) { + obj.__assign(__indirect(__vector(o) + j * 4), bb) + } else { + null + } + } + val firmwarePartLength : Int + get() { + val o = __offset(12); return if (o != 0) __vector_len(o) else 0 + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSerialFirmwareUpdate(_bb: ByteBuffer): SerialFirmwareUpdate = getRootAsSerialFirmwareUpdate(_bb, SerialFirmwareUpdate()) + @JvmStatic + fun getRootAsSerialFirmwareUpdate(_bb: ByteBuffer, obj: SerialFirmwareUpdate): SerialFirmwareUpdate { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createSerialFirmwareUpdate(builder: FlatBufferBuilder, deviceIdOffset: Int, needManualReboot: Boolean, ssidOffset: Int, passwordOffset: Int, firmwarePartOffset: Int) : Int { + builder.startTable(5) + addFirmwarePart(builder, firmwarePartOffset) + addPassword(builder, passwordOffset) + addSsid(builder, ssidOffset) + addDeviceId(builder, deviceIdOffset) + addNeedManualReboot(builder, needManualReboot) + return endSerialFirmwareUpdate(builder) + } + @JvmStatic + fun startSerialFirmwareUpdate(builder: FlatBufferBuilder) = builder.startTable(5) + @JvmStatic + fun addDeviceId(builder: FlatBufferBuilder, deviceId: Int) = builder.addOffset(0, deviceId, 0) + @JvmStatic + fun addNeedManualReboot(builder: FlatBufferBuilder, needManualReboot: Boolean) = builder.addBoolean(1, needManualReboot, false) + @JvmStatic + fun addSsid(builder: FlatBufferBuilder, ssid: Int) = builder.addOffset(2, ssid, 0) + @JvmStatic + fun addPassword(builder: FlatBufferBuilder, password: Int) = builder.addOffset(3, password, 0) + @JvmStatic + fun addFirmwarePart(builder: FlatBufferBuilder, firmwarePart: Int) = builder.addOffset(4, firmwarePart, 0) + @JvmStatic + fun createFirmwarePartVector(builder: FlatBufferBuilder, data: IntArray) : Int { + builder.startVector(4, data.size, 4) + for (i in data.size - 1 downTo 0) { + builder.addOffset(data[i]) + } + return builder.endVector() + } + @JvmStatic + fun startFirmwarePartVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) + @JvmStatic + fun endSerialFirmwareUpdate(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SerialTrackerFactoryResetRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SerialTrackerFactoryResetRequest.kt index ed77bc2b..49c35f64 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SerialTrackerFactoryResetRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SerialTrackerFactoryResetRequest.kt @@ -1,40 +1,40 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Sends the FRST cmd to the currently over the Serial Montior connected Tracker - */ -@Suppress("unused") -class SerialTrackerFactoryResetRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : SerialTrackerFactoryResetRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsSerialTrackerFactoryResetRequest(_bb: ByteBuffer): SerialTrackerFactoryResetRequest = getRootAsSerialTrackerFactoryResetRequest(_bb, SerialTrackerFactoryResetRequest()) - @JvmStatic - fun getRootAsSerialTrackerFactoryResetRequest(_bb: ByteBuffer, obj: SerialTrackerFactoryResetRequest): SerialTrackerFactoryResetRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startSerialTrackerFactoryResetRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endSerialTrackerFactoryResetRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Sends the FRST cmd to the currently over the Serial Montior connected Tracker + */ +@Suppress("unused") +class SerialTrackerFactoryResetRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SerialTrackerFactoryResetRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSerialTrackerFactoryResetRequest(_bb: ByteBuffer): SerialTrackerFactoryResetRequest = getRootAsSerialTrackerFactoryResetRequest(_bb, SerialTrackerFactoryResetRequest()) + @JvmStatic + fun getRootAsSerialTrackerFactoryResetRequest(_bb: ByteBuffer, obj: SerialTrackerFactoryResetRequest): SerialTrackerFactoryResetRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startSerialTrackerFactoryResetRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endSerialTrackerFactoryResetRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SerialTrackerGetInfoRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SerialTrackerGetInfoRequest.kt index b83f9bbe..f53f9bed 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SerialTrackerGetInfoRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SerialTrackerGetInfoRequest.kt @@ -1,40 +1,40 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Sends the GET INFO cmd to the current tracker on the serial monitor - */ -@Suppress("unused") -class SerialTrackerGetInfoRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : SerialTrackerGetInfoRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsSerialTrackerGetInfoRequest(_bb: ByteBuffer): SerialTrackerGetInfoRequest = getRootAsSerialTrackerGetInfoRequest(_bb, SerialTrackerGetInfoRequest()) - @JvmStatic - fun getRootAsSerialTrackerGetInfoRequest(_bb: ByteBuffer, obj: SerialTrackerGetInfoRequest): SerialTrackerGetInfoRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startSerialTrackerGetInfoRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endSerialTrackerGetInfoRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Sends the GET INFO cmd to the current tracker on the serial monitor + */ +@Suppress("unused") +class SerialTrackerGetInfoRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SerialTrackerGetInfoRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSerialTrackerGetInfoRequest(_bb: ByteBuffer): SerialTrackerGetInfoRequest = getRootAsSerialTrackerGetInfoRequest(_bb, SerialTrackerGetInfoRequest()) + @JvmStatic + fun getRootAsSerialTrackerGetInfoRequest(_bb: ByteBuffer, obj: SerialTrackerGetInfoRequest): SerialTrackerGetInfoRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startSerialTrackerGetInfoRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endSerialTrackerGetInfoRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequest.kt index b776857c..fda977df 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequest.kt @@ -1,40 +1,40 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Sends the GET WIFISCAN cmd to the current tracker on the serial monitor - */ -@Suppress("unused") -class SerialTrackerGetWifiScanRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : SerialTrackerGetWifiScanRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsSerialTrackerGetWifiScanRequest(_bb: ByteBuffer): SerialTrackerGetWifiScanRequest = getRootAsSerialTrackerGetWifiScanRequest(_bb, SerialTrackerGetWifiScanRequest()) - @JvmStatic - fun getRootAsSerialTrackerGetWifiScanRequest(_bb: ByteBuffer, obj: SerialTrackerGetWifiScanRequest): SerialTrackerGetWifiScanRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startSerialTrackerGetWifiScanRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endSerialTrackerGetWifiScanRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Sends the GET WIFISCAN cmd to the current tracker on the serial monitor + */ +@Suppress("unused") +class SerialTrackerGetWifiScanRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SerialTrackerGetWifiScanRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSerialTrackerGetWifiScanRequest(_bb: ByteBuffer): SerialTrackerGetWifiScanRequest = getRootAsSerialTrackerGetWifiScanRequest(_bb, SerialTrackerGetWifiScanRequest()) + @JvmStatic + fun getRootAsSerialTrackerGetWifiScanRequest(_bb: ByteBuffer, obj: SerialTrackerGetWifiScanRequest): SerialTrackerGetWifiScanRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startSerialTrackerGetWifiScanRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endSerialTrackerGetWifiScanRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SerialTrackerRebootRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SerialTrackerRebootRequest.kt index e57da4ce..d3988441 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SerialTrackerRebootRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SerialTrackerRebootRequest.kt @@ -1,40 +1,40 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Reboots the tracker connected to the serial monitor - */ -@Suppress("unused") -class SerialTrackerRebootRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : SerialTrackerRebootRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsSerialTrackerRebootRequest(_bb: ByteBuffer): SerialTrackerRebootRequest = getRootAsSerialTrackerRebootRequest(_bb, SerialTrackerRebootRequest()) - @JvmStatic - fun getRootAsSerialTrackerRebootRequest(_bb: ByteBuffer, obj: SerialTrackerRebootRequest): SerialTrackerRebootRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startSerialTrackerRebootRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endSerialTrackerRebootRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Reboots the tracker connected to the serial monitor + */ +@Suppress("unused") +class SerialTrackerRebootRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SerialTrackerRebootRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSerialTrackerRebootRequest(_bb: ByteBuffer): SerialTrackerRebootRequest = getRootAsSerialTrackerRebootRequest(_bb, SerialTrackerRebootRequest()) + @JvmStatic + fun getRootAsSerialTrackerRebootRequest(_bb: ByteBuffer, obj: SerialTrackerRebootRequest): SerialTrackerRebootRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startSerialTrackerRebootRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endSerialTrackerRebootRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SerialUpdateResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SerialUpdateResponse.kt index c49830e6..fe1cefd6 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SerialUpdateResponse.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SerialUpdateResponse.kt @@ -1,60 +1,60 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class SerialUpdateResponse : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : SerialUpdateResponse { - __init(_i, _bb) - return this - } - val log : String? - get() { - val o = __offset(4) - return if (o != 0) __string(o + bb_pos) else null - } - val logAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) - fun logInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) - val closed : Boolean - get() { - val o = __offset(6) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsSerialUpdateResponse(_bb: ByteBuffer): SerialUpdateResponse = getRootAsSerialUpdateResponse(_bb, SerialUpdateResponse()) - @JvmStatic - fun getRootAsSerialUpdateResponse(_bb: ByteBuffer, obj: SerialUpdateResponse): SerialUpdateResponse { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createSerialUpdateResponse(builder: FlatBufferBuilder, logOffset: Int, closed: Boolean) : Int { - builder.startTable(2) - addLog(builder, logOffset) - addClosed(builder, closed) - return endSerialUpdateResponse(builder) - } - @JvmStatic - fun startSerialUpdateResponse(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addLog(builder: FlatBufferBuilder, log: Int) = builder.addOffset(0, log, 0) - @JvmStatic - fun addClosed(builder: FlatBufferBuilder, closed: Boolean) = builder.addBoolean(1, closed, false) - @JvmStatic - fun endSerialUpdateResponse(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class SerialUpdateResponse : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SerialUpdateResponse { + __init(_i, _bb) + return this + } + val log : String? + get() { + val o = __offset(4) + return if (o != 0) __string(o + bb_pos) else null + } + val logAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun logInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + val closed : Boolean + get() { + val o = __offset(6) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSerialUpdateResponse(_bb: ByteBuffer): SerialUpdateResponse = getRootAsSerialUpdateResponse(_bb, SerialUpdateResponse()) + @JvmStatic + fun getRootAsSerialUpdateResponse(_bb: ByteBuffer, obj: SerialUpdateResponse): SerialUpdateResponse { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createSerialUpdateResponse(builder: FlatBufferBuilder, logOffset: Int, closed: Boolean) : Int { + builder.startTable(2) + addLog(builder, logOffset) + addClosed(builder, closed) + return endSerialUpdateResponse(builder) + } + @JvmStatic + fun startSerialUpdateResponse(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addLog(builder: FlatBufferBuilder, log: Int) = builder.addOffset(0, log, 0) + @JvmStatic + fun addClosed(builder: FlatBufferBuilder, closed: Boolean) = builder.addBoolean(1, closed, false) + @JvmStatic + fun endSerialUpdateResponse(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ServerInfosRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ServerInfosRequest.kt index a72a6578..c7a9f38e 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/ServerInfosRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ServerInfosRequest.kt @@ -1,43 +1,43 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Allows to ask generic infos about the server, - * like the local ip address, the version of the server, the java version, - * the current working dir and other informations we might want to show in the gui - * for information/debug purposes - */ -@Suppress("unused") -class ServerInfosRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : ServerInfosRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsServerInfosRequest(_bb: ByteBuffer): ServerInfosRequest = getRootAsServerInfosRequest(_bb, ServerInfosRequest()) - @JvmStatic - fun getRootAsServerInfosRequest(_bb: ByteBuffer, obj: ServerInfosRequest): ServerInfosRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startServerInfosRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endServerInfosRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Allows to ask generic infos about the server, + * like the local ip address, the version of the server, the java version, + * the current working dir and other informations we might want to show in the gui + * for information/debug purposes + */ +@Suppress("unused") +class ServerInfosRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : ServerInfosRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsServerInfosRequest(_bb: ByteBuffer): ServerInfosRequest = getRootAsServerInfosRequest(_bb, ServerInfosRequest()) + @JvmStatic + fun getRootAsServerInfosRequest(_bb: ByteBuffer, obj: ServerInfosRequest): ServerInfosRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startServerInfosRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endServerInfosRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ServerInfosResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ServerInfosResponse.kt index 52b057b8..874d6ac2 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/ServerInfosResponse.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ServerInfosResponse.kt @@ -1,58 +1,58 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Holds the Server informations, this is a basic table holding various informations about the currently running server - * like its local ip address (usefull for standalone users so they can specify the ip of the server more easilly) and any more - * infos we might want to add in the future. (like java version, working dir, server version ....) - * This only holds the local ip for now. But there will be other informations added as we chose to display them on the gui for instance - */ -@Suppress("unused") -class ServerInfosResponse : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : ServerInfosResponse { - __init(_i, _bb) - return this - } - val localIp : String? - get() { - val o = __offset(4) - return if (o != 0) __string(o + bb_pos) else null - } - val localIpAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) - fun localIpInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsServerInfosResponse(_bb: ByteBuffer): ServerInfosResponse = getRootAsServerInfosResponse(_bb, ServerInfosResponse()) - @JvmStatic - fun getRootAsServerInfosResponse(_bb: ByteBuffer, obj: ServerInfosResponse): ServerInfosResponse { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createServerInfosResponse(builder: FlatBufferBuilder, localIpOffset: Int) : Int { - builder.startTable(1) - addLocalIp(builder, localIpOffset) - return endServerInfosResponse(builder) - } - @JvmStatic - fun startServerInfosResponse(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addLocalIp(builder: FlatBufferBuilder, localIp: Int) = builder.addOffset(0, localIp, 0) - @JvmStatic - fun endServerInfosResponse(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Holds the Server informations, this is a basic table holding various informations about the currently running server + * like its local ip address (usefull for standalone users so they can specify the ip of the server more easilly) and any more + * infos we might want to add in the future. (like java version, working dir, server version ....) + * This only holds the local ip for now. But there will be other informations added as we chose to display them on the gui for instance + */ +@Suppress("unused") +class ServerInfosResponse : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : ServerInfosResponse { + __init(_i, _bb) + return this + } + val localIp : String? + get() { + val o = __offset(4) + return if (o != 0) __string(o + bb_pos) else null + } + val localIpAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun localIpInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsServerInfosResponse(_bb: ByteBuffer): ServerInfosResponse = getRootAsServerInfosResponse(_bb, ServerInfosResponse()) + @JvmStatic + fun getRootAsServerInfosResponse(_bb: ByteBuffer, obj: ServerInfosResponse): ServerInfosResponse { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createServerInfosResponse(builder: FlatBufferBuilder, localIpOffset: Int) : Int { + builder.startTable(1) + addLocalIp(builder, localIpOffset) + return endServerInfosResponse(builder) + } + @JvmStatic + fun startServerInfosResponse(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addLocalIp(builder: FlatBufferBuilder, localIp: Int) = builder.addOffset(0, localIp, 0) + @JvmStatic + fun endServerInfosResponse(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SetPauseTrackingRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SetPauseTrackingRequest.kt index 20d07f46..378cad3d 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SetPauseTrackingRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SetPauseTrackingRequest.kt @@ -1,53 +1,53 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class SetPauseTrackingRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : SetPauseTrackingRequest { - __init(_i, _bb) - return this - } - /** - * Pauses skeleton tracking if true, resumes skeleton tracking if false. - */ - val pauseTracking : Boolean - get() { - val o = __offset(4) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsSetPauseTrackingRequest(_bb: ByteBuffer): SetPauseTrackingRequest = getRootAsSetPauseTrackingRequest(_bb, SetPauseTrackingRequest()) - @JvmStatic - fun getRootAsSetPauseTrackingRequest(_bb: ByteBuffer, obj: SetPauseTrackingRequest): SetPauseTrackingRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createSetPauseTrackingRequest(builder: FlatBufferBuilder, pauseTracking: Boolean) : Int { - builder.startTable(1) - addPauseTracking(builder, pauseTracking) - return endSetPauseTrackingRequest(builder) - } - @JvmStatic - fun startSetPauseTrackingRequest(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addPauseTracking(builder: FlatBufferBuilder, pauseTracking: Boolean) = builder.addBoolean(0, pauseTracking, false) - @JvmStatic - fun endSetPauseTrackingRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class SetPauseTrackingRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SetPauseTrackingRequest { + __init(_i, _bb) + return this + } + /** + * Pauses skeleton tracking if true, resumes skeleton tracking if false. + */ + val pauseTracking : Boolean + get() { + val o = __offset(4) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSetPauseTrackingRequest(_bb: ByteBuffer): SetPauseTrackingRequest = getRootAsSetPauseTrackingRequest(_bb, SetPauseTrackingRequest()) + @JvmStatic + fun getRootAsSetPauseTrackingRequest(_bb: ByteBuffer, obj: SetPauseTrackingRequest): SetPauseTrackingRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createSetPauseTrackingRequest(builder: FlatBufferBuilder, pauseTracking: Boolean) : Int { + builder.startTable(1) + addPauseTracking(builder, pauseTracking) + return endSetPauseTrackingRequest(builder) + } + @JvmStatic + fun startSetPauseTrackingRequest(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addPauseTracking(builder: FlatBufferBuilder, pauseTracking: Boolean) = builder.addBoolean(0, pauseTracking, false) + @JvmStatic + fun endSetPauseTrackingRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SetWifiRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SetWifiRequest.kt index 3c5757ff..20a35a09 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SetWifiRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SetWifiRequest.kt @@ -1,62 +1,62 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class SetWifiRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : SetWifiRequest { - __init(_i, _bb) - return this - } - val ssid : String? - get() { - val o = __offset(4) - return if (o != 0) __string(o + bb_pos) else null - } - val ssidAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) - fun ssidInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) - val password : String? - get() { - val o = __offset(6) - return if (o != 0) __string(o + bb_pos) else null - } - val passwordAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) - fun passwordInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsSetWifiRequest(_bb: ByteBuffer): SetWifiRequest = getRootAsSetWifiRequest(_bb, SetWifiRequest()) - @JvmStatic - fun getRootAsSetWifiRequest(_bb: ByteBuffer, obj: SetWifiRequest): SetWifiRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createSetWifiRequest(builder: FlatBufferBuilder, ssidOffset: Int, passwordOffset: Int) : Int { - builder.startTable(2) - addPassword(builder, passwordOffset) - addSsid(builder, ssidOffset) - return endSetWifiRequest(builder) - } - @JvmStatic - fun startSetWifiRequest(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addSsid(builder: FlatBufferBuilder, ssid: Int) = builder.addOffset(0, ssid, 0) - @JvmStatic - fun addPassword(builder: FlatBufferBuilder, password: Int) = builder.addOffset(1, password, 0) - @JvmStatic - fun endSetWifiRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class SetWifiRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SetWifiRequest { + __init(_i, _bb) + return this + } + val ssid : String? + get() { + val o = __offset(4) + return if (o != 0) __string(o + bb_pos) else null + } + val ssidAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun ssidInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + val password : String? + get() { + val o = __offset(6) + return if (o != 0) __string(o + bb_pos) else null + } + val passwordAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) + fun passwordInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSetWifiRequest(_bb: ByteBuffer): SetWifiRequest = getRootAsSetWifiRequest(_bb, SetWifiRequest()) + @JvmStatic + fun getRootAsSetWifiRequest(_bb: ByteBuffer, obj: SetWifiRequest): SetWifiRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createSetWifiRequest(builder: FlatBufferBuilder, ssidOffset: Int, passwordOffset: Int) : Int { + builder.startTable(2) + addPassword(builder, passwordOffset) + addSsid(builder, ssidOffset) + return endSetWifiRequest(builder) + } + @JvmStatic + fun startSetWifiRequest(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addSsid(builder: FlatBufferBuilder, ssid: Int) = builder.addOffset(0, ssid, 0) + @JvmStatic + fun addPassword(builder: FlatBufferBuilder, password: Int) = builder.addOffset(1, password, 0) + @JvmStatic + fun endSetWifiRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SettingsRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SettingsRequest.kt index 796f9c47..1ef64b89 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SettingsRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SettingsRequest.kt @@ -1,37 +1,37 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class SettingsRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : SettingsRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsSettingsRequest(_bb: ByteBuffer): SettingsRequest = getRootAsSettingsRequest(_bb, SettingsRequest()) - @JvmStatic - fun getRootAsSettingsRequest(_bb: ByteBuffer, obj: SettingsRequest): SettingsRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startSettingsRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endSettingsRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class SettingsRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SettingsRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSettingsRequest(_bb: ByteBuffer): SettingsRequest = getRootAsSettingsRequest(_bb, SettingsRequest()) + @JvmStatic + fun getRootAsSettingsRequest(_bb: ByteBuffer, obj: SettingsRequest): SettingsRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startSettingsRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endSettingsRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SettingsResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SettingsResponse.kt index edcf3a8c..a8d727d3 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SettingsResponse.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SettingsResponse.kt @@ -1,162 +1,162 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class SettingsResponse : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : SettingsResponse { - __init(_i, _bb) - return this - } - val steamVrTrackers : solarxr_protocol.rpc.SteamVRTrackersSetting? get() = steamVrTrackers(solarxr_protocol.rpc.SteamVRTrackersSetting()) - fun steamVrTrackers(obj: solarxr_protocol.rpc.SteamVRTrackersSetting) : solarxr_protocol.rpc.SteamVRTrackersSetting? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val filtering : solarxr_protocol.rpc.FilteringSettings? get() = filtering(solarxr_protocol.rpc.FilteringSettings()) - fun filtering(obj: solarxr_protocol.rpc.FilteringSettings) : solarxr_protocol.rpc.FilteringSettings? { - val o = __offset(6) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val driftCompensation : solarxr_protocol.rpc.DriftCompensationSettings? get() = driftCompensation(solarxr_protocol.rpc.DriftCompensationSettings()) - fun driftCompensation(obj: solarxr_protocol.rpc.DriftCompensationSettings) : solarxr_protocol.rpc.DriftCompensationSettings? { - val o = __offset(8) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val oscRouter : solarxr_protocol.rpc.OSCRouterSettings? get() = oscRouter(solarxr_protocol.rpc.OSCRouterSettings()) - fun oscRouter(obj: solarxr_protocol.rpc.OSCRouterSettings) : solarxr_protocol.rpc.OSCRouterSettings? { - val o = __offset(10) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val vrcOsc : solarxr_protocol.rpc.VRCOSCSettings? get() = vrcOsc(solarxr_protocol.rpc.VRCOSCSettings()) - fun vrcOsc(obj: solarxr_protocol.rpc.VRCOSCSettings) : solarxr_protocol.rpc.VRCOSCSettings? { - val o = __offset(12) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val vmcOsc : solarxr_protocol.rpc.VMCOSCSettings? get() = vmcOsc(solarxr_protocol.rpc.VMCOSCSettings()) - fun vmcOsc(obj: solarxr_protocol.rpc.VMCOSCSettings) : solarxr_protocol.rpc.VMCOSCSettings? { - val o = __offset(14) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val modelSettings : solarxr_protocol.rpc.settings.ModelSettings? get() = modelSettings(solarxr_protocol.rpc.settings.ModelSettings()) - fun modelSettings(obj: solarxr_protocol.rpc.settings.ModelSettings) : solarxr_protocol.rpc.settings.ModelSettings? { - val o = __offset(16) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val tapDetectionSettings : solarxr_protocol.rpc.TapDetectionSettings? get() = tapDetectionSettings(solarxr_protocol.rpc.TapDetectionSettings()) - fun tapDetectionSettings(obj: solarxr_protocol.rpc.TapDetectionSettings) : solarxr_protocol.rpc.TapDetectionSettings? { - val o = __offset(18) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val autoBoneSettings : solarxr_protocol.rpc.AutoBoneSettings? get() = autoBoneSettings(solarxr_protocol.rpc.AutoBoneSettings()) - fun autoBoneSettings(obj: solarxr_protocol.rpc.AutoBoneSettings) : solarxr_protocol.rpc.AutoBoneSettings? { - val o = __offset(20) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val resetsSettings : solarxr_protocol.rpc.ResetsSettings? get() = resetsSettings(solarxr_protocol.rpc.ResetsSettings()) - fun resetsSettings(obj: solarxr_protocol.rpc.ResetsSettings) : solarxr_protocol.rpc.ResetsSettings? { - val o = __offset(22) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsSettingsResponse(_bb: ByteBuffer): SettingsResponse = getRootAsSettingsResponse(_bb, SettingsResponse()) - @JvmStatic - fun getRootAsSettingsResponse(_bb: ByteBuffer, obj: SettingsResponse): SettingsResponse { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createSettingsResponse(builder: FlatBufferBuilder, steamVrTrackersOffset: Int, filteringOffset: Int, driftCompensationOffset: Int, oscRouterOffset: Int, vrcOscOffset: Int, vmcOscOffset: Int, modelSettingsOffset: Int, tapDetectionSettingsOffset: Int, autoBoneSettingsOffset: Int, resetsSettingsOffset: Int) : Int { - builder.startTable(10) - addResetsSettings(builder, resetsSettingsOffset) - addAutoBoneSettings(builder, autoBoneSettingsOffset) - addTapDetectionSettings(builder, tapDetectionSettingsOffset) - addModelSettings(builder, modelSettingsOffset) - addVmcOsc(builder, vmcOscOffset) - addVrcOsc(builder, vrcOscOffset) - addOscRouter(builder, oscRouterOffset) - addDriftCompensation(builder, driftCompensationOffset) - addFiltering(builder, filteringOffset) - addSteamVrTrackers(builder, steamVrTrackersOffset) - return endSettingsResponse(builder) - } - @JvmStatic - fun startSettingsResponse(builder: FlatBufferBuilder) = builder.startTable(10) - @JvmStatic - fun addSteamVrTrackers(builder: FlatBufferBuilder, steamVrTrackers: Int) = builder.addOffset(0, steamVrTrackers, 0) - @JvmStatic - fun addFiltering(builder: FlatBufferBuilder, filtering: Int) = builder.addOffset(1, filtering, 0) - @JvmStatic - fun addDriftCompensation(builder: FlatBufferBuilder, driftCompensation: Int) = builder.addOffset(2, driftCompensation, 0) - @JvmStatic - fun addOscRouter(builder: FlatBufferBuilder, oscRouter: Int) = builder.addOffset(3, oscRouter, 0) - @JvmStatic - fun addVrcOsc(builder: FlatBufferBuilder, vrcOsc: Int) = builder.addOffset(4, vrcOsc, 0) - @JvmStatic - fun addVmcOsc(builder: FlatBufferBuilder, vmcOsc: Int) = builder.addOffset(5, vmcOsc, 0) - @JvmStatic - fun addModelSettings(builder: FlatBufferBuilder, modelSettings: Int) = builder.addOffset(6, modelSettings, 0) - @JvmStatic - fun addTapDetectionSettings(builder: FlatBufferBuilder, tapDetectionSettings: Int) = builder.addOffset(7, tapDetectionSettings, 0) - @JvmStatic - fun addAutoBoneSettings(builder: FlatBufferBuilder, autoBoneSettings: Int) = builder.addOffset(8, autoBoneSettings, 0) - @JvmStatic - fun addResetsSettings(builder: FlatBufferBuilder, resetsSettings: Int) = builder.addOffset(9, resetsSettings, 0) - @JvmStatic - fun endSettingsResponse(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class SettingsResponse : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SettingsResponse { + __init(_i, _bb) + return this + } + val steamVrTrackers : solarxr_protocol.rpc.SteamVRTrackersSetting? get() = steamVrTrackers(solarxr_protocol.rpc.SteamVRTrackersSetting()) + fun steamVrTrackers(obj: solarxr_protocol.rpc.SteamVRTrackersSetting) : solarxr_protocol.rpc.SteamVRTrackersSetting? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val filtering : solarxr_protocol.rpc.FilteringSettings? get() = filtering(solarxr_protocol.rpc.FilteringSettings()) + fun filtering(obj: solarxr_protocol.rpc.FilteringSettings) : solarxr_protocol.rpc.FilteringSettings? { + val o = __offset(6) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val driftCompensation : solarxr_protocol.rpc.DriftCompensationSettings? get() = driftCompensation(solarxr_protocol.rpc.DriftCompensationSettings()) + fun driftCompensation(obj: solarxr_protocol.rpc.DriftCompensationSettings) : solarxr_protocol.rpc.DriftCompensationSettings? { + val o = __offset(8) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val oscRouter : solarxr_protocol.rpc.OSCRouterSettings? get() = oscRouter(solarxr_protocol.rpc.OSCRouterSettings()) + fun oscRouter(obj: solarxr_protocol.rpc.OSCRouterSettings) : solarxr_protocol.rpc.OSCRouterSettings? { + val o = __offset(10) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val vrcOsc : solarxr_protocol.rpc.VRCOSCSettings? get() = vrcOsc(solarxr_protocol.rpc.VRCOSCSettings()) + fun vrcOsc(obj: solarxr_protocol.rpc.VRCOSCSettings) : solarxr_protocol.rpc.VRCOSCSettings? { + val o = __offset(12) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val vmcOsc : solarxr_protocol.rpc.VMCOSCSettings? get() = vmcOsc(solarxr_protocol.rpc.VMCOSCSettings()) + fun vmcOsc(obj: solarxr_protocol.rpc.VMCOSCSettings) : solarxr_protocol.rpc.VMCOSCSettings? { + val o = __offset(14) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val modelSettings : solarxr_protocol.rpc.settings.ModelSettings? get() = modelSettings(solarxr_protocol.rpc.settings.ModelSettings()) + fun modelSettings(obj: solarxr_protocol.rpc.settings.ModelSettings) : solarxr_protocol.rpc.settings.ModelSettings? { + val o = __offset(16) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val tapDetectionSettings : solarxr_protocol.rpc.TapDetectionSettings? get() = tapDetectionSettings(solarxr_protocol.rpc.TapDetectionSettings()) + fun tapDetectionSettings(obj: solarxr_protocol.rpc.TapDetectionSettings) : solarxr_protocol.rpc.TapDetectionSettings? { + val o = __offset(18) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val autoBoneSettings : solarxr_protocol.rpc.AutoBoneSettings? get() = autoBoneSettings(solarxr_protocol.rpc.AutoBoneSettings()) + fun autoBoneSettings(obj: solarxr_protocol.rpc.AutoBoneSettings) : solarxr_protocol.rpc.AutoBoneSettings? { + val o = __offset(20) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val resetsSettings : solarxr_protocol.rpc.ResetsSettings? get() = resetsSettings(solarxr_protocol.rpc.ResetsSettings()) + fun resetsSettings(obj: solarxr_protocol.rpc.ResetsSettings) : solarxr_protocol.rpc.ResetsSettings? { + val o = __offset(22) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSettingsResponse(_bb: ByteBuffer): SettingsResponse = getRootAsSettingsResponse(_bb, SettingsResponse()) + @JvmStatic + fun getRootAsSettingsResponse(_bb: ByteBuffer, obj: SettingsResponse): SettingsResponse { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createSettingsResponse(builder: FlatBufferBuilder, steamVrTrackersOffset: Int, filteringOffset: Int, driftCompensationOffset: Int, oscRouterOffset: Int, vrcOscOffset: Int, vmcOscOffset: Int, modelSettingsOffset: Int, tapDetectionSettingsOffset: Int, autoBoneSettingsOffset: Int, resetsSettingsOffset: Int) : Int { + builder.startTable(10) + addResetsSettings(builder, resetsSettingsOffset) + addAutoBoneSettings(builder, autoBoneSettingsOffset) + addTapDetectionSettings(builder, tapDetectionSettingsOffset) + addModelSettings(builder, modelSettingsOffset) + addVmcOsc(builder, vmcOscOffset) + addVrcOsc(builder, vrcOscOffset) + addOscRouter(builder, oscRouterOffset) + addDriftCompensation(builder, driftCompensationOffset) + addFiltering(builder, filteringOffset) + addSteamVrTrackers(builder, steamVrTrackersOffset) + return endSettingsResponse(builder) + } + @JvmStatic + fun startSettingsResponse(builder: FlatBufferBuilder) = builder.startTable(10) + @JvmStatic + fun addSteamVrTrackers(builder: FlatBufferBuilder, steamVrTrackers: Int) = builder.addOffset(0, steamVrTrackers, 0) + @JvmStatic + fun addFiltering(builder: FlatBufferBuilder, filtering: Int) = builder.addOffset(1, filtering, 0) + @JvmStatic + fun addDriftCompensation(builder: FlatBufferBuilder, driftCompensation: Int) = builder.addOffset(2, driftCompensation, 0) + @JvmStatic + fun addOscRouter(builder: FlatBufferBuilder, oscRouter: Int) = builder.addOffset(3, oscRouter, 0) + @JvmStatic + fun addVrcOsc(builder: FlatBufferBuilder, vrcOsc: Int) = builder.addOffset(4, vrcOsc, 0) + @JvmStatic + fun addVmcOsc(builder: FlatBufferBuilder, vmcOsc: Int) = builder.addOffset(5, vmcOsc, 0) + @JvmStatic + fun addModelSettings(builder: FlatBufferBuilder, modelSettings: Int) = builder.addOffset(6, modelSettings, 0) + @JvmStatic + fun addTapDetectionSettings(builder: FlatBufferBuilder, tapDetectionSettings: Int) = builder.addOffset(7, tapDetectionSettings, 0) + @JvmStatic + fun addAutoBoneSettings(builder: FlatBufferBuilder, autoBoneSettings: Int) = builder.addOffset(8, autoBoneSettings, 0) + @JvmStatic + fun addResetsSettings(builder: FlatBufferBuilder, resetsSettings: Int) = builder.addOffset(9, resetsSettings, 0) + @JvmStatic + fun endSettingsResponse(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SkeletonBone.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SkeletonBone.kt index 85cdac0e..e4e0ea84 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SkeletonBone.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SkeletonBone.kt @@ -1,34 +1,34 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -@Suppress("unused") -class SkeletonBone private constructor() { - companion object { - const val NONE: UByte = 0u - const val HEAD: UByte = 1u - const val NECK: UByte = 2u - const val CHEST: UByte = 3u - const val CHESTOFFSET: UByte = 4u - const val WAIST: UByte = 5u - const val HIP: UByte = 6u - const val HIPOFFSET: UByte = 7u - const val HIPSWIDTH: UByte = 8u - const val UPPERLEG: UByte = 9u - const val LOWERLEG: UByte = 10u - const val FOOTLENGTH: UByte = 11u - const val FOOTSHIFT: UByte = 12u - const val SKELETONOFFSET: UByte = 13u - const val SHOULDERSDISTANCE: UByte = 14u - const val SHOULDERSWIDTH: UByte = 15u - const val UPPERARM: UByte = 16u - const val LOWERARM: UByte = 17u - const val HANDY: UByte = 18u - const val HANDZ: UByte = 19u - const val ELBOWOFFSET: UByte = 20u - const val UPPERCHEST: UByte = 21u - val names : Array = arrayOf("NONE", "HEAD", "NECK", "CHEST", "CHEST_OFFSET", "WAIST", "HIP", "HIP_OFFSET", "HIPS_WIDTH", "UPPER_LEG", "LOWER_LEG", "FOOT_LENGTH", "FOOT_SHIFT", "SKELETON_OFFSET", "SHOULDERS_DISTANCE", "SHOULDERS_WIDTH", "UPPER_ARM", "LOWER_ARM", "HAND_Y", "HAND_Z", "ELBOW_OFFSET", "UPPER_CHEST") - @JvmStatic - fun name(e: Int) : String = names[e] - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +@Suppress("unused") +class SkeletonBone private constructor() { + companion object { + const val NONE: UByte = 0u + const val HEAD: UByte = 1u + const val NECK: UByte = 2u + const val CHEST: UByte = 3u + const val CHESTOFFSET: UByte = 4u + const val WAIST: UByte = 5u + const val HIP: UByte = 6u + const val HIPOFFSET: UByte = 7u + const val HIPSWIDTH: UByte = 8u + const val UPPERLEG: UByte = 9u + const val LOWERLEG: UByte = 10u + const val FOOTLENGTH: UByte = 11u + const val FOOTSHIFT: UByte = 12u + const val SKELETONOFFSET: UByte = 13u + const val SHOULDERSDISTANCE: UByte = 14u + const val SHOULDERSWIDTH: UByte = 15u + const val UPPERARM: UByte = 16u + const val LOWERARM: UByte = 17u + const val HANDY: UByte = 18u + const val HANDZ: UByte = 19u + const val ELBOWOFFSET: UByte = 20u + const val UPPERCHEST: UByte = 21u + val names : Array = arrayOf("NONE", "HEAD", "NECK", "CHEST", "CHEST_OFFSET", "WAIST", "HIP", "HIP_OFFSET", "HIPS_WIDTH", "UPPER_LEG", "LOWER_LEG", "FOOT_LENGTH", "FOOT_SHIFT", "SKELETON_OFFSET", "SHOULDERS_DISTANCE", "SHOULDERS_WIDTH", "UPPER_ARM", "LOWER_ARM", "HAND_Y", "HAND_Z", "ELBOW_OFFSET", "UPPER_CHEST") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SkeletonConfigRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SkeletonConfigRequest.kt index 11f96293..576be5bb 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SkeletonConfigRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SkeletonConfigRequest.kt @@ -1,37 +1,37 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class SkeletonConfigRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : SkeletonConfigRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsSkeletonConfigRequest(_bb: ByteBuffer): SkeletonConfigRequest = getRootAsSkeletonConfigRequest(_bb, SkeletonConfigRequest()) - @JvmStatic - fun getRootAsSkeletonConfigRequest(_bb: ByteBuffer, obj: SkeletonConfigRequest): SkeletonConfigRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startSkeletonConfigRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endSkeletonConfigRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class SkeletonConfigRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SkeletonConfigRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSkeletonConfigRequest(_bb: ByteBuffer): SkeletonConfigRequest = getRootAsSkeletonConfigRequest(_bb, SkeletonConfigRequest()) + @JvmStatic + fun getRootAsSkeletonConfigRequest(_bb: ByteBuffer, obj: SkeletonConfigRequest): SkeletonConfigRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startSkeletonConfigRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endSkeletonConfigRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SkeletonConfigResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SkeletonConfigResponse.kt index ddf24e6c..f6638990 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SkeletonConfigResponse.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SkeletonConfigResponse.kt @@ -1,68 +1,68 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class SkeletonConfigResponse : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : SkeletonConfigResponse { - __init(_i, _bb) - return this - } - fun skeletonParts(j: Int) : solarxr_protocol.rpc.SkeletonPart? = skeletonParts(solarxr_protocol.rpc.SkeletonPart(), j) - fun skeletonParts(obj: solarxr_protocol.rpc.SkeletonPart, j: Int) : solarxr_protocol.rpc.SkeletonPart? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(__vector(o) + j * 4), bb) - } else { - null - } - } - val skeletonPartsLength : Int - get() { - val o = __offset(4); return if (o != 0) __vector_len(o) else 0 - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsSkeletonConfigResponse(_bb: ByteBuffer): SkeletonConfigResponse = getRootAsSkeletonConfigResponse(_bb, SkeletonConfigResponse()) - @JvmStatic - fun getRootAsSkeletonConfigResponse(_bb: ByteBuffer, obj: SkeletonConfigResponse): SkeletonConfigResponse { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createSkeletonConfigResponse(builder: FlatBufferBuilder, skeletonPartsOffset: Int) : Int { - builder.startTable(1) - addSkeletonParts(builder, skeletonPartsOffset) - return endSkeletonConfigResponse(builder) - } - @JvmStatic - fun startSkeletonConfigResponse(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addSkeletonParts(builder: FlatBufferBuilder, skeletonParts: Int) = builder.addOffset(0, skeletonParts, 0) - @JvmStatic - fun createSkeletonPartsVector(builder: FlatBufferBuilder, data: IntArray) : Int { - builder.startVector(4, data.size, 4) - for (i in data.size - 1 downTo 0) { - builder.addOffset(data[i]) - } - return builder.endVector() - } - @JvmStatic - fun startSkeletonPartsVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) - @JvmStatic - fun endSkeletonConfigResponse(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class SkeletonConfigResponse : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SkeletonConfigResponse { + __init(_i, _bb) + return this + } + fun skeletonParts(j: Int) : solarxr_protocol.rpc.SkeletonPart? = skeletonParts(solarxr_protocol.rpc.SkeletonPart(), j) + fun skeletonParts(obj: solarxr_protocol.rpc.SkeletonPart, j: Int) : solarxr_protocol.rpc.SkeletonPart? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(__vector(o) + j * 4), bb) + } else { + null + } + } + val skeletonPartsLength : Int + get() { + val o = __offset(4); return if (o != 0) __vector_len(o) else 0 + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSkeletonConfigResponse(_bb: ByteBuffer): SkeletonConfigResponse = getRootAsSkeletonConfigResponse(_bb, SkeletonConfigResponse()) + @JvmStatic + fun getRootAsSkeletonConfigResponse(_bb: ByteBuffer, obj: SkeletonConfigResponse): SkeletonConfigResponse { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createSkeletonConfigResponse(builder: FlatBufferBuilder, skeletonPartsOffset: Int) : Int { + builder.startTable(1) + addSkeletonParts(builder, skeletonPartsOffset) + return endSkeletonConfigResponse(builder) + } + @JvmStatic + fun startSkeletonConfigResponse(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addSkeletonParts(builder: FlatBufferBuilder, skeletonParts: Int) = builder.addOffset(0, skeletonParts, 0) + @JvmStatic + fun createSkeletonPartsVector(builder: FlatBufferBuilder, data: IntArray) : Int { + builder.startVector(4, data.size, 4) + for (i in data.size - 1 downTo 0) { + builder.addOffset(data[i]) + } + return builder.endVector() + } + @JvmStatic + fun startSkeletonPartsVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) + @JvmStatic + fun endSkeletonConfigResponse(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SkeletonPart.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SkeletonPart.kt index 5d3f5c47..d39ad402 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SkeletonPart.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SkeletonPart.kt @@ -1,58 +1,58 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class SkeletonPart : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : SkeletonPart { - __init(_i, _bb) - return this - } - val bone : UByte - get() { - val o = __offset(4) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - val value : Float - get() { - val o = __offset(6) - return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsSkeletonPart(_bb: ByteBuffer): SkeletonPart = getRootAsSkeletonPart(_bb, SkeletonPart()) - @JvmStatic - fun getRootAsSkeletonPart(_bb: ByteBuffer, obj: SkeletonPart): SkeletonPart { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createSkeletonPart(builder: FlatBufferBuilder, bone: UByte, value: Float) : Int { - builder.startTable(2) - addValue(builder, value) - addBone(builder, bone) - return endSkeletonPart(builder) - } - @JvmStatic - fun startSkeletonPart(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addBone(builder: FlatBufferBuilder, bone: UByte) = builder.addByte(0, bone.toByte(), 0) - @JvmStatic - fun addValue(builder: FlatBufferBuilder, value: Float) = builder.addFloat(1, value, 0.0) - @JvmStatic - fun endSkeletonPart(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class SkeletonPart : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SkeletonPart { + __init(_i, _bb) + return this + } + val bone : UByte + get() { + val o = __offset(4) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + val value : Float + get() { + val o = __offset(6) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSkeletonPart(_bb: ByteBuffer): SkeletonPart = getRootAsSkeletonPart(_bb, SkeletonPart()) + @JvmStatic + fun getRootAsSkeletonPart(_bb: ByteBuffer, obj: SkeletonPart): SkeletonPart { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createSkeletonPart(builder: FlatBufferBuilder, bone: UByte, value: Float) : Int { + builder.startTable(2) + addValue(builder, value) + addBone(builder, bone) + return endSkeletonPart(builder) + } + @JvmStatic + fun startSkeletonPart(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addBone(builder: FlatBufferBuilder, bone: UByte) = builder.addByte(0, bone.toByte(), 0) + @JvmStatic + fun addValue(builder: FlatBufferBuilder, value: Float) = builder.addFloat(1, value, 0.0) + @JvmStatic + fun endSkeletonPart(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SkeletonResetAllRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SkeletonResetAllRequest.kt index d3324ac7..7dd8450a 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SkeletonResetAllRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SkeletonResetAllRequest.kt @@ -1,37 +1,37 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class SkeletonResetAllRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : SkeletonResetAllRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsSkeletonResetAllRequest(_bb: ByteBuffer): SkeletonResetAllRequest = getRootAsSkeletonResetAllRequest(_bb, SkeletonResetAllRequest()) - @JvmStatic - fun getRootAsSkeletonResetAllRequest(_bb: ByteBuffer, obj: SkeletonResetAllRequest): SkeletonResetAllRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startSkeletonResetAllRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endSkeletonResetAllRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class SkeletonResetAllRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SkeletonResetAllRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSkeletonResetAllRequest(_bb: ByteBuffer): SkeletonResetAllRequest = getRootAsSkeletonResetAllRequest(_bb, SkeletonResetAllRequest()) + @JvmStatic + fun getRootAsSkeletonResetAllRequest(_bb: ByteBuffer, obj: SkeletonResetAllRequest): SkeletonResetAllRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startSkeletonResetAllRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endSkeletonResetAllRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/StartWifiProvisioningRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/StartWifiProvisioningRequest.kt index 8e63d705..e29ae57e 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/StartWifiProvisioningRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/StartWifiProvisioningRequest.kt @@ -1,72 +1,72 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class StartWifiProvisioningRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : StartWifiProvisioningRequest { - __init(_i, _bb) - return this - } - val ssid : String? - get() { - val o = __offset(4) - return if (o != 0) __string(o + bb_pos) else null - } - val ssidAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) - fun ssidInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) - val password : String? - get() { - val o = __offset(6) - return if (o != 0) __string(o + bb_pos) else null - } - val passwordAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) - fun passwordInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) - val port : String? - get() { - val o = __offset(8) - return if (o != 0) __string(o + bb_pos) else null - } - val portAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(8, 1) - fun portInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 8, 1) - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsStartWifiProvisioningRequest(_bb: ByteBuffer): StartWifiProvisioningRequest = getRootAsStartWifiProvisioningRequest(_bb, StartWifiProvisioningRequest()) - @JvmStatic - fun getRootAsStartWifiProvisioningRequest(_bb: ByteBuffer, obj: StartWifiProvisioningRequest): StartWifiProvisioningRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createStartWifiProvisioningRequest(builder: FlatBufferBuilder, ssidOffset: Int, passwordOffset: Int, portOffset: Int) : Int { - builder.startTable(3) - addPort(builder, portOffset) - addPassword(builder, passwordOffset) - addSsid(builder, ssidOffset) - return endStartWifiProvisioningRequest(builder) - } - @JvmStatic - fun startStartWifiProvisioningRequest(builder: FlatBufferBuilder) = builder.startTable(3) - @JvmStatic - fun addSsid(builder: FlatBufferBuilder, ssid: Int) = builder.addOffset(0, ssid, 0) - @JvmStatic - fun addPassword(builder: FlatBufferBuilder, password: Int) = builder.addOffset(1, password, 0) - @JvmStatic - fun addPort(builder: FlatBufferBuilder, port: Int) = builder.addOffset(2, port, 0) - @JvmStatic - fun endStartWifiProvisioningRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class StartWifiProvisioningRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : StartWifiProvisioningRequest { + __init(_i, _bb) + return this + } + val ssid : String? + get() { + val o = __offset(4) + return if (o != 0) __string(o + bb_pos) else null + } + val ssidAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun ssidInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + val password : String? + get() { + val o = __offset(6) + return if (o != 0) __string(o + bb_pos) else null + } + val passwordAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) + fun passwordInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) + val port : String? + get() { + val o = __offset(8) + return if (o != 0) __string(o + bb_pos) else null + } + val portAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(8, 1) + fun portInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 8, 1) + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsStartWifiProvisioningRequest(_bb: ByteBuffer): StartWifiProvisioningRequest = getRootAsStartWifiProvisioningRequest(_bb, StartWifiProvisioningRequest()) + @JvmStatic + fun getRootAsStartWifiProvisioningRequest(_bb: ByteBuffer, obj: StartWifiProvisioningRequest): StartWifiProvisioningRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createStartWifiProvisioningRequest(builder: FlatBufferBuilder, ssidOffset: Int, passwordOffset: Int, portOffset: Int) : Int { + builder.startTable(3) + addPort(builder, portOffset) + addPassword(builder, passwordOffset) + addSsid(builder, ssidOffset) + return endStartWifiProvisioningRequest(builder) + } + @JvmStatic + fun startStartWifiProvisioningRequest(builder: FlatBufferBuilder) = builder.startTable(3) + @JvmStatic + fun addSsid(builder: FlatBufferBuilder, ssid: Int) = builder.addOffset(0, ssid, 0) + @JvmStatic + fun addPassword(builder: FlatBufferBuilder, password: Int) = builder.addOffset(1, password, 0) + @JvmStatic + fun addPort(builder: FlatBufferBuilder, port: Int) = builder.addOffset(2, port, 0) + @JvmStatic + fun endStartWifiProvisioningRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/StatusData.kt b/protocol/kotlin/src/solarxr_protocol/rpc/StatusData.kt index 4e664e94..9107703e 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/StatusData.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/StatusData.kt @@ -1,17 +1,17 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -@Suppress("unused") -class StatusData private constructor() { - companion object { - const val NONE: UByte = 0u - const val StatusTrackerReset: UByte = 1u - const val StatusTrackerError: UByte = 2u - const val StatusSteamVRDisconnected: UByte = 3u - const val StatusUnassignedHMD: UByte = 4u - val names : Array = arrayOf("NONE", "StatusTrackerReset", "StatusTrackerError", "StatusSteamVRDisconnected", "StatusUnassignedHMD") - @JvmStatic - fun name(e: Int) : String = names[e] - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +@Suppress("unused") +class StatusData private constructor() { + companion object { + const val NONE: UByte = 0u + const val StatusTrackerReset: UByte = 1u + const val StatusTrackerError: UByte = 2u + const val StatusSteamVRDisconnected: UByte = 3u + const val StatusUnassignedHMD: UByte = 4u + val names : Array = arrayOf("NONE", "StatusTrackerReset", "StatusTrackerError", "StatusSteamVRDisconnected", "StatusUnassignedHMD") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/StatusMessage.kt b/protocol/kotlin/src/solarxr_protocol/rpc/StatusMessage.kt index 66b7858b..ad3e1126 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/StatusMessage.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/StatusMessage.kt @@ -1,82 +1,82 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * An status is some kind of warning sent by the server, it's mainly made for - * showing problems with the server and need attention from the user. - */ -@Suppress("unused") -class StatusMessage : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : StatusMessage { - __init(_i, _bb) - return this - } - /** - * The status ID - */ - val id : UInt - get() { - val o = __offset(4) - return if(o != 0) bb.getInt(o + bb_pos).toUInt() else 0u - } - /** - * This should be prioritized in the GUI in some way if true - */ - val prioritized : Boolean - get() { - val o = __offset(6) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val dataType : UByte - get() { - val o = __offset(8) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - fun data(obj: Table) : Table? { - val o = __offset(10); return if (o != 0) __union(obj, o + bb_pos) else null - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsStatusMessage(_bb: ByteBuffer): StatusMessage = getRootAsStatusMessage(_bb, StatusMessage()) - @JvmStatic - fun getRootAsStatusMessage(_bb: ByteBuffer, obj: StatusMessage): StatusMessage { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createStatusMessage(builder: FlatBufferBuilder, id: UInt, prioritized: Boolean, dataType: UByte, dataOffset: Int) : Int { - builder.startTable(4) - addData(builder, dataOffset) - addId(builder, id) - addDataType(builder, dataType) - addPrioritized(builder, prioritized) - return endStatusMessage(builder) - } - @JvmStatic - fun startStatusMessage(builder: FlatBufferBuilder) = builder.startTable(4) - @JvmStatic - fun addId(builder: FlatBufferBuilder, id: UInt) = builder.addInt(0, id.toInt(), 0) - @JvmStatic - fun addPrioritized(builder: FlatBufferBuilder, prioritized: Boolean) = builder.addBoolean(1, prioritized, false) - @JvmStatic - fun addDataType(builder: FlatBufferBuilder, dataType: UByte) = builder.addByte(2, dataType.toByte(), 0) - @JvmStatic - fun addData(builder: FlatBufferBuilder, data: Int) = builder.addOffset(3, data, 0) - @JvmStatic - fun endStatusMessage(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * An status is some kind of warning sent by the server, it's mainly made for + * showing problems with the server and need attention from the user. + */ +@Suppress("unused") +class StatusMessage : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : StatusMessage { + __init(_i, _bb) + return this + } + /** + * The status ID + */ + val id : UInt + get() { + val o = __offset(4) + return if(o != 0) bb.getInt(o + bb_pos).toUInt() else 0u + } + /** + * This should be prioritized in the GUI in some way if true + */ + val prioritized : Boolean + get() { + val o = __offset(6) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val dataType : UByte + get() { + val o = __offset(8) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + fun data(obj: Table) : Table? { + val o = __offset(10); return if (o != 0) __union(obj, o + bb_pos) else null + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsStatusMessage(_bb: ByteBuffer): StatusMessage = getRootAsStatusMessage(_bb, StatusMessage()) + @JvmStatic + fun getRootAsStatusMessage(_bb: ByteBuffer, obj: StatusMessage): StatusMessage { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createStatusMessage(builder: FlatBufferBuilder, id: UInt, prioritized: Boolean, dataType: UByte, dataOffset: Int) : Int { + builder.startTable(4) + addData(builder, dataOffset) + addId(builder, id) + addDataType(builder, dataType) + addPrioritized(builder, prioritized) + return endStatusMessage(builder) + } + @JvmStatic + fun startStatusMessage(builder: FlatBufferBuilder) = builder.startTable(4) + @JvmStatic + fun addId(builder: FlatBufferBuilder, id: UInt) = builder.addInt(0, id.toInt(), 0) + @JvmStatic + fun addPrioritized(builder: FlatBufferBuilder, prioritized: Boolean) = builder.addBoolean(1, prioritized, false) + @JvmStatic + fun addDataType(builder: FlatBufferBuilder, dataType: UByte) = builder.addByte(2, dataType.toByte(), 0) + @JvmStatic + fun addData(builder: FlatBufferBuilder, data: Int) = builder.addOffset(3, data, 0) + @JvmStatic + fun endStatusMessage(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/StatusSteamVRDisconnected.kt b/protocol/kotlin/src/solarxr_protocol/rpc/StatusSteamVRDisconnected.kt index 9bd3b565..229a0a3e 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/StatusSteamVRDisconnected.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/StatusSteamVRDisconnected.kt @@ -1,58 +1,58 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * SteamVR bridge is disconnected - */ -@Suppress("unused") -class StatusSteamVRDisconnected : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : StatusSteamVRDisconnected { - __init(_i, _bb) - return this - } - /** - * Name of bridge in the server's config - */ - val bridgeSettingsName : String? - get() { - val o = __offset(4) - return if (o != 0) __string(o + bb_pos) else null - } - val bridgeSettingsNameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) - fun bridgeSettingsNameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsStatusSteamVRDisconnected(_bb: ByteBuffer): StatusSteamVRDisconnected = getRootAsStatusSteamVRDisconnected(_bb, StatusSteamVRDisconnected()) - @JvmStatic - fun getRootAsStatusSteamVRDisconnected(_bb: ByteBuffer, obj: StatusSteamVRDisconnected): StatusSteamVRDisconnected { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createStatusSteamVRDisconnected(builder: FlatBufferBuilder, bridgeSettingsNameOffset: Int) : Int { - builder.startTable(1) - addBridgeSettingsName(builder, bridgeSettingsNameOffset) - return endStatusSteamVRDisconnected(builder) - } - @JvmStatic - fun startStatusSteamVRDisconnected(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addBridgeSettingsName(builder: FlatBufferBuilder, bridgeSettingsName: Int) = builder.addOffset(0, bridgeSettingsName, 0) - @JvmStatic - fun endStatusSteamVRDisconnected(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * SteamVR bridge is disconnected + */ +@Suppress("unused") +class StatusSteamVRDisconnected : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : StatusSteamVRDisconnected { + __init(_i, _bb) + return this + } + /** + * Name of bridge in the server's config + */ + val bridgeSettingsName : String? + get() { + val o = __offset(4) + return if (o != 0) __string(o + bb_pos) else null + } + val bridgeSettingsNameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun bridgeSettingsNameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsStatusSteamVRDisconnected(_bb: ByteBuffer): StatusSteamVRDisconnected = getRootAsStatusSteamVRDisconnected(_bb, StatusSteamVRDisconnected()) + @JvmStatic + fun getRootAsStatusSteamVRDisconnected(_bb: ByteBuffer, obj: StatusSteamVRDisconnected): StatusSteamVRDisconnected { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createStatusSteamVRDisconnected(builder: FlatBufferBuilder, bridgeSettingsNameOffset: Int) : Int { + builder.startTable(1) + addBridgeSettingsName(builder, bridgeSettingsNameOffset) + return endStatusSteamVRDisconnected(builder) + } + @JvmStatic + fun startStatusSteamVRDisconnected(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addBridgeSettingsName(builder: FlatBufferBuilder, bridgeSettingsName: Int) = builder.addOffset(0, bridgeSettingsName, 0) + @JvmStatic + fun endStatusSteamVRDisconnected(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/StatusSystemFixed.kt b/protocol/kotlin/src/solarxr_protocol/rpc/StatusSystemFixed.kt index 91656b15..3a02a47c 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/StatusSystemFixed.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/StatusSystemFixed.kt @@ -1,53 +1,53 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * When an status is fixed and it's removed, it's ID is sent - */ -@Suppress("unused") -class StatusSystemFixed : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : StatusSystemFixed { - __init(_i, _bb) - return this - } - val fixedStatusId : UInt - get() { - val o = __offset(4) - return if(o != 0) bb.getInt(o + bb_pos).toUInt() else 0u - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsStatusSystemFixed(_bb: ByteBuffer): StatusSystemFixed = getRootAsStatusSystemFixed(_bb, StatusSystemFixed()) - @JvmStatic - fun getRootAsStatusSystemFixed(_bb: ByteBuffer, obj: StatusSystemFixed): StatusSystemFixed { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createStatusSystemFixed(builder: FlatBufferBuilder, fixedStatusId: UInt) : Int { - builder.startTable(1) - addFixedStatusId(builder, fixedStatusId) - return endStatusSystemFixed(builder) - } - @JvmStatic - fun startStatusSystemFixed(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addFixedStatusId(builder: FlatBufferBuilder, fixedStatusId: UInt) = builder.addInt(0, fixedStatusId.toInt(), 0) - @JvmStatic - fun endStatusSystemFixed(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * When an status is fixed and it's removed, it's ID is sent + */ +@Suppress("unused") +class StatusSystemFixed : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : StatusSystemFixed { + __init(_i, _bb) + return this + } + val fixedStatusId : UInt + get() { + val o = __offset(4) + return if(o != 0) bb.getInt(o + bb_pos).toUInt() else 0u + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsStatusSystemFixed(_bb: ByteBuffer): StatusSystemFixed = getRootAsStatusSystemFixed(_bb, StatusSystemFixed()) + @JvmStatic + fun getRootAsStatusSystemFixed(_bb: ByteBuffer, obj: StatusSystemFixed): StatusSystemFixed { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createStatusSystemFixed(builder: FlatBufferBuilder, fixedStatusId: UInt) : Int { + builder.startTable(1) + addFixedStatusId(builder, fixedStatusId) + return endStatusSystemFixed(builder) + } + @JvmStatic + fun startStatusSystemFixed(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addFixedStatusId(builder: FlatBufferBuilder, fixedStatusId: UInt) = builder.addInt(0, fixedStatusId.toInt(), 0) + @JvmStatic + fun endStatusSystemFixed(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/StatusSystemRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/StatusSystemRequest.kt index 391449ca..7045780e 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/StatusSystemRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/StatusSystemRequest.kt @@ -1,40 +1,40 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Request current statuses that we have - */ -@Suppress("unused") -class StatusSystemRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : StatusSystemRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsStatusSystemRequest(_bb: ByteBuffer): StatusSystemRequest = getRootAsStatusSystemRequest(_bb, StatusSystemRequest()) - @JvmStatic - fun getRootAsStatusSystemRequest(_bb: ByteBuffer, obj: StatusSystemRequest): StatusSystemRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startStatusSystemRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endStatusSystemRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Request current statuses that we have + */ +@Suppress("unused") +class StatusSystemRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : StatusSystemRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsStatusSystemRequest(_bb: ByteBuffer): StatusSystemRequest = getRootAsStatusSystemRequest(_bb, StatusSystemRequest()) + @JvmStatic + fun getRootAsStatusSystemRequest(_bb: ByteBuffer, obj: StatusSystemRequest): StatusSystemRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startStatusSystemRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endStatusSystemRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/StatusSystemResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/StatusSystemResponse.kt index ee7d9b04..cf6683a7 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/StatusSystemResponse.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/StatusSystemResponse.kt @@ -1,71 +1,71 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Response containing all current valid statuses - */ -@Suppress("unused") -class StatusSystemResponse : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : StatusSystemResponse { - __init(_i, _bb) - return this - } - fun currentStatuses(j: Int) : solarxr_protocol.rpc.StatusMessage? = currentStatuses(solarxr_protocol.rpc.StatusMessage(), j) - fun currentStatuses(obj: solarxr_protocol.rpc.StatusMessage, j: Int) : solarxr_protocol.rpc.StatusMessage? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(__vector(o) + j * 4), bb) - } else { - null - } - } - val currentStatusesLength : Int - get() { - val o = __offset(4); return if (o != 0) __vector_len(o) else 0 - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsStatusSystemResponse(_bb: ByteBuffer): StatusSystemResponse = getRootAsStatusSystemResponse(_bb, StatusSystemResponse()) - @JvmStatic - fun getRootAsStatusSystemResponse(_bb: ByteBuffer, obj: StatusSystemResponse): StatusSystemResponse { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createStatusSystemResponse(builder: FlatBufferBuilder, currentStatusesOffset: Int) : Int { - builder.startTable(1) - addCurrentStatuses(builder, currentStatusesOffset) - return endStatusSystemResponse(builder) - } - @JvmStatic - fun startStatusSystemResponse(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addCurrentStatuses(builder: FlatBufferBuilder, currentStatuses: Int) = builder.addOffset(0, currentStatuses, 0) - @JvmStatic - fun createCurrentStatusesVector(builder: FlatBufferBuilder, data: IntArray) : Int { - builder.startVector(4, data.size, 4) - for (i in data.size - 1 downTo 0) { - builder.addOffset(data[i]) - } - return builder.endVector() - } - @JvmStatic - fun startCurrentStatusesVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) - @JvmStatic - fun endStatusSystemResponse(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Response containing all current valid statuses + */ +@Suppress("unused") +class StatusSystemResponse : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : StatusSystemResponse { + __init(_i, _bb) + return this + } + fun currentStatuses(j: Int) : solarxr_protocol.rpc.StatusMessage? = currentStatuses(solarxr_protocol.rpc.StatusMessage(), j) + fun currentStatuses(obj: solarxr_protocol.rpc.StatusMessage, j: Int) : solarxr_protocol.rpc.StatusMessage? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(__vector(o) + j * 4), bb) + } else { + null + } + } + val currentStatusesLength : Int + get() { + val o = __offset(4); return if (o != 0) __vector_len(o) else 0 + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsStatusSystemResponse(_bb: ByteBuffer): StatusSystemResponse = getRootAsStatusSystemResponse(_bb, StatusSystemResponse()) + @JvmStatic + fun getRootAsStatusSystemResponse(_bb: ByteBuffer, obj: StatusSystemResponse): StatusSystemResponse { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createStatusSystemResponse(builder: FlatBufferBuilder, currentStatusesOffset: Int) : Int { + builder.startTable(1) + addCurrentStatuses(builder, currentStatusesOffset) + return endStatusSystemResponse(builder) + } + @JvmStatic + fun startStatusSystemResponse(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addCurrentStatuses(builder: FlatBufferBuilder, currentStatuses: Int) = builder.addOffset(0, currentStatuses, 0) + @JvmStatic + fun createCurrentStatusesVector(builder: FlatBufferBuilder, data: IntArray) : Int { + builder.startVector(4, data.size, 4) + for (i in data.size - 1 downTo 0) { + builder.addOffset(data[i]) + } + return builder.endVector() + } + @JvmStatic + fun startCurrentStatusesVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) + @JvmStatic + fun endStatusSystemResponse(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/StatusSystemUpdate.kt b/protocol/kotlin/src/solarxr_protocol/rpc/StatusSystemUpdate.kt index 57e38593..84efd85d 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/StatusSystemUpdate.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/StatusSystemUpdate.kt @@ -1,57 +1,57 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * When a new status appears, it's sent alone - */ -@Suppress("unused") -class StatusSystemUpdate : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : StatusSystemUpdate { - __init(_i, _bb) - return this - } - val newStatus : solarxr_protocol.rpc.StatusMessage? get() = newStatus(solarxr_protocol.rpc.StatusMessage()) - fun newStatus(obj: solarxr_protocol.rpc.StatusMessage) : solarxr_protocol.rpc.StatusMessage? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsStatusSystemUpdate(_bb: ByteBuffer): StatusSystemUpdate = getRootAsStatusSystemUpdate(_bb, StatusSystemUpdate()) - @JvmStatic - fun getRootAsStatusSystemUpdate(_bb: ByteBuffer, obj: StatusSystemUpdate): StatusSystemUpdate { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createStatusSystemUpdate(builder: FlatBufferBuilder, newStatusOffset: Int) : Int { - builder.startTable(1) - addNewStatus(builder, newStatusOffset) - return endStatusSystemUpdate(builder) - } - @JvmStatic - fun startStatusSystemUpdate(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addNewStatus(builder: FlatBufferBuilder, newStatus: Int) = builder.addOffset(0, newStatus, 0) - @JvmStatic - fun endStatusSystemUpdate(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * When a new status appears, it's sent alone + */ +@Suppress("unused") +class StatusSystemUpdate : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : StatusSystemUpdate { + __init(_i, _bb) + return this + } + val newStatus : solarxr_protocol.rpc.StatusMessage? get() = newStatus(solarxr_protocol.rpc.StatusMessage()) + fun newStatus(obj: solarxr_protocol.rpc.StatusMessage) : solarxr_protocol.rpc.StatusMessage? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsStatusSystemUpdate(_bb: ByteBuffer): StatusSystemUpdate = getRootAsStatusSystemUpdate(_bb, StatusSystemUpdate()) + @JvmStatic + fun getRootAsStatusSystemUpdate(_bb: ByteBuffer, obj: StatusSystemUpdate): StatusSystemUpdate { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createStatusSystemUpdate(builder: FlatBufferBuilder, newStatusOffset: Int) : Int { + builder.startTable(1) + addNewStatus(builder, newStatusOffset) + return endStatusSystemUpdate(builder) + } + @JvmStatic + fun startStatusSystemUpdate(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addNewStatus(builder: FlatBufferBuilder, newStatus: Int) = builder.addOffset(0, newStatus, 0) + @JvmStatic + fun endStatusSystemUpdate(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/StatusTrackerError.kt b/protocol/kotlin/src/solarxr_protocol/rpc/StatusTrackerError.kt index 71edd6e4..18988727 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/StatusTrackerError.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/StatusTrackerError.kt @@ -1,57 +1,57 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Tracker has error state - */ -@Suppress("unused") -class StatusTrackerError : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : StatusTrackerError { - __init(_i, _bb) - return this - } - val trackerId : solarxr_protocol.datatypes.TrackerId? get() = trackerId(solarxr_protocol.datatypes.TrackerId()) - fun trackerId(obj: solarxr_protocol.datatypes.TrackerId) : solarxr_protocol.datatypes.TrackerId? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsStatusTrackerError(_bb: ByteBuffer): StatusTrackerError = getRootAsStatusTrackerError(_bb, StatusTrackerError()) - @JvmStatic - fun getRootAsStatusTrackerError(_bb: ByteBuffer, obj: StatusTrackerError): StatusTrackerError { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createStatusTrackerError(builder: FlatBufferBuilder, trackerIdOffset: Int) : Int { - builder.startTable(1) - addTrackerId(builder, trackerIdOffset) - return endStatusTrackerError(builder) - } - @JvmStatic - fun startStatusTrackerError(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addTrackerId(builder: FlatBufferBuilder, trackerId: Int) = builder.addOffset(0, trackerId, 0) - @JvmStatic - fun endStatusTrackerError(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Tracker has error state + */ +@Suppress("unused") +class StatusTrackerError : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : StatusTrackerError { + __init(_i, _bb) + return this + } + val trackerId : solarxr_protocol.datatypes.TrackerId? get() = trackerId(solarxr_protocol.datatypes.TrackerId()) + fun trackerId(obj: solarxr_protocol.datatypes.TrackerId) : solarxr_protocol.datatypes.TrackerId? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsStatusTrackerError(_bb: ByteBuffer): StatusTrackerError = getRootAsStatusTrackerError(_bb, StatusTrackerError()) + @JvmStatic + fun getRootAsStatusTrackerError(_bb: ByteBuffer, obj: StatusTrackerError): StatusTrackerError { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createStatusTrackerError(builder: FlatBufferBuilder, trackerIdOffset: Int) : Int { + builder.startTable(1) + addTrackerId(builder, trackerIdOffset) + return endStatusTrackerError(builder) + } + @JvmStatic + fun startStatusTrackerError(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addTrackerId(builder: FlatBufferBuilder, trackerId: Int) = builder.addOffset(0, trackerId, 0) + @JvmStatic + fun endStatusTrackerError(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/StatusTrackerReset.kt b/protocol/kotlin/src/solarxr_protocol/rpc/StatusTrackerReset.kt index e5526773..89a8088e 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/StatusTrackerReset.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/StatusTrackerReset.kt @@ -1,57 +1,57 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Tracker requires full reset - */ -@Suppress("unused") -class StatusTrackerReset : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : StatusTrackerReset { - __init(_i, _bb) - return this - } - val trackerId : solarxr_protocol.datatypes.TrackerId? get() = trackerId(solarxr_protocol.datatypes.TrackerId()) - fun trackerId(obj: solarxr_protocol.datatypes.TrackerId) : solarxr_protocol.datatypes.TrackerId? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsStatusTrackerReset(_bb: ByteBuffer): StatusTrackerReset = getRootAsStatusTrackerReset(_bb, StatusTrackerReset()) - @JvmStatic - fun getRootAsStatusTrackerReset(_bb: ByteBuffer, obj: StatusTrackerReset): StatusTrackerReset { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createStatusTrackerReset(builder: FlatBufferBuilder, trackerIdOffset: Int) : Int { - builder.startTable(1) - addTrackerId(builder, trackerIdOffset) - return endStatusTrackerReset(builder) - } - @JvmStatic - fun startStatusTrackerReset(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addTrackerId(builder: FlatBufferBuilder, trackerId: Int) = builder.addOffset(0, trackerId, 0) - @JvmStatic - fun endStatusTrackerReset(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Tracker requires full reset + */ +@Suppress("unused") +class StatusTrackerReset : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : StatusTrackerReset { + __init(_i, _bb) + return this + } + val trackerId : solarxr_protocol.datatypes.TrackerId? get() = trackerId(solarxr_protocol.datatypes.TrackerId()) + fun trackerId(obj: solarxr_protocol.datatypes.TrackerId) : solarxr_protocol.datatypes.TrackerId? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsStatusTrackerReset(_bb: ByteBuffer): StatusTrackerReset = getRootAsStatusTrackerReset(_bb, StatusTrackerReset()) + @JvmStatic + fun getRootAsStatusTrackerReset(_bb: ByteBuffer, obj: StatusTrackerReset): StatusTrackerReset { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createStatusTrackerReset(builder: FlatBufferBuilder, trackerIdOffset: Int) : Int { + builder.startTable(1) + addTrackerId(builder, trackerIdOffset) + return endStatusTrackerReset(builder) + } + @JvmStatic + fun startStatusTrackerReset(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addTrackerId(builder: FlatBufferBuilder, trackerId: Int) = builder.addOffset(0, trackerId, 0) + @JvmStatic + fun endStatusTrackerReset(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/StatusUnassignedHMD.kt b/protocol/kotlin/src/solarxr_protocol/rpc/StatusUnassignedHMD.kt index 88bfcba9..f9ada556 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/StatusUnassignedHMD.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/StatusUnassignedHMD.kt @@ -1,57 +1,57 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * There is an available HMD tracker and it's not assigned to head - */ -@Suppress("unused") -class StatusUnassignedHMD : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : StatusUnassignedHMD { - __init(_i, _bb) - return this - } - val trackerId : solarxr_protocol.datatypes.TrackerId? get() = trackerId(solarxr_protocol.datatypes.TrackerId()) - fun trackerId(obj: solarxr_protocol.datatypes.TrackerId) : solarxr_protocol.datatypes.TrackerId? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsStatusUnassignedHMD(_bb: ByteBuffer): StatusUnassignedHMD = getRootAsStatusUnassignedHMD(_bb, StatusUnassignedHMD()) - @JvmStatic - fun getRootAsStatusUnassignedHMD(_bb: ByteBuffer, obj: StatusUnassignedHMD): StatusUnassignedHMD { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createStatusUnassignedHMD(builder: FlatBufferBuilder, trackerIdOffset: Int) : Int { - builder.startTable(1) - addTrackerId(builder, trackerIdOffset) - return endStatusUnassignedHMD(builder) - } - @JvmStatic - fun startStatusUnassignedHMD(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addTrackerId(builder: FlatBufferBuilder, trackerId: Int) = builder.addOffset(0, trackerId, 0) - @JvmStatic - fun endStatusUnassignedHMD(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * There is an available HMD tracker and it's not assigned to head + */ +@Suppress("unused") +class StatusUnassignedHMD : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : StatusUnassignedHMD { + __init(_i, _bb) + return this + } + val trackerId : solarxr_protocol.datatypes.TrackerId? get() = trackerId(solarxr_protocol.datatypes.TrackerId()) + fun trackerId(obj: solarxr_protocol.datatypes.TrackerId) : solarxr_protocol.datatypes.TrackerId? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsStatusUnassignedHMD(_bb: ByteBuffer): StatusUnassignedHMD = getRootAsStatusUnassignedHMD(_bb, StatusUnassignedHMD()) + @JvmStatic + fun getRootAsStatusUnassignedHMD(_bb: ByteBuffer, obj: StatusUnassignedHMD): StatusUnassignedHMD { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createStatusUnassignedHMD(builder: FlatBufferBuilder, trackerIdOffset: Int) : Int { + builder.startTable(1) + addTrackerId(builder, trackerIdOffset) + return endStatusUnassignedHMD(builder) + } + @JvmStatic + fun startStatusUnassignedHMD(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addTrackerId(builder: FlatBufferBuilder, trackerId: Int) = builder.addOffset(0, trackerId, 0) + @JvmStatic + fun endStatusUnassignedHMD(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SteamVRTrackersSetting.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SteamVRTrackersSetting.kt index 5befe9f2..f0eac263 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SteamVRTrackersSetting.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SteamVRTrackersSetting.kt @@ -1,130 +1,130 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class SteamVRTrackersSetting : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : SteamVRTrackersSetting { - __init(_i, _bb) - return this - } - val waist : Boolean - get() { - val o = __offset(4) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val chest : Boolean - get() { - val o = __offset(6) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val automaticTrackerToggle : Boolean - get() { - val o = __offset(16) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val leftFoot : Boolean - get() { - val o = __offset(18) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val rightFoot : Boolean - get() { - val o = __offset(20) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val leftKnee : Boolean - get() { - val o = __offset(22) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val rightKnee : Boolean - get() { - val o = __offset(24) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val leftElbow : Boolean - get() { - val o = __offset(26) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val rightElbow : Boolean - get() { - val o = __offset(28) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val leftHand : Boolean - get() { - val o = __offset(30) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val rightHand : Boolean - get() { - val o = __offset(32) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsSteamVRTrackersSetting(_bb: ByteBuffer): SteamVRTrackersSetting = getRootAsSteamVRTrackersSetting(_bb, SteamVRTrackersSetting()) - @JvmStatic - fun getRootAsSteamVRTrackersSetting(_bb: ByteBuffer, obj: SteamVRTrackersSetting): SteamVRTrackersSetting { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createSteamVRTrackersSetting(builder: FlatBufferBuilder, waist: Boolean, chest: Boolean, automaticTrackerToggle: Boolean, leftFoot: Boolean, rightFoot: Boolean, leftKnee: Boolean, rightKnee: Boolean, leftElbow: Boolean, rightElbow: Boolean, leftHand: Boolean, rightHand: Boolean) : Int { - builder.startTable(15) - addRightHand(builder, rightHand) - addLeftHand(builder, leftHand) - addRightElbow(builder, rightElbow) - addLeftElbow(builder, leftElbow) - addRightKnee(builder, rightKnee) - addLeftKnee(builder, leftKnee) - addRightFoot(builder, rightFoot) - addLeftFoot(builder, leftFoot) - addAutomaticTrackerToggle(builder, automaticTrackerToggle) - addChest(builder, chest) - addWaist(builder, waist) - return endSteamVRTrackersSetting(builder) - } - @JvmStatic - fun startSteamVRTrackersSetting(builder: FlatBufferBuilder) = builder.startTable(15) - @JvmStatic - fun addWaist(builder: FlatBufferBuilder, waist: Boolean) = builder.addBoolean(0, waist, false) - @JvmStatic - fun addChest(builder: FlatBufferBuilder, chest: Boolean) = builder.addBoolean(1, chest, false) - @JvmStatic - fun addAutomaticTrackerToggle(builder: FlatBufferBuilder, automaticTrackerToggle: Boolean) = builder.addBoolean(6, automaticTrackerToggle, false) - @JvmStatic - fun addLeftFoot(builder: FlatBufferBuilder, leftFoot: Boolean) = builder.addBoolean(7, leftFoot, false) - @JvmStatic - fun addRightFoot(builder: FlatBufferBuilder, rightFoot: Boolean) = builder.addBoolean(8, rightFoot, false) - @JvmStatic - fun addLeftKnee(builder: FlatBufferBuilder, leftKnee: Boolean) = builder.addBoolean(9, leftKnee, false) - @JvmStatic - fun addRightKnee(builder: FlatBufferBuilder, rightKnee: Boolean) = builder.addBoolean(10, rightKnee, false) - @JvmStatic - fun addLeftElbow(builder: FlatBufferBuilder, leftElbow: Boolean) = builder.addBoolean(11, leftElbow, false) - @JvmStatic - fun addRightElbow(builder: FlatBufferBuilder, rightElbow: Boolean) = builder.addBoolean(12, rightElbow, false) - @JvmStatic - fun addLeftHand(builder: FlatBufferBuilder, leftHand: Boolean) = builder.addBoolean(13, leftHand, false) - @JvmStatic - fun addRightHand(builder: FlatBufferBuilder, rightHand: Boolean) = builder.addBoolean(14, rightHand, false) - @JvmStatic - fun endSteamVRTrackersSetting(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class SteamVRTrackersSetting : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SteamVRTrackersSetting { + __init(_i, _bb) + return this + } + val waist : Boolean + get() { + val o = __offset(4) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val chest : Boolean + get() { + val o = __offset(6) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val automaticTrackerToggle : Boolean + get() { + val o = __offset(16) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val leftFoot : Boolean + get() { + val o = __offset(18) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val rightFoot : Boolean + get() { + val o = __offset(20) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val leftKnee : Boolean + get() { + val o = __offset(22) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val rightKnee : Boolean + get() { + val o = __offset(24) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val leftElbow : Boolean + get() { + val o = __offset(26) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val rightElbow : Boolean + get() { + val o = __offset(28) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val leftHand : Boolean + get() { + val o = __offset(30) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val rightHand : Boolean + get() { + val o = __offset(32) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSteamVRTrackersSetting(_bb: ByteBuffer): SteamVRTrackersSetting = getRootAsSteamVRTrackersSetting(_bb, SteamVRTrackersSetting()) + @JvmStatic + fun getRootAsSteamVRTrackersSetting(_bb: ByteBuffer, obj: SteamVRTrackersSetting): SteamVRTrackersSetting { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createSteamVRTrackersSetting(builder: FlatBufferBuilder, waist: Boolean, chest: Boolean, automaticTrackerToggle: Boolean, leftFoot: Boolean, rightFoot: Boolean, leftKnee: Boolean, rightKnee: Boolean, leftElbow: Boolean, rightElbow: Boolean, leftHand: Boolean, rightHand: Boolean) : Int { + builder.startTable(15) + addRightHand(builder, rightHand) + addLeftHand(builder, leftHand) + addRightElbow(builder, rightElbow) + addLeftElbow(builder, leftElbow) + addRightKnee(builder, rightKnee) + addLeftKnee(builder, leftKnee) + addRightFoot(builder, rightFoot) + addLeftFoot(builder, leftFoot) + addAutomaticTrackerToggle(builder, automaticTrackerToggle) + addChest(builder, chest) + addWaist(builder, waist) + return endSteamVRTrackersSetting(builder) + } + @JvmStatic + fun startSteamVRTrackersSetting(builder: FlatBufferBuilder) = builder.startTable(15) + @JvmStatic + fun addWaist(builder: FlatBufferBuilder, waist: Boolean) = builder.addBoolean(0, waist, false) + @JvmStatic + fun addChest(builder: FlatBufferBuilder, chest: Boolean) = builder.addBoolean(1, chest, false) + @JvmStatic + fun addAutomaticTrackerToggle(builder: FlatBufferBuilder, automaticTrackerToggle: Boolean) = builder.addBoolean(6, automaticTrackerToggle, false) + @JvmStatic + fun addLeftFoot(builder: FlatBufferBuilder, leftFoot: Boolean) = builder.addBoolean(7, leftFoot, false) + @JvmStatic + fun addRightFoot(builder: FlatBufferBuilder, rightFoot: Boolean) = builder.addBoolean(8, rightFoot, false) + @JvmStatic + fun addLeftKnee(builder: FlatBufferBuilder, leftKnee: Boolean) = builder.addBoolean(9, leftKnee, false) + @JvmStatic + fun addRightKnee(builder: FlatBufferBuilder, rightKnee: Boolean) = builder.addBoolean(10, rightKnee, false) + @JvmStatic + fun addLeftElbow(builder: FlatBufferBuilder, leftElbow: Boolean) = builder.addBoolean(11, leftElbow, false) + @JvmStatic + fun addRightElbow(builder: FlatBufferBuilder, rightElbow: Boolean) = builder.addBoolean(12, rightElbow, false) + @JvmStatic + fun addLeftHand(builder: FlatBufferBuilder, leftHand: Boolean) = builder.addBoolean(13, leftHand, false) + @JvmStatic + fun addRightHand(builder: FlatBufferBuilder, rightHand: Boolean) = builder.addBoolean(14, rightHand, false) + @JvmStatic + fun endSteamVRTrackersSetting(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/StopWifiProvisioningRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/StopWifiProvisioningRequest.kt index 287fb99c..dba9b6d8 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/StopWifiProvisioningRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/StopWifiProvisioningRequest.kt @@ -1,37 +1,37 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class StopWifiProvisioningRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : StopWifiProvisioningRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsStopWifiProvisioningRequest(_bb: ByteBuffer): StopWifiProvisioningRequest = getRootAsStopWifiProvisioningRequest(_bb, StopWifiProvisioningRequest()) - @JvmStatic - fun getRootAsStopWifiProvisioningRequest(_bb: ByteBuffer, obj: StopWifiProvisioningRequest): StopWifiProvisioningRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startStopWifiProvisioningRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endStopWifiProvisioningRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class StopWifiProvisioningRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : StopWifiProvisioningRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsStopWifiProvisioningRequest(_bb: ByteBuffer): StopWifiProvisioningRequest = getRootAsStopWifiProvisioningRequest(_bb, StopWifiProvisioningRequest()) + @JvmStatic + fun getRootAsStopWifiProvisioningRequest(_bb: ByteBuffer, obj: StopWifiProvisioningRequest): StopWifiProvisioningRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startStopWifiProvisioningRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endStopWifiProvisioningRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/TapDetectionSettings.kt b/protocol/kotlin/src/solarxr_protocol/rpc/TapDetectionSettings.kt index e3bf7000..a082e1b9 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/TapDetectionSettings.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/TapDetectionSettings.kt @@ -1,134 +1,134 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class TapDetectionSettings : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : TapDetectionSettings { - __init(_i, _bb) - return this - } - val fullResetDelay : Float? - get() { - val o = __offset(4) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - val fullResetEnabled : Boolean? - get() { - val o = __offset(6) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val fullResetTaps : UByte? - get() { - val o = __offset(8) - return if(o != 0) bb.get(o + bb_pos).toUByte() else null - } - val yawResetDelay : Float? - get() { - val o = __offset(10) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - val yawResetEnabled : Boolean? - get() { - val o = __offset(12) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val yawResetTaps : UByte? - get() { - val o = __offset(14) - return if(o != 0) bb.get(o + bb_pos).toUByte() else null - } - val mountingResetDelay : Float? - get() { - val o = __offset(16) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - val mountingResetEnabled : Boolean? - get() { - val o = __offset(18) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val mountingResetTaps : UByte? - get() { - val o = __offset(20) - return if(o != 0) bb.get(o + bb_pos).toUByte() else null - } - /** - * If true, disables reset behavior of tap detection and sends a - * TapDetectionSetupNotification, each time 2 taps are detected on any tracker - */ - val setupMode : Boolean? - get() { - val o = __offset(22) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val numberTrackersOverThreshold : UByte? - get() { - val o = __offset(24) - return if(o != 0) bb.get(o + bb_pos).toUByte() else null - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsTapDetectionSettings(_bb: ByteBuffer): TapDetectionSettings = getRootAsTapDetectionSettings(_bb, TapDetectionSettings()) - @JvmStatic - fun getRootAsTapDetectionSettings(_bb: ByteBuffer, obj: TapDetectionSettings): TapDetectionSettings { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createTapDetectionSettings(builder: FlatBufferBuilder, fullResetDelay: Float?, fullResetEnabled: Boolean?, fullResetTaps: UByte?, yawResetDelay: Float?, yawResetEnabled: Boolean?, yawResetTaps: UByte?, mountingResetDelay: Float?, mountingResetEnabled: Boolean?, mountingResetTaps: UByte?, setupMode: Boolean?, numberTrackersOverThreshold: UByte?) : Int { - builder.startTable(11) - mountingResetDelay?.run { addMountingResetDelay(builder, mountingResetDelay) } - yawResetDelay?.run { addYawResetDelay(builder, yawResetDelay) } - fullResetDelay?.run { addFullResetDelay(builder, fullResetDelay) } - numberTrackersOverThreshold?.run { addNumberTrackersOverThreshold(builder, numberTrackersOverThreshold) } - setupMode?.run { addSetupMode(builder, setupMode) } - mountingResetTaps?.run { addMountingResetTaps(builder, mountingResetTaps) } - mountingResetEnabled?.run { addMountingResetEnabled(builder, mountingResetEnabled) } - yawResetTaps?.run { addYawResetTaps(builder, yawResetTaps) } - yawResetEnabled?.run { addYawResetEnabled(builder, yawResetEnabled) } - fullResetTaps?.run { addFullResetTaps(builder, fullResetTaps) } - fullResetEnabled?.run { addFullResetEnabled(builder, fullResetEnabled) } - return endTapDetectionSettings(builder) - } - @JvmStatic - fun startTapDetectionSettings(builder: FlatBufferBuilder) = builder.startTable(11) - @JvmStatic - fun addFullResetDelay(builder: FlatBufferBuilder, fullResetDelay: Float) = builder.addFloat(0, fullResetDelay, 0.0) - @JvmStatic - fun addFullResetEnabled(builder: FlatBufferBuilder, fullResetEnabled: Boolean) = builder.addBoolean(1, fullResetEnabled, false) - @JvmStatic - fun addFullResetTaps(builder: FlatBufferBuilder, fullResetTaps: UByte) = builder.addByte(2, fullResetTaps.toByte(), 0) - @JvmStatic - fun addYawResetDelay(builder: FlatBufferBuilder, yawResetDelay: Float) = builder.addFloat(3, yawResetDelay, 0.0) - @JvmStatic - fun addYawResetEnabled(builder: FlatBufferBuilder, yawResetEnabled: Boolean) = builder.addBoolean(4, yawResetEnabled, false) - @JvmStatic - fun addYawResetTaps(builder: FlatBufferBuilder, yawResetTaps: UByte) = builder.addByte(5, yawResetTaps.toByte(), 0) - @JvmStatic - fun addMountingResetDelay(builder: FlatBufferBuilder, mountingResetDelay: Float) = builder.addFloat(6, mountingResetDelay, 0.0) - @JvmStatic - fun addMountingResetEnabled(builder: FlatBufferBuilder, mountingResetEnabled: Boolean) = builder.addBoolean(7, mountingResetEnabled, false) - @JvmStatic - fun addMountingResetTaps(builder: FlatBufferBuilder, mountingResetTaps: UByte) = builder.addByte(8, mountingResetTaps.toByte(), 0) - @JvmStatic - fun addSetupMode(builder: FlatBufferBuilder, setupMode: Boolean) = builder.addBoolean(9, setupMode, false) - @JvmStatic - fun addNumberTrackersOverThreshold(builder: FlatBufferBuilder, numberTrackersOverThreshold: UByte) = builder.addByte(10, numberTrackersOverThreshold.toByte(), 0) - @JvmStatic - fun endTapDetectionSettings(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class TapDetectionSettings : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : TapDetectionSettings { + __init(_i, _bb) + return this + } + val fullResetDelay : Float? + get() { + val o = __offset(4) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + val fullResetEnabled : Boolean? + get() { + val o = __offset(6) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val fullResetTaps : UByte? + get() { + val o = __offset(8) + return if(o != 0) bb.get(o + bb_pos).toUByte() else null + } + val yawResetDelay : Float? + get() { + val o = __offset(10) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + val yawResetEnabled : Boolean? + get() { + val o = __offset(12) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val yawResetTaps : UByte? + get() { + val o = __offset(14) + return if(o != 0) bb.get(o + bb_pos).toUByte() else null + } + val mountingResetDelay : Float? + get() { + val o = __offset(16) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + val mountingResetEnabled : Boolean? + get() { + val o = __offset(18) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val mountingResetTaps : UByte? + get() { + val o = __offset(20) + return if(o != 0) bb.get(o + bb_pos).toUByte() else null + } + /** + * If true, disables reset behavior of tap detection and sends a + * TapDetectionSetupNotification, each time 2 taps are detected on any tracker + */ + val setupMode : Boolean? + get() { + val o = __offset(22) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val numberTrackersOverThreshold : UByte? + get() { + val o = __offset(24) + return if(o != 0) bb.get(o + bb_pos).toUByte() else null + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsTapDetectionSettings(_bb: ByteBuffer): TapDetectionSettings = getRootAsTapDetectionSettings(_bb, TapDetectionSettings()) + @JvmStatic + fun getRootAsTapDetectionSettings(_bb: ByteBuffer, obj: TapDetectionSettings): TapDetectionSettings { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createTapDetectionSettings(builder: FlatBufferBuilder, fullResetDelay: Float?, fullResetEnabled: Boolean?, fullResetTaps: UByte?, yawResetDelay: Float?, yawResetEnabled: Boolean?, yawResetTaps: UByte?, mountingResetDelay: Float?, mountingResetEnabled: Boolean?, mountingResetTaps: UByte?, setupMode: Boolean?, numberTrackersOverThreshold: UByte?) : Int { + builder.startTable(11) + mountingResetDelay?.run { addMountingResetDelay(builder, mountingResetDelay) } + yawResetDelay?.run { addYawResetDelay(builder, yawResetDelay) } + fullResetDelay?.run { addFullResetDelay(builder, fullResetDelay) } + numberTrackersOverThreshold?.run { addNumberTrackersOverThreshold(builder, numberTrackersOverThreshold) } + setupMode?.run { addSetupMode(builder, setupMode) } + mountingResetTaps?.run { addMountingResetTaps(builder, mountingResetTaps) } + mountingResetEnabled?.run { addMountingResetEnabled(builder, mountingResetEnabled) } + yawResetTaps?.run { addYawResetTaps(builder, yawResetTaps) } + yawResetEnabled?.run { addYawResetEnabled(builder, yawResetEnabled) } + fullResetTaps?.run { addFullResetTaps(builder, fullResetTaps) } + fullResetEnabled?.run { addFullResetEnabled(builder, fullResetEnabled) } + return endTapDetectionSettings(builder) + } + @JvmStatic + fun startTapDetectionSettings(builder: FlatBufferBuilder) = builder.startTable(11) + @JvmStatic + fun addFullResetDelay(builder: FlatBufferBuilder, fullResetDelay: Float) = builder.addFloat(0, fullResetDelay, 0.0) + @JvmStatic + fun addFullResetEnabled(builder: FlatBufferBuilder, fullResetEnabled: Boolean) = builder.addBoolean(1, fullResetEnabled, false) + @JvmStatic + fun addFullResetTaps(builder: FlatBufferBuilder, fullResetTaps: UByte) = builder.addByte(2, fullResetTaps.toByte(), 0) + @JvmStatic + fun addYawResetDelay(builder: FlatBufferBuilder, yawResetDelay: Float) = builder.addFloat(3, yawResetDelay, 0.0) + @JvmStatic + fun addYawResetEnabled(builder: FlatBufferBuilder, yawResetEnabled: Boolean) = builder.addBoolean(4, yawResetEnabled, false) + @JvmStatic + fun addYawResetTaps(builder: FlatBufferBuilder, yawResetTaps: UByte) = builder.addByte(5, yawResetTaps.toByte(), 0) + @JvmStatic + fun addMountingResetDelay(builder: FlatBufferBuilder, mountingResetDelay: Float) = builder.addFloat(6, mountingResetDelay, 0.0) + @JvmStatic + fun addMountingResetEnabled(builder: FlatBufferBuilder, mountingResetEnabled: Boolean) = builder.addBoolean(7, mountingResetEnabled, false) + @JvmStatic + fun addMountingResetTaps(builder: FlatBufferBuilder, mountingResetTaps: UByte) = builder.addByte(8, mountingResetTaps.toByte(), 0) + @JvmStatic + fun addSetupMode(builder: FlatBufferBuilder, setupMode: Boolean) = builder.addBoolean(9, setupMode, false) + @JvmStatic + fun addNumberTrackersOverThreshold(builder: FlatBufferBuilder, numberTrackersOverThreshold: UByte) = builder.addByte(10, numberTrackersOverThreshold.toByte(), 0) + @JvmStatic + fun endTapDetectionSettings(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/TapDetectionSetupNotification.kt b/protocol/kotlin/src/solarxr_protocol/rpc/TapDetectionSetupNotification.kt index 0d73e6f8..5a9972b0 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/TapDetectionSetupNotification.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/TapDetectionSetupNotification.kt @@ -1,57 +1,57 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * See TapDetectionSettings::setup_mode - */ -@Suppress("unused") -class TapDetectionSetupNotification : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : TapDetectionSetupNotification { - __init(_i, _bb) - return this - } - val trackerId : solarxr_protocol.datatypes.TrackerId? get() = trackerId(solarxr_protocol.datatypes.TrackerId()) - fun trackerId(obj: solarxr_protocol.datatypes.TrackerId) : solarxr_protocol.datatypes.TrackerId? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsTapDetectionSetupNotification(_bb: ByteBuffer): TapDetectionSetupNotification = getRootAsTapDetectionSetupNotification(_bb, TapDetectionSetupNotification()) - @JvmStatic - fun getRootAsTapDetectionSetupNotification(_bb: ByteBuffer, obj: TapDetectionSetupNotification): TapDetectionSetupNotification { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createTapDetectionSetupNotification(builder: FlatBufferBuilder, trackerIdOffset: Int) : Int { - builder.startTable(1) - addTrackerId(builder, trackerIdOffset) - return endTapDetectionSetupNotification(builder) - } - @JvmStatic - fun startTapDetectionSetupNotification(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addTrackerId(builder: FlatBufferBuilder, trackerId: Int) = builder.addOffset(0, trackerId, 0) - @JvmStatic - fun endTapDetectionSetupNotification(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * See TapDetectionSettings::setup_mode + */ +@Suppress("unused") +class TapDetectionSetupNotification : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : TapDetectionSetupNotification { + __init(_i, _bb) + return this + } + val trackerId : solarxr_protocol.datatypes.TrackerId? get() = trackerId(solarxr_protocol.datatypes.TrackerId()) + fun trackerId(obj: solarxr_protocol.datatypes.TrackerId) : solarxr_protocol.datatypes.TrackerId? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsTapDetectionSetupNotification(_bb: ByteBuffer): TapDetectionSetupNotification = getRootAsTapDetectionSetupNotification(_bb, TapDetectionSetupNotification()) + @JvmStatic + fun getRootAsTapDetectionSetupNotification(_bb: ByteBuffer, obj: TapDetectionSetupNotification): TapDetectionSetupNotification { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createTapDetectionSetupNotification(builder: FlatBufferBuilder, trackerIdOffset: Int) : Int { + builder.startTable(1) + addTrackerId(builder, trackerIdOffset) + return endTapDetectionSetupNotification(builder) + } + @JvmStatic + fun startTapDetectionSetupNotification(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addTrackerId(builder: FlatBufferBuilder, trackerId: Int) = builder.addOffset(0, trackerId, 0) + @JvmStatic + fun endTapDetectionSetupNotification(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/TrackingPauseStateRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/TrackingPauseStateRequest.kt index f2aa5eb0..f6edbb11 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/TrackingPauseStateRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/TrackingPauseStateRequest.kt @@ -1,40 +1,40 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Requests the current state of tracking pause - */ -@Suppress("unused") -class TrackingPauseStateRequest : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : TrackingPauseStateRequest { - __init(_i, _bb) - return this - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsTrackingPauseStateRequest(_bb: ByteBuffer): TrackingPauseStateRequest = getRootAsTrackingPauseStateRequest(_bb, TrackingPauseStateRequest()) - @JvmStatic - fun getRootAsTrackingPauseStateRequest(_bb: ByteBuffer, obj: TrackingPauseStateRequest): TrackingPauseStateRequest { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun startTrackingPauseStateRequest(builder: FlatBufferBuilder) = builder.startTable(0) - @JvmStatic - fun endTrackingPauseStateRequest(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Requests the current state of tracking pause + */ +@Suppress("unused") +class TrackingPauseStateRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : TrackingPauseStateRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsTrackingPauseStateRequest(_bb: ByteBuffer): TrackingPauseStateRequest = getRootAsTrackingPauseStateRequest(_bb, TrackingPauseStateRequest()) + @JvmStatic + fun getRootAsTrackingPauseStateRequest(_bb: ByteBuffer, obj: TrackingPauseStateRequest): TrackingPauseStateRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startTrackingPauseStateRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endTrackingPauseStateRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/TrackingPauseStateResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/TrackingPauseStateResponse.kt index 256c1a3d..17a8cd4c 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/TrackingPauseStateResponse.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/TrackingPauseStateResponse.kt @@ -1,53 +1,53 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class TrackingPauseStateResponse : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : TrackingPauseStateResponse { - __init(_i, _bb) - return this - } - /** - * Skeleton tracking is paused if true, skeleton tracking is unpaused if false. - */ - val trackingPaused : Boolean - get() { - val o = __offset(4) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsTrackingPauseStateResponse(_bb: ByteBuffer): TrackingPauseStateResponse = getRootAsTrackingPauseStateResponse(_bb, TrackingPauseStateResponse()) - @JvmStatic - fun getRootAsTrackingPauseStateResponse(_bb: ByteBuffer, obj: TrackingPauseStateResponse): TrackingPauseStateResponse { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createTrackingPauseStateResponse(builder: FlatBufferBuilder, trackingPaused: Boolean) : Int { - builder.startTable(1) - addTrackingPaused(builder, trackingPaused) - return endTrackingPauseStateResponse(builder) - } - @JvmStatic - fun startTrackingPauseStateResponse(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addTrackingPaused(builder: FlatBufferBuilder, trackingPaused: Boolean) = builder.addBoolean(0, trackingPaused, false) - @JvmStatic - fun endTrackingPauseStateResponse(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class TrackingPauseStateResponse : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : TrackingPauseStateResponse { + __init(_i, _bb) + return this + } + /** + * Skeleton tracking is paused if true, skeleton tracking is unpaused if false. + */ + val trackingPaused : Boolean + get() { + val o = __offset(4) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsTrackingPauseStateResponse(_bb: ByteBuffer): TrackingPauseStateResponse = getRootAsTrackingPauseStateResponse(_bb, TrackingPauseStateResponse()) + @JvmStatic + fun getRootAsTrackingPauseStateResponse(_bb: ByteBuffer, obj: TrackingPauseStateResponse): TrackingPauseStateResponse { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createTrackingPauseStateResponse(builder: FlatBufferBuilder, trackingPaused: Boolean) : Int { + builder.startTable(1) + addTrackingPaused(builder, trackingPaused) + return endTrackingPauseStateResponse(builder) + } + @JvmStatic + fun startTrackingPauseStateResponse(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addTrackingPaused(builder: FlatBufferBuilder, trackingPaused: Boolean) = builder.addBoolean(0, trackingPaused, false) + @JvmStatic + fun endTrackingPauseStateResponse(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotification.kt b/protocol/kotlin/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotification.kt index d4fae87f..b9d65ec6 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotification.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotification.kt @@ -1,57 +1,57 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Server notifies connection of an unknown device. - * If the notification is no longer sent, it means the device connected to another - * server, got connected to this server or it was turned off. - */ -@Suppress("unused") -class UnknownDeviceHandshakeNotification : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : UnknownDeviceHandshakeNotification { - __init(_i, _bb) - return this - } - val macAddress : String? - get() { - val o = __offset(4) - return if (o != 0) __string(o + bb_pos) else null - } - val macAddressAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) - fun macAddressInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsUnknownDeviceHandshakeNotification(_bb: ByteBuffer): UnknownDeviceHandshakeNotification = getRootAsUnknownDeviceHandshakeNotification(_bb, UnknownDeviceHandshakeNotification()) - @JvmStatic - fun getRootAsUnknownDeviceHandshakeNotification(_bb: ByteBuffer, obj: UnknownDeviceHandshakeNotification): UnknownDeviceHandshakeNotification { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createUnknownDeviceHandshakeNotification(builder: FlatBufferBuilder, macAddressOffset: Int) : Int { - builder.startTable(1) - addMacAddress(builder, macAddressOffset) - return endUnknownDeviceHandshakeNotification(builder) - } - @JvmStatic - fun startUnknownDeviceHandshakeNotification(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addMacAddress(builder: FlatBufferBuilder, macAddress: Int) = builder.addOffset(0, macAddress, 0) - @JvmStatic - fun endUnknownDeviceHandshakeNotification(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Server notifies connection of an unknown device. + * If the notification is no longer sent, it means the device connected to another + * server, got connected to this server or it was turned off. + */ +@Suppress("unused") +class UnknownDeviceHandshakeNotification : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : UnknownDeviceHandshakeNotification { + __init(_i, _bb) + return this + } + val macAddress : String? + get() { + val o = __offset(4) + return if (o != 0) __string(o + bb_pos) else null + } + val macAddressAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun macAddressInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsUnknownDeviceHandshakeNotification(_bb: ByteBuffer): UnknownDeviceHandshakeNotification = getRootAsUnknownDeviceHandshakeNotification(_bb, UnknownDeviceHandshakeNotification()) + @JvmStatic + fun getRootAsUnknownDeviceHandshakeNotification(_bb: ByteBuffer, obj: UnknownDeviceHandshakeNotification): UnknownDeviceHandshakeNotification { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createUnknownDeviceHandshakeNotification(builder: FlatBufferBuilder, macAddressOffset: Int) : Int { + builder.startTable(1) + addMacAddress(builder, macAddressOffset) + return endUnknownDeviceHandshakeNotification(builder) + } + @JvmStatic + fun startUnknownDeviceHandshakeNotification(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addMacAddress(builder: FlatBufferBuilder, macAddress: Int) = builder.addOffset(0, macAddress, 0) + @JvmStatic + fun endUnknownDeviceHandshakeNotification(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/VMCOSCSettings.kt b/protocol/kotlin/src/solarxr_protocol/rpc/VMCOSCSettings.kt index 22d043b5..a6361189 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/VMCOSCSettings.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/VMCOSCSettings.kt @@ -1,83 +1,83 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * OSC Settings specific to VMC - */ -@Suppress("unused") -class VMCOSCSettings : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : VMCOSCSettings { - __init(_i, _bb) - return this - } - val oscSettings : solarxr_protocol.rpc.OSCSettings? get() = oscSettings(solarxr_protocol.rpc.OSCSettings()) - fun oscSettings(obj: solarxr_protocol.rpc.OSCSettings) : solarxr_protocol.rpc.OSCSettings? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val vrmJson : String? - get() { - val o = __offset(6) - return if (o != 0) __string(o + bb_pos) else null - } - val vrmJsonAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) - fun vrmJsonInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) - val anchorHip : Boolean - get() { - val o = __offset(8) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val mirrorTracking : Boolean - get() { - val o = __offset(10) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsVMCOSCSettings(_bb: ByteBuffer): VMCOSCSettings = getRootAsVMCOSCSettings(_bb, VMCOSCSettings()) - @JvmStatic - fun getRootAsVMCOSCSettings(_bb: ByteBuffer, obj: VMCOSCSettings): VMCOSCSettings { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createVMCOSCSettings(builder: FlatBufferBuilder, oscSettingsOffset: Int, vrmJsonOffset: Int, anchorHip: Boolean, mirrorTracking: Boolean) : Int { - builder.startTable(4) - addVrmJson(builder, vrmJsonOffset) - addOscSettings(builder, oscSettingsOffset) - addMirrorTracking(builder, mirrorTracking) - addAnchorHip(builder, anchorHip) - return endVMCOSCSettings(builder) - } - @JvmStatic - fun startVMCOSCSettings(builder: FlatBufferBuilder) = builder.startTable(4) - @JvmStatic - fun addOscSettings(builder: FlatBufferBuilder, oscSettings: Int) = builder.addOffset(0, oscSettings, 0) - @JvmStatic - fun addVrmJson(builder: FlatBufferBuilder, vrmJson: Int) = builder.addOffset(1, vrmJson, 0) - @JvmStatic - fun addAnchorHip(builder: FlatBufferBuilder, anchorHip: Boolean) = builder.addBoolean(2, anchorHip, false) - @JvmStatic - fun addMirrorTracking(builder: FlatBufferBuilder, mirrorTracking: Boolean) = builder.addBoolean(3, mirrorTracking, false) - @JvmStatic - fun endVMCOSCSettings(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * OSC Settings specific to VMC + */ +@Suppress("unused") +class VMCOSCSettings : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : VMCOSCSettings { + __init(_i, _bb) + return this + } + val oscSettings : solarxr_protocol.rpc.OSCSettings? get() = oscSettings(solarxr_protocol.rpc.OSCSettings()) + fun oscSettings(obj: solarxr_protocol.rpc.OSCSettings) : solarxr_protocol.rpc.OSCSettings? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val vrmJson : String? + get() { + val o = __offset(6) + return if (o != 0) __string(o + bb_pos) else null + } + val vrmJsonAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) + fun vrmJsonInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) + val anchorHip : Boolean + get() { + val o = __offset(8) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val mirrorTracking : Boolean + get() { + val o = __offset(10) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsVMCOSCSettings(_bb: ByteBuffer): VMCOSCSettings = getRootAsVMCOSCSettings(_bb, VMCOSCSettings()) + @JvmStatic + fun getRootAsVMCOSCSettings(_bb: ByteBuffer, obj: VMCOSCSettings): VMCOSCSettings { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createVMCOSCSettings(builder: FlatBufferBuilder, oscSettingsOffset: Int, vrmJsonOffset: Int, anchorHip: Boolean, mirrorTracking: Boolean) : Int { + builder.startTable(4) + addVrmJson(builder, vrmJsonOffset) + addOscSettings(builder, oscSettingsOffset) + addMirrorTracking(builder, mirrorTracking) + addAnchorHip(builder, anchorHip) + return endVMCOSCSettings(builder) + } + @JvmStatic + fun startVMCOSCSettings(builder: FlatBufferBuilder) = builder.startTable(4) + @JvmStatic + fun addOscSettings(builder: FlatBufferBuilder, oscSettings: Int) = builder.addOffset(0, oscSettings, 0) + @JvmStatic + fun addVrmJson(builder: FlatBufferBuilder, vrmJson: Int) = builder.addOffset(1, vrmJson, 0) + @JvmStatic + fun addAnchorHip(builder: FlatBufferBuilder, anchorHip: Boolean) = builder.addBoolean(2, anchorHip, false) + @JvmStatic + fun addMirrorTracking(builder: FlatBufferBuilder, mirrorTracking: Boolean) = builder.addBoolean(3, mirrorTracking, false) + @JvmStatic + fun endVMCOSCSettings(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/VRCOSCSettings.kt b/protocol/kotlin/src/solarxr_protocol/rpc/VRCOSCSettings.kt index cfc0a544..41a2701c 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/VRCOSCSettings.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/VRCOSCSettings.kt @@ -1,69 +1,69 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * OSC Settings specific to VRChat - */ -@Suppress("unused") -class VRCOSCSettings : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : VRCOSCSettings { - __init(_i, _bb) - return this - } - val oscSettings : solarxr_protocol.rpc.OSCSettings? get() = oscSettings(solarxr_protocol.rpc.OSCSettings()) - fun oscSettings(obj: solarxr_protocol.rpc.OSCSettings) : solarxr_protocol.rpc.OSCSettings? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val trackers : solarxr_protocol.rpc.OSCTrackersSetting? get() = trackers(solarxr_protocol.rpc.OSCTrackersSetting()) - fun trackers(obj: solarxr_protocol.rpc.OSCTrackersSetting) : solarxr_protocol.rpc.OSCTrackersSetting? { - val o = __offset(6) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsVRCOSCSettings(_bb: ByteBuffer): VRCOSCSettings = getRootAsVRCOSCSettings(_bb, VRCOSCSettings()) - @JvmStatic - fun getRootAsVRCOSCSettings(_bb: ByteBuffer, obj: VRCOSCSettings): VRCOSCSettings { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createVRCOSCSettings(builder: FlatBufferBuilder, oscSettingsOffset: Int, trackersOffset: Int) : Int { - builder.startTable(2) - addTrackers(builder, trackersOffset) - addOscSettings(builder, oscSettingsOffset) - return endVRCOSCSettings(builder) - } - @JvmStatic - fun startVRCOSCSettings(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addOscSettings(builder: FlatBufferBuilder, oscSettings: Int) = builder.addOffset(0, oscSettings, 0) - @JvmStatic - fun addTrackers(builder: FlatBufferBuilder, trackers: Int) = builder.addOffset(1, trackers, 0) - @JvmStatic - fun endVRCOSCSettings(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * OSC Settings specific to VRChat + */ +@Suppress("unused") +class VRCOSCSettings : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : VRCOSCSettings { + __init(_i, _bb) + return this + } + val oscSettings : solarxr_protocol.rpc.OSCSettings? get() = oscSettings(solarxr_protocol.rpc.OSCSettings()) + fun oscSettings(obj: solarxr_protocol.rpc.OSCSettings) : solarxr_protocol.rpc.OSCSettings? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val trackers : solarxr_protocol.rpc.OSCTrackersSetting? get() = trackers(solarxr_protocol.rpc.OSCTrackersSetting()) + fun trackers(obj: solarxr_protocol.rpc.OSCTrackersSetting) : solarxr_protocol.rpc.OSCTrackersSetting? { + val o = __offset(6) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsVRCOSCSettings(_bb: ByteBuffer): VRCOSCSettings = getRootAsVRCOSCSettings(_bb, VRCOSCSettings()) + @JvmStatic + fun getRootAsVRCOSCSettings(_bb: ByteBuffer, obj: VRCOSCSettings): VRCOSCSettings { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createVRCOSCSettings(builder: FlatBufferBuilder, oscSettingsOffset: Int, trackersOffset: Int) : Int { + builder.startTable(2) + addTrackers(builder, trackersOffset) + addOscSettings(builder, oscSettingsOffset) + return endVRCOSCSettings(builder) + } + @JvmStatic + fun startVRCOSCSettings(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addOscSettings(builder: FlatBufferBuilder, oscSettings: Int) = builder.addOffset(0, oscSettings, 0) + @JvmStatic + fun addTrackers(builder: FlatBufferBuilder, trackers: Int) = builder.addOffset(1, trackers, 0) + @JvmStatic + fun endVRCOSCSettings(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/WifiProvisioningStatus.kt b/protocol/kotlin/src/solarxr_protocol/rpc/WifiProvisioningStatus.kt index 6bbff56a..15737e90 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/WifiProvisioningStatus.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/WifiProvisioningStatus.kt @@ -1,20 +1,21 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -@Suppress("unused") -class WifiProvisioningStatus private constructor() { - companion object { - const val NONE: UByte = 0u - const val SERIALINIT: UByte = 1u - const val PROVISIONING: UByte = 2u - const val CONNECTING: UByte = 3u - const val CONNECTIONERROR: UByte = 4u - const val LOOKINGFORSERVER: UByte = 5u - const val COULDNOTFINDSERVER: UByte = 6u - const val DONE: UByte = 7u - val names : Array = arrayOf("NONE", "SERIAL_INIT", "PROVISIONING", "CONNECTING", "CONNECTION_ERROR", "LOOKING_FOR_SERVER", "COULD_NOT_FIND_SERVER", "DONE") - @JvmStatic - fun name(e: Int) : String = names[e] - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +@Suppress("unused") +class WifiProvisioningStatus private constructor() { + companion object { + const val NONE: UByte = 0u + const val SERIALINIT: UByte = 1u + const val PROVISIONING: UByte = 2u + const val OPTAININGMACADDRESS: UByte = 3u + const val CONNECTING: UByte = 4u + const val CONNECTIONERROR: UByte = 5u + const val LOOKINGFORSERVER: UByte = 6u + const val COULDNOTFINDSERVER: UByte = 7u + const val DONE: UByte = 8u + val names : Array = arrayOf("NONE", "SERIAL_INIT", "PROVISIONING", "OPTAINING_MAC_ADDRESS", "CONNECTING", "CONNECTION_ERROR", "LOOKING_FOR_SERVER", "COULD_NOT_FIND_SERVER", "DONE") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/WifiProvisioningStatusResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/WifiProvisioningStatusResponse.kt index b8d62428..fcfccead 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/WifiProvisioningStatusResponse.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/WifiProvisioningStatusResponse.kt @@ -1,50 +1,50 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class WifiProvisioningStatusResponse : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : WifiProvisioningStatusResponse { - __init(_i, _bb) - return this - } - val status : UByte - get() { - val o = __offset(4) - return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsWifiProvisioningStatusResponse(_bb: ByteBuffer): WifiProvisioningStatusResponse = getRootAsWifiProvisioningStatusResponse(_bb, WifiProvisioningStatusResponse()) - @JvmStatic - fun getRootAsWifiProvisioningStatusResponse(_bb: ByteBuffer, obj: WifiProvisioningStatusResponse): WifiProvisioningStatusResponse { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createWifiProvisioningStatusResponse(builder: FlatBufferBuilder, status: UByte) : Int { - builder.startTable(1) - addStatus(builder, status) - return endWifiProvisioningStatusResponse(builder) - } - @JvmStatic - fun startWifiProvisioningStatusResponse(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addStatus(builder: FlatBufferBuilder, status: UByte) = builder.addByte(0, status.toByte(), 0) - @JvmStatic - fun endWifiProvisioningStatusResponse(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class WifiProvisioningStatusResponse : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : WifiProvisioningStatusResponse { + __init(_i, _bb) + return this + } + val status : UByte + get() { + val o = __offset(4) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsWifiProvisioningStatusResponse(_bb: ByteBuffer): WifiProvisioningStatusResponse = getRootAsWifiProvisioningStatusResponse(_bb, WifiProvisioningStatusResponse()) + @JvmStatic + fun getRootAsWifiProvisioningStatusResponse(_bb: ByteBuffer, obj: WifiProvisioningStatusResponse): WifiProvisioningStatusResponse { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createWifiProvisioningStatusResponse(builder: FlatBufferBuilder, status: UByte) : Int { + builder.startTable(1) + addStatus(builder, status) + return endWifiProvisioningStatusResponse(builder) + } + @JvmStatic + fun startWifiProvisioningStatusResponse(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addStatus(builder: FlatBufferBuilder, status: UByte) = builder.addByte(0, status.toByte(), 0) + @JvmStatic + fun endWifiProvisioningStatusResponse(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/settings/LegTweaksSettings.kt b/protocol/kotlin/src/solarxr_protocol/rpc/settings/LegTweaksSettings.kt index dc6758ce..171a5a64 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/settings/LegTweaksSettings.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/settings/LegTweaksSettings.kt @@ -1,50 +1,50 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc.settings - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class LegTweaksSettings : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : LegTweaksSettings { - __init(_i, _bb) - return this - } - val correctionStrength : Float? - get() { - val o = __offset(4) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsLegTweaksSettings(_bb: ByteBuffer): LegTweaksSettings = getRootAsLegTweaksSettings(_bb, LegTweaksSettings()) - @JvmStatic - fun getRootAsLegTweaksSettings(_bb: ByteBuffer, obj: LegTweaksSettings): LegTweaksSettings { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createLegTweaksSettings(builder: FlatBufferBuilder, correctionStrength: Float?) : Int { - builder.startTable(1) - correctionStrength?.run { addCorrectionStrength(builder, correctionStrength) } - return endLegTweaksSettings(builder) - } - @JvmStatic - fun startLegTweaksSettings(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addCorrectionStrength(builder: FlatBufferBuilder, correctionStrength: Float) = builder.addFloat(0, correctionStrength, 0.0) - @JvmStatic - fun endLegTweaksSettings(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc.settings + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class LegTweaksSettings : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : LegTweaksSettings { + __init(_i, _bb) + return this + } + val correctionStrength : Float? + get() { + val o = __offset(4) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsLegTweaksSettings(_bb: ByteBuffer): LegTweaksSettings = getRootAsLegTweaksSettings(_bb, LegTweaksSettings()) + @JvmStatic + fun getRootAsLegTweaksSettings(_bb: ByteBuffer, obj: LegTweaksSettings): LegTweaksSettings { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createLegTweaksSettings(builder: FlatBufferBuilder, correctionStrength: Float?) : Int { + builder.startTable(1) + correctionStrength?.run { addCorrectionStrength(builder, correctionStrength) } + return endLegTweaksSettings(builder) + } + @JvmStatic + fun startLegTweaksSettings(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addCorrectionStrength(builder: FlatBufferBuilder, correctionStrength: Float) = builder.addFloat(0, correctionStrength, 0.0) + @JvmStatic + fun endLegTweaksSettings(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/settings/ModelRatios.kt b/protocol/kotlin/src/solarxr_protocol/rpc/settings/ModelRatios.kt index 452c0be5..4d3c2d10 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/settings/ModelRatios.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/settings/ModelRatios.kt @@ -1,111 +1,111 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc.settings - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Settings for the skeletal model that are ratios. - * These values range from 0 to 1. - */ -@Suppress("unused") -class ModelRatios : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : ModelRatios { - __init(_i, _bb) - return this - } - val imputeWaistFromChestHip : Float? - get() { - val o = __offset(4) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - val imputeWaistFromChestLegs : Float? - get() { - val o = __offset(6) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - val imputeHipFromChestLegs : Float? - get() { - val o = __offset(8) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - val imputeHipFromWaistLegs : Float? - get() { - val o = __offset(10) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - /** - * Hip's yaw and roll is set to the average of legs when 1.0 - */ - val interpHipLegs : Float? - get() { - val o = __offset(12) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - /** - * Knee trackers' yaw and roll is set to the lower leg's when 1.0 - */ - val interpKneeTrackerAnkle : Float? - get() { - val o = __offset(14) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - /** - * Upper leg's yaw and roll is set to the lower leg's when 1.0 - */ - val interpKneeAnkle : Float? - get() { - val o = __offset(16) - return if(o != 0) bb.getFloat(o + bb_pos) else null - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsModelRatios(_bb: ByteBuffer): ModelRatios = getRootAsModelRatios(_bb, ModelRatios()) - @JvmStatic - fun getRootAsModelRatios(_bb: ByteBuffer, obj: ModelRatios): ModelRatios { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createModelRatios(builder: FlatBufferBuilder, imputeWaistFromChestHip: Float?, imputeWaistFromChestLegs: Float?, imputeHipFromChestLegs: Float?, imputeHipFromWaistLegs: Float?, interpHipLegs: Float?, interpKneeTrackerAnkle: Float?, interpKneeAnkle: Float?) : Int { - builder.startTable(7) - interpKneeAnkle?.run { addInterpKneeAnkle(builder, interpKneeAnkle) } - interpKneeTrackerAnkle?.run { addInterpKneeTrackerAnkle(builder, interpKneeTrackerAnkle) } - interpHipLegs?.run { addInterpHipLegs(builder, interpHipLegs) } - imputeHipFromWaistLegs?.run { addImputeHipFromWaistLegs(builder, imputeHipFromWaistLegs) } - imputeHipFromChestLegs?.run { addImputeHipFromChestLegs(builder, imputeHipFromChestLegs) } - imputeWaistFromChestLegs?.run { addImputeWaistFromChestLegs(builder, imputeWaistFromChestLegs) } - imputeWaistFromChestHip?.run { addImputeWaistFromChestHip(builder, imputeWaistFromChestHip) } - return endModelRatios(builder) - } - @JvmStatic - fun startModelRatios(builder: FlatBufferBuilder) = builder.startTable(7) - @JvmStatic - fun addImputeWaistFromChestHip(builder: FlatBufferBuilder, imputeWaistFromChestHip: Float) = builder.addFloat(0, imputeWaistFromChestHip, 0.0) - @JvmStatic - fun addImputeWaistFromChestLegs(builder: FlatBufferBuilder, imputeWaistFromChestLegs: Float) = builder.addFloat(1, imputeWaistFromChestLegs, 0.0) - @JvmStatic - fun addImputeHipFromChestLegs(builder: FlatBufferBuilder, imputeHipFromChestLegs: Float) = builder.addFloat(2, imputeHipFromChestLegs, 0.0) - @JvmStatic - fun addImputeHipFromWaistLegs(builder: FlatBufferBuilder, imputeHipFromWaistLegs: Float) = builder.addFloat(3, imputeHipFromWaistLegs, 0.0) - @JvmStatic - fun addInterpHipLegs(builder: FlatBufferBuilder, interpHipLegs: Float) = builder.addFloat(4, interpHipLegs, 0.0) - @JvmStatic - fun addInterpKneeTrackerAnkle(builder: FlatBufferBuilder, interpKneeTrackerAnkle: Float) = builder.addFloat(5, interpKneeTrackerAnkle, 0.0) - @JvmStatic - fun addInterpKneeAnkle(builder: FlatBufferBuilder, interpKneeAnkle: Float) = builder.addFloat(6, interpKneeAnkle, 0.0) - @JvmStatic - fun endModelRatios(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc.settings + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Settings for the skeletal model that are ratios. + * These values range from 0 to 1. + */ +@Suppress("unused") +class ModelRatios : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : ModelRatios { + __init(_i, _bb) + return this + } + val imputeWaistFromChestHip : Float? + get() { + val o = __offset(4) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + val imputeWaistFromChestLegs : Float? + get() { + val o = __offset(6) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + val imputeHipFromChestLegs : Float? + get() { + val o = __offset(8) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + val imputeHipFromWaistLegs : Float? + get() { + val o = __offset(10) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + /** + * Hip's yaw and roll is set to the average of legs when 1.0 + */ + val interpHipLegs : Float? + get() { + val o = __offset(12) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + /** + * Knee trackers' yaw and roll is set to the lower leg's when 1.0 + */ + val interpKneeTrackerAnkle : Float? + get() { + val o = __offset(14) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + /** + * Upper leg's yaw and roll is set to the lower leg's when 1.0 + */ + val interpKneeAnkle : Float? + get() { + val o = __offset(16) + return if(o != 0) bb.getFloat(o + bb_pos) else null + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsModelRatios(_bb: ByteBuffer): ModelRatios = getRootAsModelRatios(_bb, ModelRatios()) + @JvmStatic + fun getRootAsModelRatios(_bb: ByteBuffer, obj: ModelRatios): ModelRatios { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createModelRatios(builder: FlatBufferBuilder, imputeWaistFromChestHip: Float?, imputeWaistFromChestLegs: Float?, imputeHipFromChestLegs: Float?, imputeHipFromWaistLegs: Float?, interpHipLegs: Float?, interpKneeTrackerAnkle: Float?, interpKneeAnkle: Float?) : Int { + builder.startTable(7) + interpKneeAnkle?.run { addInterpKneeAnkle(builder, interpKneeAnkle) } + interpKneeTrackerAnkle?.run { addInterpKneeTrackerAnkle(builder, interpKneeTrackerAnkle) } + interpHipLegs?.run { addInterpHipLegs(builder, interpHipLegs) } + imputeHipFromWaistLegs?.run { addImputeHipFromWaistLegs(builder, imputeHipFromWaistLegs) } + imputeHipFromChestLegs?.run { addImputeHipFromChestLegs(builder, imputeHipFromChestLegs) } + imputeWaistFromChestLegs?.run { addImputeWaistFromChestLegs(builder, imputeWaistFromChestLegs) } + imputeWaistFromChestHip?.run { addImputeWaistFromChestHip(builder, imputeWaistFromChestHip) } + return endModelRatios(builder) + } + @JvmStatic + fun startModelRatios(builder: FlatBufferBuilder) = builder.startTable(7) + @JvmStatic + fun addImputeWaistFromChestHip(builder: FlatBufferBuilder, imputeWaistFromChestHip: Float) = builder.addFloat(0, imputeWaistFromChestHip, 0.0) + @JvmStatic + fun addImputeWaistFromChestLegs(builder: FlatBufferBuilder, imputeWaistFromChestLegs: Float) = builder.addFloat(1, imputeWaistFromChestLegs, 0.0) + @JvmStatic + fun addImputeHipFromChestLegs(builder: FlatBufferBuilder, imputeHipFromChestLegs: Float) = builder.addFloat(2, imputeHipFromChestLegs, 0.0) + @JvmStatic + fun addImputeHipFromWaistLegs(builder: FlatBufferBuilder, imputeHipFromWaistLegs: Float) = builder.addFloat(3, imputeHipFromWaistLegs, 0.0) + @JvmStatic + fun addInterpHipLegs(builder: FlatBufferBuilder, interpHipLegs: Float) = builder.addFloat(4, interpHipLegs, 0.0) + @JvmStatic + fun addInterpKneeTrackerAnkle(builder: FlatBufferBuilder, interpKneeTrackerAnkle: Float) = builder.addFloat(5, interpKneeTrackerAnkle, 0.0) + @JvmStatic + fun addInterpKneeAnkle(builder: FlatBufferBuilder, interpKneeAnkle: Float) = builder.addFloat(6, interpKneeAnkle, 0.0) + @JvmStatic + fun endModelRatios(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/settings/ModelSettings.kt b/protocol/kotlin/src/solarxr_protocol/rpc/settings/ModelSettings.kt index 03e89ce9..aa1a8689 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/settings/ModelSettings.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/settings/ModelSettings.kt @@ -1,81 +1,81 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc.settings - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Settings for the skeletal model. - */ -@Suppress("unused") -class ModelSettings : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : ModelSettings { - __init(_i, _bb) - return this - } - val toggles : solarxr_protocol.rpc.settings.ModelToggles? get() = toggles(solarxr_protocol.rpc.settings.ModelToggles()) - fun toggles(obj: solarxr_protocol.rpc.settings.ModelToggles) : solarxr_protocol.rpc.settings.ModelToggles? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val ratios : solarxr_protocol.rpc.settings.ModelRatios? get() = ratios(solarxr_protocol.rpc.settings.ModelRatios()) - fun ratios(obj: solarxr_protocol.rpc.settings.ModelRatios) : solarxr_protocol.rpc.settings.ModelRatios? { - val o = __offset(6) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - val legTweaks : solarxr_protocol.rpc.settings.LegTweaksSettings? get() = legTweaks(solarxr_protocol.rpc.settings.LegTweaksSettings()) - fun legTweaks(obj: solarxr_protocol.rpc.settings.LegTweaksSettings) : solarxr_protocol.rpc.settings.LegTweaksSettings? { - val o = __offset(8) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsModelSettings(_bb: ByteBuffer): ModelSettings = getRootAsModelSettings(_bb, ModelSettings()) - @JvmStatic - fun getRootAsModelSettings(_bb: ByteBuffer, obj: ModelSettings): ModelSettings { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createModelSettings(builder: FlatBufferBuilder, togglesOffset: Int, ratiosOffset: Int, legTweaksOffset: Int) : Int { - builder.startTable(3) - addLegTweaks(builder, legTweaksOffset) - addRatios(builder, ratiosOffset) - addToggles(builder, togglesOffset) - return endModelSettings(builder) - } - @JvmStatic - fun startModelSettings(builder: FlatBufferBuilder) = builder.startTable(3) - @JvmStatic - fun addToggles(builder: FlatBufferBuilder, toggles: Int) = builder.addOffset(0, toggles, 0) - @JvmStatic - fun addRatios(builder: FlatBufferBuilder, ratios: Int) = builder.addOffset(1, ratios, 0) - @JvmStatic - fun addLegTweaks(builder: FlatBufferBuilder, legTweaks: Int) = builder.addOffset(2, legTweaks, 0) - @JvmStatic - fun endModelSettings(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc.settings + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Settings for the skeletal model. + */ +@Suppress("unused") +class ModelSettings : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : ModelSettings { + __init(_i, _bb) + return this + } + val toggles : solarxr_protocol.rpc.settings.ModelToggles? get() = toggles(solarxr_protocol.rpc.settings.ModelToggles()) + fun toggles(obj: solarxr_protocol.rpc.settings.ModelToggles) : solarxr_protocol.rpc.settings.ModelToggles? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val ratios : solarxr_protocol.rpc.settings.ModelRatios? get() = ratios(solarxr_protocol.rpc.settings.ModelRatios()) + fun ratios(obj: solarxr_protocol.rpc.settings.ModelRatios) : solarxr_protocol.rpc.settings.ModelRatios? { + val o = __offset(6) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + val legTweaks : solarxr_protocol.rpc.settings.LegTweaksSettings? get() = legTweaks(solarxr_protocol.rpc.settings.LegTweaksSettings()) + fun legTweaks(obj: solarxr_protocol.rpc.settings.LegTweaksSettings) : solarxr_protocol.rpc.settings.LegTweaksSettings? { + val o = __offset(8) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsModelSettings(_bb: ByteBuffer): ModelSettings = getRootAsModelSettings(_bb, ModelSettings()) + @JvmStatic + fun getRootAsModelSettings(_bb: ByteBuffer, obj: ModelSettings): ModelSettings { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createModelSettings(builder: FlatBufferBuilder, togglesOffset: Int, ratiosOffset: Int, legTweaksOffset: Int) : Int { + builder.startTable(3) + addLegTweaks(builder, legTweaksOffset) + addRatios(builder, ratiosOffset) + addToggles(builder, togglesOffset) + return endModelSettings(builder) + } + @JvmStatic + fun startModelSettings(builder: FlatBufferBuilder) = builder.startTable(3) + @JvmStatic + fun addToggles(builder: FlatBufferBuilder, toggles: Int) = builder.addOffset(0, toggles, 0) + @JvmStatic + fun addRatios(builder: FlatBufferBuilder, ratios: Int) = builder.addOffset(1, ratios, 0) + @JvmStatic + fun addLegTweaks(builder: FlatBufferBuilder, legTweaks: Int) = builder.addOffset(2, legTweaks, 0) + @JvmStatic + fun endModelSettings(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/settings/ModelToggles.kt b/protocol/kotlin/src/solarxr_protocol/rpc/settings/ModelToggles.kt index d8223ee0..cba246fd 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/settings/ModelToggles.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/settings/ModelToggles.kt @@ -1,133 +1,133 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc.settings - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -/** - * Settings for the skeletal model that are toggles. - */ -@Suppress("unused") -class ModelToggles : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : ModelToggles { - __init(_i, _bb) - return this - } - val extendedSpine : Boolean? - get() { - val o = __offset(4) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val extendedPelvis : Boolean? - get() { - val o = __offset(6) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val extendedKnee : Boolean? - get() { - val o = __offset(8) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val forceArmsFromHmd : Boolean? - get() { - val o = __offset(10) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val floorClip : Boolean? - get() { - val o = __offset(12) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val skatingCorrection : Boolean? - get() { - val o = __offset(14) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val viveEmulation : Boolean? - get() { - val o = __offset(16) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val toeSnap : Boolean? - get() { - val o = __offset(18) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val footPlant : Boolean? - get() { - val o = __offset(20) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val selfLocalization : Boolean? - get() { - val o = __offset(22) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - val usePosition : Boolean? - get() { - val o = __offset(24) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsModelToggles(_bb: ByteBuffer): ModelToggles = getRootAsModelToggles(_bb, ModelToggles()) - @JvmStatic - fun getRootAsModelToggles(_bb: ByteBuffer, obj: ModelToggles): ModelToggles { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createModelToggles(builder: FlatBufferBuilder, extendedSpine: Boolean?, extendedPelvis: Boolean?, extendedKnee: Boolean?, forceArmsFromHmd: Boolean?, floorClip: Boolean?, skatingCorrection: Boolean?, viveEmulation: Boolean?, toeSnap: Boolean?, footPlant: Boolean?, selfLocalization: Boolean?, usePosition: Boolean?) : Int { - builder.startTable(11) - usePosition?.run { addUsePosition(builder, usePosition) } - selfLocalization?.run { addSelfLocalization(builder, selfLocalization) } - footPlant?.run { addFootPlant(builder, footPlant) } - toeSnap?.run { addToeSnap(builder, toeSnap) } - viveEmulation?.run { addViveEmulation(builder, viveEmulation) } - skatingCorrection?.run { addSkatingCorrection(builder, skatingCorrection) } - floorClip?.run { addFloorClip(builder, floorClip) } - forceArmsFromHmd?.run { addForceArmsFromHmd(builder, forceArmsFromHmd) } - extendedKnee?.run { addExtendedKnee(builder, extendedKnee) } - extendedPelvis?.run { addExtendedPelvis(builder, extendedPelvis) } - extendedSpine?.run { addExtendedSpine(builder, extendedSpine) } - return endModelToggles(builder) - } - @JvmStatic - fun startModelToggles(builder: FlatBufferBuilder) = builder.startTable(11) - @JvmStatic - fun addExtendedSpine(builder: FlatBufferBuilder, extendedSpine: Boolean) = builder.addBoolean(0, extendedSpine, false) - @JvmStatic - fun addExtendedPelvis(builder: FlatBufferBuilder, extendedPelvis: Boolean) = builder.addBoolean(1, extendedPelvis, false) - @JvmStatic - fun addExtendedKnee(builder: FlatBufferBuilder, extendedKnee: Boolean) = builder.addBoolean(2, extendedKnee, false) - @JvmStatic - fun addForceArmsFromHmd(builder: FlatBufferBuilder, forceArmsFromHmd: Boolean) = builder.addBoolean(3, forceArmsFromHmd, false) - @JvmStatic - fun addFloorClip(builder: FlatBufferBuilder, floorClip: Boolean) = builder.addBoolean(4, floorClip, false) - @JvmStatic - fun addSkatingCorrection(builder: FlatBufferBuilder, skatingCorrection: Boolean) = builder.addBoolean(5, skatingCorrection, false) - @JvmStatic - fun addViveEmulation(builder: FlatBufferBuilder, viveEmulation: Boolean) = builder.addBoolean(6, viveEmulation, false) - @JvmStatic - fun addToeSnap(builder: FlatBufferBuilder, toeSnap: Boolean) = builder.addBoolean(7, toeSnap, false) - @JvmStatic - fun addFootPlant(builder: FlatBufferBuilder, footPlant: Boolean) = builder.addBoolean(8, footPlant, false) - @JvmStatic - fun addSelfLocalization(builder: FlatBufferBuilder, selfLocalization: Boolean) = builder.addBoolean(9, selfLocalization, false) - @JvmStatic - fun addUsePosition(builder: FlatBufferBuilder, usePosition: Boolean) = builder.addBoolean(10, usePosition, false) - @JvmStatic - fun endModelToggles(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc.settings + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Settings for the skeletal model that are toggles. + */ +@Suppress("unused") +class ModelToggles : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : ModelToggles { + __init(_i, _bb) + return this + } + val extendedSpine : Boolean? + get() { + val o = __offset(4) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val extendedPelvis : Boolean? + get() { + val o = __offset(6) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val extendedKnee : Boolean? + get() { + val o = __offset(8) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val forceArmsFromHmd : Boolean? + get() { + val o = __offset(10) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val floorClip : Boolean? + get() { + val o = __offset(12) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val skatingCorrection : Boolean? + get() { + val o = __offset(14) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val viveEmulation : Boolean? + get() { + val o = __offset(16) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val toeSnap : Boolean? + get() { + val o = __offset(18) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val footPlant : Boolean? + get() { + val o = __offset(20) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val selfLocalization : Boolean? + get() { + val o = __offset(22) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + val usePosition : Boolean? + get() { + val o = __offset(24) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsModelToggles(_bb: ByteBuffer): ModelToggles = getRootAsModelToggles(_bb, ModelToggles()) + @JvmStatic + fun getRootAsModelToggles(_bb: ByteBuffer, obj: ModelToggles): ModelToggles { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createModelToggles(builder: FlatBufferBuilder, extendedSpine: Boolean?, extendedPelvis: Boolean?, extendedKnee: Boolean?, forceArmsFromHmd: Boolean?, floorClip: Boolean?, skatingCorrection: Boolean?, viveEmulation: Boolean?, toeSnap: Boolean?, footPlant: Boolean?, selfLocalization: Boolean?, usePosition: Boolean?) : Int { + builder.startTable(11) + usePosition?.run { addUsePosition(builder, usePosition) } + selfLocalization?.run { addSelfLocalization(builder, selfLocalization) } + footPlant?.run { addFootPlant(builder, footPlant) } + toeSnap?.run { addToeSnap(builder, toeSnap) } + viveEmulation?.run { addViveEmulation(builder, viveEmulation) } + skatingCorrection?.run { addSkatingCorrection(builder, skatingCorrection) } + floorClip?.run { addFloorClip(builder, floorClip) } + forceArmsFromHmd?.run { addForceArmsFromHmd(builder, forceArmsFromHmd) } + extendedKnee?.run { addExtendedKnee(builder, extendedKnee) } + extendedPelvis?.run { addExtendedPelvis(builder, extendedPelvis) } + extendedSpine?.run { addExtendedSpine(builder, extendedSpine) } + return endModelToggles(builder) + } + @JvmStatic + fun startModelToggles(builder: FlatBufferBuilder) = builder.startTable(11) + @JvmStatic + fun addExtendedSpine(builder: FlatBufferBuilder, extendedSpine: Boolean) = builder.addBoolean(0, extendedSpine, false) + @JvmStatic + fun addExtendedPelvis(builder: FlatBufferBuilder, extendedPelvis: Boolean) = builder.addBoolean(1, extendedPelvis, false) + @JvmStatic + fun addExtendedKnee(builder: FlatBufferBuilder, extendedKnee: Boolean) = builder.addBoolean(2, extendedKnee, false) + @JvmStatic + fun addForceArmsFromHmd(builder: FlatBufferBuilder, forceArmsFromHmd: Boolean) = builder.addBoolean(3, forceArmsFromHmd, false) + @JvmStatic + fun addFloorClip(builder: FlatBufferBuilder, floorClip: Boolean) = builder.addBoolean(4, floorClip, false) + @JvmStatic + fun addSkatingCorrection(builder: FlatBufferBuilder, skatingCorrection: Boolean) = builder.addBoolean(5, skatingCorrection, false) + @JvmStatic + fun addViveEmulation(builder: FlatBufferBuilder, viveEmulation: Boolean) = builder.addBoolean(6, viveEmulation, false) + @JvmStatic + fun addToeSnap(builder: FlatBufferBuilder, toeSnap: Boolean) = builder.addBoolean(7, toeSnap, false) + @JvmStatic + fun addFootPlant(builder: FlatBufferBuilder, footPlant: Boolean) = builder.addBoolean(8, footPlant, false) + @JvmStatic + fun addSelfLocalization(builder: FlatBufferBuilder, selfLocalization: Boolean) = builder.addBoolean(9, selfLocalization, false) + @JvmStatic + fun addUsePosition(builder: FlatBufferBuilder, usePosition: Boolean) = builder.addBoolean(10, usePosition, false) + @JvmStatic + fun endModelToggles(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/rust/src/generated/mod.rs b/protocol/rust/src/generated/mod.rs index f2dafea3..0ae426ea 100644 --- a/protocol/rust/src/generated/mod.rs +++ b/protocol/rust/src/generated/mod.rs @@ -1,302 +1,326 @@ -// Automatically generated by the Flatbuffers compiler. Do not modify. -// @generated -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_4_address_generated; - pub use self::ipv_4_address_generated::*; - mod bytes_generated; - pub use self::bytes_generated::*; - mod string_table_generated; - pub use self::string_table_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_mapping_generated; - pub use self::topic_mapping_generated::*; - mod topic_handle_request_generated; - pub use self::topic_handle_request_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 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 leg_tweaks_settings_generated; - pub use self::leg_tweaks_settings_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 reset_status_generated; - pub use self::reset_status_generated::*; - mod arms_mounting_reset_mode_generated; - pub use self::arms_mounting_reset_mode_generated::*; - mod skeleton_bone_generated; - pub use self::skeleton_bone_generated::*; - mod wifi_provisioning_status_generated; - pub use self::wifi_provisioning_status_generated::*; - mod auto_bone_process_type_generated; - pub use self::auto_bone_process_type_generated::*; - mod status_data_generated; - pub use self::status_data_generated::*; - mod computer_directory_generated; - pub use self::computer_directory_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 clear_drift_compensation_request_generated; - pub use self::clear_drift_compensation_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 drift_compensation_settings_generated; - pub use self::drift_compensation_settings_generated::*; - mod oscrouter_settings_generated; - pub use self::oscrouter_settings_generated::*; - mod vrcoscsettings_generated; - pub use self::vrcoscsettings_generated::*; - mod vmcoscsettings_generated; - pub use self::vmcoscsettings_generated::*; - mod oscsettings_generated; - pub use self::oscsettings_generated::*; - mod osctrackers_setting_generated; - pub use self::osctrackers_setting_generated::*; - mod tap_detection_settings_generated; - pub use self::tap_detection_settings_generated::*; - mod resets_settings_generated; - pub use self::resets_settings_generated::*; - mod tap_detection_setup_notification_generated; - pub use self::tap_detection_setup_notification_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 serial_device_generated; - pub use self::serial_device_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 serial_devices_request_generated; - pub use self::serial_devices_request_generated::*; - mod serial_devices_response_generated; - pub use self::serial_devices_response_generated::*; - mod new_serial_device_response_generated; - pub use self::new_serial_device_response_generated::*; - mod start_wifi_provisioning_request_generated; - pub use self::start_wifi_provisioning_request_generated::*; - mod stop_wifi_provisioning_request_generated; - pub use self::stop_wifi_provisioning_request_generated::*; - mod wifi_provisioning_status_response_generated; - pub use self::wifi_provisioning_status_response_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 auto_bone_settings_generated; - pub use self::auto_bone_settings_generated::*; - mod height_request_generated; - pub use self::height_request_generated::*; - mod height_response_generated; - pub use self::height_response_generated::*; - mod auto_bone_apply_request_generated; - pub use self::auto_bone_apply_request_generated::*; - mod auto_bone_stop_recording_request_generated; - pub use self::auto_bone_stop_recording_request_generated::*; - mod auto_bone_cancel_recording_request_generated; - pub use self::auto_bone_cancel_recording_request_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::*; - mod server_infos_request_generated; - pub use self::server_infos_request_generated::*; - mod server_infos_response_generated; - pub use self::server_infos_response_generated::*; - mod leg_tweaks_tmp_change_generated; - pub use self::leg_tweaks_tmp_change_generated::*; - mod leg_tweaks_tmp_clear_generated; - pub use self::leg_tweaks_tmp_clear_generated::*; - mod status_tracker_reset_generated; - pub use self::status_tracker_reset_generated::*; - mod status_tracker_error_generated; - pub use self::status_tracker_error_generated::*; - mod status_steam_vrdisconnected_generated; - pub use self::status_steam_vrdisconnected_generated::*; - mod status_unassigned_hmd_generated; - pub use self::status_unassigned_hmd_generated::*; - mod status_system_request_generated; - pub use self::status_system_request_generated::*; - mod status_system_response_generated; - pub use self::status_system_response_generated::*; - mod status_system_update_generated; - pub use self::status_system_update_generated::*; - mod status_system_fixed_generated; - pub use self::status_system_fixed_generated::*; - mod status_message_generated; - pub use self::status_message_generated::*; - mod set_pause_tracking_request_generated; - pub use self::set_pause_tracking_request_generated::*; - mod clear_mounting_reset_request_generated; - pub use self::clear_mounting_reset_request_generated::*; - mod save_file_notification_generated; - pub use self::save_file_notification_generated::*; - mod tracking_pause_state_request_generated; - pub use self::tracking_pause_state_request_generated::*; - mod tracking_pause_state_response_generated; - pub use self::tracking_pause_state_response_generated::*; - mod serial_tracker_get_wifi_scan_request_generated; - pub use self::serial_tracker_get_wifi_scan_request_generated::*; - mod unknown_device_handshake_notification_generated; - pub use self::unknown_device_handshake_notification_generated::*; - mod add_unknown_device_request_generated; - pub use self::add_unknown_device_request_generated::*; - mod forget_device_request_generated; - pub use self::forget_device_request_generated::*; - } // rpc - mod message_bundle_generated; - pub use self::message_bundle_generated::*; -} // solarxr_protocol +// Automatically generated by the Flatbuffers compiler. Do not modify. +// @generated +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 board_type_generated; + pub use self::board_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 device_id_table_generated; + pub use self::device_id_table_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_4_address_generated; + pub use self::ipv_4_address_generated::*; + mod bytes_generated; + pub use self::bytes_generated::*; + mod string_table_generated; + pub use self::string_table_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_mapping_generated; + pub use self::topic_mapping_generated::*; + mod topic_handle_request_generated; + pub use self::topic_handle_request_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 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 leg_tweaks_settings_generated; + pub use self::leg_tweaks_settings_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 reset_status_generated; + pub use self::reset_status_generated::*; + mod arms_mounting_reset_mode_generated; + pub use self::arms_mounting_reset_mode_generated::*; + mod skeleton_bone_generated; + pub use self::skeleton_bone_generated::*; + mod wifi_provisioning_status_generated; + pub use self::wifi_provisioning_status_generated::*; + mod auto_bone_process_type_generated; + pub use self::auto_bone_process_type_generated::*; + mod status_data_generated; + pub use self::status_data_generated::*; + mod computer_directory_generated; + pub use self::computer_directory_generated::*; + mod firmware_update_status_generated; + pub use self::firmware_update_status_generated::*; + mod firmware_update_device_id_generated; + pub use self::firmware_update_device_id_generated::*; + mod firmware_update_method_generated; + pub use self::firmware_update_method_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 clear_drift_compensation_request_generated; + pub use self::clear_drift_compensation_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 drift_compensation_settings_generated; + pub use self::drift_compensation_settings_generated::*; + mod oscrouter_settings_generated; + pub use self::oscrouter_settings_generated::*; + mod vrcoscsettings_generated; + pub use self::vrcoscsettings_generated::*; + mod vmcoscsettings_generated; + pub use self::vmcoscsettings_generated::*; + mod oscsettings_generated; + pub use self::oscsettings_generated::*; + mod osctrackers_setting_generated; + pub use self::osctrackers_setting_generated::*; + mod tap_detection_settings_generated; + pub use self::tap_detection_settings_generated::*; + mod resets_settings_generated; + pub use self::resets_settings_generated::*; + mod tap_detection_setup_notification_generated; + pub use self::tap_detection_setup_notification_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 serial_device_generated; + pub use self::serial_device_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 serial_devices_request_generated; + pub use self::serial_devices_request_generated::*; + mod serial_devices_response_generated; + pub use self::serial_devices_response_generated::*; + mod new_serial_device_response_generated; + pub use self::new_serial_device_response_generated::*; + mod start_wifi_provisioning_request_generated; + pub use self::start_wifi_provisioning_request_generated::*; + mod stop_wifi_provisioning_request_generated; + pub use self::stop_wifi_provisioning_request_generated::*; + mod wifi_provisioning_status_response_generated; + pub use self::wifi_provisioning_status_response_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 auto_bone_settings_generated; + pub use self::auto_bone_settings_generated::*; + mod height_request_generated; + pub use self::height_request_generated::*; + mod height_response_generated; + pub use self::height_response_generated::*; + mod auto_bone_apply_request_generated; + pub use self::auto_bone_apply_request_generated::*; + mod auto_bone_stop_recording_request_generated; + pub use self::auto_bone_stop_recording_request_generated::*; + mod auto_bone_cancel_recording_request_generated; + pub use self::auto_bone_cancel_recording_request_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::*; + mod server_infos_request_generated; + pub use self::server_infos_request_generated::*; + mod server_infos_response_generated; + pub use self::server_infos_response_generated::*; + mod leg_tweaks_tmp_change_generated; + pub use self::leg_tweaks_tmp_change_generated::*; + mod leg_tweaks_tmp_clear_generated; + pub use self::leg_tweaks_tmp_clear_generated::*; + mod status_tracker_reset_generated; + pub use self::status_tracker_reset_generated::*; + mod status_tracker_error_generated; + pub use self::status_tracker_error_generated::*; + mod status_steam_vrdisconnected_generated; + pub use self::status_steam_vrdisconnected_generated::*; + mod status_unassigned_hmd_generated; + pub use self::status_unassigned_hmd_generated::*; + mod status_system_request_generated; + pub use self::status_system_request_generated::*; + mod status_system_response_generated; + pub use self::status_system_response_generated::*; + mod status_system_update_generated; + pub use self::status_system_update_generated::*; + mod status_system_fixed_generated; + pub use self::status_system_fixed_generated::*; + mod status_message_generated; + pub use self::status_message_generated::*; + mod set_pause_tracking_request_generated; + pub use self::set_pause_tracking_request_generated::*; + mod clear_mounting_reset_request_generated; + pub use self::clear_mounting_reset_request_generated::*; + mod save_file_notification_generated; + pub use self::save_file_notification_generated::*; + mod serial_device_port_generated; + pub use self::serial_device_port_generated::*; + mod firmware_part_generated; + pub use self::firmware_part_generated::*; + mod firmware_update_request_generated; + pub use self::firmware_update_request_generated::*; + mod otafirmware_update_generated; + pub use self::otafirmware_update_generated::*; + mod serial_firmware_update_generated; + pub use self::serial_firmware_update_generated::*; + mod firmware_update_status_response_generated; + pub use self::firmware_update_status_response_generated::*; + mod firmware_update_stop_queues_request_generated; + pub use self::firmware_update_stop_queues_request_generated::*; + mod tracking_pause_state_request_generated; + pub use self::tracking_pause_state_request_generated::*; + mod tracking_pause_state_response_generated; + pub use self::tracking_pause_state_response_generated::*; + mod serial_tracker_get_wifi_scan_request_generated; + pub use self::serial_tracker_get_wifi_scan_request_generated::*; + mod unknown_device_handshake_notification_generated; + pub use self::unknown_device_handshake_notification_generated::*; + mod add_unknown_device_request_generated; + pub use self::add_unknown_device_request_generated::*; + mod forget_device_request_generated; + pub use self::forget_device_request_generated::*; + } // rpc + mod message_bundle_generated; + pub use self::message_bundle_generated::*; +} // 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 3f33e766..7afa41f0 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,167 +1,167 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(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 unsafe 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(Bone::VT_ROTATION_G, None)} - } - #[inline] - pub fn bone_length(&self) -> f32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(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 unsafe 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Bone::VT_ROTATION_G, None)} + } + #[inline] + pub fn bone_length(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} 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 2ae303e2..93af1c55 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,163 +1,163 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(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 unsafe 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(DataFeedConfig::VT_MINIMUM_TIME_SINCE_LAST, Some(0)).unwrap()} - } - #[inline] - pub fn data_mask(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(DataFeedConfig::VT_DATA_MASK, None)} - } - #[inline] - pub fn synthetic_trackers_mask(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(DataFeedConfig::VT_SYNTHETIC_TRACKERS_MASK, None)} - } - #[inline] - pub fn bone_mask(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(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 unsafe 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(DataFeedConfig::VT_MINIMUM_TIME_SINCE_LAST, Some(0)).unwrap()} + } + #[inline] + pub fn data_mask(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(DataFeedConfig::VT_DATA_MASK, None)} + } + #[inline] + pub fn synthetic_trackers_mask(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(DataFeedConfig::VT_SYNTHETIC_TRACKERS_MASK, None)} + } + #[inline] + pub fn bone_mask(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} 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 d54aadcf..6004ede5 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,110 +1,110 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for DataFeedMessage { - type Output = DataFeedMessage; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for DataFeedMessage { - type Scalar = u8; - #[inline] - fn to_little_endian(self) -> u8 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u8) -> Self { - let b = u8::from_le(v); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for DataFeedMessage { + type Output = DataFeedMessage; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for DataFeedMessage { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for 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 d9dfb67e..754090f0 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,225 +1,225 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> DataFeedMessageHeader<'a> { - pub const VT_MESSAGE_TYPE: flatbuffers::VOffsetT = 4; - pub const VT_MESSAGE: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(DataFeedMessageHeader::VT_MESSAGE_TYPE, Some(DataFeedMessage::NONE)).unwrap()} - } - #[inline] - pub fn message(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { PollDataFeed::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { StartDataFeed::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { DataFeedUpdate::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { DataFeedConfig::init_from_table(t) } - }) - } 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> DataFeedMessageHeader<'a> { + pub const VT_MESSAGE_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_MESSAGE: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(DataFeedMessageHeader::VT_MESSAGE_TYPE, Some(DataFeedMessage::NONE)).unwrap()} + } + #[inline] + pub fn message(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { PollDataFeed::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { StartDataFeed::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { DataFeedUpdate::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { DataFeedConfig::init_from_table(t) } + }) + } 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() + } +} 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 03e1bdf7..703d5d15 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,150 +1,150 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(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 unsafe 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>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(DataFeedUpdate::VT_DEVICES, None)} - } - #[inline] - pub fn synthetic_trackers(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(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 unsafe 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>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(DataFeedUpdate::VT_DEVICES, None)} + } + #[inline] + pub fn synthetic_trackers(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} 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 af9a830a..91b7499a 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,184 +1,184 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(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 unsafe 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(DeviceData::VT_CUSTOM_NAME, None)} - } - /// Mostly-static info about the device hardware - #[inline] - pub fn hardware_info(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(DeviceData::VT_HARDWARE_INFO, None)} - } - /// General info about the status of the device - #[inline] - pub fn hardware_status(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(DeviceData::VT_HARDWARE_STATUS, None)} - } - /// Info about all trackers attached to this device - #[inline] - pub fn trackers(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(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 unsafe 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(DeviceData::VT_CUSTOM_NAME, None)} + } + /// Mostly-static info about the device hardware + #[inline] + pub fn hardware_info(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(DeviceData::VT_HARDWARE_INFO, None)} + } + /// General info about the status of the device + #[inline] + pub fn hardware_status(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(DeviceData::VT_HARDWARE_STATUS, None)} + } + /// Info about all trackers attached to this device + #[inline] + pub fn trackers(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} 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 392426af..922184a0 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,133 +1,133 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> DeviceDataMask<'a> { - pub const VT_TRACKER_DATA: flatbuffers::VOffsetT = 4; - pub const VT_DEVICE_DATA: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> DeviceDataMask<'a> { + pub const VT_TRACKER_DATA: flatbuffers::VOffsetT = 4; + pub const VT_DEVICE_DATA: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} 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 aaa1713c..38ca7bdf 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,110 +1,110 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> PollDataFeed<'a> { - pub const VT_CONFIG: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> PollDataFeed<'a> { + pub const VT_CONFIG: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} 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 4e8357f9..0325c4fb 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,116 +1,116 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> StartDataFeed<'a> { - pub const VT_DATA_FEEDS: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe 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>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> StartDataFeed<'a> { + pub const VT_DATA_FEEDS: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe 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>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} 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 1db1b960..43ce87b0 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,319 +1,319 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(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_ANGULAR_VELOCITY: flatbuffers::VOffsetT = 14; - pub const VT_RAW_ACCELERATION: flatbuffers::VOffsetT = 16; - pub const VT_TEMP: flatbuffers::VOffsetT = 18; - pub const VT_LINEAR_ACCELERATION: flatbuffers::VOffsetT = 20; - pub const VT_ROTATION_REFERENCE_ADJUSTED: flatbuffers::VOffsetT = 22; - pub const VT_ROTATION_IDENTITY_ADJUSTED: flatbuffers::VOffsetT = 24; - pub const VT_TPS: flatbuffers::VOffsetT = 26; - - #[inline] - pub unsafe 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.rotation_identity_adjusted { builder.add_rotation_identity_adjusted(x); } - if let Some(x) = args.rotation_reference_adjusted { builder.add_rotation_reference_adjusted(x); } - if let Some(x) = args.linear_acceleration { builder.add_linear_acceleration(x); } - if let Some(x) = args.temp { builder.add_temp(x); } - if let Some(x) = args.raw_acceleration { builder.add_raw_acceleration(x); } - if let Some(x) = args.raw_angular_velocity { builder.add_raw_angular_velocity(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); } - if let Some(x) = args.tps { builder.add_tps(x); } - builder.add_status(args.status); - builder.finish() - } - - - #[inline] - pub fn tracker_id(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(TrackerData::VT_TRACKER_ID, None)} - } - #[inline] - pub fn info(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(TrackerData::VT_INFO, None)} - } - #[inline] - pub fn status(&self) -> super::super::datatypes::TrackerStatus { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerData::VT_STATUS, Some(super::super::datatypes::TrackerStatus::NONE)).unwrap()} - } - /// Sensor rotation after fusion - #[inline] - pub fn rotation(&self) -> Option<&'a super::super::datatypes::math::Quat> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerData::VT_ROTATION, None)} - } - /// Position, in meters - #[inline] - pub fn position(&self) -> Option<&'a super::super::datatypes::math::Vec3f> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerData::VT_POSITION, None)} - } - /// Raw angular velocity, in euler angles, rad/s - #[inline] - pub fn raw_angular_velocity(&self) -> Option<&'a super::super::datatypes::math::Vec3f> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerData::VT_RAW_ANGULAR_VELOCITY, None)} - } - /// Raw acceleration, in m/s^2 - #[inline] - pub fn raw_acceleration(&self) -> Option<&'a super::super::datatypes::math::Vec3f> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerData::VT_RAW_ACCELERATION, None)} - } - /// Temperature, in degrees celsius - #[inline] - pub fn temp(&self) -> Option<&'a super::super::datatypes::Temperature> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerData::VT_TEMP, None)} - } - /// Acceleration without gravity, in m/s^2 - #[inline] - pub fn linear_acceleration(&self) -> Option<&'a super::super::datatypes::math::Vec3f> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerData::VT_LINEAR_ACCELERATION, None)} - } - /// Reference-adjusted rotation for IMU-only trackers (VR HMD yaw is used as a reset reference). - /// In other words, a rotation that is aligned to a reliable source of rotation ((0, VR HMD YAW, 0)), - /// triggered after user input (using reset buttons). - /// This is a SlimeVR-specific field and computed exclusively by SlimeVR server. - /// Includes: mounting orientation, full, quick and mounting reset adjustments. - /// This rotation can be used to reconstruct a skeleton pose using forward kinematics. - #[inline] - pub fn rotation_reference_adjusted(&self) -> Option<&'a super::super::datatypes::math::Quat> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerData::VT_ROTATION_REFERENCE_ADJUSTED, None)} - } - /// Zero-reference-adjusted rotation for IMU-only trackers (identity quaternion is used as a reset reference). - /// In other words, a rotation that is aligned to a zero vector ((0, 0, 0)) by - /// inverting the current rotation, triggered after user input (using reset buttons). - /// This is a SlimeVR-specific field and computed exclusively by SlimeVR server. - /// Includes: only full and quick reset adjustments. - /// This rotation can be used in visualizations for IMU debugging. - #[inline] - pub fn rotation_identity_adjusted(&self) -> Option<&'a super::super::datatypes::math::Quat> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerData::VT_ROTATION_IDENTITY_ADJUSTED, None)} - } - /// Data ticks per second, processed by SlimeVR server - #[inline] - pub fn tps(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerData::VT_TPS, 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_angular_velocity", Self::VT_RAW_ANGULAR_VELOCITY, false)? - .visit_field::("raw_acceleration", Self::VT_RAW_ACCELERATION, false)? - .visit_field::("temp", Self::VT_TEMP, false)? - .visit_field::("linear_acceleration", Self::VT_LINEAR_ACCELERATION, false)? - .visit_field::("rotation_reference_adjusted", Self::VT_ROTATION_REFERENCE_ADJUSTED, false)? - .visit_field::("rotation_identity_adjusted", Self::VT_ROTATION_IDENTITY_ADJUSTED, false)? - .visit_field::("tps", Self::VT_TPS, 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_angular_velocity: Option<&'a super::super::datatypes::math::Vec3f>, - pub raw_acceleration: Option<&'a super::super::datatypes::math::Vec3f>, - pub temp: Option<&'a super::super::datatypes::Temperature>, - pub linear_acceleration: Option<&'a super::super::datatypes::math::Vec3f>, - pub rotation_reference_adjusted: Option<&'a super::super::datatypes::math::Quat>, - pub rotation_identity_adjusted: Option<&'a super::super::datatypes::math::Quat>, - pub tps: Option, -} -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_angular_velocity: None, - raw_acceleration: None, - temp: None, - linear_acceleration: None, - rotation_reference_adjusted: None, - rotation_identity_adjusted: None, - tps: 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_angular_velocity(&mut self, raw_angular_velocity: &super::super::datatypes::math::Vec3f) { - self.fbb_.push_slot_always::<&super::super::datatypes::math::Vec3f>(TrackerData::VT_RAW_ANGULAR_VELOCITY, raw_angular_velocity); - } - #[inline] - pub fn add_raw_acceleration(&mut self, raw_acceleration: &super::super::datatypes::math::Vec3f) { - self.fbb_.push_slot_always::<&super::super::datatypes::math::Vec3f>(TrackerData::VT_RAW_ACCELERATION, raw_acceleration); - } - #[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 add_linear_acceleration(&mut self, linear_acceleration: &super::super::datatypes::math::Vec3f) { - self.fbb_.push_slot_always::<&super::super::datatypes::math::Vec3f>(TrackerData::VT_LINEAR_ACCELERATION, linear_acceleration); - } - #[inline] - pub fn add_rotation_reference_adjusted(&mut self, rotation_reference_adjusted: &super::super::datatypes::math::Quat) { - self.fbb_.push_slot_always::<&super::super::datatypes::math::Quat>(TrackerData::VT_ROTATION_REFERENCE_ADJUSTED, rotation_reference_adjusted); - } - #[inline] - pub fn add_rotation_identity_adjusted(&mut self, rotation_identity_adjusted: &super::super::datatypes::math::Quat) { - self.fbb_.push_slot_always::<&super::super::datatypes::math::Quat>(TrackerData::VT_ROTATION_IDENTITY_ADJUSTED, rotation_identity_adjusted); - } - #[inline] - pub fn add_tps(&mut self, tps: u16) { - self.fbb_.push_slot_always::(TrackerData::VT_TPS, tps); - } - #[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_angular_velocity", &self.raw_angular_velocity()); - ds.field("raw_acceleration", &self.raw_acceleration()); - ds.field("temp", &self.temp()); - ds.field("linear_acceleration", &self.linear_acceleration()); - ds.field("rotation_reference_adjusted", &self.rotation_reference_adjusted()); - ds.field("rotation_identity_adjusted", &self.rotation_identity_adjusted()); - ds.field("tps", &self.tps()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(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_ANGULAR_VELOCITY: flatbuffers::VOffsetT = 14; + pub const VT_RAW_ACCELERATION: flatbuffers::VOffsetT = 16; + pub const VT_TEMP: flatbuffers::VOffsetT = 18; + pub const VT_LINEAR_ACCELERATION: flatbuffers::VOffsetT = 20; + pub const VT_ROTATION_REFERENCE_ADJUSTED: flatbuffers::VOffsetT = 22; + pub const VT_ROTATION_IDENTITY_ADJUSTED: flatbuffers::VOffsetT = 24; + pub const VT_TPS: flatbuffers::VOffsetT = 26; + + #[inline] + pub unsafe 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.rotation_identity_adjusted { builder.add_rotation_identity_adjusted(x); } + if let Some(x) = args.rotation_reference_adjusted { builder.add_rotation_reference_adjusted(x); } + if let Some(x) = args.linear_acceleration { builder.add_linear_acceleration(x); } + if let Some(x) = args.temp { builder.add_temp(x); } + if let Some(x) = args.raw_acceleration { builder.add_raw_acceleration(x); } + if let Some(x) = args.raw_angular_velocity { builder.add_raw_angular_velocity(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); } + if let Some(x) = args.tps { builder.add_tps(x); } + builder.add_status(args.status); + builder.finish() + } + + + #[inline] + pub fn tracker_id(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(TrackerData::VT_TRACKER_ID, None)} + } + #[inline] + pub fn info(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(TrackerData::VT_INFO, None)} + } + #[inline] + pub fn status(&self) -> super::super::datatypes::TrackerStatus { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerData::VT_STATUS, Some(super::super::datatypes::TrackerStatus::NONE)).unwrap()} + } + /// Sensor rotation after fusion + #[inline] + pub fn rotation(&self) -> Option<&'a super::super::datatypes::math::Quat> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerData::VT_ROTATION, None)} + } + /// Position, in meters + #[inline] + pub fn position(&self) -> Option<&'a super::super::datatypes::math::Vec3f> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerData::VT_POSITION, None)} + } + /// Raw angular velocity, in euler angles, rad/s + #[inline] + pub fn raw_angular_velocity(&self) -> Option<&'a super::super::datatypes::math::Vec3f> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerData::VT_RAW_ANGULAR_VELOCITY, None)} + } + /// Raw acceleration, in m/s^2 + #[inline] + pub fn raw_acceleration(&self) -> Option<&'a super::super::datatypes::math::Vec3f> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerData::VT_RAW_ACCELERATION, None)} + } + /// Temperature, in degrees celsius + #[inline] + pub fn temp(&self) -> Option<&'a super::super::datatypes::Temperature> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerData::VT_TEMP, None)} + } + /// Acceleration without gravity, in m/s^2 + #[inline] + pub fn linear_acceleration(&self) -> Option<&'a super::super::datatypes::math::Vec3f> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerData::VT_LINEAR_ACCELERATION, None)} + } + /// Reference-adjusted rotation for IMU-only trackers (VR HMD yaw is used as a reset reference). + /// In other words, a rotation that is aligned to a reliable source of rotation ((0, VR HMD YAW, 0)), + /// triggered after user input (using reset buttons). + /// This is a SlimeVR-specific field and computed exclusively by SlimeVR server. + /// Includes: mounting orientation, full, quick and mounting reset adjustments. + /// This rotation can be used to reconstruct a skeleton pose using forward kinematics. + #[inline] + pub fn rotation_reference_adjusted(&self) -> Option<&'a super::super::datatypes::math::Quat> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerData::VT_ROTATION_REFERENCE_ADJUSTED, None)} + } + /// Zero-reference-adjusted rotation for IMU-only trackers (identity quaternion is used as a reset reference). + /// In other words, a rotation that is aligned to a zero vector ((0, 0, 0)) by + /// inverting the current rotation, triggered after user input (using reset buttons). + /// This is a SlimeVR-specific field and computed exclusively by SlimeVR server. + /// Includes: only full and quick reset adjustments. + /// This rotation can be used in visualizations for IMU debugging. + #[inline] + pub fn rotation_identity_adjusted(&self) -> Option<&'a super::super::datatypes::math::Quat> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerData::VT_ROTATION_IDENTITY_ADJUSTED, None)} + } + /// Data ticks per second, processed by SlimeVR server + #[inline] + pub fn tps(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerData::VT_TPS, 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_angular_velocity", Self::VT_RAW_ANGULAR_VELOCITY, false)? + .visit_field::("raw_acceleration", Self::VT_RAW_ACCELERATION, false)? + .visit_field::("temp", Self::VT_TEMP, false)? + .visit_field::("linear_acceleration", Self::VT_LINEAR_ACCELERATION, false)? + .visit_field::("rotation_reference_adjusted", Self::VT_ROTATION_REFERENCE_ADJUSTED, false)? + .visit_field::("rotation_identity_adjusted", Self::VT_ROTATION_IDENTITY_ADJUSTED, false)? + .visit_field::("tps", Self::VT_TPS, 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_angular_velocity: Option<&'a super::super::datatypes::math::Vec3f>, + pub raw_acceleration: Option<&'a super::super::datatypes::math::Vec3f>, + pub temp: Option<&'a super::super::datatypes::Temperature>, + pub linear_acceleration: Option<&'a super::super::datatypes::math::Vec3f>, + pub rotation_reference_adjusted: Option<&'a super::super::datatypes::math::Quat>, + pub rotation_identity_adjusted: Option<&'a super::super::datatypes::math::Quat>, + pub tps: Option, +} +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_angular_velocity: None, + raw_acceleration: None, + temp: None, + linear_acceleration: None, + rotation_reference_adjusted: None, + rotation_identity_adjusted: None, + tps: 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_angular_velocity(&mut self, raw_angular_velocity: &super::super::datatypes::math::Vec3f) { + self.fbb_.push_slot_always::<&super::super::datatypes::math::Vec3f>(TrackerData::VT_RAW_ANGULAR_VELOCITY, raw_angular_velocity); + } + #[inline] + pub fn add_raw_acceleration(&mut self, raw_acceleration: &super::super::datatypes::math::Vec3f) { + self.fbb_.push_slot_always::<&super::super::datatypes::math::Vec3f>(TrackerData::VT_RAW_ACCELERATION, raw_acceleration); + } + #[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 add_linear_acceleration(&mut self, linear_acceleration: &super::super::datatypes::math::Vec3f) { + self.fbb_.push_slot_always::<&super::super::datatypes::math::Vec3f>(TrackerData::VT_LINEAR_ACCELERATION, linear_acceleration); + } + #[inline] + pub fn add_rotation_reference_adjusted(&mut self, rotation_reference_adjusted: &super::super::datatypes::math::Quat) { + self.fbb_.push_slot_always::<&super::super::datatypes::math::Quat>(TrackerData::VT_ROTATION_REFERENCE_ADJUSTED, rotation_reference_adjusted); + } + #[inline] + pub fn add_rotation_identity_adjusted(&mut self, rotation_identity_adjusted: &super::super::datatypes::math::Quat) { + self.fbb_.push_slot_always::<&super::super::datatypes::math::Quat>(TrackerData::VT_ROTATION_IDENTITY_ADJUSTED, rotation_identity_adjusted); + } + #[inline] + pub fn add_tps(&mut self, tps: u16) { + self.fbb_.push_slot_always::(TrackerData::VT_TPS, tps); + } + #[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_angular_velocity", &self.raw_angular_velocity()); + ds.field("raw_acceleration", &self.raw_acceleration()); + ds.field("temp", &self.temp()); + ds.field("linear_acceleration", &self.linear_acceleration()); + ds.field("rotation_reference_adjusted", &self.rotation_reference_adjusted()); + ds.field("rotation_identity_adjusted", &self.rotation_identity_adjusted()); + ds.field("tps", &self.tps()); + 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 7d2b251f..5587be60 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,279 +1,279 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(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_ANGULAR_VELOCITY: flatbuffers::VOffsetT = 12; - pub const VT_RAW_ACCELERATION: flatbuffers::VOffsetT = 14; - pub const VT_TEMP: flatbuffers::VOffsetT = 16; - pub const VT_LINEAR_ACCELERATION: flatbuffers::VOffsetT = 18; - pub const VT_ROTATION_REFERENCE_ADJUSTED: flatbuffers::VOffsetT = 20; - pub const VT_ROTATION_IDENTITY_ADJUSTED: flatbuffers::VOffsetT = 22; - pub const VT_TPS: flatbuffers::VOffsetT = 24; - - #[inline] - pub unsafe 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_tps(args.tps); - builder.add_rotation_identity_adjusted(args.rotation_identity_adjusted); - builder.add_rotation_reference_adjusted(args.rotation_reference_adjusted); - builder.add_linear_acceleration(args.linear_acceleration); - builder.add_temp(args.temp); - builder.add_raw_acceleration(args.raw_acceleration); - builder.add_raw_angular_velocity(args.raw_angular_velocity); - 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerDataMask::VT_INFO, Some(false)).unwrap()} - } - #[inline] - pub fn status(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerDataMask::VT_STATUS, Some(false)).unwrap()} - } - #[inline] - pub fn rotation(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerDataMask::VT_ROTATION, Some(false)).unwrap()} - } - #[inline] - pub fn position(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerDataMask::VT_POSITION, Some(false)).unwrap()} - } - #[inline] - pub fn raw_angular_velocity(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerDataMask::VT_RAW_ANGULAR_VELOCITY, Some(false)).unwrap()} - } - #[inline] - pub fn raw_acceleration(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerDataMask::VT_RAW_ACCELERATION, Some(false)).unwrap()} - } - #[inline] - pub fn temp(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerDataMask::VT_TEMP, Some(false)).unwrap()} - } - #[inline] - pub fn linear_acceleration(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerDataMask::VT_LINEAR_ACCELERATION, Some(false)).unwrap()} - } - #[inline] - pub fn rotation_reference_adjusted(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerDataMask::VT_ROTATION_REFERENCE_ADJUSTED, Some(false)).unwrap()} - } - #[inline] - pub fn rotation_identity_adjusted(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerDataMask::VT_ROTATION_IDENTITY_ADJUSTED, Some(false)).unwrap()} - } - #[inline] - pub fn tps(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerDataMask::VT_TPS, 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_angular_velocity", Self::VT_RAW_ANGULAR_VELOCITY, false)? - .visit_field::("raw_acceleration", Self::VT_RAW_ACCELERATION, false)? - .visit_field::("temp", Self::VT_TEMP, false)? - .visit_field::("linear_acceleration", Self::VT_LINEAR_ACCELERATION, false)? - .visit_field::("rotation_reference_adjusted", Self::VT_ROTATION_REFERENCE_ADJUSTED, false)? - .visit_field::("rotation_identity_adjusted", Self::VT_ROTATION_IDENTITY_ADJUSTED, false)? - .visit_field::("tps", Self::VT_TPS, false)? - .finish(); - Ok(()) - } -} -pub struct TrackerDataMaskArgs { - pub info: bool, - pub status: bool, - pub rotation: bool, - pub position: bool, - pub raw_angular_velocity: bool, - pub raw_acceleration: bool, - pub temp: bool, - pub linear_acceleration: bool, - pub rotation_reference_adjusted: bool, - pub rotation_identity_adjusted: bool, - pub tps: bool, -} -impl<'a> Default for TrackerDataMaskArgs { - #[inline] - fn default() -> Self { - TrackerDataMaskArgs { - info: false, - status: false, - rotation: false, - position: false, - raw_angular_velocity: false, - raw_acceleration: false, - temp: false, - linear_acceleration: false, - rotation_reference_adjusted: false, - rotation_identity_adjusted: false, - tps: 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_angular_velocity(&mut self, raw_angular_velocity: bool) { - self.fbb_.push_slot::(TrackerDataMask::VT_RAW_ANGULAR_VELOCITY, raw_angular_velocity, false); - } - #[inline] - pub fn add_raw_acceleration(&mut self, raw_acceleration: bool) { - self.fbb_.push_slot::(TrackerDataMask::VT_RAW_ACCELERATION, raw_acceleration, false); - } - #[inline] - pub fn add_temp(&mut self, temp: bool) { - self.fbb_.push_slot::(TrackerDataMask::VT_TEMP, temp, false); - } - #[inline] - pub fn add_linear_acceleration(&mut self, linear_acceleration: bool) { - self.fbb_.push_slot::(TrackerDataMask::VT_LINEAR_ACCELERATION, linear_acceleration, false); - } - #[inline] - pub fn add_rotation_reference_adjusted(&mut self, rotation_reference_adjusted: bool) { - self.fbb_.push_slot::(TrackerDataMask::VT_ROTATION_REFERENCE_ADJUSTED, rotation_reference_adjusted, false); - } - #[inline] - pub fn add_rotation_identity_adjusted(&mut self, rotation_identity_adjusted: bool) { - self.fbb_.push_slot::(TrackerDataMask::VT_ROTATION_IDENTITY_ADJUSTED, rotation_identity_adjusted, false); - } - #[inline] - pub fn add_tps(&mut self, tps: bool) { - self.fbb_.push_slot::(TrackerDataMask::VT_TPS, tps, 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_angular_velocity", &self.raw_angular_velocity()); - ds.field("raw_acceleration", &self.raw_acceleration()); - ds.field("temp", &self.temp()); - ds.field("linear_acceleration", &self.linear_acceleration()); - ds.field("rotation_reference_adjusted", &self.rotation_reference_adjusted()); - ds.field("rotation_identity_adjusted", &self.rotation_identity_adjusted()); - ds.field("tps", &self.tps()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(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_ANGULAR_VELOCITY: flatbuffers::VOffsetT = 12; + pub const VT_RAW_ACCELERATION: flatbuffers::VOffsetT = 14; + pub const VT_TEMP: flatbuffers::VOffsetT = 16; + pub const VT_LINEAR_ACCELERATION: flatbuffers::VOffsetT = 18; + pub const VT_ROTATION_REFERENCE_ADJUSTED: flatbuffers::VOffsetT = 20; + pub const VT_ROTATION_IDENTITY_ADJUSTED: flatbuffers::VOffsetT = 22; + pub const VT_TPS: flatbuffers::VOffsetT = 24; + + #[inline] + pub unsafe 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_tps(args.tps); + builder.add_rotation_identity_adjusted(args.rotation_identity_adjusted); + builder.add_rotation_reference_adjusted(args.rotation_reference_adjusted); + builder.add_linear_acceleration(args.linear_acceleration); + builder.add_temp(args.temp); + builder.add_raw_acceleration(args.raw_acceleration); + builder.add_raw_angular_velocity(args.raw_angular_velocity); + 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerDataMask::VT_INFO, Some(false)).unwrap()} + } + #[inline] + pub fn status(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerDataMask::VT_STATUS, Some(false)).unwrap()} + } + #[inline] + pub fn rotation(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerDataMask::VT_ROTATION, Some(false)).unwrap()} + } + #[inline] + pub fn position(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerDataMask::VT_POSITION, Some(false)).unwrap()} + } + #[inline] + pub fn raw_angular_velocity(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerDataMask::VT_RAW_ANGULAR_VELOCITY, Some(false)).unwrap()} + } + #[inline] + pub fn raw_acceleration(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerDataMask::VT_RAW_ACCELERATION, Some(false)).unwrap()} + } + #[inline] + pub fn temp(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerDataMask::VT_TEMP, Some(false)).unwrap()} + } + #[inline] + pub fn linear_acceleration(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerDataMask::VT_LINEAR_ACCELERATION, Some(false)).unwrap()} + } + #[inline] + pub fn rotation_reference_adjusted(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerDataMask::VT_ROTATION_REFERENCE_ADJUSTED, Some(false)).unwrap()} + } + #[inline] + pub fn rotation_identity_adjusted(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerDataMask::VT_ROTATION_IDENTITY_ADJUSTED, Some(false)).unwrap()} + } + #[inline] + pub fn tps(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerDataMask::VT_TPS, 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_angular_velocity", Self::VT_RAW_ANGULAR_VELOCITY, false)? + .visit_field::("raw_acceleration", Self::VT_RAW_ACCELERATION, false)? + .visit_field::("temp", Self::VT_TEMP, false)? + .visit_field::("linear_acceleration", Self::VT_LINEAR_ACCELERATION, false)? + .visit_field::("rotation_reference_adjusted", Self::VT_ROTATION_REFERENCE_ADJUSTED, false)? + .visit_field::("rotation_identity_adjusted", Self::VT_ROTATION_IDENTITY_ADJUSTED, false)? + .visit_field::("tps", Self::VT_TPS, false)? + .finish(); + Ok(()) + } +} +pub struct TrackerDataMaskArgs { + pub info: bool, + pub status: bool, + pub rotation: bool, + pub position: bool, + pub raw_angular_velocity: bool, + pub raw_acceleration: bool, + pub temp: bool, + pub linear_acceleration: bool, + pub rotation_reference_adjusted: bool, + pub rotation_identity_adjusted: bool, + pub tps: bool, +} +impl<'a> Default for TrackerDataMaskArgs { + #[inline] + fn default() -> Self { + TrackerDataMaskArgs { + info: false, + status: false, + rotation: false, + position: false, + raw_angular_velocity: false, + raw_acceleration: false, + temp: false, + linear_acceleration: false, + rotation_reference_adjusted: false, + rotation_identity_adjusted: false, + tps: 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_angular_velocity(&mut self, raw_angular_velocity: bool) { + self.fbb_.push_slot::(TrackerDataMask::VT_RAW_ANGULAR_VELOCITY, raw_angular_velocity, false); + } + #[inline] + pub fn add_raw_acceleration(&mut self, raw_acceleration: bool) { + self.fbb_.push_slot::(TrackerDataMask::VT_RAW_ACCELERATION, raw_acceleration, false); + } + #[inline] + pub fn add_temp(&mut self, temp: bool) { + self.fbb_.push_slot::(TrackerDataMask::VT_TEMP, temp, false); + } + #[inline] + pub fn add_linear_acceleration(&mut self, linear_acceleration: bool) { + self.fbb_.push_slot::(TrackerDataMask::VT_LINEAR_ACCELERATION, linear_acceleration, false); + } + #[inline] + pub fn add_rotation_reference_adjusted(&mut self, rotation_reference_adjusted: bool) { + self.fbb_.push_slot::(TrackerDataMask::VT_ROTATION_REFERENCE_ADJUSTED, rotation_reference_adjusted, false); + } + #[inline] + pub fn add_rotation_identity_adjusted(&mut self, rotation_identity_adjusted: bool) { + self.fbb_.push_slot::(TrackerDataMask::VT_ROTATION_IDENTITY_ADJUSTED, rotation_identity_adjusted, false); + } + #[inline] + pub fn add_tps(&mut self, tps: bool) { + self.fbb_.push_slot::(TrackerDataMask::VT_TPS, tps, 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_angular_velocity", &self.raw_angular_velocity()); + ds.field("raw_acceleration", &self.raw_acceleration()); + ds.field("temp", &self.temp()); + ds.field("linear_acceleration", &self.linear_acceleration()); + ds.field("rotation_reference_adjusted", &self.rotation_reference_adjusted()); + ds.field("rotation_identity_adjusted", &self.rotation_identity_adjusted()); + ds.field("tps", &self.tps()); + 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 616fcdf1..3e881e7d 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,309 +1,309 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(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_IS_COMPUTED: flatbuffers::VOffsetT = 14; - pub const VT_IS_IMU: flatbuffers::VOffsetT = 16; - pub const VT_DISPLAY_NAME: flatbuffers::VOffsetT = 18; - pub const VT_CUSTOM_NAME: flatbuffers::VOffsetT = 20; - pub const VT_ALLOW_DRIFT_COMPENSATION: flatbuffers::VOffsetT = 22; - pub const VT_MOUNTING_RESET_ORIENTATION: flatbuffers::VOffsetT = 24; - pub const VT_IS_HMD: flatbuffers::VOffsetT = 26; - - #[inline] - pub unsafe 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.mounting_reset_orientation { builder.add_mounting_reset_orientation(x); } - 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_is_hmd(args.is_hmd); - builder.add_allow_drift_compensation(args.allow_drift_compensation); - builder.add_is_imu(args.is_imu); - builder.add_is_computed(args.is_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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerInfo::VT_MOUNTING_ORIENTATION, None)} - } - /// Should the tracker's settings be editable by the user - #[inline] - pub fn editable(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerInfo::VT_EDITABLE, Some(false)).unwrap()} - } - /// Indicates if the tracker is computed (solved position and rotation) - #[inline] - pub fn is_computed(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerInfo::VT_IS_COMPUTED, Some(false)).unwrap()} - } - /// Indicates if the tracker is using an IMU for its tracking data - #[inline] - pub fn is_imu(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerInfo::VT_IS_IMU, Some(false)).unwrap()} - } - /// A human-friendly name to display as the name of the tracker. - #[inline] - pub fn display_name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(TrackerInfo::VT_CUSTOM_NAME, None)} - } - /// Whether to allow yaw drift compensation for this tracker or not. - #[inline] - pub fn allow_drift_compensation(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerInfo::VT_ALLOW_DRIFT_COMPENSATION, Some(false)).unwrap()} - } - /// Mounting Reset orientation overrides the current `mounting_orientation` of - /// the tracker, this orientation is not saved and needs to be calculated - /// each time the server is ran - #[inline] - pub fn mounting_reset_orientation(&self) -> Option<&'a super::super::datatypes::math::Quat> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerInfo::VT_MOUNTING_RESET_ORIENTATION, None)} - } - /// Indicates if the tracker is actually an HMD - #[inline] - pub fn is_hmd(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackerInfo::VT_IS_HMD, Some(false)).unwrap()} - } -} - -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::("is_computed", Self::VT_IS_COMPUTED, false)? - .visit_field::("is_imu", Self::VT_IS_IMU, false)? - .visit_field::>("display_name", Self::VT_DISPLAY_NAME, false)? - .visit_field::>("custom_name", Self::VT_CUSTOM_NAME, false)? - .visit_field::("allow_drift_compensation", Self::VT_ALLOW_DRIFT_COMPENSATION, false)? - .visit_field::("mounting_reset_orientation", Self::VT_MOUNTING_RESET_ORIENTATION, false)? - .visit_field::("is_hmd", Self::VT_IS_HMD, 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 is_computed: bool, - pub is_imu: bool, - pub display_name: Option>, - pub custom_name: Option>, - pub allow_drift_compensation: bool, - pub mounting_reset_orientation: Option<&'a super::super::datatypes::math::Quat>, - pub is_hmd: bool, -} -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, - is_computed: false, - is_imu: false, - display_name: None, - custom_name: None, - allow_drift_compensation: false, - mounting_reset_orientation: None, - is_hmd: false, - } - } -} - -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_is_computed(&mut self, is_computed: bool) { - self.fbb_.push_slot::(TrackerInfo::VT_IS_COMPUTED, is_computed, false); - } - #[inline] - pub fn add_is_imu(&mut self, is_imu: bool) { - self.fbb_.push_slot::(TrackerInfo::VT_IS_IMU, is_imu, 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 add_allow_drift_compensation(&mut self, allow_drift_compensation: bool) { - self.fbb_.push_slot::(TrackerInfo::VT_ALLOW_DRIFT_COMPENSATION, allow_drift_compensation, false); - } - #[inline] - pub fn add_mounting_reset_orientation(&mut self, mounting_reset_orientation: &super::super::datatypes::math::Quat) { - self.fbb_.push_slot_always::<&super::super::datatypes::math::Quat>(TrackerInfo::VT_MOUNTING_RESET_ORIENTATION, mounting_reset_orientation); - } - #[inline] - pub fn add_is_hmd(&mut self, is_hmd: bool) { - self.fbb_.push_slot::(TrackerInfo::VT_IS_HMD, is_hmd, false); - } - #[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("is_computed", &self.is_computed()); - ds.field("is_imu", &self.is_imu()); - ds.field("display_name", &self.display_name()); - ds.field("custom_name", &self.custom_name()); - ds.field("allow_drift_compensation", &self.allow_drift_compensation()); - ds.field("mounting_reset_orientation", &self.mounting_reset_orientation()); - ds.field("is_hmd", &self.is_hmd()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(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_IS_COMPUTED: flatbuffers::VOffsetT = 14; + pub const VT_IS_IMU: flatbuffers::VOffsetT = 16; + pub const VT_DISPLAY_NAME: flatbuffers::VOffsetT = 18; + pub const VT_CUSTOM_NAME: flatbuffers::VOffsetT = 20; + pub const VT_ALLOW_DRIFT_COMPENSATION: flatbuffers::VOffsetT = 22; + pub const VT_MOUNTING_RESET_ORIENTATION: flatbuffers::VOffsetT = 24; + pub const VT_IS_HMD: flatbuffers::VOffsetT = 26; + + #[inline] + pub unsafe 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.mounting_reset_orientation { builder.add_mounting_reset_orientation(x); } + 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_is_hmd(args.is_hmd); + builder.add_allow_drift_compensation(args.allow_drift_compensation); + builder.add_is_imu(args.is_imu); + builder.add_is_computed(args.is_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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerInfo::VT_MOUNTING_ORIENTATION, None)} + } + /// Should the tracker's settings be editable by the user + #[inline] + pub fn editable(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerInfo::VT_EDITABLE, Some(false)).unwrap()} + } + /// Indicates if the tracker is computed (solved position and rotation) + #[inline] + pub fn is_computed(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerInfo::VT_IS_COMPUTED, Some(false)).unwrap()} + } + /// Indicates if the tracker is using an IMU for its tracking data + #[inline] + pub fn is_imu(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerInfo::VT_IS_IMU, Some(false)).unwrap()} + } + /// A human-friendly name to display as the name of the tracker. + #[inline] + pub fn display_name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(TrackerInfo::VT_CUSTOM_NAME, None)} + } + /// Whether to allow yaw drift compensation for this tracker or not. + #[inline] + pub fn allow_drift_compensation(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerInfo::VT_ALLOW_DRIFT_COMPENSATION, Some(false)).unwrap()} + } + /// Mounting Reset orientation overrides the current `mounting_orientation` of + /// the tracker, this orientation is not saved and needs to be calculated + /// each time the server is ran + #[inline] + pub fn mounting_reset_orientation(&self) -> Option<&'a super::super::datatypes::math::Quat> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerInfo::VT_MOUNTING_RESET_ORIENTATION, None)} + } + /// Indicates if the tracker is actually an HMD + #[inline] + pub fn is_hmd(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerInfo::VT_IS_HMD, Some(false)).unwrap()} + } +} + +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::("is_computed", Self::VT_IS_COMPUTED, false)? + .visit_field::("is_imu", Self::VT_IS_IMU, false)? + .visit_field::>("display_name", Self::VT_DISPLAY_NAME, false)? + .visit_field::>("custom_name", Self::VT_CUSTOM_NAME, false)? + .visit_field::("allow_drift_compensation", Self::VT_ALLOW_DRIFT_COMPENSATION, false)? + .visit_field::("mounting_reset_orientation", Self::VT_MOUNTING_RESET_ORIENTATION, false)? + .visit_field::("is_hmd", Self::VT_IS_HMD, 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 is_computed: bool, + pub is_imu: bool, + pub display_name: Option>, + pub custom_name: Option>, + pub allow_drift_compensation: bool, + pub mounting_reset_orientation: Option<&'a super::super::datatypes::math::Quat>, + pub is_hmd: bool, +} +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, + is_computed: false, + is_imu: false, + display_name: None, + custom_name: None, + allow_drift_compensation: false, + mounting_reset_orientation: None, + is_hmd: false, + } + } +} + +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_is_computed(&mut self, is_computed: bool) { + self.fbb_.push_slot::(TrackerInfo::VT_IS_COMPUTED, is_computed, false); + } + #[inline] + pub fn add_is_imu(&mut self, is_imu: bool) { + self.fbb_.push_slot::(TrackerInfo::VT_IS_IMU, is_imu, 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 add_allow_drift_compensation(&mut self, allow_drift_compensation: bool) { + self.fbb_.push_slot::(TrackerInfo::VT_ALLOW_DRIFT_COMPENSATION, allow_drift_compensation, false); + } + #[inline] + pub fn add_mounting_reset_orientation(&mut self, mounting_reset_orientation: &super::super::datatypes::math::Quat) { + self.fbb_.push_slot_always::<&super::super::datatypes::math::Quat>(TrackerInfo::VT_MOUNTING_RESET_ORIENTATION, mounting_reset_orientation); + } + #[inline] + pub fn add_is_hmd(&mut self, is_hmd: bool) { + self.fbb_.push_slot::(TrackerInfo::VT_IS_HMD, is_hmd, false); + } + #[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("is_computed", &self.is_computed()); + ds.field("is_imu", &self.is_imu()); + ds.field("display_name", &self.display_name()); + ds.field("custom_name", &self.custom_name()); + ds.field("allow_drift_compensation", &self.allow_drift_compensation()); + ds.field("mounting_reset_orientation", &self.mounting_reset_orientation()); + ds.field("is_hmd", &self.is_hmd()); + 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 2f988983..9028fcf2 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,182 +1,182 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_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 = 24; -#[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; 23] = [ - 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_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, - BodyPart::UPPER_CHEST, - BodyPart::LEFT_HIP, - BodyPart::RIGHT_HIP, -]; - -/// Different parts of the body. Maps to each possible non-tracker 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_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 UPPER_CHEST: Self = Self(22); - pub const LEFT_HIP: Self = Self(23); - pub const RIGHT_HIP: Self = Self(24); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 24; - 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_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, - Self::UPPER_CHEST, - Self::LEFT_HIP, - Self::RIGHT_HIP, - ]; - /// 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_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"), - Self::UPPER_CHEST => Some("UPPER_CHEST"), - Self::LEFT_HIP => Some("LEFT_HIP"), - Self::RIGHT_HIP => Some("RIGHT_HIP"), - _ => 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for BodyPart { - type Output = BodyPart; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for BodyPart { - type Scalar = u8; - #[inline] - fn to_little_endian(self) -> u8 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u8) -> Self { - let b = u8::from_le(v); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_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 = 24; +#[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; 23] = [ + 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_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, + BodyPart::UPPER_CHEST, + BodyPart::LEFT_HIP, + BodyPart::RIGHT_HIP, +]; + +/// Different parts of the body. Maps to each possible non-tracker 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_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 UPPER_CHEST: Self = Self(22); + pub const LEFT_HIP: Self = Self(23); + pub const RIGHT_HIP: Self = Self(24); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 24; + 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_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, + Self::UPPER_CHEST, + Self::LEFT_HIP, + Self::RIGHT_HIP, + ]; + /// 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_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"), + Self::UPPER_CHEST => Some("UPPER_CHEST"), + Self::LEFT_HIP => Some("LEFT_HIP"), + Self::RIGHT_HIP => Some("RIGHT_HIP"), + _ => 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for BodyPart { + type Output = BodyPart; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for BodyPart { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for 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 index e0ddb063..dff2982e 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/bytes_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/bytes_generated.rs @@ -1,108 +1,108 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> Bytes<'a> { - pub const VT_B: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(Bytes::VT_B, None)} - } -} - -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 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() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> Bytes<'a> { + pub const VT_B: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Bytes::VT_B, None)} + } +} + +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 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 6333a53e..1b10859a 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,105 +1,105 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -/// 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<'a> flatbuffers::Follow<'a> for DeviceId { - type Inner = &'a DeviceId; - #[inline] - unsafe 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] - unsafe 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] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - let src = ::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::<::Scalar>::uninit(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - EndianScalar::from_little_endian(unsafe { - core::ptr::copy_nonoverlapping( - self.0[0..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::<::Scalar>(), - ); - mem.assume_init() - }) - } - - pub fn set_id(&mut self, x: u8) { - let x_le = x.to_little_endian(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const _ as *const u8, - self.0[0..].as_mut_ptr(), - core::mem::size_of::<::Scalar>(), - ); - } - } - -} - +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +/// 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<'a> flatbuffers::Follow<'a> for DeviceId { + type Inner = &'a DeviceId; + #[inline] + unsafe 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] + unsafe 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] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::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::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { + core::ptr::copy_nonoverlapping( + self.0[0..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::<::Scalar>(), + ); + mem.assume_init() + }) + } + + pub fn set_id(&mut self, x: u8) { + let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const _ as *const u8, + self.0[0..].as_mut_ptr(), + core::mem::size_of::<::Scalar>(), + ); + } + } + +} + diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/device_id_table_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/device_id_table_generated.rs new file mode 100644 index 00000000..ce665fc9 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/device_id_table_generated.rs @@ -0,0 +1,109 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum DeviceIdTableOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// To be used inside unions +pub struct DeviceIdTable<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for DeviceIdTable<'a> { + type Inner = DeviceIdTable<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> DeviceIdTable<'a> { + pub const VT_ID: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + DeviceIdTable { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args DeviceIdTableArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = DeviceIdTableBuilder::new(_fbb); + if let Some(x) = args.id { builder.add_id(x); } + builder.finish() + } + + + #[inline] + pub fn id(&self) -> Option<&'a DeviceId> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(DeviceIdTable::VT_ID, None)} + } +} + +impl flatbuffers::Verifiable for DeviceIdTable<'_> { + #[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 DeviceIdTableArgs<'a> { + pub id: Option<&'a DeviceId>, +} +impl<'a> Default for DeviceIdTableArgs<'a> { + #[inline] + fn default() -> Self { + DeviceIdTableArgs { + id: None, + } + } +} + +pub struct DeviceIdTableBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> DeviceIdTableBuilder<'a, 'b> { + #[inline] + pub fn add_id(&mut self, id: &DeviceId) { + self.fbb_.push_slot_always::<&DeviceId>(DeviceIdTable::VT_ID, id); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> DeviceIdTableBuilder<'a, 'b> { + let start = _fbb.start_table(); + DeviceIdTableBuilder { + 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 DeviceIdTable<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("DeviceIdTable"); + ds.field("id", &self.id()); + ds.finish() + } +} 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 cebb78b0..8b26cdba 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,101 +1,101 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for FilteringType { - type Output = FilteringType; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for FilteringType { - type Scalar = u8; - #[inline] - fn to_little_endian(self) -> u8 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u8) -> Self { - let b = u8::from_le(v); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for FilteringType { + type Output = FilteringType; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for FilteringType { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for 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 6b55c965..1dad9c36 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,105 +1,105 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for FirmwareErrorCode { - type Output = FirmwareErrorCode; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for FirmwareErrorCode { - type Scalar = u8; - #[inline] - fn to_little_endian(self) -> u8 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u8) -> Self { - let b = u8::from_le(v); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for FirmwareErrorCode { + type Output = FirmwareErrorCode; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for FirmwareErrorCode { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for 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/board_type_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/board_type_generated.rs new file mode 100644 index 00000000..d49a5342 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/board_type_generated.rs @@ -0,0 +1,140 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_BOARD_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_BOARD_TYPE: u16 = 12; +#[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_BOARD_TYPE: [BoardType; 13] = [ + BoardType::UNKNOWN, + BoardType::SLIMEVR_LEGACY, + BoardType::SLIMEVR_DEV, + BoardType::NODEMCU, + BoardType::CUSTOM, + BoardType::WROOM32, + BoardType::WEMOSD1MINI, + BoardType::TTGO_TBASE, + BoardType::ESP01, + BoardType::SLIMEVR, + BoardType::LOLIN_C3_MINI, + BoardType::BEETLE32C3, + BoardType::ES32C3DEVKITM1, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct BoardType(pub u16); +#[allow(non_upper_case_globals)] +impl BoardType { + pub const UNKNOWN: Self = Self(0); + pub const SLIMEVR_LEGACY: Self = Self(1); + pub const SLIMEVR_DEV: Self = Self(2); + pub const NODEMCU: Self = Self(3); + pub const CUSTOM: Self = Self(4); + pub const WROOM32: Self = Self(5); + pub const WEMOSD1MINI: Self = Self(6); + pub const TTGO_TBASE: Self = Self(7); + pub const ESP01: Self = Self(8); + pub const SLIMEVR: Self = Self(9); + pub const LOLIN_C3_MINI: Self = Self(10); + pub const BEETLE32C3: Self = Self(11); + pub const ES32C3DEVKITM1: Self = Self(12); + + pub const ENUM_MIN: u16 = 0; + pub const ENUM_MAX: u16 = 12; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::UNKNOWN, + Self::SLIMEVR_LEGACY, + Self::SLIMEVR_DEV, + Self::NODEMCU, + Self::CUSTOM, + Self::WROOM32, + Self::WEMOSD1MINI, + Self::TTGO_TBASE, + Self::ESP01, + Self::SLIMEVR, + Self::LOLIN_C3_MINI, + Self::BEETLE32C3, + Self::ES32C3DEVKITM1, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::UNKNOWN => Some("UNKNOWN"), + Self::SLIMEVR_LEGACY => Some("SLIMEVR_LEGACY"), + Self::SLIMEVR_DEV => Some("SLIMEVR_DEV"), + Self::NODEMCU => Some("NODEMCU"), + Self::CUSTOM => Some("CUSTOM"), + Self::WROOM32 => Some("WROOM32"), + Self::WEMOSD1MINI => Some("WEMOSD1MINI"), + Self::TTGO_TBASE => Some("TTGO_TBASE"), + Self::ESP01 => Some("ESP01"), + Self::SLIMEVR => Some("SLIMEVR"), + Self::LOLIN_C3_MINI => Some("LOLIN_C3_MINI"), + Self::BEETLE32C3 => Some("BEETLE32C3"), + Self::ES32C3DEVKITM1 => Some("ES32C3DEVKITM1"), + _ => None, + } + } +} +impl core::fmt::Debug for BoardType { + 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 BoardType { + type Inner = Self; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for BoardType { + type Output = BoardType; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for BoardType { + type Scalar = u16; + #[inline] + fn to_little_endian(self) -> u16 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u16) -> Self { + let b = u16::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for BoardType { + #[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 BoardType {} 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 f60e3cf0..298286da 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,211 +1,211 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(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 unsafe 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(FirmwareStatusMask::VT_ERROR_STATUS, Some(false)).unwrap()} - } - #[inline] - pub fn tps(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(FirmwareStatusMask::VT_TPS, Some(false)).unwrap()} - } - #[inline] - pub fn ping(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(FirmwareStatusMask::VT_PING, Some(false)).unwrap()} - } - #[inline] - pub fn rssi(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(FirmwareStatusMask::VT_RSSI, Some(false)).unwrap()} - } - #[inline] - pub fn mcu_temp(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(FirmwareStatusMask::VT_MCU_TEMP, Some(false)).unwrap()} - } - #[inline] - pub fn battery_voltage(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(FirmwareStatusMask::VT_BATTERY_VOLTAGE, Some(false)).unwrap()} - } - #[inline] - pub fn battery_pct_estimate(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(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 unsafe 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(FirmwareStatusMask::VT_ERROR_STATUS, Some(false)).unwrap()} + } + #[inline] + pub fn tps(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(FirmwareStatusMask::VT_TPS, Some(false)).unwrap()} + } + #[inline] + pub fn ping(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(FirmwareStatusMask::VT_PING, Some(false)).unwrap()} + } + #[inline] + pub fn rssi(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(FirmwareStatusMask::VT_RSSI, Some(false)).unwrap()} + } + #[inline] + pub fn mcu_temp(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(FirmwareStatusMask::VT_MCU_TEMP, Some(false)).unwrap()} + } + #[inline] + pub fn battery_voltage(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(FirmwareStatusMask::VT_BATTERY_VOLTAGE, Some(false)).unwrap()} + } + #[inline] + pub fn battery_pct_estimate(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} 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 94033091..e91b3ef9 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,106 +1,106 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -/// 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<'a> flatbuffers::Follow<'a> for HardwareAddress { - type Inner = &'a HardwareAddress; - #[inline] - unsafe 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] - unsafe 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] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - let src = ::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::<::Scalar>::uninit(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - EndianScalar::from_little_endian(unsafe { - core::ptr::copy_nonoverlapping( - self.0[0..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::<::Scalar>(), - ); - mem.assume_init() - }) - } - - pub fn set_addr(&mut self, x: u64) { - let x_le = x.to_little_endian(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const _ as *const u8, - self.0[0..].as_mut_ptr(), - core::mem::size_of::<::Scalar>(), - ); - } - } - -} - +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +/// 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<'a> flatbuffers::Follow<'a> for HardwareAddress { + type Inner = &'a HardwareAddress; + #[inline] + unsafe 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] + unsafe 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] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::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::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { + core::ptr::copy_nonoverlapping( + self.0[0..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::<::Scalar>(), + ); + mem.assume_init() + }) + } + + pub fn set_addr(&mut self, x: u64) { + let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const _ as *const u8, + self.0[0..].as_mut_ptr(), + core::mem::size_of::<::Scalar>(), + ); + } + } + +} + 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 7691212b..4965e34d 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,287 +1,306 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(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; - pub const VT_BOARD_TYPE: flatbuffers::VOffsetT = 20; - pub const VT_HARDWARE_IDENTIFIER: flatbuffers::VOffsetT = 22; - pub const VT_NETWORK_PROTOCOL_VERSION: flatbuffers::VOffsetT = 24; - - #[inline] - pub unsafe 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.hardware_identifier { builder.add_hardware_identifier(x); } - if let Some(x) = args.board_type { builder.add_board_type(x); } - 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); } - if let Some(x) = args.network_protocol_version { builder.add_network_protocol_version(x); } - builder.add_mcu_id(args.mcu_id); - builder.finish() - } - - - #[inline] - pub fn mcu_id(&self) -> McuType { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HardwareInfo::VT_DISPLAY_NAME, None)} - } - /// A human-friendly string for the device model. - #[inline] - pub fn model(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HardwareInfo::VT_FIRMWARE_VERSION, None)} - } - #[inline] - pub fn hardware_address(&self) -> Option<&'a HardwareAddress> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HardwareInfo::VT_HARDWARE_ADDRESS, None)} - } - #[inline] - pub fn ip_address(&self) -> Option<&'a super::Ipv4Address> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HardwareInfo::VT_IP_ADDRESS, None)} - } - #[inline] - pub fn board_type(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HardwareInfo::VT_BOARD_TYPE, None)} - } - /// A unique identifier for the device. Depending on the type of device it can be the MAC address, - /// the IP address, or some other unique identifier like what USB device it is. - #[inline] - pub fn hardware_identifier(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HardwareInfo::VT_HARDWARE_IDENTIFIER, None)} - } - /// The version of the protocol it's using to communicate with server - #[inline] - pub fn network_protocol_version(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HardwareInfo::VT_NETWORK_PROTOCOL_VERSION, 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)? - .visit_field::>("board_type", Self::VT_BOARD_TYPE, false)? - .visit_field::>("hardware_identifier", Self::VT_HARDWARE_IDENTIFIER, false)? - .visit_field::("network_protocol_version", Self::VT_NETWORK_PROTOCOL_VERSION, 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>, - pub board_type: Option>, - pub hardware_identifier: Option>, - pub network_protocol_version: Option, -} -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, - board_type: None, - hardware_identifier: None, - network_protocol_version: 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 add_board_type(&mut self, board_type: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HardwareInfo::VT_BOARD_TYPE, board_type); - } - #[inline] - pub fn add_hardware_identifier(&mut self, hardware_identifier: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HardwareInfo::VT_HARDWARE_IDENTIFIER, hardware_identifier); - } - #[inline] - pub fn add_network_protocol_version(&mut self, network_protocol_version: u16) { - self.fbb_.push_slot_always::(HardwareInfo::VT_NETWORK_PROTOCOL_VERSION, network_protocol_version); - } - #[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.field("board_type", &self.board_type()); - ds.field("hardware_identifier", &self.hardware_identifier()); - ds.field("network_protocol_version", &self.network_protocol_version()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(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; + pub const VT_BOARD_TYPE: flatbuffers::VOffsetT = 20; + pub const VT_OFFICIAL_BOARD_TYPE: flatbuffers::VOffsetT = 22; + pub const VT_HARDWARE_IDENTIFIER: flatbuffers::VOffsetT = 24; + pub const VT_NETWORK_PROTOCOL_VERSION: flatbuffers::VOffsetT = 26; + + #[inline] + pub unsafe 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.hardware_identifier { builder.add_hardware_identifier(x); } + if let Some(x) = args.board_type { builder.add_board_type(x); } + 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); } + if let Some(x) = args.network_protocol_version { builder.add_network_protocol_version(x); } + builder.add_official_board_type(args.official_board_type); + builder.add_mcu_id(args.mcu_id); + builder.finish() + } + + + #[inline] + pub fn mcu_id(&self) -> McuType { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(HardwareInfo::VT_DISPLAY_NAME, None)} + } + /// A human-friendly string for the device model. + #[inline] + pub fn model(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(HardwareInfo::VT_FIRMWARE_VERSION, None)} + } + #[inline] + pub fn hardware_address(&self) -> Option<&'a HardwareAddress> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(HardwareInfo::VT_HARDWARE_ADDRESS, None)} + } + #[inline] + pub fn ip_address(&self) -> Option<&'a super::Ipv4Address> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(HardwareInfo::VT_IP_ADDRESS, None)} + } + /// A board type string that can be used to name a board. if possible you should use official board type + #[inline] + pub fn board_type(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(HardwareInfo::VT_BOARD_TYPE, None)} + } + /// An enum listing all the board types supported by the firmware + #[inline] + pub fn official_board_type(&self) -> BoardType { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(HardwareInfo::VT_OFFICIAL_BOARD_TYPE, Some(BoardType::UNKNOWN)).unwrap()} + } + /// A unique identifier for the device. Depending on the type of device it can be the MAC address, + /// the IP address, or some other unique identifier like what USB device it is. + #[inline] + pub fn hardware_identifier(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(HardwareInfo::VT_HARDWARE_IDENTIFIER, None)} + } + /// The version of the protocol it's using to communicate with server + #[inline] + pub fn network_protocol_version(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(HardwareInfo::VT_NETWORK_PROTOCOL_VERSION, 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)? + .visit_field::>("board_type", Self::VT_BOARD_TYPE, false)? + .visit_field::("official_board_type", Self::VT_OFFICIAL_BOARD_TYPE, false)? + .visit_field::>("hardware_identifier", Self::VT_HARDWARE_IDENTIFIER, false)? + .visit_field::("network_protocol_version", Self::VT_NETWORK_PROTOCOL_VERSION, 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>, + pub board_type: Option>, + pub official_board_type: BoardType, + pub hardware_identifier: Option>, + pub network_protocol_version: Option, +} +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, + board_type: None, + official_board_type: BoardType::UNKNOWN, + hardware_identifier: None, + network_protocol_version: 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 add_board_type(&mut self, board_type: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(HardwareInfo::VT_BOARD_TYPE, board_type); + } + #[inline] + pub fn add_official_board_type(&mut self, official_board_type: BoardType) { + self.fbb_.push_slot::(HardwareInfo::VT_OFFICIAL_BOARD_TYPE, official_board_type, BoardType::UNKNOWN); + } + #[inline] + pub fn add_hardware_identifier(&mut self, hardware_identifier: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(HardwareInfo::VT_HARDWARE_IDENTIFIER, hardware_identifier); + } + #[inline] + pub fn add_network_protocol_version(&mut self, network_protocol_version: u16) { + self.fbb_.push_slot_always::(HardwareInfo::VT_NETWORK_PROTOCOL_VERSION, network_protocol_version); + } + #[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.field("board_type", &self.board_type()); + ds.field("official_board_type", &self.official_board_type()); + ds.field("hardware_identifier", &self.hardware_identifier()); + ds.field("network_protocol_version", &self.network_protocol_version()); + 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 5012668d..75082745 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,213 +1,213 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> HardwareStatus<'a> { - pub const VT_ERROR_STATUS: flatbuffers::VOffsetT = 4; - 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 unsafe 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.error_status { builder.add_error_status(x); } - builder.finish() - } - - - #[inline] - pub fn error_status(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HardwareStatus::VT_ERROR_STATUS, None)} - } - #[inline] - pub fn ping(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HardwareStatus::VT_PING, None)} - } - /// “Received Signal Strength Indicator" between device and wifi adapter in dBm - #[inline] - pub fn rssi(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HardwareStatus::VT_RSSI, None)} - } - /// Temperature in degrees celsius - #[inline] - pub fn mcu_temp(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HardwareStatus::VT_MCU_TEMP, None)} - } - #[inline] - pub fn battery_voltage(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HardwareStatus::VT_BATTERY_VOLTAGE, None)} - } - #[inline] - pub fn battery_pct_estimate(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HardwareStatus::VT_BATTERY_PCT_ESTIMATE, None)} - } - #[inline] - pub fn log_data(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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::("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 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, - 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_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("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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> HardwareStatus<'a> { + pub const VT_ERROR_STATUS: flatbuffers::VOffsetT = 4; + 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 unsafe 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.error_status { builder.add_error_status(x); } + builder.finish() + } + + + #[inline] + pub fn error_status(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(HardwareStatus::VT_ERROR_STATUS, None)} + } + #[inline] + pub fn ping(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(HardwareStatus::VT_PING, None)} + } + /// “Received Signal Strength Indicator" between device and wifi adapter in dBm + #[inline] + pub fn rssi(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(HardwareStatus::VT_RSSI, None)} + } + /// Temperature in degrees celsius + #[inline] + pub fn mcu_temp(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(HardwareStatus::VT_MCU_TEMP, None)} + } + #[inline] + pub fn battery_voltage(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(HardwareStatus::VT_BATTERY_VOLTAGE, None)} + } + #[inline] + pub fn battery_pct_estimate(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(HardwareStatus::VT_BATTERY_PCT_ESTIMATE, None)} + } + #[inline] + pub fn log_data(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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::("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 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, + 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_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("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 2a93f9a7..97f6ba99 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,132 +1,132 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_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 = 10; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -#[allow(non_camel_case_types)] -pub const ENUM_VALUES_IMU_TYPE: [ImuType; 11] = [ - ImuType::Other, - ImuType::MPU9250, - ImuType::MPU6500, - ImuType::BNO080, - ImuType::BNO085, - ImuType::BNO055, - ImuType::MPU6050, - ImuType::BNO086, - ImuType::BMI160, - ImuType::ICM20948, - ImuType::ICM42688, -]; - -#[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 MPU9250: Self = Self(1); - pub const MPU6500: Self = Self(2); - pub const BNO080: Self = Self(3); - pub const BNO085: Self = Self(4); - pub const BNO055: Self = Self(5); - pub const MPU6050: Self = Self(6); - pub const BNO086: Self = Self(7); - pub const BMI160: Self = Self(8); - pub const ICM20948: Self = Self(9); - pub const ICM42688: Self = Self(10); - - pub const ENUM_MIN: u16 = 0; - pub const ENUM_MAX: u16 = 10; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::Other, - Self::MPU9250, - Self::MPU6500, - Self::BNO080, - Self::BNO085, - Self::BNO055, - Self::MPU6050, - Self::BNO086, - Self::BMI160, - Self::ICM20948, - Self::ICM42688, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::Other => Some("Other"), - Self::MPU9250 => Some("MPU9250"), - Self::MPU6500 => Some("MPU6500"), - Self::BNO080 => Some("BNO080"), - Self::BNO085 => Some("BNO085"), - Self::BNO055 => Some("BNO055"), - Self::MPU6050 => Some("MPU6050"), - Self::BNO086 => Some("BNO086"), - Self::BMI160 => Some("BMI160"), - Self::ICM20948 => Some("ICM20948"), - Self::ICM42688 => Some("ICM42688"), - _ => 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for ImuType { - type Output = ImuType; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for ImuType { - type Scalar = u16; - #[inline] - fn to_little_endian(self) -> u16 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u16) -> Self { - let b = u16::from_le(v); - 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_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 = 10; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +#[allow(non_camel_case_types)] +pub const ENUM_VALUES_IMU_TYPE: [ImuType; 11] = [ + ImuType::Other, + ImuType::MPU9250, + ImuType::MPU6500, + ImuType::BNO080, + ImuType::BNO085, + ImuType::BNO055, + ImuType::MPU6050, + ImuType::BNO086, + ImuType::BMI160, + ImuType::ICM20948, + ImuType::ICM42688, +]; + +#[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 MPU9250: Self = Self(1); + pub const MPU6500: Self = Self(2); + pub const BNO080: Self = Self(3); + pub const BNO085: Self = Self(4); + pub const BNO055: Self = Self(5); + pub const MPU6050: Self = Self(6); + pub const BNO086: Self = Self(7); + pub const BMI160: Self = Self(8); + pub const ICM20948: Self = Self(9); + pub const ICM42688: Self = Self(10); + + pub const ENUM_MIN: u16 = 0; + pub const ENUM_MAX: u16 = 10; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::Other, + Self::MPU9250, + Self::MPU6500, + Self::BNO080, + Self::BNO085, + Self::BNO055, + Self::MPU6050, + Self::BNO086, + Self::BMI160, + Self::ICM20948, + Self::ICM42688, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::Other => Some("Other"), + Self::MPU9250 => Some("MPU9250"), + Self::MPU6500 => Some("MPU6500"), + Self::BNO080 => Some("BNO080"), + Self::BNO085 => Some("BNO085"), + Self::BNO055 => Some("BNO055"), + Self::MPU6050 => Some("MPU6050"), + Self::BNO086 => Some("BNO086"), + Self::BMI160 => Some("BMI160"), + Self::ICM20948 => Some("ICM20948"), + Self::ICM42688 => Some("ICM42688"), + _ => 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for ImuType { + type Output = ImuType; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for ImuType { + type Scalar = u16; + #[inline] + fn to_little_endian(self) -> u16 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u16) -> Self { + let b = u16::from_le(v); + 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 97a66c8d..bcde350e 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,124 +1,124 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_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 = 250; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -#[allow(non_camel_case_types)] -pub const ENUM_VALUES_MCU_TYPE: [McuType; 9] = [ - McuType::Other, - McuType::ESP8266, - McuType::ESP32, - McuType::OWOTRACK_ANDROID, - McuType::WRANGLER, - McuType::OWOTRACK_IOS, - McuType::ESP32_C3, - McuType::MOCOPI, - McuType::DEV_RESERVED, -]; - -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[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: Self = Self(2); - pub const OWOTRACK_ANDROID: Self = Self(3); - pub const WRANGLER: Self = Self(4); - pub const OWOTRACK_IOS: Self = Self(5); - pub const ESP32_C3: Self = Self(6); - pub const MOCOPI: Self = Self(7); - pub const DEV_RESERVED: Self = Self(250); - - pub const ENUM_MIN: u16 = 0; - pub const ENUM_MAX: u16 = 250; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::Other, - Self::ESP8266, - Self::ESP32, - Self::OWOTRACK_ANDROID, - Self::WRANGLER, - Self::OWOTRACK_IOS, - Self::ESP32_C3, - Self::MOCOPI, - Self::DEV_RESERVED, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::Other => Some("Other"), - Self::ESP8266 => Some("ESP8266"), - Self::ESP32 => Some("ESP32"), - Self::OWOTRACK_ANDROID => Some("OWOTRACK_ANDROID"), - Self::WRANGLER => Some("WRANGLER"), - Self::OWOTRACK_IOS => Some("OWOTRACK_IOS"), - Self::ESP32_C3 => Some("ESP32_C3"), - Self::MOCOPI => Some("MOCOPI"), - Self::DEV_RESERVED => Some("DEV_RESERVED"), - _ => None, - } - } -} -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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for McuType { - type Output = McuType; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for McuType { - type Scalar = u16; - #[inline] - fn to_little_endian(self) -> u16 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u16) -> Self { - let b = u16::from_le(v); - 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_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 = 250; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +#[allow(non_camel_case_types)] +pub const ENUM_VALUES_MCU_TYPE: [McuType; 9] = [ + McuType::Other, + McuType::ESP8266, + McuType::ESP32, + McuType::OWOTRACK_ANDROID, + McuType::WRANGLER, + McuType::OWOTRACK_IOS, + McuType::ESP32_C3, + McuType::MOCOPI, + McuType::DEV_RESERVED, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[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: Self = Self(2); + pub const OWOTRACK_ANDROID: Self = Self(3); + pub const WRANGLER: Self = Self(4); + pub const OWOTRACK_IOS: Self = Self(5); + pub const ESP32_C3: Self = Self(6); + pub const MOCOPI: Self = Self(7); + pub const DEV_RESERVED: Self = Self(250); + + pub const ENUM_MIN: u16 = 0; + pub const ENUM_MAX: u16 = 250; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::Other, + Self::ESP8266, + Self::ESP32, + Self::OWOTRACK_ANDROID, + Self::WRANGLER, + Self::OWOTRACK_IOS, + Self::ESP32_C3, + Self::MOCOPI, + Self::DEV_RESERVED, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::Other => Some("Other"), + Self::ESP8266 => Some("ESP8266"), + Self::ESP32 => Some("ESP32"), + Self::OWOTRACK_ANDROID => Some("OWOTRACK_ANDROID"), + Self::WRANGLER => Some("WRANGLER"), + Self::OWOTRACK_IOS => Some("OWOTRACK_IOS"), + Self::ESP32_C3 => Some("ESP32_C3"), + Self::MOCOPI => Some("MOCOPI"), + Self::DEV_RESERVED => Some("DEV_RESERVED"), + _ => None, + } + } +} +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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for McuType { + type Output = McuType; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for McuType { + type Scalar = u16; + #[inline] + fn to_little_endian(self) -> u16 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u16) -> Self { + let b = u16::from_le(v); + 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 fd9ce8dd..c50846d6 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,104 +1,104 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -/// 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<'a> flatbuffers::Follow<'a> for HzF32 { - type Inner = &'a HzF32; - #[inline] - unsafe 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] - unsafe 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] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - let src = ::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::<::Scalar>::uninit(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - EndianScalar::from_little_endian(unsafe { - core::ptr::copy_nonoverlapping( - self.0[0..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::<::Scalar>(), - ); - mem.assume_init() - }) - } - - pub fn set_f(&mut self, x: f32) { - let x_le = x.to_little_endian(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const _ as *const u8, - self.0[0..].as_mut_ptr(), - core::mem::size_of::<::Scalar>(), - ); - } - } - -} - +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +/// 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<'a> flatbuffers::Follow<'a> for HzF32 { + type Inner = &'a HzF32; + #[inline] + unsafe 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] + unsafe 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] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::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::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { + core::ptr::copy_nonoverlapping( + self.0[0..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::<::Scalar>(), + ); + mem.assume_init() + }) + } + + pub fn set_f(&mut self, x: f32) { + let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const _ as *const u8, + self.0[0..].as_mut_ptr(), + core::mem::size_of::<::Scalar>(), + ); + } + } + +} + diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/ipv_4_address_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/ipv_4_address_generated.rs index 8bbb3755..f95b7965 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/ipv_4_address_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/ipv_4_address_generated.rs @@ -1,105 +1,105 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -/// 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<'a> flatbuffers::Follow<'a> for Ipv4Address { - type Inner = &'a Ipv4Address; - #[inline] - unsafe 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] - unsafe 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] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - let src = ::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::<::Scalar>::uninit(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - EndianScalar::from_little_endian(unsafe { - core::ptr::copy_nonoverlapping( - self.0[0..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::<::Scalar>(), - ); - mem.assume_init() - }) - } - - pub fn set_addr(&mut self, x: u32) { - let x_le = x.to_little_endian(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const _ as *const u8, - self.0[0..].as_mut_ptr(), - core::mem::size_of::<::Scalar>(), - ); - } - } - -} - +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +/// 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<'a> flatbuffers::Follow<'a> for Ipv4Address { + type Inner = &'a Ipv4Address; + #[inline] + unsafe 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] + unsafe 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] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::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::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { + core::ptr::copy_nonoverlapping( + self.0[0..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::<::Scalar>(), + ); + mem.assume_init() + }) + } + + pub fn set_addr(&mut self, x: u32) { + let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const _ as *const u8, + self.0[0..].as_mut_ptr(), + core::mem::size_of::<::Scalar>(), + ); + } + } + +} + 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 c0ef94cf..0d2d177d 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,126 +1,126 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> LogData<'a> { - pub const VT_MESSAGE: flatbuffers::VOffsetT = 4; - pub const VT_DATA: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(LogData::VT_MESSAGE, None)} - } - #[inline] - pub fn data(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(LogData::VT_DATA, None)} - } -} - -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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> LogData<'a> { + pub const VT_MESSAGE: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(LogData::VT_MESSAGE, None)} + } + #[inline] + pub fn data(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(LogData::VT_DATA, None)} + } +} + +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() + } +} 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 af935e99..e2f71915 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,199 +1,199 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -// 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<'a> flatbuffers::Follow<'a> for Quat { - type Inner = &'a Quat; - #[inline] - unsafe 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] - unsafe 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] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - let src = ::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::<::Scalar>::uninit(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - EndianScalar::from_little_endian(unsafe { - core::ptr::copy_nonoverlapping( - self.0[0..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::<::Scalar>(), - ); - mem.assume_init() - }) - } - - pub fn set_x(&mut self, x: f32) { - let x_le = x.to_little_endian(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const _ as *const u8, - self.0[0..].as_mut_ptr(), - core::mem::size_of::<::Scalar>(), - ); - } - } - - pub fn y(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - EndianScalar::from_little_endian(unsafe { - core::ptr::copy_nonoverlapping( - self.0[4..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::<::Scalar>(), - ); - mem.assume_init() - }) - } - - pub fn set_y(&mut self, x: f32) { - let x_le = x.to_little_endian(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const _ as *const u8, - self.0[4..].as_mut_ptr(), - core::mem::size_of::<::Scalar>(), - ); - } - } - - pub fn z(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - EndianScalar::from_little_endian(unsafe { - core::ptr::copy_nonoverlapping( - self.0[8..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::<::Scalar>(), - ); - mem.assume_init() - }) - } - - pub fn set_z(&mut self, x: f32) { - let x_le = x.to_little_endian(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const _ as *const u8, - self.0[8..].as_mut_ptr(), - core::mem::size_of::<::Scalar>(), - ); - } - } - - pub fn w(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - EndianScalar::from_little_endian(unsafe { - core::ptr::copy_nonoverlapping( - self.0[12..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::<::Scalar>(), - ); - mem.assume_init() - }) - } - - pub fn set_w(&mut self, x: f32) { - let x_le = x.to_little_endian(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const _ as *const u8, - self.0[12..].as_mut_ptr(), - core::mem::size_of::<::Scalar>(), - ); - } - } - -} - +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +// 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<'a> flatbuffers::Follow<'a> for Quat { + type Inner = &'a Quat; + #[inline] + unsafe 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] + unsafe 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] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::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::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { + core::ptr::copy_nonoverlapping( + self.0[0..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::<::Scalar>(), + ); + mem.assume_init() + }) + } + + pub fn set_x(&mut self, x: f32) { + let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const _ as *const u8, + self.0[0..].as_mut_ptr(), + core::mem::size_of::<::Scalar>(), + ); + } + } + + pub fn y(&self) -> f32 { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { + core::ptr::copy_nonoverlapping( + self.0[4..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::<::Scalar>(), + ); + mem.assume_init() + }) + } + + pub fn set_y(&mut self, x: f32) { + let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const _ as *const u8, + self.0[4..].as_mut_ptr(), + core::mem::size_of::<::Scalar>(), + ); + } + } + + pub fn z(&self) -> f32 { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { + core::ptr::copy_nonoverlapping( + self.0[8..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::<::Scalar>(), + ); + mem.assume_init() + }) + } + + pub fn set_z(&mut self, x: f32) { + let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const _ as *const u8, + self.0[8..].as_mut_ptr(), + core::mem::size_of::<::Scalar>(), + ); + } + } + + pub fn w(&self) -> f32 { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { + core::ptr::copy_nonoverlapping( + self.0[12..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::<::Scalar>(), + ); + mem.assume_init() + }) + } + + pub fn set_w(&mut self, x: f32) { + let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const _ as *const u8, + self.0[12..].as_mut_ptr(), + core::mem::size_of::<::Scalar>(), + ); + } + } + +} + 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 f8aaab72..75dc44f5 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,167 +1,167 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -// 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<'a> flatbuffers::Follow<'a> for Vec3f { - type Inner = &'a Vec3f; - #[inline] - unsafe 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] - unsafe 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] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - let src = ::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::<::Scalar>::uninit(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - EndianScalar::from_little_endian(unsafe { - core::ptr::copy_nonoverlapping( - self.0[0..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::<::Scalar>(), - ); - mem.assume_init() - }) - } - - pub fn set_x(&mut self, x: f32) { - let x_le = x.to_little_endian(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const _ as *const u8, - self.0[0..].as_mut_ptr(), - core::mem::size_of::<::Scalar>(), - ); - } - } - - pub fn y(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - EndianScalar::from_little_endian(unsafe { - core::ptr::copy_nonoverlapping( - self.0[4..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::<::Scalar>(), - ); - mem.assume_init() - }) - } - - pub fn set_y(&mut self, x: f32) { - let x_le = x.to_little_endian(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const _ as *const u8, - self.0[4..].as_mut_ptr(), - core::mem::size_of::<::Scalar>(), - ); - } - } - - pub fn z(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - EndianScalar::from_little_endian(unsafe { - core::ptr::copy_nonoverlapping( - self.0[8..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::<::Scalar>(), - ); - mem.assume_init() - }) - } - - pub fn set_z(&mut self, x: f32) { - let x_le = x.to_little_endian(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const _ as *const u8, - self.0[8..].as_mut_ptr(), - core::mem::size_of::<::Scalar>(), - ); - } - } - -} - +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +// 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<'a> flatbuffers::Follow<'a> for Vec3f { + type Inner = &'a Vec3f; + #[inline] + unsafe 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] + unsafe 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] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::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::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { + core::ptr::copy_nonoverlapping( + self.0[0..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::<::Scalar>(), + ); + mem.assume_init() + }) + } + + pub fn set_x(&mut self, x: f32) { + let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const _ as *const u8, + self.0[0..].as_mut_ptr(), + core::mem::size_of::<::Scalar>(), + ); + } + } + + pub fn y(&self) -> f32 { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { + core::ptr::copy_nonoverlapping( + self.0[4..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::<::Scalar>(), + ); + mem.assume_init() + }) + } + + pub fn set_y(&mut self, x: f32) { + let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const _ as *const u8, + self.0[4..].as_mut_ptr(), + core::mem::size_of::<::Scalar>(), + ); + } + } + + pub fn z(&self) -> f32 { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { + core::ptr::copy_nonoverlapping( + self.0[8..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::<::Scalar>(), + ); + mem.assume_init() + }) + } + + pub fn set_z(&mut self, x: f32) { + let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const _ as *const u8, + self.0[8..].as_mut_ptr(), + core::mem::size_of::<::Scalar>(), + ); + } + } + +} + diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/string_table_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/string_table_generated.rs index 6c0d76e8..20a65584 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/string_table_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/string_table_generated.rs @@ -1,108 +1,108 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum StringTableOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct StringTable<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for StringTable<'a> { - type Inner = StringTable<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> StringTable<'a> { - pub const VT_S: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - 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 StringTableArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = StringTableBuilder::new(_fbb); - if let Some(x) = args.s { builder.add_s(x); } - builder.finish() - } - - - #[inline] - pub fn s(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(StringTable::VT_S, None)} - } -} - -impl flatbuffers::Verifiable for StringTable<'_> { - #[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 StringTableArgs<'a> { - pub s: Option>, -} -impl<'a> Default for StringTableArgs<'a> { - #[inline] - fn default() -> Self { - StringTableArgs { - s: None, - } - } -} - -pub struct StringTableBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> StringTableBuilder<'a, 'b> { - #[inline] - pub fn add_s(&mut self, s: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(StringTable::VT_S, s); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StringTableBuilder<'a, 'b> { - let start = _fbb.start_table(); - StringTableBuilder { - 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 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() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum StringTableOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct StringTable<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for StringTable<'a> { + type Inner = StringTable<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> StringTable<'a> { + pub const VT_S: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + 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 StringTableArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = StringTableBuilder::new(_fbb); + if let Some(x) = args.s { builder.add_s(x); } + builder.finish() + } + + + #[inline] + pub fn s(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(StringTable::VT_S, None)} + } +} + +impl flatbuffers::Verifiable for StringTable<'_> { + #[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 StringTableArgs<'a> { + pub s: Option>, +} +impl<'a> Default for StringTableArgs<'a> { + #[inline] + fn default() -> Self { + StringTableArgs { + s: None, + } + } +} + +pub struct StringTableBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> StringTableBuilder<'a, 'b> { + #[inline] + pub fn add_s(&mut self, s: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(StringTable::VT_S, s); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StringTableBuilder<'a, 'b> { + let start = _fbb.start_table(); + StringTableBuilder { + 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 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 ad22688e..4d706123 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/temperature_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/temperature_generated.rs @@ -1,104 +1,104 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -/// 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<'a> flatbuffers::Follow<'a> for Temperature { - type Inner = &'a Temperature; - #[inline] - unsafe 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] - unsafe 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] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - let src = ::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::<::Scalar>::uninit(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - EndianScalar::from_little_endian(unsafe { - core::ptr::copy_nonoverlapping( - self.0[0..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::<::Scalar>(), - ); - mem.assume_init() - }) - } - - pub fn set_temp(&mut self, x: f32) { - let x_le = x.to_little_endian(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const _ as *const u8, - self.0[0..].as_mut_ptr(), - core::mem::size_of::<::Scalar>(), - ); - } - } - -} - +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +/// 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<'a> flatbuffers::Follow<'a> for Temperature { + type Inner = &'a Temperature; + #[inline] + unsafe 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] + unsafe 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] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::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::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { + core::ptr::copy_nonoverlapping( + self.0[0..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::<::Scalar>(), + ); + mem.assume_init() + }) + } + + pub fn set_temp(&mut self, x: f32) { + let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const _ as *const u8, + self.0[0..].as_mut_ptr(), + core::mem::size_of::<::Scalar>(), + ); + } + } + +} + 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 79d8f080..c42b56a8 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,128 +1,128 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> TrackerId<'a> { - pub const VT_DEVICE_ID: flatbuffers::VOffsetT = 4; - pub const VT_TRACKER_NUM: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> TrackerId<'a> { + pub const VT_DEVICE_ID: flatbuffers::VOffsetT = 4; + pub const VT_TRACKER_NUM: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} 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 d64badc3..d0b1c151 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,180 +1,180 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for TrackerRole { - type Output = TrackerRole; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for TrackerRole { - type Scalar = u8; - #[inline] - fn to_little_endian(self) -> u8 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u8) -> Self { - let b = u8::from_le(v); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for TrackerRole { + type Output = TrackerRole; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for TrackerRole { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for 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 5ca956de..f44feb60 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,116 +1,116 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_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 = 6; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -#[allow(non_camel_case_types)] -pub const ENUM_VALUES_TRACKER_STATUS: [TrackerStatus; 7] = [ - TrackerStatus::NONE, - TrackerStatus::DISCONNECTED, - TrackerStatus::OK, - TrackerStatus::BUSY, - TrackerStatus::ERROR, - TrackerStatus::OCCLUDED, - TrackerStatus::TIMED_OUT, -]; - -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[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 TIMED_OUT: Self = Self(6); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 6; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::NONE, - Self::DISCONNECTED, - Self::OK, - Self::BUSY, - Self::ERROR, - Self::OCCLUDED, - Self::TIMED_OUT, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - 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"), - Self::TIMED_OUT => Some("TIMED_OUT"), - _ => 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for TrackerStatus { - type Output = TrackerStatus; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for TrackerStatus { - type Scalar = u8; - #[inline] - fn to_little_endian(self) -> u8 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u8) -> Self { - let b = u8::from_le(v); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_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 = 6; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +#[allow(non_camel_case_types)] +pub const ENUM_VALUES_TRACKER_STATUS: [TrackerStatus; 7] = [ + TrackerStatus::NONE, + TrackerStatus::DISCONNECTED, + TrackerStatus::OK, + TrackerStatus::BUSY, + TrackerStatus::ERROR, + TrackerStatus::OCCLUDED, + TrackerStatus::TIMED_OUT, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[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 TIMED_OUT: Self = Self(6); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 6; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::NONE, + Self::DISCONNECTED, + Self::OK, + Self::BUSY, + Self::ERROR, + Self::OCCLUDED, + Self::TIMED_OUT, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + 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"), + Self::TIMED_OUT => Some("TIMED_OUT"), + _ => 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for TrackerStatus { + type Output = TrackerStatus; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for TrackerStatus { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for 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 0db9dd7e..6cf92ac5 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,104 +1,104 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -// 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<'a> flatbuffers::Follow<'a> for TransactionId { - type Inner = &'a TransactionId; - #[inline] - unsafe 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] - unsafe 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] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - let src = ::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::<::Scalar>::uninit(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - EndianScalar::from_little_endian(unsafe { - core::ptr::copy_nonoverlapping( - self.0[0..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::<::Scalar>(), - ); - mem.assume_init() - }) - } - - pub fn set_id(&mut self, x: u32) { - let x_le = x.to_little_endian(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const _ as *const u8, - self.0[0..].as_mut_ptr(), - core::mem::size_of::<::Scalar>(), - ); - } - } - -} - +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +// 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<'a> flatbuffers::Follow<'a> for TransactionId { + type Inner = &'a TransactionId; + #[inline] + unsafe 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] + unsafe 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] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::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::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { + core::ptr::copy_nonoverlapping( + self.0[0..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::<::Scalar>(), + ); + mem.assume_init() + }) + } + + pub fn set_id(&mut self, x: u32) { + let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const _ as *const u8, + self.0[0..].as_mut_ptr(), + core::mem::size_of::<::Scalar>(), + ); + } + } + +} + 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 81d45889..4e6ce8b4 100644 --- a/protocol/rust/src/generated/solarxr_protocol/message_bundle_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/message_bundle_generated.rs @@ -1,144 +1,144 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(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 unsafe 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>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(MessageBundle::VT_DATA_FEED_MSGS, None)} - } - #[inline] - pub fn rpc_msgs(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(MessageBundle::VT_RPC_MSGS, None)} - } - #[inline] - pub fn pub_sub_msgs(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 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.field("pub_sub_msgs", &self.pub_sub_msgs()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(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 unsafe 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>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(MessageBundle::VT_DATA_FEED_MSGS, None)} + } + #[inline] + pub fn rpc_msgs(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(MessageBundle::VT_RPC_MSGS, None)} + } + #[inline] + pub fn pub_sub_msgs(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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 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.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 index f5d15e4a..c1d462eb 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,125 +1,125 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> KeyValues<'a> { - pub const VT_KEYS: flatbuffers::VOffsetT = 4; - pub const VT_VALUES: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe 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>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(KeyValues::VT_KEYS, None)} - } - #[inline] - pub fn values(&self) -> Option>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 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()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> KeyValues<'a> { + pub const VT_KEYS: flatbuffers::VOffsetT = 4; + pub const VT_VALUES: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe 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>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(KeyValues::VT_KEYS, None)} + } + #[inline] + pub fn values(&self) -> Option>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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 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()); + 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 index 24af74f5..96fd62e2 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,291 +1,291 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(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 unsafe 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(Message::VT_TOPIC_TYPE, Some(Topic::NONE)).unwrap()} - } - #[inline] - pub fn topic(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(Message::VT_TOPIC, None)} - } - #[inline] - pub fn payload_type(&self) -> Payload { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(Message::VT_PAYLOAD_TYPE, Some(Payload::NONE)).unwrap()} - } - #[inline] - pub fn payload(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { TopicHandle::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn topic_as_topic_id(&self) -> Option> { - if self.topic_type() == Topic::TopicId { - self.topic().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { TopicId::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn payload_as_solarxr_protocol_datatypes_string_table(&self) -> Option> { - if self.payload_type() == Payload::solarxr_protocol_datatypes_StringTable { - self.payload().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { super::datatypes::StringTable::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { super::datatypes::Bytes::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn payload_as_key_values(&self) -> Option> { - if self.payload_type() == Payload::KeyValues { - self.payload().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { KeyValues::init_from_table(t) } - }) - } 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_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(()), - } - })? - .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 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() { - 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_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.") - } - }, - 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() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(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 unsafe 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Message::VT_TOPIC_TYPE, Some(Topic::NONE)).unwrap()} + } + #[inline] + pub fn topic(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Message::VT_TOPIC, None)} + } + #[inline] + pub fn payload_type(&self) -> Payload { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Message::VT_PAYLOAD_TYPE, Some(Payload::NONE)).unwrap()} + } + #[inline] + pub fn payload(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { TopicHandle::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn topic_as_topic_id(&self) -> Option> { + if self.topic_type() == Topic::TopicId { + self.topic().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { TopicId::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn payload_as_solarxr_protocol_datatypes_string_table(&self) -> Option> { + if self.payload_type() == Payload::solarxr_protocol_datatypes_StringTable { + self.payload().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { super::datatypes::StringTable::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { super::datatypes::Bytes::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn payload_as_key_values(&self) -> Option> { + if self.payload_type() == Payload::KeyValues { + self.payload().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { KeyValues::init_from_table(t) } + }) + } 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_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(()), + } + })? + .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 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() { + 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_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.") + } + }, + 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 index 3c631193..67cd91e9 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,106 +1,106 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_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_StringTable, - 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_StringTable: 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_StringTable, - 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_StringTable => Some("solarxr_protocol_datatypes_StringTable"), - Self::solarxr_protocol_datatypes_Bytes => Some("solarxr_protocol_datatypes_Bytes"), - Self::KeyValues => Some("KeyValues"), - _ => None, - } - } -} -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 { - f.write_fmt(format_args!("", self.0)) - } - } -} -impl<'a> flatbuffers::Follow<'a> for Payload { - type Inner = Self; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for Payload { - type Output = Payload; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for Payload { - type Scalar = u8; - #[inline] - fn to_little_endian(self) -> u8 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u8) -> Self { - let b = u8::from_le(v); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for 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 {} - +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_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_StringTable, + 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_StringTable: 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_StringTable, + 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_StringTable => Some("solarxr_protocol_datatypes_StringTable"), + Self::solarxr_protocol_datatypes_Bytes => Some("solarxr_protocol_datatypes_Bytes"), + Self::KeyValues => Some("KeyValues"), + _ => None, + } + } +} +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 { + f.write_fmt(format_args!("", self.0)) + } + } +} +impl<'a> flatbuffers::Follow<'a> for Payload { + type Inner = Self; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for Payload { + type Output = Payload; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for Payload { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for 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 index aa418431..27cd91a1 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,225 +1,225 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> PubSubHeader<'a> { - pub const VT_U_TYPE: flatbuffers::VOffsetT = 4; - pub const VT_U: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(PubSubHeader::VT_U_TYPE, Some(PubSubUnion::NONE)).unwrap()} - } - #[inline] - pub fn u(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { Message::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn u_as_subscription_request(&self) -> Option> { - if self.u_type() == PubSubUnion::SubscriptionRequest { - self.u().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { SubscriptionRequest::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { TopicHandleRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn u_as_topic_mapping(&self) -> Option> { - if self.u_type() == PubSubUnion::TopicMapping { - self.u().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { TopicMapping::init_from_table(t) } - }) - } 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::TopicMapping => v.verify_union_variant::>("PubSubUnion::TopicMapping", 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 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() { - 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::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.") - } - }, - _ => { - let x: Option<()> = None; - ds.field("u", &x) - }, - }; - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> PubSubHeader<'a> { + pub const VT_U_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_U: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(PubSubHeader::VT_U_TYPE, Some(PubSubUnion::NONE)).unwrap()} + } + #[inline] + pub fn u(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { Message::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn u_as_subscription_request(&self) -> Option> { + if self.u_type() == PubSubUnion::SubscriptionRequest { + self.u().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { SubscriptionRequest::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { TopicHandleRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn u_as_topic_mapping(&self) -> Option> { + if self.u_type() == PubSubUnion::TopicMapping { + self.u().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { TopicMapping::init_from_table(t) } + }) + } 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::TopicMapping => v.verify_union_variant::>("PubSubUnion::TopicMapping", 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 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() { + 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::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.") + } + }, + _ => { + 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 index e419b8da..618b9a5d 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,110 +1,110 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_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::TopicMapping, -]; - -#[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 TopicMapping: 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::TopicMapping, - ]; - /// 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::TopicMapping => Some("TopicMapping"), - _ => None, - } - } -} -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 { - f.write_fmt(format_args!("", self.0)) - } - } -} -impl<'a> flatbuffers::Follow<'a> for PubSubUnion { - type Inner = Self; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for PubSubUnion { - type Output = PubSubUnion; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for PubSubUnion { - type Scalar = u8; - #[inline] - fn to_little_endian(self) -> u8 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u8) -> Self { - let b = u8::from_le(v); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for 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 {} - +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_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::TopicMapping, +]; + +#[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 TopicMapping: 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::TopicMapping, + ]; + /// 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::TopicMapping => Some("TopicMapping"), + _ => None, + } + } +} +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 { + f.write_fmt(format_args!("", self.0)) + } + } +} +impl<'a> flatbuffers::Follow<'a> for PubSubUnion { + type Inner = Self; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for PubSubUnion { + type Output = PubSubUnion; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for PubSubUnion { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for 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 index 6ca3428f..d92b5356 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,180 +1,180 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum SubscriptionRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Requests a subscription to `topic`. Replies with a `TopicMapping`. -pub struct SubscriptionRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for SubscriptionRequest<'a> { - type Inner = SubscriptionRequest<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> SubscriptionRequest<'a> { - pub const VT_TOPIC_TYPE: flatbuffers::VOffsetT = 4; - pub const VT_TOPIC: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(SubscriptionRequest::VT_TOPIC_TYPE, Some(Topic::NONE)).unwrap()} - } - #[inline] - pub fn topic(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { TopicHandle::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn topic_as_topic_id(&self) -> Option> { - if self.topic_type() == Topic::TopicId { - self.topic().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { TopicId::init_from_table(t) } - }) - } 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 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() { - 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() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum SubscriptionRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Requests a subscription to `topic`. Replies with a `TopicMapping`. +pub struct SubscriptionRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SubscriptionRequest<'a> { + type Inner = SubscriptionRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SubscriptionRequest<'a> { + pub const VT_TOPIC_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_TOPIC: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(SubscriptionRequest::VT_TOPIC_TYPE, Some(Topic::NONE)).unwrap()} + } + #[inline] + pub fn topic(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { TopicHandle::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn topic_as_topic_id(&self) -> Option> { + if self.topic_type() == Topic::TopicId { + self.topic().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { TopicId::init_from_table(t) } + }) + } 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 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() { + 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 index e81d9bf0..75774881 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,102 +1,102 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_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 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 { - f.write_fmt(format_args!("", self.0)) - } - } -} -impl<'a> flatbuffers::Follow<'a> for Topic { - type Inner = Self; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for Topic { - type Output = Topic; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for Topic { - type Scalar = u8; - #[inline] - fn to_little_endian(self) -> u8 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u8) -> Self { - let b = u8::from_le(v); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for 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 {} - +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_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 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 { + f.write_fmt(format_args!("", self.0)) + } + } +} +impl<'a> flatbuffers::Follow<'a> for Topic { + type Inner = Self; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for Topic { + type Output = Topic; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for Topic { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for 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 index e9e07f6f..867cc773 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,110 +1,110 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> TopicHandle<'a> { - pub const VT_ID: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 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() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> TopicHandle<'a> { + pub const VT_ID: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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 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 c9184a4f..b8b03c56 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,110 +1,110 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> TopicHandleRequest<'a> { - pub const VT_ID: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 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() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> TopicHandleRequest<'a> { + pub const VT_ID: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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 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_id_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_id_generated.rs index 0220472a..97a80dbc 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,153 +1,153 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(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 unsafe 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 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()); - ds.field("topic", &self.topic()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(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 unsafe 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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 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()); + ds.field("topic", &self.topic()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_mapping_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_mapping_generated.rs index 48a84930..94852c45 100644 --- a/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_mapping_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_mapping_generated.rs @@ -1,126 +1,126 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum TopicMappingOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Response for `TopicHandleRequest` or `SubscriptionRequest`. -pub struct TopicMapping<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for TopicMapping<'a> { - type Inner = TopicMapping<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> TopicMapping<'a> { - pub const VT_ID: flatbuffers::VOffsetT = 4; - pub const VT_HANDLE: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - 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 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(TopicMapping::VT_ID, None)} - } - #[inline] - pub fn handle(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(TopicMapping::VT_HANDLE, None)} - } -} - -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 TopicMappingArgs<'a> { - pub id: Option>>, - pub handle: Option>>, -} -impl<'a> Default for TopicMappingArgs<'a> { - #[inline] - fn default() -> Self { - TopicMappingArgs { - id: None, - handle: None, - } - } -} - -pub struct TopicMappingBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -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::>(TopicMapping::VT_HANDLE, handle); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TopicMappingBuilder<'a, 'b> { - let start = _fbb.start_table(); - TopicMappingBuilder { - 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 TopicMapping<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("TopicMapping"); - ds.field("id", &self.id()); - ds.field("handle", &self.handle()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum TopicMappingOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Response for `TopicHandleRequest` or `SubscriptionRequest`. +pub struct TopicMapping<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for TopicMapping<'a> { + type Inner = TopicMapping<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> TopicMapping<'a> { + pub const VT_ID: flatbuffers::VOffsetT = 4; + pub const VT_HANDLE: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + 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 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(TopicMapping::VT_ID, None)} + } + #[inline] + pub fn handle(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(TopicMapping::VT_HANDLE, None)} + } +} + +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 TopicMappingArgs<'a> { + pub id: Option>>, + pub handle: Option>>, +} +impl<'a> Default for TopicMappingArgs<'a> { + #[inline] + fn default() -> Self { + TopicMappingArgs { + id: None, + handle: None, + } + } +} + +pub struct TopicMappingBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +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::>(TopicMapping::VT_HANDLE, handle); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TopicMappingBuilder<'a, 'b> { + let start = _fbb.start_table(); + TopicMappingBuilder { + 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 TopicMapping<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("TopicMapping"); + ds.field("id", &self.id()); + ds.field("handle", &self.handle()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/add_unknown_device_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/add_unknown_device_request_generated.rs index 22d6fb7f..a1120c7a 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/add_unknown_device_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/add_unknown_device_request_generated.rs @@ -1,108 +1,108 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum AddUnknownDeviceRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct AddUnknownDeviceRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for AddUnknownDeviceRequest<'a> { - type Inner = AddUnknownDeviceRequest<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> AddUnknownDeviceRequest<'a> { - pub const VT_MAC_ADDRESS: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - AddUnknownDeviceRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args AddUnknownDeviceRequestArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = AddUnknownDeviceRequestBuilder::new(_fbb); - if let Some(x) = args.mac_address { builder.add_mac_address(x); } - builder.finish() - } - - - #[inline] - pub fn mac_address(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(AddUnknownDeviceRequest::VT_MAC_ADDRESS, None)} - } -} - -impl flatbuffers::Verifiable for AddUnknownDeviceRequest<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("mac_address", Self::VT_MAC_ADDRESS, false)? - .finish(); - Ok(()) - } -} -pub struct AddUnknownDeviceRequestArgs<'a> { - pub mac_address: Option>, -} -impl<'a> Default for AddUnknownDeviceRequestArgs<'a> { - #[inline] - fn default() -> Self { - AddUnknownDeviceRequestArgs { - mac_address: None, - } - } -} - -pub struct AddUnknownDeviceRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> AddUnknownDeviceRequestBuilder<'a, 'b> { - #[inline] - pub fn add_mac_address(&mut self, mac_address: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(AddUnknownDeviceRequest::VT_MAC_ADDRESS, mac_address); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> AddUnknownDeviceRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - AddUnknownDeviceRequestBuilder { - fbb_: _fbb, - start_: start, - } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } -} - -impl core::fmt::Debug for AddUnknownDeviceRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("AddUnknownDeviceRequest"); - ds.field("mac_address", &self.mac_address()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum AddUnknownDeviceRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct AddUnknownDeviceRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for AddUnknownDeviceRequest<'a> { + type Inner = AddUnknownDeviceRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> AddUnknownDeviceRequest<'a> { + pub const VT_MAC_ADDRESS: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + AddUnknownDeviceRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args AddUnknownDeviceRequestArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = AddUnknownDeviceRequestBuilder::new(_fbb); + if let Some(x) = args.mac_address { builder.add_mac_address(x); } + builder.finish() + } + + + #[inline] + pub fn mac_address(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(AddUnknownDeviceRequest::VT_MAC_ADDRESS, None)} + } +} + +impl flatbuffers::Verifiable for AddUnknownDeviceRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("mac_address", Self::VT_MAC_ADDRESS, false)? + .finish(); + Ok(()) + } +} +pub struct AddUnknownDeviceRequestArgs<'a> { + pub mac_address: Option>, +} +impl<'a> Default for AddUnknownDeviceRequestArgs<'a> { + #[inline] + fn default() -> Self { + AddUnknownDeviceRequestArgs { + mac_address: None, + } + } +} + +pub struct AddUnknownDeviceRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> AddUnknownDeviceRequestBuilder<'a, 'b> { + #[inline] + pub fn add_mac_address(&mut self, mac_address: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(AddUnknownDeviceRequest::VT_MAC_ADDRESS, mac_address); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> AddUnknownDeviceRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + AddUnknownDeviceRequestBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for AddUnknownDeviceRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("AddUnknownDeviceRequest"); + ds.field("mac_address", &self.mac_address()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/arms_mounting_reset_mode_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/arms_mounting_reset_mode_generated.rs index 694b1046..80a84fb9 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/arms_mounting_reset_mode_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/arms_mounting_reset_mode_generated.rs @@ -1,108 +1,108 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_ARMS_MOUNTING_RESET_MODE: u8 = 0; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_ARMS_MOUNTING_RESET_MODE: 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_ARMS_MOUNTING_RESET_MODE: [ArmsMountingResetMode; 4] = [ - ArmsMountingResetMode::BACK, - ArmsMountingResetMode::FORWARD, - ArmsMountingResetMode::TPOSE_UP, - ArmsMountingResetMode::TPOSE_DOWN, -]; - -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[repr(transparent)] -pub struct ArmsMountingResetMode(pub u8); -#[allow(non_upper_case_globals)] -impl ArmsMountingResetMode { - /// Upper arm going back and forearm going forward - pub const BACK: Self = Self(0); - /// Arms going forward - pub const FORWARD: Self = Self(1); - /// Arms going up to the sides into a tpose - pub const TPOSE_UP: Self = Self(2); - /// Arms going down to the sides from a tpose - pub const TPOSE_DOWN: Self = Self(3); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 3; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::BACK, - Self::FORWARD, - Self::TPOSE_UP, - Self::TPOSE_DOWN, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::BACK => Some("BACK"), - Self::FORWARD => Some("FORWARD"), - Self::TPOSE_UP => Some("TPOSE_UP"), - Self::TPOSE_DOWN => Some("TPOSE_DOWN"), - _ => None, - } - } -} -impl core::fmt::Debug for ArmsMountingResetMode { - 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 ArmsMountingResetMode { - type Inner = Self; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for ArmsMountingResetMode { - type Output = ArmsMountingResetMode; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for ArmsMountingResetMode { - type Scalar = u8; - #[inline] - fn to_little_endian(self) -> u8 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u8) -> Self { - let b = u8::from_le(v); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for ArmsMountingResetMode { - #[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 ArmsMountingResetMode {} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_ARMS_MOUNTING_RESET_MODE: u8 = 0; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MAX_ARMS_MOUNTING_RESET_MODE: 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_ARMS_MOUNTING_RESET_MODE: [ArmsMountingResetMode; 4] = [ + ArmsMountingResetMode::BACK, + ArmsMountingResetMode::FORWARD, + ArmsMountingResetMode::TPOSE_UP, + ArmsMountingResetMode::TPOSE_DOWN, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct ArmsMountingResetMode(pub u8); +#[allow(non_upper_case_globals)] +impl ArmsMountingResetMode { + /// Upper arm going back and forearm going forward + pub const BACK: Self = Self(0); + /// Arms going forward + pub const FORWARD: Self = Self(1); + /// Arms going up to the sides into a tpose + pub const TPOSE_UP: Self = Self(2); + /// Arms going down to the sides from a tpose + pub const TPOSE_DOWN: Self = Self(3); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 3; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::BACK, + Self::FORWARD, + Self::TPOSE_UP, + Self::TPOSE_DOWN, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::BACK => Some("BACK"), + Self::FORWARD => Some("FORWARD"), + Self::TPOSE_UP => Some("TPOSE_UP"), + Self::TPOSE_DOWN => Some("TPOSE_DOWN"), + _ => None, + } + } +} +impl core::fmt::Debug for ArmsMountingResetMode { + 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 ArmsMountingResetMode { + type Inner = Self; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for ArmsMountingResetMode { + type Output = ArmsMountingResetMode; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for ArmsMountingResetMode { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for ArmsMountingResetMode { + #[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 ArmsMountingResetMode {} 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 603a9965..cd41ac90 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,176 +1,176 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(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_ORIENTATION: flatbuffers::VOffsetT = 8; - pub const VT_DISPLAY_NAME: flatbuffers::VOffsetT = 10; - pub const VT_ALLOW_DRIFT_COMPENSATION: flatbuffers::VOffsetT = 12; - - #[inline] - pub unsafe 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_orientation { builder.add_mounting_orientation(x); } - if let Some(x) = args.tracker_id { builder.add_tracker_id(x); } - builder.add_allow_drift_compensation(args.allow_drift_compensation); - builder.add_body_position(args.body_position); - builder.finish() - } - - - #[inline] - pub fn tracker_id(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(AssignTrackerRequest::VT_TRACKER_ID, None)} - } - #[inline] - pub fn body_position(&self) -> super::datatypes::BodyPart { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AssignTrackerRequest::VT_BODY_POSITION, Some(super::datatypes::BodyPart::NONE)).unwrap()} - } - #[inline] - pub fn mounting_orientation(&self) -> Option<&'a super::datatypes::math::Quat> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AssignTrackerRequest::VT_MOUNTING_ORIENTATION, None)} - } - #[inline] - pub fn display_name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(AssignTrackerRequest::VT_DISPLAY_NAME, None)} - } - #[inline] - pub fn allow_drift_compensation(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AssignTrackerRequest::VT_ALLOW_DRIFT_COMPENSATION, Some(false)).unwrap()} - } -} - -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_orientation", Self::VT_MOUNTING_ORIENTATION, false)? - .visit_field::>("display_name", Self::VT_DISPLAY_NAME, false)? - .visit_field::("allow_drift_compensation", Self::VT_ALLOW_DRIFT_COMPENSATION, false)? - .finish(); - Ok(()) - } -} -pub struct AssignTrackerRequestArgs<'a> { - pub tracker_id: Option>>, - pub body_position: super::datatypes::BodyPart, - pub mounting_orientation: Option<&'a super::datatypes::math::Quat>, - pub display_name: Option>, - pub allow_drift_compensation: bool, -} -impl<'a> Default for AssignTrackerRequestArgs<'a> { - #[inline] - fn default() -> Self { - AssignTrackerRequestArgs { - tracker_id: None, - body_position: super::datatypes::BodyPart::NONE, - mounting_orientation: None, - display_name: None, - allow_drift_compensation: false, - } - } -} - -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_orientation(&mut self, mounting_orientation: &super::datatypes::math::Quat) { - self.fbb_.push_slot_always::<&super::datatypes::math::Quat>(AssignTrackerRequest::VT_MOUNTING_ORIENTATION, mounting_orientation); - } - #[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 add_allow_drift_compensation(&mut self, allow_drift_compensation: bool) { - self.fbb_.push_slot::(AssignTrackerRequest::VT_ALLOW_DRIFT_COMPENSATION, allow_drift_compensation, false); - } - #[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_orientation", &self.mounting_orientation()); - ds.field("display_name", &self.display_name()); - ds.field("allow_drift_compensation", &self.allow_drift_compensation()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(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_ORIENTATION: flatbuffers::VOffsetT = 8; + pub const VT_DISPLAY_NAME: flatbuffers::VOffsetT = 10; + pub const VT_ALLOW_DRIFT_COMPENSATION: flatbuffers::VOffsetT = 12; + + #[inline] + pub unsafe 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_orientation { builder.add_mounting_orientation(x); } + if let Some(x) = args.tracker_id { builder.add_tracker_id(x); } + builder.add_allow_drift_compensation(args.allow_drift_compensation); + builder.add_body_position(args.body_position); + builder.finish() + } + + + #[inline] + pub fn tracker_id(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(AssignTrackerRequest::VT_TRACKER_ID, None)} + } + #[inline] + pub fn body_position(&self) -> super::datatypes::BodyPart { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AssignTrackerRequest::VT_BODY_POSITION, Some(super::datatypes::BodyPart::NONE)).unwrap()} + } + #[inline] + pub fn mounting_orientation(&self) -> Option<&'a super::datatypes::math::Quat> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AssignTrackerRequest::VT_MOUNTING_ORIENTATION, None)} + } + #[inline] + pub fn display_name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(AssignTrackerRequest::VT_DISPLAY_NAME, None)} + } + #[inline] + pub fn allow_drift_compensation(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AssignTrackerRequest::VT_ALLOW_DRIFT_COMPENSATION, Some(false)).unwrap()} + } +} + +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_orientation", Self::VT_MOUNTING_ORIENTATION, false)? + .visit_field::>("display_name", Self::VT_DISPLAY_NAME, false)? + .visit_field::("allow_drift_compensation", Self::VT_ALLOW_DRIFT_COMPENSATION, false)? + .finish(); + Ok(()) + } +} +pub struct AssignTrackerRequestArgs<'a> { + pub tracker_id: Option>>, + pub body_position: super::datatypes::BodyPart, + pub mounting_orientation: Option<&'a super::datatypes::math::Quat>, + pub display_name: Option>, + pub allow_drift_compensation: bool, +} +impl<'a> Default for AssignTrackerRequestArgs<'a> { + #[inline] + fn default() -> Self { + AssignTrackerRequestArgs { + tracker_id: None, + body_position: super::datatypes::BodyPart::NONE, + mounting_orientation: None, + display_name: None, + allow_drift_compensation: false, + } + } +} + +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_orientation(&mut self, mounting_orientation: &super::datatypes::math::Quat) { + self.fbb_.push_slot_always::<&super::datatypes::math::Quat>(AssignTrackerRequest::VT_MOUNTING_ORIENTATION, mounting_orientation); + } + #[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 add_allow_drift_compensation(&mut self, allow_drift_compensation: bool) { + self.fbb_.push_slot::(AssignTrackerRequest::VT_ALLOW_DRIFT_COMPENSATION, allow_drift_compensation, false); + } + #[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_orientation", &self.mounting_orientation()); + ds.field("display_name", &self.display_name()); + ds.field("allow_drift_compensation", &self.allow_drift_compensation()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_apply_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_apply_request_generated.rs index a192f782..097ddb64 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_apply_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_apply_request_generated.rs @@ -1,91 +1,91 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum AutoBoneApplyRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Applies the estimated proportions -pub struct AutoBoneApplyRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for AutoBoneApplyRequest<'a> { - type Inner = AutoBoneApplyRequest<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> AutoBoneApplyRequest<'a> { - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - AutoBoneApplyRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args AutoBoneApplyRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = AutoBoneApplyRequestBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for AutoBoneApplyRequest<'_> { - #[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 AutoBoneApplyRequestArgs { -} -impl<'a> Default for AutoBoneApplyRequestArgs { - #[inline] - fn default() -> Self { - AutoBoneApplyRequestArgs { - } - } -} - -pub struct AutoBoneApplyRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> AutoBoneApplyRequestBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> AutoBoneApplyRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - AutoBoneApplyRequestBuilder { - 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 AutoBoneApplyRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("AutoBoneApplyRequest"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum AutoBoneApplyRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Applies the estimated proportions +pub struct AutoBoneApplyRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for AutoBoneApplyRequest<'a> { + type Inner = AutoBoneApplyRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> AutoBoneApplyRequest<'a> { + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + AutoBoneApplyRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args AutoBoneApplyRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = AutoBoneApplyRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for AutoBoneApplyRequest<'_> { + #[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 AutoBoneApplyRequestArgs { +} +impl<'a> Default for AutoBoneApplyRequestArgs { + #[inline] + fn default() -> Self { + AutoBoneApplyRequestArgs { + } + } +} + +pub struct AutoBoneApplyRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> AutoBoneApplyRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> AutoBoneApplyRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + AutoBoneApplyRequestBuilder { + 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 AutoBoneApplyRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("AutoBoneApplyRequest"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_cancel_recording_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_cancel_recording_request_generated.rs index ee2b36e0..4a85069b 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_cancel_recording_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_cancel_recording_request_generated.rs @@ -1,91 +1,91 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum AutoBoneCancelRecordingRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Cancels the current recording, aborting the process and discarding the data -pub struct AutoBoneCancelRecordingRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for AutoBoneCancelRecordingRequest<'a> { - type Inner = AutoBoneCancelRecordingRequest<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> AutoBoneCancelRecordingRequest<'a> { - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - AutoBoneCancelRecordingRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args AutoBoneCancelRecordingRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = AutoBoneCancelRecordingRequestBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for AutoBoneCancelRecordingRequest<'_> { - #[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 AutoBoneCancelRecordingRequestArgs { -} -impl<'a> Default for AutoBoneCancelRecordingRequestArgs { - #[inline] - fn default() -> Self { - AutoBoneCancelRecordingRequestArgs { - } - } -} - -pub struct AutoBoneCancelRecordingRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> AutoBoneCancelRecordingRequestBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> AutoBoneCancelRecordingRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - AutoBoneCancelRecordingRequestBuilder { - 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 AutoBoneCancelRecordingRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("AutoBoneCancelRecordingRequest"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum AutoBoneCancelRecordingRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Cancels the current recording, aborting the process and discarding the data +pub struct AutoBoneCancelRecordingRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for AutoBoneCancelRecordingRequest<'a> { + type Inner = AutoBoneCancelRecordingRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> AutoBoneCancelRecordingRequest<'a> { + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + AutoBoneCancelRecordingRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args AutoBoneCancelRecordingRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = AutoBoneCancelRecordingRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for AutoBoneCancelRecordingRequest<'_> { + #[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 AutoBoneCancelRecordingRequestArgs { +} +impl<'a> Default for AutoBoneCancelRecordingRequestArgs { + #[inline] + fn default() -> Self { + AutoBoneCancelRecordingRequestArgs { + } + } +} + +pub struct AutoBoneCancelRecordingRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> AutoBoneCancelRecordingRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> AutoBoneCancelRecordingRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + AutoBoneCancelRecordingRequestBuilder { + 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 AutoBoneCancelRecordingRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("AutoBoneCancelRecordingRequest"); + 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 6577433c..ef998b45 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,161 +1,161 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(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 unsafe 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneEpochResponse::VT_CURRENT_EPOCH, Some(0)).unwrap()} - } - #[inline] - pub fn total_epochs(&self) -> u32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneEpochResponse::VT_TOTAL_EPOCHS, Some(0)).unwrap()} - } - /// The current error value. This can be any positive number, where lower is better. - #[inline] - pub fn epoch_error(&self) -> f32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneEpochResponse::VT_EPOCH_ERROR, Some(0.0)).unwrap()} - } - /// A list of the current estimated body proportions. - #[inline] - pub fn adjusted_skeleton_parts(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(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 unsafe 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneEpochResponse::VT_CURRENT_EPOCH, Some(0)).unwrap()} + } + #[inline] + pub fn total_epochs(&self) -> u32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneEpochResponse::VT_TOTAL_EPOCHS, Some(0)).unwrap()} + } + /// The current error value. This can be any positive number, where lower is better. + #[inline] + pub fn epoch_error(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneEpochResponse::VT_EPOCH_ERROR, Some(0.0)).unwrap()} + } + /// A list of the current estimated body proportions. + #[inline] + pub fn adjusted_skeleton_parts(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} 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 d4489c60..557ce28b 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,108 +1,108 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> AutoBoneProcessRequest<'a> { - pub const VT_PROCESS_TYPE: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> AutoBoneProcessRequest<'a> { + pub const VT_PROCESS_TYPE: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} 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 d3d1cf3e..fa12b0ed 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,198 +1,198 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> AutoBoneProcessStatusResponse<'a> { - pub const VT_PROCESS_TYPE: flatbuffers::VOffsetT = 4; - 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; - pub const VT_ETA: flatbuffers::VOffsetT = 16; - - #[inline] - pub unsafe 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 - ) -> flatbuffers::WIPOffset> { - let mut builder = AutoBoneProcessStatusResponseBuilder::new(_fbb); - builder.add_eta(args.eta); - builder.add_total(args.total); - builder.add_current(args.current); - 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneProcessStatusResponse::VT_PROCESS_TYPE, Some(AutoBoneProcessType::NONE)).unwrap()} - } - /// The current count. This value is -1 if there is nothing to report. - #[inline] - pub fn current(&self) -> u32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneProcessStatusResponse::VT_CURRENT, Some(0)).unwrap()} - } - /// The total count. This value is -1 if there is nothing to report. - #[inline] - pub fn total(&self) -> u32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneProcessStatusResponse::VT_TOTAL, Some(0)).unwrap()} - } - /// True if the operation has completed with any result, successful or not. - #[inline] - pub fn completed(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneProcessStatusResponse::VT_COMPLETED, Some(false)).unwrap()} - } - /// True if the completed operation was successful, only observe if `completed` is true. - #[inline] - pub fn success(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneProcessStatusResponse::VT_SUCCESS, Some(false)).unwrap()} - } - /// The time remaining in seconds. This value is -1 if there is nothing to report. - #[inline] - pub fn eta(&self) -> f32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneProcessStatusResponse::VT_ETA, Some(0.0)).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::("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)? - .visit_field::("eta", Self::VT_ETA, false)? - .finish(); - Ok(()) - } -} -pub struct AutoBoneProcessStatusResponseArgs { - pub process_type: AutoBoneProcessType, - pub current: u32, - pub total: u32, - pub completed: bool, - pub success: bool, - pub eta: f32, -} -impl<'a> Default for AutoBoneProcessStatusResponseArgs { - #[inline] - fn default() -> Self { - AutoBoneProcessStatusResponseArgs { - process_type: AutoBoneProcessType::NONE, - current: 0, - total: 0, - completed: false, - success: false, - eta: 0.0, - } - } -} - -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_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 add_eta(&mut self, eta: f32) { - self.fbb_.push_slot::(AutoBoneProcessStatusResponse::VT_ETA, eta, 0.0); - } - #[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("current", &self.current()); - ds.field("total", &self.total()); - ds.field("completed", &self.completed()); - ds.field("success", &self.success()); - ds.field("eta", &self.eta()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> AutoBoneProcessStatusResponse<'a> { + pub const VT_PROCESS_TYPE: flatbuffers::VOffsetT = 4; + 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; + pub const VT_ETA: flatbuffers::VOffsetT = 16; + + #[inline] + pub unsafe 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 + ) -> flatbuffers::WIPOffset> { + let mut builder = AutoBoneProcessStatusResponseBuilder::new(_fbb); + builder.add_eta(args.eta); + builder.add_total(args.total); + builder.add_current(args.current); + 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneProcessStatusResponse::VT_PROCESS_TYPE, Some(AutoBoneProcessType::NONE)).unwrap()} + } + /// The current count. This value is -1 if there is nothing to report. + #[inline] + pub fn current(&self) -> u32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneProcessStatusResponse::VT_CURRENT, Some(0)).unwrap()} + } + /// The total count. This value is -1 if there is nothing to report. + #[inline] + pub fn total(&self) -> u32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneProcessStatusResponse::VT_TOTAL, Some(0)).unwrap()} + } + /// True if the operation has completed with any result, successful or not. + #[inline] + pub fn completed(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneProcessStatusResponse::VT_COMPLETED, Some(false)).unwrap()} + } + /// True if the completed operation was successful, only observe if `completed` is true. + #[inline] + pub fn success(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneProcessStatusResponse::VT_SUCCESS, Some(false)).unwrap()} + } + /// The time remaining in seconds. This value is -1 if there is nothing to report. + #[inline] + pub fn eta(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneProcessStatusResponse::VT_ETA, Some(0.0)).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::("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)? + .visit_field::("eta", Self::VT_ETA, false)? + .finish(); + Ok(()) + } +} +pub struct AutoBoneProcessStatusResponseArgs { + pub process_type: AutoBoneProcessType, + pub current: u32, + pub total: u32, + pub completed: bool, + pub success: bool, + pub eta: f32, +} +impl<'a> Default for AutoBoneProcessStatusResponseArgs { + #[inline] + fn default() -> Self { + AutoBoneProcessStatusResponseArgs { + process_type: AutoBoneProcessType::NONE, + current: 0, + total: 0, + completed: false, + success: false, + eta: 0.0, + } + } +} + +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_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 add_eta(&mut self, eta: f32) { + self.fbb_.push_slot::(AutoBoneProcessStatusResponse::VT_ETA, eta, 0.0); + } + #[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("current", &self.current()); + ds.field("total", &self.total()); + ds.field("completed", &self.completed()); + ds.field("success", &self.success()); + ds.field("eta", &self.eta()); + 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 6e0a0002..ca6a852b 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,110 +1,110 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_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); - /// @deprecated - /// Use AutoBoneApplyRequest instead - 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for AutoBoneProcessType { - type Output = AutoBoneProcessType; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for AutoBoneProcessType { - type Scalar = u8; - #[inline] - fn to_little_endian(self) -> u8 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u8) -> Self { - let b = u8::from_le(v); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_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); + /// @deprecated + /// Use AutoBoneApplyRequest instead + 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for AutoBoneProcessType { + type Output = AutoBoneProcessType; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for AutoBoneProcessType { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for 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/auto_bone_settings_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_settings_generated.rs index 944314a6..5603db33 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_settings_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_settings_generated.rs @@ -1,500 +1,500 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum AutoBoneSettingsOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// https://github.com/SlimeVR/SlimeVR-Server/blob/v0.8.3/server/src/main/java/dev/slimevr/config/AutoBoneConfig.kt -pub struct AutoBoneSettings<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for AutoBoneSettings<'a> { - type Inner = AutoBoneSettings<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> AutoBoneSettings<'a> { - pub const VT_CURSOR_INCREMENT: flatbuffers::VOffsetT = 4; - pub const VT_MIN_DATA_DISTANCE: flatbuffers::VOffsetT = 6; - pub const VT_MAX_DATA_DISTANCE: flatbuffers::VOffsetT = 8; - pub const VT_NUM_EPOCHS: flatbuffers::VOffsetT = 10; - pub const VT_PRINT_EVERY_NUM_EPOCHS: flatbuffers::VOffsetT = 12; - pub const VT_INITIAL_ADJUST_RATE: flatbuffers::VOffsetT = 14; - pub const VT_ADJUST_RATE_DECAY: flatbuffers::VOffsetT = 16; - pub const VT_SLIDE_ERROR_FACTOR: flatbuffers::VOffsetT = 18; - pub const VT_OFFSET_SLIDE_ERROR_FACTOR: flatbuffers::VOffsetT = 20; - pub const VT_FOOT_HEIGHT_OFFSET_ERROR_FACTOR: flatbuffers::VOffsetT = 22; - pub const VT_BODY_PROPORTION_ERROR_FACTOR: flatbuffers::VOffsetT = 24; - pub const VT_HEIGHT_ERROR_FACTOR: flatbuffers::VOffsetT = 26; - pub const VT_POSITION_ERROR_FACTOR: flatbuffers::VOffsetT = 28; - pub const VT_POSITION_OFFSET_ERROR_FACTOR: flatbuffers::VOffsetT = 30; - pub const VT_CALC_INIT_ERROR: flatbuffers::VOffsetT = 32; - pub const VT_TARGET_HMD_HEIGHT: flatbuffers::VOffsetT = 34; - pub const VT_TARGET_FULL_HEIGHT: flatbuffers::VOffsetT = 36; - pub const VT_RANDOMIZE_FRAME_ORDER: flatbuffers::VOffsetT = 38; - pub const VT_SCALE_EACH_STEP: flatbuffers::VOffsetT = 40; - pub const VT_SAMPLE_COUNT: flatbuffers::VOffsetT = 42; - pub const VT_SAMPLE_RATE_MS: flatbuffers::VOffsetT = 44; - pub const VT_SAVE_RECORDINGS: flatbuffers::VOffsetT = 46; - pub const VT_USE_SKELETON_HEIGHT: flatbuffers::VOffsetT = 48; - pub const VT_RAND_SEED: flatbuffers::VOffsetT = 50; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - AutoBoneSettings { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args AutoBoneSettingsArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = AutoBoneSettingsBuilder::new(_fbb); - if let Some(x) = args.rand_seed { builder.add_rand_seed(x); } - if let Some(x) = args.sample_rate_ms { builder.add_sample_rate_ms(x); } - if let Some(x) = args.sample_count { builder.add_sample_count(x); } - if let Some(x) = args.target_full_height { builder.add_target_full_height(x); } - if let Some(x) = args.target_hmd_height { builder.add_target_hmd_height(x); } - if let Some(x) = args.position_offset_error_factor { builder.add_position_offset_error_factor(x); } - if let Some(x) = args.position_error_factor { builder.add_position_error_factor(x); } - if let Some(x) = args.height_error_factor { builder.add_height_error_factor(x); } - if let Some(x) = args.body_proportion_error_factor { builder.add_body_proportion_error_factor(x); } - if let Some(x) = args.foot_height_offset_error_factor { builder.add_foot_height_offset_error_factor(x); } - if let Some(x) = args.offset_slide_error_factor { builder.add_offset_slide_error_factor(x); } - if let Some(x) = args.slide_error_factor { builder.add_slide_error_factor(x); } - if let Some(x) = args.adjust_rate_decay { builder.add_adjust_rate_decay(x); } - if let Some(x) = args.initial_adjust_rate { builder.add_initial_adjust_rate(x); } - if let Some(x) = args.print_every_num_epochs { builder.add_print_every_num_epochs(x); } - if let Some(x) = args.num_epochs { builder.add_num_epochs(x); } - if let Some(x) = args.max_data_distance { builder.add_max_data_distance(x); } - if let Some(x) = args.min_data_distance { builder.add_min_data_distance(x); } - if let Some(x) = args.cursor_increment { builder.add_cursor_increment(x); } - if let Some(x) = args.use_skeleton_height { builder.add_use_skeleton_height(x); } - if let Some(x) = args.save_recordings { builder.add_save_recordings(x); } - if let Some(x) = args.scale_each_step { builder.add_scale_each_step(x); } - if let Some(x) = args.randomize_frame_order { builder.add_randomize_frame_order(x); } - if let Some(x) = args.calc_init_error { builder.add_calc_init_error(x); } - builder.finish() - } - - - #[inline] - pub fn cursor_increment(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_CURSOR_INCREMENT, None)} - } - #[inline] - pub fn min_data_distance(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_MIN_DATA_DISTANCE, None)} - } - #[inline] - pub fn max_data_distance(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_MAX_DATA_DISTANCE, None)} - } - #[inline] - pub fn num_epochs(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_NUM_EPOCHS, None)} - } - #[inline] - pub fn print_every_num_epochs(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_PRINT_EVERY_NUM_EPOCHS, None)} - } - #[inline] - pub fn initial_adjust_rate(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_INITIAL_ADJUST_RATE, None)} - } - #[inline] - pub fn adjust_rate_decay(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_ADJUST_RATE_DECAY, None)} - } - #[inline] - pub fn slide_error_factor(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_SLIDE_ERROR_FACTOR, None)} - } - #[inline] - pub fn offset_slide_error_factor(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_OFFSET_SLIDE_ERROR_FACTOR, None)} - } - #[inline] - pub fn foot_height_offset_error_factor(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_FOOT_HEIGHT_OFFSET_ERROR_FACTOR, None)} - } - #[inline] - pub fn body_proportion_error_factor(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_BODY_PROPORTION_ERROR_FACTOR, None)} - } - #[inline] - pub fn height_error_factor(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_HEIGHT_ERROR_FACTOR, None)} - } - #[inline] - pub fn position_error_factor(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_POSITION_ERROR_FACTOR, None)} - } - #[inline] - pub fn position_offset_error_factor(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_POSITION_OFFSET_ERROR_FACTOR, None)} - } - #[inline] - pub fn calc_init_error(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_CALC_INIT_ERROR, None)} - } - #[inline] - pub fn target_hmd_height(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_TARGET_HMD_HEIGHT, None)} - } - #[inline] - pub fn target_full_height(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_TARGET_FULL_HEIGHT, None)} - } - #[inline] - pub fn randomize_frame_order(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_RANDOMIZE_FRAME_ORDER, None)} - } - #[inline] - pub fn scale_each_step(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_SCALE_EACH_STEP, None)} - } - #[inline] - pub fn sample_count(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_SAMPLE_COUNT, None)} - } - #[inline] - pub fn sample_rate_ms(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_SAMPLE_RATE_MS, None)} - } - #[inline] - pub fn save_recordings(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_SAVE_RECORDINGS, None)} - } - #[inline] - pub fn use_skeleton_height(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_USE_SKELETON_HEIGHT, None)} - } - #[inline] - pub fn rand_seed(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AutoBoneSettings::VT_RAND_SEED, None)} - } -} - -impl flatbuffers::Verifiable for AutoBoneSettings<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("cursor_increment", Self::VT_CURSOR_INCREMENT, false)? - .visit_field::("min_data_distance", Self::VT_MIN_DATA_DISTANCE, false)? - .visit_field::("max_data_distance", Self::VT_MAX_DATA_DISTANCE, false)? - .visit_field::("num_epochs", Self::VT_NUM_EPOCHS, false)? - .visit_field::("print_every_num_epochs", Self::VT_PRINT_EVERY_NUM_EPOCHS, false)? - .visit_field::("initial_adjust_rate", Self::VT_INITIAL_ADJUST_RATE, false)? - .visit_field::("adjust_rate_decay", Self::VT_ADJUST_RATE_DECAY, false)? - .visit_field::("slide_error_factor", Self::VT_SLIDE_ERROR_FACTOR, false)? - .visit_field::("offset_slide_error_factor", Self::VT_OFFSET_SLIDE_ERROR_FACTOR, false)? - .visit_field::("foot_height_offset_error_factor", Self::VT_FOOT_HEIGHT_OFFSET_ERROR_FACTOR, false)? - .visit_field::("body_proportion_error_factor", Self::VT_BODY_PROPORTION_ERROR_FACTOR, false)? - .visit_field::("height_error_factor", Self::VT_HEIGHT_ERROR_FACTOR, false)? - .visit_field::("position_error_factor", Self::VT_POSITION_ERROR_FACTOR, false)? - .visit_field::("position_offset_error_factor", Self::VT_POSITION_OFFSET_ERROR_FACTOR, false)? - .visit_field::("calc_init_error", Self::VT_CALC_INIT_ERROR, false)? - .visit_field::("target_hmd_height", Self::VT_TARGET_HMD_HEIGHT, false)? - .visit_field::("target_full_height", Self::VT_TARGET_FULL_HEIGHT, false)? - .visit_field::("randomize_frame_order", Self::VT_RANDOMIZE_FRAME_ORDER, false)? - .visit_field::("scale_each_step", Self::VT_SCALE_EACH_STEP, false)? - .visit_field::("sample_count", Self::VT_SAMPLE_COUNT, false)? - .visit_field::("sample_rate_ms", Self::VT_SAMPLE_RATE_MS, false)? - .visit_field::("save_recordings", Self::VT_SAVE_RECORDINGS, false)? - .visit_field::("use_skeleton_height", Self::VT_USE_SKELETON_HEIGHT, false)? - .visit_field::("rand_seed", Self::VT_RAND_SEED, false)? - .finish(); - Ok(()) - } -} -pub struct AutoBoneSettingsArgs { - pub cursor_increment: Option, - pub min_data_distance: Option, - pub max_data_distance: Option, - pub num_epochs: Option, - pub print_every_num_epochs: Option, - pub initial_adjust_rate: Option, - pub adjust_rate_decay: Option, - pub slide_error_factor: Option, - pub offset_slide_error_factor: Option, - pub foot_height_offset_error_factor: Option, - pub body_proportion_error_factor: Option, - pub height_error_factor: Option, - pub position_error_factor: Option, - pub position_offset_error_factor: Option, - pub calc_init_error: Option, - pub target_hmd_height: Option, - pub target_full_height: Option, - pub randomize_frame_order: Option, - pub scale_each_step: Option, - pub sample_count: Option, - pub sample_rate_ms: Option, - pub save_recordings: Option, - pub use_skeleton_height: Option, - pub rand_seed: Option, -} -impl<'a> Default for AutoBoneSettingsArgs { - #[inline] - fn default() -> Self { - AutoBoneSettingsArgs { - cursor_increment: None, - min_data_distance: None, - max_data_distance: None, - num_epochs: None, - print_every_num_epochs: None, - initial_adjust_rate: None, - adjust_rate_decay: None, - slide_error_factor: None, - offset_slide_error_factor: None, - foot_height_offset_error_factor: None, - body_proportion_error_factor: None, - height_error_factor: None, - position_error_factor: None, - position_offset_error_factor: None, - calc_init_error: None, - target_hmd_height: None, - target_full_height: None, - randomize_frame_order: None, - scale_each_step: None, - sample_count: None, - sample_rate_ms: None, - save_recordings: None, - use_skeleton_height: None, - rand_seed: None, - } - } -} - -pub struct AutoBoneSettingsBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> AutoBoneSettingsBuilder<'a, 'b> { - #[inline] - pub fn add_cursor_increment(&mut self, cursor_increment: i32) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_CURSOR_INCREMENT, cursor_increment); - } - #[inline] - pub fn add_min_data_distance(&mut self, min_data_distance: i32) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_MIN_DATA_DISTANCE, min_data_distance); - } - #[inline] - pub fn add_max_data_distance(&mut self, max_data_distance: i32) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_MAX_DATA_DISTANCE, max_data_distance); - } - #[inline] - pub fn add_num_epochs(&mut self, num_epochs: i32) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_NUM_EPOCHS, num_epochs); - } - #[inline] - pub fn add_print_every_num_epochs(&mut self, print_every_num_epochs: i32) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_PRINT_EVERY_NUM_EPOCHS, print_every_num_epochs); - } - #[inline] - pub fn add_initial_adjust_rate(&mut self, initial_adjust_rate: f32) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_INITIAL_ADJUST_RATE, initial_adjust_rate); - } - #[inline] - pub fn add_adjust_rate_decay(&mut self, adjust_rate_decay: f32) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_ADJUST_RATE_DECAY, adjust_rate_decay); - } - #[inline] - pub fn add_slide_error_factor(&mut self, slide_error_factor: f32) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_SLIDE_ERROR_FACTOR, slide_error_factor); - } - #[inline] - pub fn add_offset_slide_error_factor(&mut self, offset_slide_error_factor: f32) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_OFFSET_SLIDE_ERROR_FACTOR, offset_slide_error_factor); - } - #[inline] - pub fn add_foot_height_offset_error_factor(&mut self, foot_height_offset_error_factor: f32) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_FOOT_HEIGHT_OFFSET_ERROR_FACTOR, foot_height_offset_error_factor); - } - #[inline] - pub fn add_body_proportion_error_factor(&mut self, body_proportion_error_factor: f32) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_BODY_PROPORTION_ERROR_FACTOR, body_proportion_error_factor); - } - #[inline] - pub fn add_height_error_factor(&mut self, height_error_factor: f32) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_HEIGHT_ERROR_FACTOR, height_error_factor); - } - #[inline] - pub fn add_position_error_factor(&mut self, position_error_factor: f32) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_POSITION_ERROR_FACTOR, position_error_factor); - } - #[inline] - pub fn add_position_offset_error_factor(&mut self, position_offset_error_factor: f32) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_POSITION_OFFSET_ERROR_FACTOR, position_offset_error_factor); - } - #[inline] - pub fn add_calc_init_error(&mut self, calc_init_error: bool) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_CALC_INIT_ERROR, calc_init_error); - } - #[inline] - pub fn add_target_hmd_height(&mut self, target_hmd_height: f32) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_TARGET_HMD_HEIGHT, target_hmd_height); - } - #[inline] - pub fn add_target_full_height(&mut self, target_full_height: f32) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_TARGET_FULL_HEIGHT, target_full_height); - } - #[inline] - pub fn add_randomize_frame_order(&mut self, randomize_frame_order: bool) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_RANDOMIZE_FRAME_ORDER, randomize_frame_order); - } - #[inline] - pub fn add_scale_each_step(&mut self, scale_each_step: bool) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_SCALE_EACH_STEP, scale_each_step); - } - #[inline] - pub fn add_sample_count(&mut self, sample_count: i32) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_SAMPLE_COUNT, sample_count); - } - #[inline] - pub fn add_sample_rate_ms(&mut self, sample_rate_ms: i64) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_SAMPLE_RATE_MS, sample_rate_ms); - } - #[inline] - pub fn add_save_recordings(&mut self, save_recordings: bool) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_SAVE_RECORDINGS, save_recordings); - } - #[inline] - pub fn add_use_skeleton_height(&mut self, use_skeleton_height: bool) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_USE_SKELETON_HEIGHT, use_skeleton_height); - } - #[inline] - pub fn add_rand_seed(&mut self, rand_seed: i64) { - self.fbb_.push_slot_always::(AutoBoneSettings::VT_RAND_SEED, rand_seed); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> AutoBoneSettingsBuilder<'a, 'b> { - let start = _fbb.start_table(); - AutoBoneSettingsBuilder { - 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 AutoBoneSettings<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("AutoBoneSettings"); - ds.field("cursor_increment", &self.cursor_increment()); - ds.field("min_data_distance", &self.min_data_distance()); - ds.field("max_data_distance", &self.max_data_distance()); - ds.field("num_epochs", &self.num_epochs()); - ds.field("print_every_num_epochs", &self.print_every_num_epochs()); - ds.field("initial_adjust_rate", &self.initial_adjust_rate()); - ds.field("adjust_rate_decay", &self.adjust_rate_decay()); - ds.field("slide_error_factor", &self.slide_error_factor()); - ds.field("offset_slide_error_factor", &self.offset_slide_error_factor()); - ds.field("foot_height_offset_error_factor", &self.foot_height_offset_error_factor()); - ds.field("body_proportion_error_factor", &self.body_proportion_error_factor()); - ds.field("height_error_factor", &self.height_error_factor()); - ds.field("position_error_factor", &self.position_error_factor()); - ds.field("position_offset_error_factor", &self.position_offset_error_factor()); - ds.field("calc_init_error", &self.calc_init_error()); - ds.field("target_hmd_height", &self.target_hmd_height()); - ds.field("target_full_height", &self.target_full_height()); - ds.field("randomize_frame_order", &self.randomize_frame_order()); - ds.field("scale_each_step", &self.scale_each_step()); - ds.field("sample_count", &self.sample_count()); - ds.field("sample_rate_ms", &self.sample_rate_ms()); - ds.field("save_recordings", &self.save_recordings()); - ds.field("use_skeleton_height", &self.use_skeleton_height()); - ds.field("rand_seed", &self.rand_seed()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum AutoBoneSettingsOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// https://github.com/SlimeVR/SlimeVR-Server/blob/v0.8.3/server/src/main/java/dev/slimevr/config/AutoBoneConfig.kt +pub struct AutoBoneSettings<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for AutoBoneSettings<'a> { + type Inner = AutoBoneSettings<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> AutoBoneSettings<'a> { + pub const VT_CURSOR_INCREMENT: flatbuffers::VOffsetT = 4; + pub const VT_MIN_DATA_DISTANCE: flatbuffers::VOffsetT = 6; + pub const VT_MAX_DATA_DISTANCE: flatbuffers::VOffsetT = 8; + pub const VT_NUM_EPOCHS: flatbuffers::VOffsetT = 10; + pub const VT_PRINT_EVERY_NUM_EPOCHS: flatbuffers::VOffsetT = 12; + pub const VT_INITIAL_ADJUST_RATE: flatbuffers::VOffsetT = 14; + pub const VT_ADJUST_RATE_DECAY: flatbuffers::VOffsetT = 16; + pub const VT_SLIDE_ERROR_FACTOR: flatbuffers::VOffsetT = 18; + pub const VT_OFFSET_SLIDE_ERROR_FACTOR: flatbuffers::VOffsetT = 20; + pub const VT_FOOT_HEIGHT_OFFSET_ERROR_FACTOR: flatbuffers::VOffsetT = 22; + pub const VT_BODY_PROPORTION_ERROR_FACTOR: flatbuffers::VOffsetT = 24; + pub const VT_HEIGHT_ERROR_FACTOR: flatbuffers::VOffsetT = 26; + pub const VT_POSITION_ERROR_FACTOR: flatbuffers::VOffsetT = 28; + pub const VT_POSITION_OFFSET_ERROR_FACTOR: flatbuffers::VOffsetT = 30; + pub const VT_CALC_INIT_ERROR: flatbuffers::VOffsetT = 32; + pub const VT_TARGET_HMD_HEIGHT: flatbuffers::VOffsetT = 34; + pub const VT_TARGET_FULL_HEIGHT: flatbuffers::VOffsetT = 36; + pub const VT_RANDOMIZE_FRAME_ORDER: flatbuffers::VOffsetT = 38; + pub const VT_SCALE_EACH_STEP: flatbuffers::VOffsetT = 40; + pub const VT_SAMPLE_COUNT: flatbuffers::VOffsetT = 42; + pub const VT_SAMPLE_RATE_MS: flatbuffers::VOffsetT = 44; + pub const VT_SAVE_RECORDINGS: flatbuffers::VOffsetT = 46; + pub const VT_USE_SKELETON_HEIGHT: flatbuffers::VOffsetT = 48; + pub const VT_RAND_SEED: flatbuffers::VOffsetT = 50; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + AutoBoneSettings { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args AutoBoneSettingsArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = AutoBoneSettingsBuilder::new(_fbb); + if let Some(x) = args.rand_seed { builder.add_rand_seed(x); } + if let Some(x) = args.sample_rate_ms { builder.add_sample_rate_ms(x); } + if let Some(x) = args.sample_count { builder.add_sample_count(x); } + if let Some(x) = args.target_full_height { builder.add_target_full_height(x); } + if let Some(x) = args.target_hmd_height { builder.add_target_hmd_height(x); } + if let Some(x) = args.position_offset_error_factor { builder.add_position_offset_error_factor(x); } + if let Some(x) = args.position_error_factor { builder.add_position_error_factor(x); } + if let Some(x) = args.height_error_factor { builder.add_height_error_factor(x); } + if let Some(x) = args.body_proportion_error_factor { builder.add_body_proportion_error_factor(x); } + if let Some(x) = args.foot_height_offset_error_factor { builder.add_foot_height_offset_error_factor(x); } + if let Some(x) = args.offset_slide_error_factor { builder.add_offset_slide_error_factor(x); } + if let Some(x) = args.slide_error_factor { builder.add_slide_error_factor(x); } + if let Some(x) = args.adjust_rate_decay { builder.add_adjust_rate_decay(x); } + if let Some(x) = args.initial_adjust_rate { builder.add_initial_adjust_rate(x); } + if let Some(x) = args.print_every_num_epochs { builder.add_print_every_num_epochs(x); } + if let Some(x) = args.num_epochs { builder.add_num_epochs(x); } + if let Some(x) = args.max_data_distance { builder.add_max_data_distance(x); } + if let Some(x) = args.min_data_distance { builder.add_min_data_distance(x); } + if let Some(x) = args.cursor_increment { builder.add_cursor_increment(x); } + if let Some(x) = args.use_skeleton_height { builder.add_use_skeleton_height(x); } + if let Some(x) = args.save_recordings { builder.add_save_recordings(x); } + if let Some(x) = args.scale_each_step { builder.add_scale_each_step(x); } + if let Some(x) = args.randomize_frame_order { builder.add_randomize_frame_order(x); } + if let Some(x) = args.calc_init_error { builder.add_calc_init_error(x); } + builder.finish() + } + + + #[inline] + pub fn cursor_increment(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_CURSOR_INCREMENT, None)} + } + #[inline] + pub fn min_data_distance(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_MIN_DATA_DISTANCE, None)} + } + #[inline] + pub fn max_data_distance(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_MAX_DATA_DISTANCE, None)} + } + #[inline] + pub fn num_epochs(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_NUM_EPOCHS, None)} + } + #[inline] + pub fn print_every_num_epochs(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_PRINT_EVERY_NUM_EPOCHS, None)} + } + #[inline] + pub fn initial_adjust_rate(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_INITIAL_ADJUST_RATE, None)} + } + #[inline] + pub fn adjust_rate_decay(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_ADJUST_RATE_DECAY, None)} + } + #[inline] + pub fn slide_error_factor(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_SLIDE_ERROR_FACTOR, None)} + } + #[inline] + pub fn offset_slide_error_factor(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_OFFSET_SLIDE_ERROR_FACTOR, None)} + } + #[inline] + pub fn foot_height_offset_error_factor(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_FOOT_HEIGHT_OFFSET_ERROR_FACTOR, None)} + } + #[inline] + pub fn body_proportion_error_factor(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_BODY_PROPORTION_ERROR_FACTOR, None)} + } + #[inline] + pub fn height_error_factor(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_HEIGHT_ERROR_FACTOR, None)} + } + #[inline] + pub fn position_error_factor(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_POSITION_ERROR_FACTOR, None)} + } + #[inline] + pub fn position_offset_error_factor(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_POSITION_OFFSET_ERROR_FACTOR, None)} + } + #[inline] + pub fn calc_init_error(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_CALC_INIT_ERROR, None)} + } + #[inline] + pub fn target_hmd_height(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_TARGET_HMD_HEIGHT, None)} + } + #[inline] + pub fn target_full_height(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_TARGET_FULL_HEIGHT, None)} + } + #[inline] + pub fn randomize_frame_order(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_RANDOMIZE_FRAME_ORDER, None)} + } + #[inline] + pub fn scale_each_step(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_SCALE_EACH_STEP, None)} + } + #[inline] + pub fn sample_count(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_SAMPLE_COUNT, None)} + } + #[inline] + pub fn sample_rate_ms(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_SAMPLE_RATE_MS, None)} + } + #[inline] + pub fn save_recordings(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_SAVE_RECORDINGS, None)} + } + #[inline] + pub fn use_skeleton_height(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_USE_SKELETON_HEIGHT, None)} + } + #[inline] + pub fn rand_seed(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(AutoBoneSettings::VT_RAND_SEED, None)} + } +} + +impl flatbuffers::Verifiable for AutoBoneSettings<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("cursor_increment", Self::VT_CURSOR_INCREMENT, false)? + .visit_field::("min_data_distance", Self::VT_MIN_DATA_DISTANCE, false)? + .visit_field::("max_data_distance", Self::VT_MAX_DATA_DISTANCE, false)? + .visit_field::("num_epochs", Self::VT_NUM_EPOCHS, false)? + .visit_field::("print_every_num_epochs", Self::VT_PRINT_EVERY_NUM_EPOCHS, false)? + .visit_field::("initial_adjust_rate", Self::VT_INITIAL_ADJUST_RATE, false)? + .visit_field::("adjust_rate_decay", Self::VT_ADJUST_RATE_DECAY, false)? + .visit_field::("slide_error_factor", Self::VT_SLIDE_ERROR_FACTOR, false)? + .visit_field::("offset_slide_error_factor", Self::VT_OFFSET_SLIDE_ERROR_FACTOR, false)? + .visit_field::("foot_height_offset_error_factor", Self::VT_FOOT_HEIGHT_OFFSET_ERROR_FACTOR, false)? + .visit_field::("body_proportion_error_factor", Self::VT_BODY_PROPORTION_ERROR_FACTOR, false)? + .visit_field::("height_error_factor", Self::VT_HEIGHT_ERROR_FACTOR, false)? + .visit_field::("position_error_factor", Self::VT_POSITION_ERROR_FACTOR, false)? + .visit_field::("position_offset_error_factor", Self::VT_POSITION_OFFSET_ERROR_FACTOR, false)? + .visit_field::("calc_init_error", Self::VT_CALC_INIT_ERROR, false)? + .visit_field::("target_hmd_height", Self::VT_TARGET_HMD_HEIGHT, false)? + .visit_field::("target_full_height", Self::VT_TARGET_FULL_HEIGHT, false)? + .visit_field::("randomize_frame_order", Self::VT_RANDOMIZE_FRAME_ORDER, false)? + .visit_field::("scale_each_step", Self::VT_SCALE_EACH_STEP, false)? + .visit_field::("sample_count", Self::VT_SAMPLE_COUNT, false)? + .visit_field::("sample_rate_ms", Self::VT_SAMPLE_RATE_MS, false)? + .visit_field::("save_recordings", Self::VT_SAVE_RECORDINGS, false)? + .visit_field::("use_skeleton_height", Self::VT_USE_SKELETON_HEIGHT, false)? + .visit_field::("rand_seed", Self::VT_RAND_SEED, false)? + .finish(); + Ok(()) + } +} +pub struct AutoBoneSettingsArgs { + pub cursor_increment: Option, + pub min_data_distance: Option, + pub max_data_distance: Option, + pub num_epochs: Option, + pub print_every_num_epochs: Option, + pub initial_adjust_rate: Option, + pub adjust_rate_decay: Option, + pub slide_error_factor: Option, + pub offset_slide_error_factor: Option, + pub foot_height_offset_error_factor: Option, + pub body_proportion_error_factor: Option, + pub height_error_factor: Option, + pub position_error_factor: Option, + pub position_offset_error_factor: Option, + pub calc_init_error: Option, + pub target_hmd_height: Option, + pub target_full_height: Option, + pub randomize_frame_order: Option, + pub scale_each_step: Option, + pub sample_count: Option, + pub sample_rate_ms: Option, + pub save_recordings: Option, + pub use_skeleton_height: Option, + pub rand_seed: Option, +} +impl<'a> Default for AutoBoneSettingsArgs { + #[inline] + fn default() -> Self { + AutoBoneSettingsArgs { + cursor_increment: None, + min_data_distance: None, + max_data_distance: None, + num_epochs: None, + print_every_num_epochs: None, + initial_adjust_rate: None, + adjust_rate_decay: None, + slide_error_factor: None, + offset_slide_error_factor: None, + foot_height_offset_error_factor: None, + body_proportion_error_factor: None, + height_error_factor: None, + position_error_factor: None, + position_offset_error_factor: None, + calc_init_error: None, + target_hmd_height: None, + target_full_height: None, + randomize_frame_order: None, + scale_each_step: None, + sample_count: None, + sample_rate_ms: None, + save_recordings: None, + use_skeleton_height: None, + rand_seed: None, + } + } +} + +pub struct AutoBoneSettingsBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> AutoBoneSettingsBuilder<'a, 'b> { + #[inline] + pub fn add_cursor_increment(&mut self, cursor_increment: i32) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_CURSOR_INCREMENT, cursor_increment); + } + #[inline] + pub fn add_min_data_distance(&mut self, min_data_distance: i32) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_MIN_DATA_DISTANCE, min_data_distance); + } + #[inline] + pub fn add_max_data_distance(&mut self, max_data_distance: i32) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_MAX_DATA_DISTANCE, max_data_distance); + } + #[inline] + pub fn add_num_epochs(&mut self, num_epochs: i32) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_NUM_EPOCHS, num_epochs); + } + #[inline] + pub fn add_print_every_num_epochs(&mut self, print_every_num_epochs: i32) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_PRINT_EVERY_NUM_EPOCHS, print_every_num_epochs); + } + #[inline] + pub fn add_initial_adjust_rate(&mut self, initial_adjust_rate: f32) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_INITIAL_ADJUST_RATE, initial_adjust_rate); + } + #[inline] + pub fn add_adjust_rate_decay(&mut self, adjust_rate_decay: f32) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_ADJUST_RATE_DECAY, adjust_rate_decay); + } + #[inline] + pub fn add_slide_error_factor(&mut self, slide_error_factor: f32) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_SLIDE_ERROR_FACTOR, slide_error_factor); + } + #[inline] + pub fn add_offset_slide_error_factor(&mut self, offset_slide_error_factor: f32) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_OFFSET_SLIDE_ERROR_FACTOR, offset_slide_error_factor); + } + #[inline] + pub fn add_foot_height_offset_error_factor(&mut self, foot_height_offset_error_factor: f32) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_FOOT_HEIGHT_OFFSET_ERROR_FACTOR, foot_height_offset_error_factor); + } + #[inline] + pub fn add_body_proportion_error_factor(&mut self, body_proportion_error_factor: f32) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_BODY_PROPORTION_ERROR_FACTOR, body_proportion_error_factor); + } + #[inline] + pub fn add_height_error_factor(&mut self, height_error_factor: f32) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_HEIGHT_ERROR_FACTOR, height_error_factor); + } + #[inline] + pub fn add_position_error_factor(&mut self, position_error_factor: f32) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_POSITION_ERROR_FACTOR, position_error_factor); + } + #[inline] + pub fn add_position_offset_error_factor(&mut self, position_offset_error_factor: f32) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_POSITION_OFFSET_ERROR_FACTOR, position_offset_error_factor); + } + #[inline] + pub fn add_calc_init_error(&mut self, calc_init_error: bool) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_CALC_INIT_ERROR, calc_init_error); + } + #[inline] + pub fn add_target_hmd_height(&mut self, target_hmd_height: f32) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_TARGET_HMD_HEIGHT, target_hmd_height); + } + #[inline] + pub fn add_target_full_height(&mut self, target_full_height: f32) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_TARGET_FULL_HEIGHT, target_full_height); + } + #[inline] + pub fn add_randomize_frame_order(&mut self, randomize_frame_order: bool) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_RANDOMIZE_FRAME_ORDER, randomize_frame_order); + } + #[inline] + pub fn add_scale_each_step(&mut self, scale_each_step: bool) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_SCALE_EACH_STEP, scale_each_step); + } + #[inline] + pub fn add_sample_count(&mut self, sample_count: i32) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_SAMPLE_COUNT, sample_count); + } + #[inline] + pub fn add_sample_rate_ms(&mut self, sample_rate_ms: i64) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_SAMPLE_RATE_MS, sample_rate_ms); + } + #[inline] + pub fn add_save_recordings(&mut self, save_recordings: bool) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_SAVE_RECORDINGS, save_recordings); + } + #[inline] + pub fn add_use_skeleton_height(&mut self, use_skeleton_height: bool) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_USE_SKELETON_HEIGHT, use_skeleton_height); + } + #[inline] + pub fn add_rand_seed(&mut self, rand_seed: i64) { + self.fbb_.push_slot_always::(AutoBoneSettings::VT_RAND_SEED, rand_seed); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> AutoBoneSettingsBuilder<'a, 'b> { + let start = _fbb.start_table(); + AutoBoneSettingsBuilder { + 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 AutoBoneSettings<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("AutoBoneSettings"); + ds.field("cursor_increment", &self.cursor_increment()); + ds.field("min_data_distance", &self.min_data_distance()); + ds.field("max_data_distance", &self.max_data_distance()); + ds.field("num_epochs", &self.num_epochs()); + ds.field("print_every_num_epochs", &self.print_every_num_epochs()); + ds.field("initial_adjust_rate", &self.initial_adjust_rate()); + ds.field("adjust_rate_decay", &self.adjust_rate_decay()); + ds.field("slide_error_factor", &self.slide_error_factor()); + ds.field("offset_slide_error_factor", &self.offset_slide_error_factor()); + ds.field("foot_height_offset_error_factor", &self.foot_height_offset_error_factor()); + ds.field("body_proportion_error_factor", &self.body_proportion_error_factor()); + ds.field("height_error_factor", &self.height_error_factor()); + ds.field("position_error_factor", &self.position_error_factor()); + ds.field("position_offset_error_factor", &self.position_offset_error_factor()); + ds.field("calc_init_error", &self.calc_init_error()); + ds.field("target_hmd_height", &self.target_hmd_height()); + ds.field("target_full_height", &self.target_full_height()); + ds.field("randomize_frame_order", &self.randomize_frame_order()); + ds.field("scale_each_step", &self.scale_each_step()); + ds.field("sample_count", &self.sample_count()); + ds.field("sample_rate_ms", &self.sample_rate_ms()); + ds.field("save_recordings", &self.save_recordings()); + ds.field("use_skeleton_height", &self.use_skeleton_height()); + ds.field("rand_seed", &self.rand_seed()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_stop_recording_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_stop_recording_request_generated.rs index a5582ce8..6703dbc0 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_stop_recording_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_stop_recording_request_generated.rs @@ -1,91 +1,91 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum AutoBoneStopRecordingRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Stops the current recording, using it as far as it has been recorded -pub struct AutoBoneStopRecordingRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for AutoBoneStopRecordingRequest<'a> { - type Inner = AutoBoneStopRecordingRequest<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> AutoBoneStopRecordingRequest<'a> { - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - AutoBoneStopRecordingRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args AutoBoneStopRecordingRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = AutoBoneStopRecordingRequestBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for AutoBoneStopRecordingRequest<'_> { - #[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 AutoBoneStopRecordingRequestArgs { -} -impl<'a> Default for AutoBoneStopRecordingRequestArgs { - #[inline] - fn default() -> Self { - AutoBoneStopRecordingRequestArgs { - } - } -} - -pub struct AutoBoneStopRecordingRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> AutoBoneStopRecordingRequestBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> AutoBoneStopRecordingRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - AutoBoneStopRecordingRequestBuilder { - 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 AutoBoneStopRecordingRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("AutoBoneStopRecordingRequest"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum AutoBoneStopRecordingRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Stops the current recording, using it as far as it has been recorded +pub struct AutoBoneStopRecordingRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for AutoBoneStopRecordingRequest<'a> { + type Inner = AutoBoneStopRecordingRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> AutoBoneStopRecordingRequest<'a> { + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + AutoBoneStopRecordingRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args AutoBoneStopRecordingRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = AutoBoneStopRecordingRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for AutoBoneStopRecordingRequest<'_> { + #[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 AutoBoneStopRecordingRequestArgs { +} +impl<'a> Default for AutoBoneStopRecordingRequestArgs { + #[inline] + fn default() -> Self { + AutoBoneStopRecordingRequestArgs { + } + } +} + +pub struct AutoBoneStopRecordingRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> AutoBoneStopRecordingRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> AutoBoneStopRecordingRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + AutoBoneStopRecordingRequestBuilder { + 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 AutoBoneStopRecordingRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("AutoBoneStopRecordingRequest"); + ds.finish() + } +} 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 71a6787b..0e357694 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,261 +1,261 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(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_DRIFT_COMPENSATION: flatbuffers::VOffsetT = 8; - pub const VT_OSC_ROUTER: flatbuffers::VOffsetT = 10; - pub const VT_VRC_OSC: flatbuffers::VOffsetT = 12; - pub const VT_VMC_OSC: flatbuffers::VOffsetT = 14; - pub const VT_MODEL_SETTINGS: flatbuffers::VOffsetT = 16; - pub const VT_TAP_DETECTION_SETTINGS: flatbuffers::VOffsetT = 18; - pub const VT_AUTO_BONE_SETTINGS: flatbuffers::VOffsetT = 20; - pub const VT_RESETS_SETTINGS: flatbuffers::VOffsetT = 22; - - #[inline] - pub unsafe 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.resets_settings { builder.add_resets_settings(x); } - if let Some(x) = args.auto_bone_settings { builder.add_auto_bone_settings(x); } - if let Some(x) = args.tap_detection_settings { builder.add_tap_detection_settings(x); } - if let Some(x) = args.model_settings { builder.add_model_settings(x); } - if let Some(x) = args.vmc_osc { builder.add_vmc_osc(x); } - if let Some(x) = args.vrc_osc { builder.add_vrc_osc(x); } - if let Some(x) = args.osc_router { builder.add_osc_router(x); } - if let Some(x) = args.drift_compensation { builder.add_drift_compensation(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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ChangeSettingsRequest::VT_STEAM_VR_TRACKERS, None)} - } - #[inline] - pub fn filtering(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ChangeSettingsRequest::VT_FILTERING, None)} - } - #[inline] - pub fn drift_compensation(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ChangeSettingsRequest::VT_DRIFT_COMPENSATION, None)} - } - #[inline] - pub fn osc_router(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ChangeSettingsRequest::VT_OSC_ROUTER, None)} - } - #[inline] - pub fn vrc_osc(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ChangeSettingsRequest::VT_VRC_OSC, None)} - } - #[inline] - pub fn vmc_osc(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ChangeSettingsRequest::VT_VMC_OSC, None)} - } - #[inline] - pub fn model_settings(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ChangeSettingsRequest::VT_MODEL_SETTINGS, None)} - } - #[inline] - pub fn tap_detection_settings(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ChangeSettingsRequest::VT_TAP_DETECTION_SETTINGS, None)} - } - #[inline] - pub fn auto_bone_settings(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ChangeSettingsRequest::VT_AUTO_BONE_SETTINGS, None)} - } - #[inline] - pub fn resets_settings(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ChangeSettingsRequest::VT_RESETS_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::>("drift_compensation", Self::VT_DRIFT_COMPENSATION, false)? - .visit_field::>("osc_router", Self::VT_OSC_ROUTER, false)? - .visit_field::>("vrc_osc", Self::VT_VRC_OSC, false)? - .visit_field::>("vmc_osc", Self::VT_VMC_OSC, false)? - .visit_field::>("model_settings", Self::VT_MODEL_SETTINGS, false)? - .visit_field::>("tap_detection_settings", Self::VT_TAP_DETECTION_SETTINGS, false)? - .visit_field::>("auto_bone_settings", Self::VT_AUTO_BONE_SETTINGS, false)? - .visit_field::>("resets_settings", Self::VT_RESETS_SETTINGS, false)? - .finish(); - Ok(()) - } -} -pub struct ChangeSettingsRequestArgs<'a> { - pub steam_vr_trackers: Option>>, - pub filtering: Option>>, - pub drift_compensation: Option>>, - pub osc_router: Option>>, - pub vrc_osc: Option>>, - pub vmc_osc: Option>>, - pub model_settings: Option>>, - pub tap_detection_settings: Option>>, - pub auto_bone_settings: Option>>, - pub resets_settings: Option>>, -} -impl<'a> Default for ChangeSettingsRequestArgs<'a> { - #[inline] - fn default() -> Self { - ChangeSettingsRequestArgs { - steam_vr_trackers: None, - filtering: None, - drift_compensation: None, - osc_router: None, - vrc_osc: None, - vmc_osc: None, - model_settings: None, - tap_detection_settings: None, - auto_bone_settings: None, - resets_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_drift_compensation(&mut self, drift_compensation: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_DRIFT_COMPENSATION, drift_compensation); - } - #[inline] - pub fn add_osc_router(&mut self, osc_router: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_OSC_ROUTER, osc_router); - } - #[inline] - pub fn add_vrc_osc(&mut self, vrc_osc: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_VRC_OSC, vrc_osc); - } - #[inline] - pub fn add_vmc_osc(&mut self, vmc_osc: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_VMC_OSC, vmc_osc); - } - #[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 add_tap_detection_settings(&mut self, tap_detection_settings: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_TAP_DETECTION_SETTINGS, tap_detection_settings); - } - #[inline] - pub fn add_auto_bone_settings(&mut self, auto_bone_settings: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_AUTO_BONE_SETTINGS, auto_bone_settings); - } - #[inline] - pub fn add_resets_settings(&mut self, resets_settings: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_RESETS_SETTINGS, resets_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("drift_compensation", &self.drift_compensation()); - ds.field("osc_router", &self.osc_router()); - ds.field("vrc_osc", &self.vrc_osc()); - ds.field("vmc_osc", &self.vmc_osc()); - ds.field("model_settings", &self.model_settings()); - ds.field("tap_detection_settings", &self.tap_detection_settings()); - ds.field("auto_bone_settings", &self.auto_bone_settings()); - ds.field("resets_settings", &self.resets_settings()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(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_DRIFT_COMPENSATION: flatbuffers::VOffsetT = 8; + pub const VT_OSC_ROUTER: flatbuffers::VOffsetT = 10; + pub const VT_VRC_OSC: flatbuffers::VOffsetT = 12; + pub const VT_VMC_OSC: flatbuffers::VOffsetT = 14; + pub const VT_MODEL_SETTINGS: flatbuffers::VOffsetT = 16; + pub const VT_TAP_DETECTION_SETTINGS: flatbuffers::VOffsetT = 18; + pub const VT_AUTO_BONE_SETTINGS: flatbuffers::VOffsetT = 20; + pub const VT_RESETS_SETTINGS: flatbuffers::VOffsetT = 22; + + #[inline] + pub unsafe 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.resets_settings { builder.add_resets_settings(x); } + if let Some(x) = args.auto_bone_settings { builder.add_auto_bone_settings(x); } + if let Some(x) = args.tap_detection_settings { builder.add_tap_detection_settings(x); } + if let Some(x) = args.model_settings { builder.add_model_settings(x); } + if let Some(x) = args.vmc_osc { builder.add_vmc_osc(x); } + if let Some(x) = args.vrc_osc { builder.add_vrc_osc(x); } + if let Some(x) = args.osc_router { builder.add_osc_router(x); } + if let Some(x) = args.drift_compensation { builder.add_drift_compensation(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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(ChangeSettingsRequest::VT_STEAM_VR_TRACKERS, None)} + } + #[inline] + pub fn filtering(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(ChangeSettingsRequest::VT_FILTERING, None)} + } + #[inline] + pub fn drift_compensation(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(ChangeSettingsRequest::VT_DRIFT_COMPENSATION, None)} + } + #[inline] + pub fn osc_router(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(ChangeSettingsRequest::VT_OSC_ROUTER, None)} + } + #[inline] + pub fn vrc_osc(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(ChangeSettingsRequest::VT_VRC_OSC, None)} + } + #[inline] + pub fn vmc_osc(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(ChangeSettingsRequest::VT_VMC_OSC, None)} + } + #[inline] + pub fn model_settings(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(ChangeSettingsRequest::VT_MODEL_SETTINGS, None)} + } + #[inline] + pub fn tap_detection_settings(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(ChangeSettingsRequest::VT_TAP_DETECTION_SETTINGS, None)} + } + #[inline] + pub fn auto_bone_settings(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(ChangeSettingsRequest::VT_AUTO_BONE_SETTINGS, None)} + } + #[inline] + pub fn resets_settings(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(ChangeSettingsRequest::VT_RESETS_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::>("drift_compensation", Self::VT_DRIFT_COMPENSATION, false)? + .visit_field::>("osc_router", Self::VT_OSC_ROUTER, false)? + .visit_field::>("vrc_osc", Self::VT_VRC_OSC, false)? + .visit_field::>("vmc_osc", Self::VT_VMC_OSC, false)? + .visit_field::>("model_settings", Self::VT_MODEL_SETTINGS, false)? + .visit_field::>("tap_detection_settings", Self::VT_TAP_DETECTION_SETTINGS, false)? + .visit_field::>("auto_bone_settings", Self::VT_AUTO_BONE_SETTINGS, false)? + .visit_field::>("resets_settings", Self::VT_RESETS_SETTINGS, false)? + .finish(); + Ok(()) + } +} +pub struct ChangeSettingsRequestArgs<'a> { + pub steam_vr_trackers: Option>>, + pub filtering: Option>>, + pub drift_compensation: Option>>, + pub osc_router: Option>>, + pub vrc_osc: Option>>, + pub vmc_osc: Option>>, + pub model_settings: Option>>, + pub tap_detection_settings: Option>>, + pub auto_bone_settings: Option>>, + pub resets_settings: Option>>, +} +impl<'a> Default for ChangeSettingsRequestArgs<'a> { + #[inline] + fn default() -> Self { + ChangeSettingsRequestArgs { + steam_vr_trackers: None, + filtering: None, + drift_compensation: None, + osc_router: None, + vrc_osc: None, + vmc_osc: None, + model_settings: None, + tap_detection_settings: None, + auto_bone_settings: None, + resets_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_drift_compensation(&mut self, drift_compensation: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_DRIFT_COMPENSATION, drift_compensation); + } + #[inline] + pub fn add_osc_router(&mut self, osc_router: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_OSC_ROUTER, osc_router); + } + #[inline] + pub fn add_vrc_osc(&mut self, vrc_osc: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_VRC_OSC, vrc_osc); + } + #[inline] + pub fn add_vmc_osc(&mut self, vmc_osc: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_VMC_OSC, vmc_osc); + } + #[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 add_tap_detection_settings(&mut self, tap_detection_settings: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_TAP_DETECTION_SETTINGS, tap_detection_settings); + } + #[inline] + pub fn add_auto_bone_settings(&mut self, auto_bone_settings: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_AUTO_BONE_SETTINGS, auto_bone_settings); + } + #[inline] + pub fn add_resets_settings(&mut self, resets_settings: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_RESETS_SETTINGS, resets_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("drift_compensation", &self.drift_compensation()); + ds.field("osc_router", &self.osc_router()); + ds.field("vrc_osc", &self.vrc_osc()); + ds.field("vmc_osc", &self.vmc_osc()); + ds.field("model_settings", &self.model_settings()); + ds.field("tap_detection_settings", &self.tap_detection_settings()); + ds.field("auto_bone_settings", &self.auto_bone_settings()); + ds.field("resets_settings", &self.resets_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 1cbb7256..99cf0db4 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,125 +1,125 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> ChangeSkeletonConfigRequest<'a> { - pub const VT_BONE: flatbuffers::VOffsetT = 4; - pub const VT_VALUE: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ChangeSkeletonConfigRequest::VT_BONE, Some(SkeletonBone::NONE)).unwrap()} - } - #[inline] - pub fn value(&self) -> f32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> ChangeSkeletonConfigRequest<'a> { + pub const VT_BONE: flatbuffers::VOffsetT = 4; + pub const VT_VALUE: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ChangeSkeletonConfigRequest::VT_BONE, Some(SkeletonBone::NONE)).unwrap()} + } + #[inline] + pub fn value(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/clear_drift_compensation_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/clear_drift_compensation_request_generated.rs index 9f058130..00de401b 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/clear_drift_compensation_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/clear_drift_compensation_request_generated.rs @@ -1,90 +1,90 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum ClearDriftCompensationRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct ClearDriftCompensationRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for ClearDriftCompensationRequest<'a> { - type Inner = ClearDriftCompensationRequest<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> ClearDriftCompensationRequest<'a> { - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - ClearDriftCompensationRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args ClearDriftCompensationRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = ClearDriftCompensationRequestBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for ClearDriftCompensationRequest<'_> { - #[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 ClearDriftCompensationRequestArgs { -} -impl<'a> Default for ClearDriftCompensationRequestArgs { - #[inline] - fn default() -> Self { - ClearDriftCompensationRequestArgs { - } - } -} - -pub struct ClearDriftCompensationRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> ClearDriftCompensationRequestBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ClearDriftCompensationRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - ClearDriftCompensationRequestBuilder { - 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 ClearDriftCompensationRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("ClearDriftCompensationRequest"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum ClearDriftCompensationRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct ClearDriftCompensationRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for ClearDriftCompensationRequest<'a> { + type Inner = ClearDriftCompensationRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> ClearDriftCompensationRequest<'a> { + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ClearDriftCompensationRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args ClearDriftCompensationRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = ClearDriftCompensationRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for ClearDriftCompensationRequest<'_> { + #[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 ClearDriftCompensationRequestArgs { +} +impl<'a> Default for ClearDriftCompensationRequestArgs { + #[inline] + fn default() -> Self { + ClearDriftCompensationRequestArgs { + } + } +} + +pub struct ClearDriftCompensationRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> ClearDriftCompensationRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ClearDriftCompensationRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + ClearDriftCompensationRequestBuilder { + 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 ClearDriftCompensationRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("ClearDriftCompensationRequest"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/clear_mounting_reset_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/clear_mounting_reset_request_generated.rs index 3113687d..e98aa705 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/clear_mounting_reset_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/clear_mounting_reset_request_generated.rs @@ -1,91 +1,91 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum ClearMountingResetRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Clears mounting reset data, defaulting to the manually set mounting orientations -pub struct ClearMountingResetRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for ClearMountingResetRequest<'a> { - type Inner = ClearMountingResetRequest<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> ClearMountingResetRequest<'a> { - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - ClearMountingResetRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args ClearMountingResetRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = ClearMountingResetRequestBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for ClearMountingResetRequest<'_> { - #[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 ClearMountingResetRequestArgs { -} -impl<'a> Default for ClearMountingResetRequestArgs { - #[inline] - fn default() -> Self { - ClearMountingResetRequestArgs { - } - } -} - -pub struct ClearMountingResetRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> ClearMountingResetRequestBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ClearMountingResetRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - ClearMountingResetRequestBuilder { - 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 ClearMountingResetRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("ClearMountingResetRequest"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum ClearMountingResetRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Clears mounting reset data, defaulting to the manually set mounting orientations +pub struct ClearMountingResetRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for ClearMountingResetRequest<'a> { + type Inner = ClearMountingResetRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> ClearMountingResetRequest<'a> { + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ClearMountingResetRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args ClearMountingResetRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = ClearMountingResetRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for ClearMountingResetRequest<'_> { + #[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 ClearMountingResetRequestArgs { +} +impl<'a> Default for ClearMountingResetRequestArgs { + #[inline] + fn default() -> Self { + ClearMountingResetRequestArgs { + } + } +} + +pub struct ClearMountingResetRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> ClearMountingResetRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ClearMountingResetRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + ClearMountingResetRequestBuilder { + 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 ClearMountingResetRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("ClearMountingResetRequest"); + 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 c62602b0..df19b3c1 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,90 +1,90 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> CloseSerialRequest<'a> { - - #[inline] - pub unsafe 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> CloseSerialRequest<'a> { + + #[inline] + pub unsafe 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() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/computer_directory_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/computer_directory_generated.rs index 77e30ac3..950093d2 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/computer_directory_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/computer_directory_generated.rs @@ -1,93 +1,93 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_COMPUTER_DIRECTORY: u8 = 0; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_COMPUTER_DIRECTORY: u8 = 0; -#[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_COMPUTER_DIRECTORY: [ComputerDirectory; 1] = [ - ComputerDirectory::Documents, -]; - -/// Common folders often used in computers for storing files -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[repr(transparent)] -pub struct ComputerDirectory(pub u8); -#[allow(non_upper_case_globals)] -impl ComputerDirectory { - pub const Documents: Self = Self(0); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 0; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::Documents, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::Documents => Some("Documents"), - _ => None, - } - } -} -impl core::fmt::Debug for ComputerDirectory { - 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 ComputerDirectory { - type Inner = Self; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for ComputerDirectory { - type Output = ComputerDirectory; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for ComputerDirectory { - type Scalar = u8; - #[inline] - fn to_little_endian(self) -> u8 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u8) -> Self { - let b = u8::from_le(v); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for ComputerDirectory { - #[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 ComputerDirectory {} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_COMPUTER_DIRECTORY: u8 = 0; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MAX_COMPUTER_DIRECTORY: u8 = 0; +#[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_COMPUTER_DIRECTORY: [ComputerDirectory; 1] = [ + ComputerDirectory::Documents, +]; + +/// Common folders often used in computers for storing files +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct ComputerDirectory(pub u8); +#[allow(non_upper_case_globals)] +impl ComputerDirectory { + pub const Documents: Self = Self(0); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 0; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::Documents, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::Documents => Some("Documents"), + _ => None, + } + } +} +impl core::fmt::Debug for ComputerDirectory { + 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 ComputerDirectory { + type Inner = Self; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for ComputerDirectory { + type Output = ComputerDirectory; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for ComputerDirectory { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for ComputerDirectory { + #[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 ComputerDirectory {} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/drift_compensation_settings_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/drift_compensation_settings_generated.rs index ce528673..3d7ecca2 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/drift_compensation_settings_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/drift_compensation_settings_generated.rs @@ -1,145 +1,145 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum DriftCompensationSettingsOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Settings related to IMU yaw drift compensation -pub struct DriftCompensationSettings<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for DriftCompensationSettings<'a> { - type Inner = DriftCompensationSettings<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> DriftCompensationSettings<'a> { - pub const VT_ENABLED: flatbuffers::VOffsetT = 4; - pub const VT_AMOUNT: flatbuffers::VOffsetT = 6; - pub const VT_MAX_RESETS: flatbuffers::VOffsetT = 8; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - DriftCompensationSettings { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args DriftCompensationSettingsArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = DriftCompensationSettingsBuilder::new(_fbb); - builder.add_amount(args.amount); - builder.add_max_resets(args.max_resets); - builder.add_enabled(args.enabled); - builder.finish() - } - - - #[inline] - pub fn enabled(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(DriftCompensationSettings::VT_ENABLED, Some(false)).unwrap()} - } - /// 0 to 1. A higher value results in more yaw drift compensation - #[inline] - pub fn amount(&self) -> f32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(DriftCompensationSettings::VT_AMOUNT, Some(0.0)).unwrap()} - } - /// Number of previous resets to take into account when calculating yaw drift - #[inline] - pub fn max_resets(&self) -> u16 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(DriftCompensationSettings::VT_MAX_RESETS, Some(0)).unwrap()} - } -} - -impl flatbuffers::Verifiable for DriftCompensationSettings<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("enabled", Self::VT_ENABLED, false)? - .visit_field::("amount", Self::VT_AMOUNT, false)? - .visit_field::("max_resets", Self::VT_MAX_RESETS, false)? - .finish(); - Ok(()) - } -} -pub struct DriftCompensationSettingsArgs { - pub enabled: bool, - pub amount: f32, - pub max_resets: u16, -} -impl<'a> Default for DriftCompensationSettingsArgs { - #[inline] - fn default() -> Self { - DriftCompensationSettingsArgs { - enabled: false, - amount: 0.0, - max_resets: 0, - } - } -} - -pub struct DriftCompensationSettingsBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> DriftCompensationSettingsBuilder<'a, 'b> { - #[inline] - pub fn add_enabled(&mut self, enabled: bool) { - self.fbb_.push_slot::(DriftCompensationSettings::VT_ENABLED, enabled, false); - } - #[inline] - pub fn add_amount(&mut self, amount: f32) { - self.fbb_.push_slot::(DriftCompensationSettings::VT_AMOUNT, amount, 0.0); - } - #[inline] - pub fn add_max_resets(&mut self, max_resets: u16) { - self.fbb_.push_slot::(DriftCompensationSettings::VT_MAX_RESETS, max_resets, 0); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> DriftCompensationSettingsBuilder<'a, 'b> { - let start = _fbb.start_table(); - DriftCompensationSettingsBuilder { - 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 DriftCompensationSettings<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("DriftCompensationSettings"); - ds.field("enabled", &self.enabled()); - ds.field("amount", &self.amount()); - ds.field("max_resets", &self.max_resets()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum DriftCompensationSettingsOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Settings related to IMU yaw drift compensation +pub struct DriftCompensationSettings<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for DriftCompensationSettings<'a> { + type Inner = DriftCompensationSettings<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> DriftCompensationSettings<'a> { + pub const VT_ENABLED: flatbuffers::VOffsetT = 4; + pub const VT_AMOUNT: flatbuffers::VOffsetT = 6; + pub const VT_MAX_RESETS: flatbuffers::VOffsetT = 8; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + DriftCompensationSettings { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args DriftCompensationSettingsArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = DriftCompensationSettingsBuilder::new(_fbb); + builder.add_amount(args.amount); + builder.add_max_resets(args.max_resets); + builder.add_enabled(args.enabled); + builder.finish() + } + + + #[inline] + pub fn enabled(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(DriftCompensationSettings::VT_ENABLED, Some(false)).unwrap()} + } + /// 0 to 1. A higher value results in more yaw drift compensation + #[inline] + pub fn amount(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(DriftCompensationSettings::VT_AMOUNT, Some(0.0)).unwrap()} + } + /// Number of previous resets to take into account when calculating yaw drift + #[inline] + pub fn max_resets(&self) -> u16 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(DriftCompensationSettings::VT_MAX_RESETS, Some(0)).unwrap()} + } +} + +impl flatbuffers::Verifiable for DriftCompensationSettings<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("enabled", Self::VT_ENABLED, false)? + .visit_field::("amount", Self::VT_AMOUNT, false)? + .visit_field::("max_resets", Self::VT_MAX_RESETS, false)? + .finish(); + Ok(()) + } +} +pub struct DriftCompensationSettingsArgs { + pub enabled: bool, + pub amount: f32, + pub max_resets: u16, +} +impl<'a> Default for DriftCompensationSettingsArgs { + #[inline] + fn default() -> Self { + DriftCompensationSettingsArgs { + enabled: false, + amount: 0.0, + max_resets: 0, + } + } +} + +pub struct DriftCompensationSettingsBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> DriftCompensationSettingsBuilder<'a, 'b> { + #[inline] + pub fn add_enabled(&mut self, enabled: bool) { + self.fbb_.push_slot::(DriftCompensationSettings::VT_ENABLED, enabled, false); + } + #[inline] + pub fn add_amount(&mut self, amount: f32) { + self.fbb_.push_slot::(DriftCompensationSettings::VT_AMOUNT, amount, 0.0); + } + #[inline] + pub fn add_max_resets(&mut self, max_resets: u16) { + self.fbb_.push_slot::(DriftCompensationSettings::VT_MAX_RESETS, max_resets, 0); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> DriftCompensationSettingsBuilder<'a, 'b> { + let start = _fbb.start_table(); + DriftCompensationSettingsBuilder { + 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 DriftCompensationSettings<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("DriftCompensationSettings"); + ds.field("enabled", &self.enabled()); + ds.field("amount", &self.amount()); + ds.field("max_resets", &self.max_resets()); + 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 15054562..0bda63da 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,126 +1,126 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> FilteringSettings<'a> { - pub const VT_TYPE_: flatbuffers::VOffsetT = 4; - pub const VT_AMOUNT: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> FilteringSettings<'a> { + pub const VT_TYPE_: flatbuffers::VOffsetT = 4; + pub const VT_AMOUNT: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_part_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_part_generated.rs new file mode 100644 index 00000000..22a739b6 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_part_generated.rs @@ -0,0 +1,128 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum FirmwarePartOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct FirmwarePart<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for FirmwarePart<'a> { + type Inner = FirmwarePart<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> FirmwarePart<'a> { + pub const VT_URL: flatbuffers::VOffsetT = 4; + pub const VT_OFFSET: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + FirmwarePart { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args FirmwarePartArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = FirmwarePartBuilder::new(_fbb); + builder.add_offset(args.offset); + if let Some(x) = args.url { builder.add_url(x); } + builder.finish() + } + + + /// Url of the firmware bin to download + #[inline] + pub fn url(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(FirmwarePart::VT_URL, None)} + } + /// Offset of the firmware, used when flashing to the mcu, it indicates where to write this file in memory + /// Will be ignored in the case of OTA flashing + #[inline] + pub fn offset(&self) -> u32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(FirmwarePart::VT_OFFSET, Some(0)).unwrap()} + } +} + +impl flatbuffers::Verifiable for FirmwarePart<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("url", Self::VT_URL, false)? + .visit_field::("offset", Self::VT_OFFSET, false)? + .finish(); + Ok(()) + } +} +pub struct FirmwarePartArgs<'a> { + pub url: Option>, + pub offset: u32, +} +impl<'a> Default for FirmwarePartArgs<'a> { + #[inline] + fn default() -> Self { + FirmwarePartArgs { + url: None, + offset: 0, + } + } +} + +pub struct FirmwarePartBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> FirmwarePartBuilder<'a, 'b> { + #[inline] + pub fn add_url(&mut self, url: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(FirmwarePart::VT_URL, url); + } + #[inline] + pub fn add_offset(&mut self, offset: u32) { + self.fbb_.push_slot::(FirmwarePart::VT_OFFSET, offset, 0); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> FirmwarePartBuilder<'a, 'b> { + let start = _fbb.start_table(); + FirmwarePartBuilder { + 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 FirmwarePart<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("FirmwarePart"); + ds.field("url", &self.url()); + ds.field("offset", &self.offset()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_update_device_id_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_update_device_id_generated.rs new file mode 100644 index 00000000..843b965c --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_update_device_id_generated.rs @@ -0,0 +1,102 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_FIRMWARE_UPDATE_DEVICE_ID: 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_UPDATE_DEVICE_ID: 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_FIRMWARE_UPDATE_DEVICE_ID: [FirmwareUpdateDeviceId; 3] = [ + FirmwareUpdateDeviceId::NONE, + FirmwareUpdateDeviceId::solarxr_protocol_datatypes_DeviceIdTable, + FirmwareUpdateDeviceId::SerialDevicePort, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct FirmwareUpdateDeviceId(pub u8); +#[allow(non_upper_case_globals)] +impl FirmwareUpdateDeviceId { + pub const NONE: Self = Self(0); + pub const solarxr_protocol_datatypes_DeviceIdTable: Self = Self(1); + pub const SerialDevicePort: Self = Self(2); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 2; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::NONE, + Self::solarxr_protocol_datatypes_DeviceIdTable, + Self::SerialDevicePort, + ]; + /// 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_DeviceIdTable => Some("solarxr_protocol_datatypes_DeviceIdTable"), + Self::SerialDevicePort => Some("SerialDevicePort"), + _ => None, + } + } +} +impl core::fmt::Debug for FirmwareUpdateDeviceId { + 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 FirmwareUpdateDeviceId { + type Inner = Self; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for FirmwareUpdateDeviceId { + type Output = FirmwareUpdateDeviceId; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for FirmwareUpdateDeviceId { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for FirmwareUpdateDeviceId { + #[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 FirmwareUpdateDeviceId {} +pub struct FirmwareUpdateDeviceIdUnionTableOffset {} + diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_update_method_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_update_method_generated.rs new file mode 100644 index 00000000..9dfa4b56 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_update_method_generated.rs @@ -0,0 +1,102 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_FIRMWARE_UPDATE_METHOD: 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_UPDATE_METHOD: 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_FIRMWARE_UPDATE_METHOD: [FirmwareUpdateMethod; 3] = [ + FirmwareUpdateMethod::NONE, + FirmwareUpdateMethod::OTAFirmwareUpdate, + FirmwareUpdateMethod::SerialFirmwareUpdate, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct FirmwareUpdateMethod(pub u8); +#[allow(non_upper_case_globals)] +impl FirmwareUpdateMethod { + pub const NONE: Self = Self(0); + pub const OTAFirmwareUpdate: Self = Self(1); + pub const SerialFirmwareUpdate: Self = Self(2); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 2; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::NONE, + Self::OTAFirmwareUpdate, + Self::SerialFirmwareUpdate, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::NONE => Some("NONE"), + Self::OTAFirmwareUpdate => Some("OTAFirmwareUpdate"), + Self::SerialFirmwareUpdate => Some("SerialFirmwareUpdate"), + _ => None, + } + } +} +impl core::fmt::Debug for FirmwareUpdateMethod { + 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 FirmwareUpdateMethod { + type Inner = Self; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for FirmwareUpdateMethod { + type Output = FirmwareUpdateMethod; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for FirmwareUpdateMethod { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for FirmwareUpdateMethod { + #[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 FirmwareUpdateMethod {} +pub struct FirmwareUpdateMethodUnionTableOffset {} + diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_update_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_update_request_generated.rs new file mode 100644 index 00000000..e799baec --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_update_request_generated.rs @@ -0,0 +1,179 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum FirmwareUpdateRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct FirmwareUpdateRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for FirmwareUpdateRequest<'a> { + type Inner = FirmwareUpdateRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> FirmwareUpdateRequest<'a> { + pub const VT_METHOD_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_METHOD: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + FirmwareUpdateRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args FirmwareUpdateRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = FirmwareUpdateRequestBuilder::new(_fbb); + if let Some(x) = args.method { builder.add_method(x); } + builder.add_method_type(args.method_type); + builder.finish() + } + + + #[inline] + pub fn method_type(&self) -> FirmwareUpdateMethod { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(FirmwareUpdateRequest::VT_METHOD_TYPE, Some(FirmwareUpdateMethod::NONE)).unwrap()} + } + #[inline] + pub fn method(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(FirmwareUpdateRequest::VT_METHOD, None)} + } + #[inline] + #[allow(non_snake_case)] + pub fn method_as_otafirmware_update(&self) -> Option> { + if self.method_type() == FirmwareUpdateMethod::OTAFirmwareUpdate { + self.method().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { OTAFirmwareUpdate::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn method_as_serial_firmware_update(&self) -> Option> { + if self.method_type() == FirmwareUpdateMethod::SerialFirmwareUpdate { + self.method().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { SerialFirmwareUpdate::init_from_table(t) } + }) + } else { + None + } + } + +} + +impl flatbuffers::Verifiable for FirmwareUpdateRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_union::("method_type", Self::VT_METHOD_TYPE, "method", Self::VT_METHOD, false, |key, v, pos| { + match key { + FirmwareUpdateMethod::OTAFirmwareUpdate => v.verify_union_variant::>("FirmwareUpdateMethod::OTAFirmwareUpdate", pos), + FirmwareUpdateMethod::SerialFirmwareUpdate => v.verify_union_variant::>("FirmwareUpdateMethod::SerialFirmwareUpdate", pos), + _ => Ok(()), + } + })? + .finish(); + Ok(()) + } +} +pub struct FirmwareUpdateRequestArgs { + pub method_type: FirmwareUpdateMethod, + pub method: Option>, +} +impl<'a> Default for FirmwareUpdateRequestArgs { + #[inline] + fn default() -> Self { + FirmwareUpdateRequestArgs { + method_type: FirmwareUpdateMethod::NONE, + method: None, + } + } +} + +pub struct FirmwareUpdateRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> FirmwareUpdateRequestBuilder<'a, 'b> { + #[inline] + pub fn add_method_type(&mut self, method_type: FirmwareUpdateMethod) { + self.fbb_.push_slot::(FirmwareUpdateRequest::VT_METHOD_TYPE, method_type, FirmwareUpdateMethod::NONE); + } + #[inline] + pub fn add_method(&mut self, method: flatbuffers::WIPOffset) { + self.fbb_.push_slot_always::>(FirmwareUpdateRequest::VT_METHOD, method); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> FirmwareUpdateRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + FirmwareUpdateRequestBuilder { + 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 FirmwareUpdateRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("FirmwareUpdateRequest"); + ds.field("method_type", &self.method_type()); + match self.method_type() { + FirmwareUpdateMethod::OTAFirmwareUpdate => { + if let Some(x) = self.method_as_otafirmware_update() { + ds.field("method", &x) + } else { + ds.field("method", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + FirmwareUpdateMethod::SerialFirmwareUpdate => { + if let Some(x) = self.method_as_serial_firmware_update() { + ds.field("method", &x) + } else { + ds.field("method", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + _ => { + let x: Option<()> = None; + ds.field("method", &x) + }, + }; + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_update_status_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_update_status_generated.rs new file mode 100644 index 00000000..05979bf5 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_update_status_generated.rs @@ -0,0 +1,168 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_FIRMWARE_UPDATE_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_FIRMWARE_UPDATE_STATUS: u8 = 15; +#[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_UPDATE_STATUS: [FirmwareUpdateStatus; 16] = [ + FirmwareUpdateStatus::DOWNLOADING, + FirmwareUpdateStatus::NEED_MANUAL_REBOOT, + FirmwareUpdateStatus::AUTHENTICATING, + FirmwareUpdateStatus::UPLOADING, + FirmwareUpdateStatus::SYNCING_WITH_MCU, + FirmwareUpdateStatus::REBOOTING, + FirmwareUpdateStatus::PROVISIONING, + FirmwareUpdateStatus::DONE, + FirmwareUpdateStatus::ERROR_DEVICE_NOT_FOUND, + FirmwareUpdateStatus::ERROR_TIMEOUT, + FirmwareUpdateStatus::ERROR_DOWNLOAD_FAILED, + FirmwareUpdateStatus::ERROR_AUTHENTICATION_FAILED, + FirmwareUpdateStatus::ERROR_UPLOAD_FAILED, + FirmwareUpdateStatus::ERROR_PROVISIONING_FAILED, + FirmwareUpdateStatus::ERROR_UNSUPPORTED_METHOD, + FirmwareUpdateStatus::ERROR_UNKNOWN, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct FirmwareUpdateStatus(pub u8); +#[allow(non_upper_case_globals)] +impl FirmwareUpdateStatus { + /// The server is downloading the firmware + pub const DOWNLOADING: Self = Self(0); + /// The server is waiting for the tracker to be rebooted by the user + /// Note that is is not the same as REBOOTING + pub const NEED_MANUAL_REBOOT: Self = Self(1); + /// The server tries to authenticate with the MCU + pub const AUTHENTICATING: Self = Self(2); + /// The server is uploading the firmware to the Device + pub const UPLOADING: Self = Self(3); + /// The serial flasher tries to sync with the MCU + /// You can use this event to prompt the user to press the boot btn + pub const SYNCING_WITH_MCU: Self = Self(4); + /// The MCU is rebooting + pub const REBOOTING: Self = Self(5); + /// The server is provisioning the tracker + pub const PROVISIONING: Self = Self(6); + pub const DONE: Self = Self(7); + /// Could not find the device + pub const ERROR_DEVICE_NOT_FOUND: Self = Self(8); + /// The operation timed out, > 1min + pub const ERROR_TIMEOUT: Self = Self(9); + /// The firmware download failed + pub const ERROR_DOWNLOAD_FAILED: Self = Self(10); + /// The server could not authenticate with the MCU + pub const ERROR_AUTHENTICATION_FAILED: Self = Self(11); + /// Could not upload the firmware to the MUC + pub const ERROR_UPLOAD_FAILED: Self = Self(12); + /// The provision of the tracker failed, usually wifi credentials + pub const ERROR_PROVISIONING_FAILED: Self = Self(13); + /// An unsupported Flashing method was used + pub const ERROR_UNSUPPORTED_METHOD: Self = Self(14); + pub const ERROR_UNKNOWN: Self = Self(15); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 15; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::DOWNLOADING, + Self::NEED_MANUAL_REBOOT, + Self::AUTHENTICATING, + Self::UPLOADING, + Self::SYNCING_WITH_MCU, + Self::REBOOTING, + Self::PROVISIONING, + Self::DONE, + Self::ERROR_DEVICE_NOT_FOUND, + Self::ERROR_TIMEOUT, + Self::ERROR_DOWNLOAD_FAILED, + Self::ERROR_AUTHENTICATION_FAILED, + Self::ERROR_UPLOAD_FAILED, + Self::ERROR_PROVISIONING_FAILED, + Self::ERROR_UNSUPPORTED_METHOD, + Self::ERROR_UNKNOWN, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::DOWNLOADING => Some("DOWNLOADING"), + Self::NEED_MANUAL_REBOOT => Some("NEED_MANUAL_REBOOT"), + Self::AUTHENTICATING => Some("AUTHENTICATING"), + Self::UPLOADING => Some("UPLOADING"), + Self::SYNCING_WITH_MCU => Some("SYNCING_WITH_MCU"), + Self::REBOOTING => Some("REBOOTING"), + Self::PROVISIONING => Some("PROVISIONING"), + Self::DONE => Some("DONE"), + Self::ERROR_DEVICE_NOT_FOUND => Some("ERROR_DEVICE_NOT_FOUND"), + Self::ERROR_TIMEOUT => Some("ERROR_TIMEOUT"), + Self::ERROR_DOWNLOAD_FAILED => Some("ERROR_DOWNLOAD_FAILED"), + Self::ERROR_AUTHENTICATION_FAILED => Some("ERROR_AUTHENTICATION_FAILED"), + Self::ERROR_UPLOAD_FAILED => Some("ERROR_UPLOAD_FAILED"), + Self::ERROR_PROVISIONING_FAILED => Some("ERROR_PROVISIONING_FAILED"), + Self::ERROR_UNSUPPORTED_METHOD => Some("ERROR_UNSUPPORTED_METHOD"), + Self::ERROR_UNKNOWN => Some("ERROR_UNKNOWN"), + _ => None, + } + } +} +impl core::fmt::Debug for FirmwareUpdateStatus { + 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 FirmwareUpdateStatus { + type Inner = Self; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for FirmwareUpdateStatus { + type Output = FirmwareUpdateStatus; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for FirmwareUpdateStatus { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for FirmwareUpdateStatus { + #[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 FirmwareUpdateStatus {} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_update_status_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_update_status_response_generated.rs new file mode 100644 index 00000000..d12a3cf8 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_update_status_response_generated.rs @@ -0,0 +1,214 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum FirmwareUpdateStatusResponseOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct FirmwareUpdateStatusResponse<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for FirmwareUpdateStatusResponse<'a> { + type Inner = FirmwareUpdateStatusResponse<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> FirmwareUpdateStatusResponse<'a> { + pub const VT_DEVICE_ID_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_DEVICE_ID: flatbuffers::VOffsetT = 6; + pub const VT_STATUS: flatbuffers::VOffsetT = 8; + pub const VT_PROGRESS: flatbuffers::VOffsetT = 10; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + FirmwareUpdateStatusResponse { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args FirmwareUpdateStatusResponseArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = FirmwareUpdateStatusResponseBuilder::new(_fbb); + if let Some(x) = args.device_id { builder.add_device_id(x); } + builder.add_progress(args.progress); + builder.add_status(args.status); + builder.add_device_id_type(args.device_id_type); + builder.finish() + } + + + #[inline] + pub fn device_id_type(&self) -> FirmwareUpdateDeviceId { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(FirmwareUpdateStatusResponse::VT_DEVICE_ID_TYPE, Some(FirmwareUpdateDeviceId::NONE)).unwrap()} + } + #[inline] + pub fn device_id(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(FirmwareUpdateStatusResponse::VT_DEVICE_ID, None)} + } + #[inline] + pub fn status(&self) -> FirmwareUpdateStatus { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(FirmwareUpdateStatusResponse::VT_STATUS, Some(FirmwareUpdateStatus::DOWNLOADING)).unwrap()} + } + /// from 0 to 100 + #[inline] + pub fn progress(&self) -> i8 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(FirmwareUpdateStatusResponse::VT_PROGRESS, Some(0)).unwrap()} + } + #[inline] + #[allow(non_snake_case)] + pub fn device_id_as_solarxr_protocol_datatypes_device_id_table(&self) -> Option> { + if self.device_id_type() == FirmwareUpdateDeviceId::solarxr_protocol_datatypes_DeviceIdTable { + self.device_id().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { super::datatypes::DeviceIdTable::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn device_id_as_serial_device_port(&self) -> Option> { + if self.device_id_type() == FirmwareUpdateDeviceId::SerialDevicePort { + self.device_id().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { SerialDevicePort::init_from_table(t) } + }) + } else { + None + } + } + +} + +impl flatbuffers::Verifiable for FirmwareUpdateStatusResponse<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_union::("device_id_type", Self::VT_DEVICE_ID_TYPE, "device_id", Self::VT_DEVICE_ID, false, |key, v, pos| { + match key { + FirmwareUpdateDeviceId::solarxr_protocol_datatypes_DeviceIdTable => v.verify_union_variant::>("FirmwareUpdateDeviceId::solarxr_protocol_datatypes_DeviceIdTable", pos), + FirmwareUpdateDeviceId::SerialDevicePort => v.verify_union_variant::>("FirmwareUpdateDeviceId::SerialDevicePort", pos), + _ => Ok(()), + } + })? + .visit_field::("status", Self::VT_STATUS, false)? + .visit_field::("progress", Self::VT_PROGRESS, false)? + .finish(); + Ok(()) + } +} +pub struct FirmwareUpdateStatusResponseArgs { + pub device_id_type: FirmwareUpdateDeviceId, + pub device_id: Option>, + pub status: FirmwareUpdateStatus, + pub progress: i8, +} +impl<'a> Default for FirmwareUpdateStatusResponseArgs { + #[inline] + fn default() -> Self { + FirmwareUpdateStatusResponseArgs { + device_id_type: FirmwareUpdateDeviceId::NONE, + device_id: None, + status: FirmwareUpdateStatus::DOWNLOADING, + progress: 0, + } + } +} + +pub struct FirmwareUpdateStatusResponseBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> FirmwareUpdateStatusResponseBuilder<'a, 'b> { + #[inline] + pub fn add_device_id_type(&mut self, device_id_type: FirmwareUpdateDeviceId) { + self.fbb_.push_slot::(FirmwareUpdateStatusResponse::VT_DEVICE_ID_TYPE, device_id_type, FirmwareUpdateDeviceId::NONE); + } + #[inline] + pub fn add_device_id(&mut self, device_id: flatbuffers::WIPOffset) { + self.fbb_.push_slot_always::>(FirmwareUpdateStatusResponse::VT_DEVICE_ID, device_id); + } + #[inline] + pub fn add_status(&mut self, status: FirmwareUpdateStatus) { + self.fbb_.push_slot::(FirmwareUpdateStatusResponse::VT_STATUS, status, FirmwareUpdateStatus::DOWNLOADING); + } + #[inline] + pub fn add_progress(&mut self, progress: i8) { + self.fbb_.push_slot::(FirmwareUpdateStatusResponse::VT_PROGRESS, progress, 0); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> FirmwareUpdateStatusResponseBuilder<'a, 'b> { + let start = _fbb.start_table(); + FirmwareUpdateStatusResponseBuilder { + 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 FirmwareUpdateStatusResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("FirmwareUpdateStatusResponse"); + ds.field("device_id_type", &self.device_id_type()); + match self.device_id_type() { + FirmwareUpdateDeviceId::solarxr_protocol_datatypes_DeviceIdTable => { + if let Some(x) = self.device_id_as_solarxr_protocol_datatypes_device_id_table() { + ds.field("device_id", &x) + } else { + ds.field("device_id", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + FirmwareUpdateDeviceId::SerialDevicePort => { + if let Some(x) = self.device_id_as_serial_device_port() { + ds.field("device_id", &x) + } else { + ds.field("device_id", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + _ => { + let x: Option<()> = None; + ds.field("device_id", &x) + }, + }; + ds.field("status", &self.status()); + ds.field("progress", &self.progress()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_update_stop_queues_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_update_stop_queues_request_generated.rs new file mode 100644 index 00000000..903da489 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/firmware_update_stop_queues_request_generated.rs @@ -0,0 +1,90 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum FirmwareUpdateStopQueuesRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct FirmwareUpdateStopQueuesRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for FirmwareUpdateStopQueuesRequest<'a> { + type Inner = FirmwareUpdateStopQueuesRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> FirmwareUpdateStopQueuesRequest<'a> { + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + FirmwareUpdateStopQueuesRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args FirmwareUpdateStopQueuesRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = FirmwareUpdateStopQueuesRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for FirmwareUpdateStopQueuesRequest<'_> { + #[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 FirmwareUpdateStopQueuesRequestArgs { +} +impl<'a> Default for FirmwareUpdateStopQueuesRequestArgs { + #[inline] + fn default() -> Self { + FirmwareUpdateStopQueuesRequestArgs { + } + } +} + +pub struct FirmwareUpdateStopQueuesRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> FirmwareUpdateStopQueuesRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> FirmwareUpdateStopQueuesRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + FirmwareUpdateStopQueuesRequestBuilder { + 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 FirmwareUpdateStopQueuesRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("FirmwareUpdateStopQueuesRequest"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/forget_device_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/forget_device_request_generated.rs index ef85aafb..731e3a5f 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/forget_device_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/forget_device_request_generated.rs @@ -1,108 +1,108 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum ForgetDeviceRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct ForgetDeviceRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for ForgetDeviceRequest<'a> { - type Inner = ForgetDeviceRequest<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> ForgetDeviceRequest<'a> { - pub const VT_MAC_ADDRESS: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - ForgetDeviceRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args ForgetDeviceRequestArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = ForgetDeviceRequestBuilder::new(_fbb); - if let Some(x) = args.mac_address { builder.add_mac_address(x); } - builder.finish() - } - - - #[inline] - pub fn mac_address(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ForgetDeviceRequest::VT_MAC_ADDRESS, None)} - } -} - -impl flatbuffers::Verifiable for ForgetDeviceRequest<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("mac_address", Self::VT_MAC_ADDRESS, false)? - .finish(); - Ok(()) - } -} -pub struct ForgetDeviceRequestArgs<'a> { - pub mac_address: Option>, -} -impl<'a> Default for ForgetDeviceRequestArgs<'a> { - #[inline] - fn default() -> Self { - ForgetDeviceRequestArgs { - mac_address: None, - } - } -} - -pub struct ForgetDeviceRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> ForgetDeviceRequestBuilder<'a, 'b> { - #[inline] - pub fn add_mac_address(&mut self, mac_address: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(ForgetDeviceRequest::VT_MAC_ADDRESS, mac_address); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ForgetDeviceRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - ForgetDeviceRequestBuilder { - fbb_: _fbb, - start_: start, - } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } -} - -impl core::fmt::Debug for ForgetDeviceRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("ForgetDeviceRequest"); - ds.field("mac_address", &self.mac_address()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum ForgetDeviceRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct ForgetDeviceRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for ForgetDeviceRequest<'a> { + type Inner = ForgetDeviceRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> ForgetDeviceRequest<'a> { + pub const VT_MAC_ADDRESS: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ForgetDeviceRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args ForgetDeviceRequestArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = ForgetDeviceRequestBuilder::new(_fbb); + if let Some(x) = args.mac_address { builder.add_mac_address(x); } + builder.finish() + } + + + #[inline] + pub fn mac_address(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(ForgetDeviceRequest::VT_MAC_ADDRESS, None)} + } +} + +impl flatbuffers::Verifiable for ForgetDeviceRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("mac_address", Self::VT_MAC_ADDRESS, false)? + .finish(); + Ok(()) + } +} +pub struct ForgetDeviceRequestArgs<'a> { + pub mac_address: Option>, +} +impl<'a> Default for ForgetDeviceRequestArgs<'a> { + #[inline] + fn default() -> Self { + ForgetDeviceRequestArgs { + mac_address: None, + } + } +} + +pub struct ForgetDeviceRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> ForgetDeviceRequestBuilder<'a, 'b> { + #[inline] + pub fn add_mac_address(&mut self, mac_address: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(ForgetDeviceRequest::VT_MAC_ADDRESS, mac_address); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ForgetDeviceRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + ForgetDeviceRequestBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for ForgetDeviceRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("ForgetDeviceRequest"); + ds.field("mac_address", &self.mac_address()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/heartbeat_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/heartbeat_request_generated.rs index 44c96c44..1ed6a72c 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,90 +1,90 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> HeartbeatRequest<'a> { - - #[inline] - pub unsafe 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> HeartbeatRequest<'a> { + + #[inline] + pub unsafe 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() + } +} 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 c0dcbe16..bde9164d 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,90 +1,90 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> HeartbeatResponse<'a> { - - #[inline] - pub unsafe 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> HeartbeatResponse<'a> { + + #[inline] + pub unsafe 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() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/height_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/height_request_generated.rs index 2679cab3..2ccb8e5b 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/height_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/height_request_generated.rs @@ -1,90 +1,90 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum HeightRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct HeightRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for HeightRequest<'a> { - type Inner = HeightRequest<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> HeightRequest<'a> { - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - HeightRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args HeightRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = HeightRequestBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for HeightRequest<'_> { - #[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 HeightRequestArgs { -} -impl<'a> Default for HeightRequestArgs { - #[inline] - fn default() -> Self { - HeightRequestArgs { - } - } -} - -pub struct HeightRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> HeightRequestBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> HeightRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - HeightRequestBuilder { - 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 HeightRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("HeightRequest"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum HeightRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct HeightRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for HeightRequest<'a> { + type Inner = HeightRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> HeightRequest<'a> { + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + HeightRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args HeightRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = HeightRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for HeightRequest<'_> { + #[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 HeightRequestArgs { +} +impl<'a> Default for HeightRequestArgs { + #[inline] + fn default() -> Self { + HeightRequestArgs { + } + } +} + +pub struct HeightRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> HeightRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> HeightRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + HeightRequestBuilder { + 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 HeightRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("HeightRequest"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/height_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/height_response_generated.rs index 9864cfea..bbc91183 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/height_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/height_response_generated.rs @@ -1,126 +1,126 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum HeightResponseOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Returns the current HMD height and returns an estimated full height (user height) -pub struct HeightResponse<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for HeightResponse<'a> { - type Inner = HeightResponse<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> HeightResponse<'a> { - pub const VT_HMD_HEIGHT: flatbuffers::VOffsetT = 4; - pub const VT_ESTIMATED_FULL_HEIGHT: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - HeightResponse { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args HeightResponseArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = HeightResponseBuilder::new(_fbb); - builder.add_estimated_full_height(args.estimated_full_height); - builder.add_hmd_height(args.hmd_height); - builder.finish() - } - - - #[inline] - pub fn hmd_height(&self) -> f32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HeightResponse::VT_HMD_HEIGHT, Some(0.0)).unwrap()} - } - #[inline] - pub fn estimated_full_height(&self) -> f32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HeightResponse::VT_ESTIMATED_FULL_HEIGHT, Some(0.0)).unwrap()} - } -} - -impl flatbuffers::Verifiable for HeightResponse<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("hmd_height", Self::VT_HMD_HEIGHT, false)? - .visit_field::("estimated_full_height", Self::VT_ESTIMATED_FULL_HEIGHT, false)? - .finish(); - Ok(()) - } -} -pub struct HeightResponseArgs { - pub hmd_height: f32, - pub estimated_full_height: f32, -} -impl<'a> Default for HeightResponseArgs { - #[inline] - fn default() -> Self { - HeightResponseArgs { - hmd_height: 0.0, - estimated_full_height: 0.0, - } - } -} - -pub struct HeightResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> HeightResponseBuilder<'a, 'b> { - #[inline] - pub fn add_hmd_height(&mut self, hmd_height: f32) { - self.fbb_.push_slot::(HeightResponse::VT_HMD_HEIGHT, hmd_height, 0.0); - } - #[inline] - pub fn add_estimated_full_height(&mut self, estimated_full_height: f32) { - self.fbb_.push_slot::(HeightResponse::VT_ESTIMATED_FULL_HEIGHT, estimated_full_height, 0.0); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> HeightResponseBuilder<'a, 'b> { - let start = _fbb.start_table(); - HeightResponseBuilder { - 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 HeightResponse<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("HeightResponse"); - ds.field("hmd_height", &self.hmd_height()); - ds.field("estimated_full_height", &self.estimated_full_height()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum HeightResponseOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Returns the current HMD height and returns an estimated full height (user height) +pub struct HeightResponse<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for HeightResponse<'a> { + type Inner = HeightResponse<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> HeightResponse<'a> { + pub const VT_HMD_HEIGHT: flatbuffers::VOffsetT = 4; + pub const VT_ESTIMATED_FULL_HEIGHT: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + HeightResponse { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args HeightResponseArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = HeightResponseBuilder::new(_fbb); + builder.add_estimated_full_height(args.estimated_full_height); + builder.add_hmd_height(args.hmd_height); + builder.finish() + } + + + #[inline] + pub fn hmd_height(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(HeightResponse::VT_HMD_HEIGHT, Some(0.0)).unwrap()} + } + #[inline] + pub fn estimated_full_height(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(HeightResponse::VT_ESTIMATED_FULL_HEIGHT, Some(0.0)).unwrap()} + } +} + +impl flatbuffers::Verifiable for HeightResponse<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("hmd_height", Self::VT_HMD_HEIGHT, false)? + .visit_field::("estimated_full_height", Self::VT_ESTIMATED_FULL_HEIGHT, false)? + .finish(); + Ok(()) + } +} +pub struct HeightResponseArgs { + pub hmd_height: f32, + pub estimated_full_height: f32, +} +impl<'a> Default for HeightResponseArgs { + #[inline] + fn default() -> Self { + HeightResponseArgs { + hmd_height: 0.0, + estimated_full_height: 0.0, + } + } +} + +pub struct HeightResponseBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> HeightResponseBuilder<'a, 'b> { + #[inline] + pub fn add_hmd_height(&mut self, hmd_height: f32) { + self.fbb_.push_slot::(HeightResponse::VT_HMD_HEIGHT, hmd_height, 0.0); + } + #[inline] + pub fn add_estimated_full_height(&mut self, estimated_full_height: f32) { + self.fbb_.push_slot::(HeightResponse::VT_ESTIMATED_FULL_HEIGHT, estimated_full_height, 0.0); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> HeightResponseBuilder<'a, 'b> { + let start = _fbb.start_table(); + HeightResponseBuilder { + 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 HeightResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("HeightResponse"); + ds.field("hmd_height", &self.hmd_height()); + ds.field("estimated_full_height", &self.estimated_full_height()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/leg_tweaks_tmp_change_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/leg_tweaks_tmp_change_generated.rs index 7f4dee62..7eeebb1f 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/leg_tweaks_tmp_change_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/leg_tweaks_tmp_change_generated.rs @@ -1,161 +1,161 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum LegTweaksTmpChangeOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Makes a temporary change to legtweaks. This is not saved to disk, and can be -/// cleared with `LegTweaksTmpClear` -pub struct LegTweaksTmpChange<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for LegTweaksTmpChange<'a> { - type Inner = LegTweaksTmpChange<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> LegTweaksTmpChange<'a> { - pub const VT_FLOOR_CLIP: flatbuffers::VOffsetT = 4; - pub const VT_SKATING_CORRECTION: flatbuffers::VOffsetT = 6; - pub const VT_TOE_SNAP: flatbuffers::VOffsetT = 8; - pub const VT_FOOT_PLANT: flatbuffers::VOffsetT = 10; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - LegTweaksTmpChange { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args LegTweaksTmpChangeArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = LegTweaksTmpChangeBuilder::new(_fbb); - if let Some(x) = args.foot_plant { builder.add_foot_plant(x); } - if let Some(x) = args.toe_snap { builder.add_toe_snap(x); } - if let Some(x) = args.skating_correction { builder.add_skating_correction(x); } - if let Some(x) = args.floor_clip { builder.add_floor_clip(x); } - builder.finish() - } - - - #[inline] - pub fn floor_clip(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(LegTweaksTmpChange::VT_FLOOR_CLIP, None)} - } - #[inline] - pub fn skating_correction(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(LegTweaksTmpChange::VT_SKATING_CORRECTION, None)} - } - #[inline] - pub fn toe_snap(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(LegTweaksTmpChange::VT_TOE_SNAP, None)} - } - #[inline] - pub fn foot_plant(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(LegTweaksTmpChange::VT_FOOT_PLANT, None)} - } -} - -impl flatbuffers::Verifiable for LegTweaksTmpChange<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("floor_clip", Self::VT_FLOOR_CLIP, false)? - .visit_field::("skating_correction", Self::VT_SKATING_CORRECTION, false)? - .visit_field::("toe_snap", Self::VT_TOE_SNAP, false)? - .visit_field::("foot_plant", Self::VT_FOOT_PLANT, false)? - .finish(); - Ok(()) - } -} -pub struct LegTweaksTmpChangeArgs { - pub floor_clip: Option, - pub skating_correction: Option, - pub toe_snap: Option, - pub foot_plant: Option, -} -impl<'a> Default for LegTweaksTmpChangeArgs { - #[inline] - fn default() -> Self { - LegTweaksTmpChangeArgs { - floor_clip: None, - skating_correction: None, - toe_snap: None, - foot_plant: None, - } - } -} - -pub struct LegTweaksTmpChangeBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> LegTweaksTmpChangeBuilder<'a, 'b> { - #[inline] - pub fn add_floor_clip(&mut self, floor_clip: bool) { - self.fbb_.push_slot_always::(LegTweaksTmpChange::VT_FLOOR_CLIP, floor_clip); - } - #[inline] - pub fn add_skating_correction(&mut self, skating_correction: bool) { - self.fbb_.push_slot_always::(LegTweaksTmpChange::VT_SKATING_CORRECTION, skating_correction); - } - #[inline] - pub fn add_toe_snap(&mut self, toe_snap: bool) { - self.fbb_.push_slot_always::(LegTweaksTmpChange::VT_TOE_SNAP, toe_snap); - } - #[inline] - pub fn add_foot_plant(&mut self, foot_plant: bool) { - self.fbb_.push_slot_always::(LegTweaksTmpChange::VT_FOOT_PLANT, foot_plant); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> LegTweaksTmpChangeBuilder<'a, 'b> { - let start = _fbb.start_table(); - LegTweaksTmpChangeBuilder { - 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 LegTweaksTmpChange<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("LegTweaksTmpChange"); - ds.field("floor_clip", &self.floor_clip()); - ds.field("skating_correction", &self.skating_correction()); - ds.field("toe_snap", &self.toe_snap()); - ds.field("foot_plant", &self.foot_plant()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum LegTweaksTmpChangeOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Makes a temporary change to legtweaks. This is not saved to disk, and can be +/// cleared with `LegTweaksTmpClear` +pub struct LegTweaksTmpChange<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for LegTweaksTmpChange<'a> { + type Inner = LegTweaksTmpChange<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> LegTweaksTmpChange<'a> { + pub const VT_FLOOR_CLIP: flatbuffers::VOffsetT = 4; + pub const VT_SKATING_CORRECTION: flatbuffers::VOffsetT = 6; + pub const VT_TOE_SNAP: flatbuffers::VOffsetT = 8; + pub const VT_FOOT_PLANT: flatbuffers::VOffsetT = 10; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + LegTweaksTmpChange { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args LegTweaksTmpChangeArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = LegTweaksTmpChangeBuilder::new(_fbb); + if let Some(x) = args.foot_plant { builder.add_foot_plant(x); } + if let Some(x) = args.toe_snap { builder.add_toe_snap(x); } + if let Some(x) = args.skating_correction { builder.add_skating_correction(x); } + if let Some(x) = args.floor_clip { builder.add_floor_clip(x); } + builder.finish() + } + + + #[inline] + pub fn floor_clip(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(LegTweaksTmpChange::VT_FLOOR_CLIP, None)} + } + #[inline] + pub fn skating_correction(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(LegTweaksTmpChange::VT_SKATING_CORRECTION, None)} + } + #[inline] + pub fn toe_snap(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(LegTweaksTmpChange::VT_TOE_SNAP, None)} + } + #[inline] + pub fn foot_plant(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(LegTweaksTmpChange::VT_FOOT_PLANT, None)} + } +} + +impl flatbuffers::Verifiable for LegTweaksTmpChange<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("floor_clip", Self::VT_FLOOR_CLIP, false)? + .visit_field::("skating_correction", Self::VT_SKATING_CORRECTION, false)? + .visit_field::("toe_snap", Self::VT_TOE_SNAP, false)? + .visit_field::("foot_plant", Self::VT_FOOT_PLANT, false)? + .finish(); + Ok(()) + } +} +pub struct LegTweaksTmpChangeArgs { + pub floor_clip: Option, + pub skating_correction: Option, + pub toe_snap: Option, + pub foot_plant: Option, +} +impl<'a> Default for LegTweaksTmpChangeArgs { + #[inline] + fn default() -> Self { + LegTweaksTmpChangeArgs { + floor_clip: None, + skating_correction: None, + toe_snap: None, + foot_plant: None, + } + } +} + +pub struct LegTweaksTmpChangeBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> LegTweaksTmpChangeBuilder<'a, 'b> { + #[inline] + pub fn add_floor_clip(&mut self, floor_clip: bool) { + self.fbb_.push_slot_always::(LegTweaksTmpChange::VT_FLOOR_CLIP, floor_clip); + } + #[inline] + pub fn add_skating_correction(&mut self, skating_correction: bool) { + self.fbb_.push_slot_always::(LegTweaksTmpChange::VT_SKATING_CORRECTION, skating_correction); + } + #[inline] + pub fn add_toe_snap(&mut self, toe_snap: bool) { + self.fbb_.push_slot_always::(LegTweaksTmpChange::VT_TOE_SNAP, toe_snap); + } + #[inline] + pub fn add_foot_plant(&mut self, foot_plant: bool) { + self.fbb_.push_slot_always::(LegTweaksTmpChange::VT_FOOT_PLANT, foot_plant); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> LegTweaksTmpChangeBuilder<'a, 'b> { + let start = _fbb.start_table(); + LegTweaksTmpChangeBuilder { + 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 LegTweaksTmpChange<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("LegTweaksTmpChange"); + ds.field("floor_clip", &self.floor_clip()); + ds.field("skating_correction", &self.skating_correction()); + ds.field("toe_snap", &self.toe_snap()); + ds.field("foot_plant", &self.foot_plant()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/leg_tweaks_tmp_clear_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/leg_tweaks_tmp_clear_generated.rs index 233be0f1..5be3b26a 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/leg_tweaks_tmp_clear_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/leg_tweaks_tmp_clear_generated.rs @@ -1,161 +1,161 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum LegTweaksTmpClearOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Clears the legtweaks temprorary state back to what the config has. -/// Setting a field to `true` will reset that field. -pub struct LegTweaksTmpClear<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for LegTweaksTmpClear<'a> { - type Inner = LegTweaksTmpClear<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> LegTweaksTmpClear<'a> { - pub const VT_FLOOR_CLIP: flatbuffers::VOffsetT = 4; - pub const VT_SKATING_CORRECTION: flatbuffers::VOffsetT = 6; - pub const VT_TOE_SNAP: flatbuffers::VOffsetT = 8; - pub const VT_FOOT_PLANT: flatbuffers::VOffsetT = 10; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - LegTweaksTmpClear { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args LegTweaksTmpClearArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = LegTweaksTmpClearBuilder::new(_fbb); - builder.add_foot_plant(args.foot_plant); - builder.add_toe_snap(args.toe_snap); - builder.add_skating_correction(args.skating_correction); - builder.add_floor_clip(args.floor_clip); - builder.finish() - } - - - #[inline] - pub fn floor_clip(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(LegTweaksTmpClear::VT_FLOOR_CLIP, Some(false)).unwrap()} - } - #[inline] - pub fn skating_correction(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(LegTweaksTmpClear::VT_SKATING_CORRECTION, Some(false)).unwrap()} - } - #[inline] - pub fn toe_snap(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(LegTweaksTmpClear::VT_TOE_SNAP, Some(false)).unwrap()} - } - #[inline] - pub fn foot_plant(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(LegTweaksTmpClear::VT_FOOT_PLANT, Some(false)).unwrap()} - } -} - -impl flatbuffers::Verifiable for LegTweaksTmpClear<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("floor_clip", Self::VT_FLOOR_CLIP, false)? - .visit_field::("skating_correction", Self::VT_SKATING_CORRECTION, false)? - .visit_field::("toe_snap", Self::VT_TOE_SNAP, false)? - .visit_field::("foot_plant", Self::VT_FOOT_PLANT, false)? - .finish(); - Ok(()) - } -} -pub struct LegTweaksTmpClearArgs { - pub floor_clip: bool, - pub skating_correction: bool, - pub toe_snap: bool, - pub foot_plant: bool, -} -impl<'a> Default for LegTweaksTmpClearArgs { - #[inline] - fn default() -> Self { - LegTweaksTmpClearArgs { - floor_clip: false, - skating_correction: false, - toe_snap: false, - foot_plant: false, - } - } -} - -pub struct LegTweaksTmpClearBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> LegTweaksTmpClearBuilder<'a, 'b> { - #[inline] - pub fn add_floor_clip(&mut self, floor_clip: bool) { - self.fbb_.push_slot::(LegTweaksTmpClear::VT_FLOOR_CLIP, floor_clip, false); - } - #[inline] - pub fn add_skating_correction(&mut self, skating_correction: bool) { - self.fbb_.push_slot::(LegTweaksTmpClear::VT_SKATING_CORRECTION, skating_correction, false); - } - #[inline] - pub fn add_toe_snap(&mut self, toe_snap: bool) { - self.fbb_.push_slot::(LegTweaksTmpClear::VT_TOE_SNAP, toe_snap, false); - } - #[inline] - pub fn add_foot_plant(&mut self, foot_plant: bool) { - self.fbb_.push_slot::(LegTweaksTmpClear::VT_FOOT_PLANT, foot_plant, false); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> LegTweaksTmpClearBuilder<'a, 'b> { - let start = _fbb.start_table(); - LegTweaksTmpClearBuilder { - 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 LegTweaksTmpClear<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("LegTweaksTmpClear"); - ds.field("floor_clip", &self.floor_clip()); - ds.field("skating_correction", &self.skating_correction()); - ds.field("toe_snap", &self.toe_snap()); - ds.field("foot_plant", &self.foot_plant()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum LegTweaksTmpClearOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Clears the legtweaks temprorary state back to what the config has. +/// Setting a field to `true` will reset that field. +pub struct LegTweaksTmpClear<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for LegTweaksTmpClear<'a> { + type Inner = LegTweaksTmpClear<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> LegTweaksTmpClear<'a> { + pub const VT_FLOOR_CLIP: flatbuffers::VOffsetT = 4; + pub const VT_SKATING_CORRECTION: flatbuffers::VOffsetT = 6; + pub const VT_TOE_SNAP: flatbuffers::VOffsetT = 8; + pub const VT_FOOT_PLANT: flatbuffers::VOffsetT = 10; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + LegTweaksTmpClear { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args LegTweaksTmpClearArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = LegTweaksTmpClearBuilder::new(_fbb); + builder.add_foot_plant(args.foot_plant); + builder.add_toe_snap(args.toe_snap); + builder.add_skating_correction(args.skating_correction); + builder.add_floor_clip(args.floor_clip); + builder.finish() + } + + + #[inline] + pub fn floor_clip(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(LegTweaksTmpClear::VT_FLOOR_CLIP, Some(false)).unwrap()} + } + #[inline] + pub fn skating_correction(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(LegTweaksTmpClear::VT_SKATING_CORRECTION, Some(false)).unwrap()} + } + #[inline] + pub fn toe_snap(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(LegTweaksTmpClear::VT_TOE_SNAP, Some(false)).unwrap()} + } + #[inline] + pub fn foot_plant(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(LegTweaksTmpClear::VT_FOOT_PLANT, Some(false)).unwrap()} + } +} + +impl flatbuffers::Verifiable for LegTweaksTmpClear<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("floor_clip", Self::VT_FLOOR_CLIP, false)? + .visit_field::("skating_correction", Self::VT_SKATING_CORRECTION, false)? + .visit_field::("toe_snap", Self::VT_TOE_SNAP, false)? + .visit_field::("foot_plant", Self::VT_FOOT_PLANT, false)? + .finish(); + Ok(()) + } +} +pub struct LegTweaksTmpClearArgs { + pub floor_clip: bool, + pub skating_correction: bool, + pub toe_snap: bool, + pub foot_plant: bool, +} +impl<'a> Default for LegTweaksTmpClearArgs { + #[inline] + fn default() -> Self { + LegTweaksTmpClearArgs { + floor_clip: false, + skating_correction: false, + toe_snap: false, + foot_plant: false, + } + } +} + +pub struct LegTweaksTmpClearBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> LegTweaksTmpClearBuilder<'a, 'b> { + #[inline] + pub fn add_floor_clip(&mut self, floor_clip: bool) { + self.fbb_.push_slot::(LegTweaksTmpClear::VT_FLOOR_CLIP, floor_clip, false); + } + #[inline] + pub fn add_skating_correction(&mut self, skating_correction: bool) { + self.fbb_.push_slot::(LegTweaksTmpClear::VT_SKATING_CORRECTION, skating_correction, false); + } + #[inline] + pub fn add_toe_snap(&mut self, toe_snap: bool) { + self.fbb_.push_slot::(LegTweaksTmpClear::VT_TOE_SNAP, toe_snap, false); + } + #[inline] + pub fn add_foot_plant(&mut self, foot_plant: bool) { + self.fbb_.push_slot::(LegTweaksTmpClear::VT_FOOT_PLANT, foot_plant, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> LegTweaksTmpClearBuilder<'a, 'b> { + let start = _fbb.start_table(); + LegTweaksTmpClearBuilder { + 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 LegTweaksTmpClear<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("LegTweaksTmpClear"); + ds.field("floor_clip", &self.floor_clip()); + ds.field("skating_correction", &self.skating_correction()); + ds.field("toe_snap", &self.toe_snap()); + ds.field("foot_plant", &self.foot_plant()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/new_serial_device_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/new_serial_device_response_generated.rs index 989cfa82..77bf26c4 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/new_serial_device_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/new_serial_device_response_generated.rs @@ -1,108 +1,108 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum NewSerialDeviceResponseOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct NewSerialDeviceResponse<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for NewSerialDeviceResponse<'a> { - type Inner = NewSerialDeviceResponse<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> NewSerialDeviceResponse<'a> { - pub const VT_DEVICE: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - NewSerialDeviceResponse { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args NewSerialDeviceResponseArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = NewSerialDeviceResponseBuilder::new(_fbb); - if let Some(x) = args.device { builder.add_device(x); } - builder.finish() - } - - - #[inline] - pub fn device(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(NewSerialDeviceResponse::VT_DEVICE, None)} - } -} - -impl flatbuffers::Verifiable for NewSerialDeviceResponse<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("device", Self::VT_DEVICE, false)? - .finish(); - Ok(()) - } -} -pub struct NewSerialDeviceResponseArgs<'a> { - pub device: Option>>, -} -impl<'a> Default for NewSerialDeviceResponseArgs<'a> { - #[inline] - fn default() -> Self { - NewSerialDeviceResponseArgs { - device: None, - } - } -} - -pub struct NewSerialDeviceResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> NewSerialDeviceResponseBuilder<'a, 'b> { - #[inline] - pub fn add_device(&mut self, device: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(NewSerialDeviceResponse::VT_DEVICE, device); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> NewSerialDeviceResponseBuilder<'a, 'b> { - let start = _fbb.start_table(); - NewSerialDeviceResponseBuilder { - 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 NewSerialDeviceResponse<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("NewSerialDeviceResponse"); - ds.field("device", &self.device()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum NewSerialDeviceResponseOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct NewSerialDeviceResponse<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for NewSerialDeviceResponse<'a> { + type Inner = NewSerialDeviceResponse<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> NewSerialDeviceResponse<'a> { + pub const VT_DEVICE: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + NewSerialDeviceResponse { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args NewSerialDeviceResponseArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = NewSerialDeviceResponseBuilder::new(_fbb); + if let Some(x) = args.device { builder.add_device(x); } + builder.finish() + } + + + #[inline] + pub fn device(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(NewSerialDeviceResponse::VT_DEVICE, None)} + } +} + +impl flatbuffers::Verifiable for NewSerialDeviceResponse<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("device", Self::VT_DEVICE, false)? + .finish(); + Ok(()) + } +} +pub struct NewSerialDeviceResponseArgs<'a> { + pub device: Option>>, +} +impl<'a> Default for NewSerialDeviceResponseArgs<'a> { + #[inline] + fn default() -> Self { + NewSerialDeviceResponseArgs { + device: None, + } + } +} + +pub struct NewSerialDeviceResponseBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> NewSerialDeviceResponseBuilder<'a, 'b> { + #[inline] + pub fn add_device(&mut self, device: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(NewSerialDeviceResponse::VT_DEVICE, device); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> NewSerialDeviceResponseBuilder<'a, 'b> { + let start = _fbb.start_table(); + NewSerialDeviceResponseBuilder { + 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 NewSerialDeviceResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("NewSerialDeviceResponse"); + ds.field("device", &self.device()); + 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 1242cea4..79be6039 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,126 +1,126 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> OpenSerialRequest<'a> { - pub const VT_AUTO: flatbuffers::VOffsetT = 4; - pub const VT_PORT: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe 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<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = OpenSerialRequestBuilder::new(_fbb); - if let Some(x) = args.port { builder.add_port(x); } - builder.add_auto(args.auto); - builder.finish() - } - - - /// Automaticaly pick the first serial device available - #[inline] - pub fn auto(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(OpenSerialRequest::VT_AUTO, Some(false)).unwrap()} - } - #[inline] - pub fn port(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(OpenSerialRequest::VT_PORT, None)} - } -} - -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)? - .visit_field::("auto", Self::VT_AUTO, false)? - .visit_field::>("port", Self::VT_PORT, false)? - .finish(); - Ok(()) - } -} -pub struct OpenSerialRequestArgs<'a> { - pub auto: bool, - pub port: Option>, -} -impl<'a> Default for OpenSerialRequestArgs<'a> { - #[inline] - fn default() -> Self { - OpenSerialRequestArgs { - auto: false, - port: None, - } - } -} - -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 add_auto(&mut self, auto: bool) { - self.fbb_.push_slot::(OpenSerialRequest::VT_AUTO, auto, false); - } - #[inline] - pub fn add_port(&mut self, port: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(OpenSerialRequest::VT_PORT, port); - } - #[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.field("auto", &self.auto()); - ds.field("port", &self.port()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> OpenSerialRequest<'a> { + pub const VT_AUTO: flatbuffers::VOffsetT = 4; + pub const VT_PORT: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe 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<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = OpenSerialRequestBuilder::new(_fbb); + if let Some(x) = args.port { builder.add_port(x); } + builder.add_auto(args.auto); + builder.finish() + } + + + /// Automaticaly pick the first serial device available + #[inline] + pub fn auto(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(OpenSerialRequest::VT_AUTO, Some(false)).unwrap()} + } + #[inline] + pub fn port(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(OpenSerialRequest::VT_PORT, None)} + } +} + +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)? + .visit_field::("auto", Self::VT_AUTO, false)? + .visit_field::>("port", Self::VT_PORT, false)? + .finish(); + Ok(()) + } +} +pub struct OpenSerialRequestArgs<'a> { + pub auto: bool, + pub port: Option>, +} +impl<'a> Default for OpenSerialRequestArgs<'a> { + #[inline] + fn default() -> Self { + OpenSerialRequestArgs { + auto: false, + port: None, + } + } +} + +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 add_auto(&mut self, auto: bool) { + self.fbb_.push_slot::(OpenSerialRequest::VT_AUTO, auto, false); + } + #[inline] + pub fn add_port(&mut self, port: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(OpenSerialRequest::VT_PORT, port); + } + #[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.field("auto", &self.auto()); + ds.field("port", &self.port()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/oscrouter_settings_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/oscrouter_settings_generated.rs index b21029c2..da215f7f 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/oscrouter_settings_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/oscrouter_settings_generated.rs @@ -1,109 +1,109 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum OSCRouterSettingsOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// OSC router forwards messages it receives, to allow the usage of multiple OSC programs for the same app. -pub struct OSCRouterSettings<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for OSCRouterSettings<'a> { - type Inner = OSCRouterSettings<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> OSCRouterSettings<'a> { - pub const VT_OSC_SETTINGS: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - OSCRouterSettings { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args OSCRouterSettingsArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = OSCRouterSettingsBuilder::new(_fbb); - if let Some(x) = args.osc_settings { builder.add_osc_settings(x); } - builder.finish() - } - - - #[inline] - pub fn osc_settings(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(OSCRouterSettings::VT_OSC_SETTINGS, None)} - } -} - -impl flatbuffers::Verifiable for OSCRouterSettings<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("osc_settings", Self::VT_OSC_SETTINGS, false)? - .finish(); - Ok(()) - } -} -pub struct OSCRouterSettingsArgs<'a> { - pub osc_settings: Option>>, -} -impl<'a> Default for OSCRouterSettingsArgs<'a> { - #[inline] - fn default() -> Self { - OSCRouterSettingsArgs { - osc_settings: None, - } - } -} - -pub struct OSCRouterSettingsBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> OSCRouterSettingsBuilder<'a, 'b> { - #[inline] - pub fn add_osc_settings(&mut self, osc_settings: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(OSCRouterSettings::VT_OSC_SETTINGS, osc_settings); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> OSCRouterSettingsBuilder<'a, 'b> { - let start = _fbb.start_table(); - OSCRouterSettingsBuilder { - 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 OSCRouterSettings<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("OSCRouterSettings"); - ds.field("osc_settings", &self.osc_settings()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum OSCRouterSettingsOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// OSC router forwards messages it receives, to allow the usage of multiple OSC programs for the same app. +pub struct OSCRouterSettings<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for OSCRouterSettings<'a> { + type Inner = OSCRouterSettings<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> OSCRouterSettings<'a> { + pub const VT_OSC_SETTINGS: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + OSCRouterSettings { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args OSCRouterSettingsArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = OSCRouterSettingsBuilder::new(_fbb); + if let Some(x) = args.osc_settings { builder.add_osc_settings(x); } + builder.finish() + } + + + #[inline] + pub fn osc_settings(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(OSCRouterSettings::VT_OSC_SETTINGS, None)} + } +} + +impl flatbuffers::Verifiable for OSCRouterSettings<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("osc_settings", Self::VT_OSC_SETTINGS, false)? + .finish(); + Ok(()) + } +} +pub struct OSCRouterSettingsArgs<'a> { + pub osc_settings: Option>>, +} +impl<'a> Default for OSCRouterSettingsArgs<'a> { + #[inline] + fn default() -> Self { + OSCRouterSettingsArgs { + osc_settings: None, + } + } +} + +pub struct OSCRouterSettingsBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> OSCRouterSettingsBuilder<'a, 'b> { + #[inline] + pub fn add_osc_settings(&mut self, osc_settings: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(OSCRouterSettings::VT_OSC_SETTINGS, osc_settings); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> OSCRouterSettingsBuilder<'a, 'b> { + let start = _fbb.start_table(); + OSCRouterSettingsBuilder { + 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 OSCRouterSettings<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("OSCRouterSettings"); + ds.field("osc_settings", &self.osc_settings()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/oscsettings_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/oscsettings_generated.rs index a8a8c28f..e1a459ec 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/oscsettings_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/oscsettings_generated.rs @@ -1,160 +1,160 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum OSCSettingsOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// OSC Settings that are used in *any* osc application. -pub struct OSCSettings<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for OSCSettings<'a> { - type Inner = OSCSettings<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> OSCSettings<'a> { - pub const VT_ENABLED: flatbuffers::VOffsetT = 4; - pub const VT_PORT_IN: flatbuffers::VOffsetT = 6; - pub const VT_PORT_OUT: flatbuffers::VOffsetT = 8; - pub const VT_ADDRESS: flatbuffers::VOffsetT = 10; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - OSCSettings { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args OSCSettingsArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = OSCSettingsBuilder::new(_fbb); - if let Some(x) = args.address { builder.add_address(x); } - builder.add_port_out(args.port_out); - builder.add_port_in(args.port_in); - builder.add_enabled(args.enabled); - builder.finish() - } - - - #[inline] - pub fn enabled(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(OSCSettings::VT_ENABLED, Some(false)).unwrap()} - } - #[inline] - pub fn port_in(&self) -> u16 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(OSCSettings::VT_PORT_IN, Some(0)).unwrap()} - } - #[inline] - pub fn port_out(&self) -> u16 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(OSCSettings::VT_PORT_OUT, Some(0)).unwrap()} - } - #[inline] - pub fn address(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(OSCSettings::VT_ADDRESS, None)} - } -} - -impl flatbuffers::Verifiable for OSCSettings<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("enabled", Self::VT_ENABLED, false)? - .visit_field::("port_in", Self::VT_PORT_IN, false)? - .visit_field::("port_out", Self::VT_PORT_OUT, false)? - .visit_field::>("address", Self::VT_ADDRESS, false)? - .finish(); - Ok(()) - } -} -pub struct OSCSettingsArgs<'a> { - pub enabled: bool, - pub port_in: u16, - pub port_out: u16, - pub address: Option>, -} -impl<'a> Default for OSCSettingsArgs<'a> { - #[inline] - fn default() -> Self { - OSCSettingsArgs { - enabled: false, - port_in: 0, - port_out: 0, - address: None, - } - } -} - -pub struct OSCSettingsBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> OSCSettingsBuilder<'a, 'b> { - #[inline] - pub fn add_enabled(&mut self, enabled: bool) { - self.fbb_.push_slot::(OSCSettings::VT_ENABLED, enabled, false); - } - #[inline] - pub fn add_port_in(&mut self, port_in: u16) { - self.fbb_.push_slot::(OSCSettings::VT_PORT_IN, port_in, 0); - } - #[inline] - pub fn add_port_out(&mut self, port_out: u16) { - self.fbb_.push_slot::(OSCSettings::VT_PORT_OUT, port_out, 0); - } - #[inline] - pub fn add_address(&mut self, address: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(OSCSettings::VT_ADDRESS, address); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> OSCSettingsBuilder<'a, 'b> { - let start = _fbb.start_table(); - OSCSettingsBuilder { - 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 OSCSettings<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("OSCSettings"); - ds.field("enabled", &self.enabled()); - ds.field("port_in", &self.port_in()); - ds.field("port_out", &self.port_out()); - ds.field("address", &self.address()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum OSCSettingsOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// OSC Settings that are used in *any* osc application. +pub struct OSCSettings<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for OSCSettings<'a> { + type Inner = OSCSettings<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> OSCSettings<'a> { + pub const VT_ENABLED: flatbuffers::VOffsetT = 4; + pub const VT_PORT_IN: flatbuffers::VOffsetT = 6; + pub const VT_PORT_OUT: flatbuffers::VOffsetT = 8; + pub const VT_ADDRESS: flatbuffers::VOffsetT = 10; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + OSCSettings { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args OSCSettingsArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = OSCSettingsBuilder::new(_fbb); + if let Some(x) = args.address { builder.add_address(x); } + builder.add_port_out(args.port_out); + builder.add_port_in(args.port_in); + builder.add_enabled(args.enabled); + builder.finish() + } + + + #[inline] + pub fn enabled(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(OSCSettings::VT_ENABLED, Some(false)).unwrap()} + } + #[inline] + pub fn port_in(&self) -> u16 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(OSCSettings::VT_PORT_IN, Some(0)).unwrap()} + } + #[inline] + pub fn port_out(&self) -> u16 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(OSCSettings::VT_PORT_OUT, Some(0)).unwrap()} + } + #[inline] + pub fn address(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(OSCSettings::VT_ADDRESS, None)} + } +} + +impl flatbuffers::Verifiable for OSCSettings<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("enabled", Self::VT_ENABLED, false)? + .visit_field::("port_in", Self::VT_PORT_IN, false)? + .visit_field::("port_out", Self::VT_PORT_OUT, false)? + .visit_field::>("address", Self::VT_ADDRESS, false)? + .finish(); + Ok(()) + } +} +pub struct OSCSettingsArgs<'a> { + pub enabled: bool, + pub port_in: u16, + pub port_out: u16, + pub address: Option>, +} +impl<'a> Default for OSCSettingsArgs<'a> { + #[inline] + fn default() -> Self { + OSCSettingsArgs { + enabled: false, + port_in: 0, + port_out: 0, + address: None, + } + } +} + +pub struct OSCSettingsBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> OSCSettingsBuilder<'a, 'b> { + #[inline] + pub fn add_enabled(&mut self, enabled: bool) { + self.fbb_.push_slot::(OSCSettings::VT_ENABLED, enabled, false); + } + #[inline] + pub fn add_port_in(&mut self, port_in: u16) { + self.fbb_.push_slot::(OSCSettings::VT_PORT_IN, port_in, 0); + } + #[inline] + pub fn add_port_out(&mut self, port_out: u16) { + self.fbb_.push_slot::(OSCSettings::VT_PORT_OUT, port_out, 0); + } + #[inline] + pub fn add_address(&mut self, address: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(OSCSettings::VT_ADDRESS, address); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> OSCSettingsBuilder<'a, 'b> { + let start = _fbb.start_table(); + OSCSettingsBuilder { + 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 OSCSettings<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("OSCSettings"); + ds.field("enabled", &self.enabled()); + ds.field("port_in", &self.port_in()); + ds.field("port_out", &self.port_out()); + ds.field("address", &self.address()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/osctrackers_setting_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/osctrackers_setting_generated.rs index 21543dcc..4c489723 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/osctrackers_setting_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/osctrackers_setting_generated.rs @@ -1,210 +1,210 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum OSCTrackersSettingOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct OSCTrackersSetting<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for OSCTrackersSetting<'a> { - type Inner = OSCTrackersSetting<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> OSCTrackersSetting<'a> { - pub const VT_HEAD: flatbuffers::VOffsetT = 4; - pub const VT_CHEST: flatbuffers::VOffsetT = 6; - pub const VT_WAIST: flatbuffers::VOffsetT = 8; - pub const VT_KNEES: flatbuffers::VOffsetT = 10; - pub const VT_FEET: flatbuffers::VOffsetT = 12; - pub const VT_ELBOWS: flatbuffers::VOffsetT = 14; - pub const VT_HANDS: flatbuffers::VOffsetT = 16; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - OSCTrackersSetting { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args OSCTrackersSettingArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = OSCTrackersSettingBuilder::new(_fbb); - builder.add_hands(args.hands); - builder.add_elbows(args.elbows); - builder.add_feet(args.feet); - builder.add_knees(args.knees); - builder.add_waist(args.waist); - builder.add_chest(args.chest); - builder.add_head(args.head); - builder.finish() - } - - - #[inline] - pub fn head(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(OSCTrackersSetting::VT_HEAD, Some(false)).unwrap()} - } - #[inline] - pub fn chest(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(OSCTrackersSetting::VT_CHEST, Some(false)).unwrap()} - } - #[inline] - pub fn waist(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(OSCTrackersSetting::VT_WAIST, Some(false)).unwrap()} - } - #[inline] - pub fn knees(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(OSCTrackersSetting::VT_KNEES, Some(false)).unwrap()} - } - #[inline] - pub fn feet(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(OSCTrackersSetting::VT_FEET, Some(false)).unwrap()} - } - #[inline] - pub fn elbows(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(OSCTrackersSetting::VT_ELBOWS, Some(false)).unwrap()} - } - #[inline] - pub fn hands(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(OSCTrackersSetting::VT_HANDS, Some(false)).unwrap()} - } -} - -impl flatbuffers::Verifiable for OSCTrackersSetting<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("head", Self::VT_HEAD, false)? - .visit_field::("chest", Self::VT_CHEST, false)? - .visit_field::("waist", Self::VT_WAIST, false)? - .visit_field::("knees", Self::VT_KNEES, false)? - .visit_field::("feet", Self::VT_FEET, false)? - .visit_field::("elbows", Self::VT_ELBOWS, false)? - .visit_field::("hands", Self::VT_HANDS, false)? - .finish(); - Ok(()) - } -} -pub struct OSCTrackersSettingArgs { - pub head: bool, - pub chest: bool, - pub waist: bool, - pub knees: bool, - pub feet: bool, - pub elbows: bool, - pub hands: bool, -} -impl<'a> Default for OSCTrackersSettingArgs { - #[inline] - fn default() -> Self { - OSCTrackersSettingArgs { - head: false, - chest: false, - waist: false, - knees: false, - feet: false, - elbows: false, - hands: false, - } - } -} - -pub struct OSCTrackersSettingBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> OSCTrackersSettingBuilder<'a, 'b> { - #[inline] - pub fn add_head(&mut self, head: bool) { - self.fbb_.push_slot::(OSCTrackersSetting::VT_HEAD, head, false); - } - #[inline] - pub fn add_chest(&mut self, chest: bool) { - self.fbb_.push_slot::(OSCTrackersSetting::VT_CHEST, chest, false); - } - #[inline] - pub fn add_waist(&mut self, waist: bool) { - self.fbb_.push_slot::(OSCTrackersSetting::VT_WAIST, waist, false); - } - #[inline] - pub fn add_knees(&mut self, knees: bool) { - self.fbb_.push_slot::(OSCTrackersSetting::VT_KNEES, knees, false); - } - #[inline] - pub fn add_feet(&mut self, feet: bool) { - self.fbb_.push_slot::(OSCTrackersSetting::VT_FEET, feet, false); - } - #[inline] - pub fn add_elbows(&mut self, elbows: bool) { - self.fbb_.push_slot::(OSCTrackersSetting::VT_ELBOWS, elbows, false); - } - #[inline] - pub fn add_hands(&mut self, hands: bool) { - self.fbb_.push_slot::(OSCTrackersSetting::VT_HANDS, hands, false); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> OSCTrackersSettingBuilder<'a, 'b> { - let start = _fbb.start_table(); - OSCTrackersSettingBuilder { - 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 OSCTrackersSetting<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("OSCTrackersSetting"); - ds.field("head", &self.head()); - ds.field("chest", &self.chest()); - ds.field("waist", &self.waist()); - ds.field("knees", &self.knees()); - ds.field("feet", &self.feet()); - ds.field("elbows", &self.elbows()); - ds.field("hands", &self.hands()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum OSCTrackersSettingOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct OSCTrackersSetting<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for OSCTrackersSetting<'a> { + type Inner = OSCTrackersSetting<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> OSCTrackersSetting<'a> { + pub const VT_HEAD: flatbuffers::VOffsetT = 4; + pub const VT_CHEST: flatbuffers::VOffsetT = 6; + pub const VT_WAIST: flatbuffers::VOffsetT = 8; + pub const VT_KNEES: flatbuffers::VOffsetT = 10; + pub const VT_FEET: flatbuffers::VOffsetT = 12; + pub const VT_ELBOWS: flatbuffers::VOffsetT = 14; + pub const VT_HANDS: flatbuffers::VOffsetT = 16; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + OSCTrackersSetting { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args OSCTrackersSettingArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = OSCTrackersSettingBuilder::new(_fbb); + builder.add_hands(args.hands); + builder.add_elbows(args.elbows); + builder.add_feet(args.feet); + builder.add_knees(args.knees); + builder.add_waist(args.waist); + builder.add_chest(args.chest); + builder.add_head(args.head); + builder.finish() + } + + + #[inline] + pub fn head(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(OSCTrackersSetting::VT_HEAD, Some(false)).unwrap()} + } + #[inline] + pub fn chest(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(OSCTrackersSetting::VT_CHEST, Some(false)).unwrap()} + } + #[inline] + pub fn waist(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(OSCTrackersSetting::VT_WAIST, Some(false)).unwrap()} + } + #[inline] + pub fn knees(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(OSCTrackersSetting::VT_KNEES, Some(false)).unwrap()} + } + #[inline] + pub fn feet(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(OSCTrackersSetting::VT_FEET, Some(false)).unwrap()} + } + #[inline] + pub fn elbows(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(OSCTrackersSetting::VT_ELBOWS, Some(false)).unwrap()} + } + #[inline] + pub fn hands(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(OSCTrackersSetting::VT_HANDS, Some(false)).unwrap()} + } +} + +impl flatbuffers::Verifiable for OSCTrackersSetting<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("head", Self::VT_HEAD, false)? + .visit_field::("chest", Self::VT_CHEST, false)? + .visit_field::("waist", Self::VT_WAIST, false)? + .visit_field::("knees", Self::VT_KNEES, false)? + .visit_field::("feet", Self::VT_FEET, false)? + .visit_field::("elbows", Self::VT_ELBOWS, false)? + .visit_field::("hands", Self::VT_HANDS, false)? + .finish(); + Ok(()) + } +} +pub struct OSCTrackersSettingArgs { + pub head: bool, + pub chest: bool, + pub waist: bool, + pub knees: bool, + pub feet: bool, + pub elbows: bool, + pub hands: bool, +} +impl<'a> Default for OSCTrackersSettingArgs { + #[inline] + fn default() -> Self { + OSCTrackersSettingArgs { + head: false, + chest: false, + waist: false, + knees: false, + feet: false, + elbows: false, + hands: false, + } + } +} + +pub struct OSCTrackersSettingBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> OSCTrackersSettingBuilder<'a, 'b> { + #[inline] + pub fn add_head(&mut self, head: bool) { + self.fbb_.push_slot::(OSCTrackersSetting::VT_HEAD, head, false); + } + #[inline] + pub fn add_chest(&mut self, chest: bool) { + self.fbb_.push_slot::(OSCTrackersSetting::VT_CHEST, chest, false); + } + #[inline] + pub fn add_waist(&mut self, waist: bool) { + self.fbb_.push_slot::(OSCTrackersSetting::VT_WAIST, waist, false); + } + #[inline] + pub fn add_knees(&mut self, knees: bool) { + self.fbb_.push_slot::(OSCTrackersSetting::VT_KNEES, knees, false); + } + #[inline] + pub fn add_feet(&mut self, feet: bool) { + self.fbb_.push_slot::(OSCTrackersSetting::VT_FEET, feet, false); + } + #[inline] + pub fn add_elbows(&mut self, elbows: bool) { + self.fbb_.push_slot::(OSCTrackersSetting::VT_ELBOWS, elbows, false); + } + #[inline] + pub fn add_hands(&mut self, hands: bool) { + self.fbb_.push_slot::(OSCTrackersSetting::VT_HANDS, hands, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> OSCTrackersSettingBuilder<'a, 'b> { + let start = _fbb.start_table(); + OSCTrackersSettingBuilder { + 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 OSCTrackersSetting<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("OSCTrackersSetting"); + ds.field("head", &self.head()); + ds.field("chest", &self.chest()); + ds.field("waist", &self.waist()); + ds.field("knees", &self.knees()); + ds.field("feet", &self.feet()); + ds.field("elbows", &self.elbows()); + ds.field("hands", &self.hands()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/otafirmware_update_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/otafirmware_update_generated.rs new file mode 100644 index 00000000..c80ef830 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/otafirmware_update_generated.rs @@ -0,0 +1,127 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum OTAFirmwareUpdateOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct OTAFirmwareUpdate<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for OTAFirmwareUpdate<'a> { + type Inner = OTAFirmwareUpdate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> OTAFirmwareUpdate<'a> { + pub const VT_DEVICE_ID: flatbuffers::VOffsetT = 4; + pub const VT_FIRMWARE_PART: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + OTAFirmwareUpdate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args OTAFirmwareUpdateArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = OTAFirmwareUpdateBuilder::new(_fbb); + if let Some(x) = args.firmware_part { builder.add_firmware_part(x); } + if let Some(x) = args.device_id { builder.add_device_id(x); } + builder.finish() + } + + + /// id of the device, this refer to the actual DeviceId from the protocol + #[inline] + pub fn device_id(&self) -> Option<&'a super::datatypes::DeviceId> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(OTAFirmwareUpdate::VT_DEVICE_ID, None)} + } + /// A table containing the url and offset of the firmware bin file + #[inline] + pub fn firmware_part(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(OTAFirmwareUpdate::VT_FIRMWARE_PART, None)} + } +} + +impl flatbuffers::Verifiable for OTAFirmwareUpdate<'_> { + #[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::>("firmware_part", Self::VT_FIRMWARE_PART, false)? + .finish(); + Ok(()) + } +} +pub struct OTAFirmwareUpdateArgs<'a> { + pub device_id: Option<&'a super::datatypes::DeviceId>, + pub firmware_part: Option>>, +} +impl<'a> Default for OTAFirmwareUpdateArgs<'a> { + #[inline] + fn default() -> Self { + OTAFirmwareUpdateArgs { + device_id: None, + firmware_part: None, + } + } +} + +pub struct OTAFirmwareUpdateBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> OTAFirmwareUpdateBuilder<'a, 'b> { + #[inline] + pub fn add_device_id(&mut self, device_id: &super::datatypes::DeviceId) { + self.fbb_.push_slot_always::<&super::datatypes::DeviceId>(OTAFirmwareUpdate::VT_DEVICE_ID, device_id); + } + #[inline] + pub fn add_firmware_part(&mut self, firmware_part: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(OTAFirmwareUpdate::VT_FIRMWARE_PART, firmware_part); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> OTAFirmwareUpdateBuilder<'a, 'b> { + let start = _fbb.start_table(); + OTAFirmwareUpdateBuilder { + 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 OTAFirmwareUpdate<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("OTAFirmwareUpdate"); + ds.field("device_id", &self.device_id()); + ds.field("firmware_part", &self.firmware_part()); + 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 231dd39f..966f1fb4 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,126 +1,126 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> OverlayDisplayModeChangeRequest<'a> { - pub const VT_IS_VISIBLE: flatbuffers::VOffsetT = 4; - pub const VT_IS_MIRRORED: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(OverlayDisplayModeChangeRequest::VT_IS_VISIBLE, None)} - } - #[inline] - pub fn is_mirrored(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> OverlayDisplayModeChangeRequest<'a> { + pub const VT_IS_VISIBLE: flatbuffers::VOffsetT = 4; + pub const VT_IS_MIRRORED: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(OverlayDisplayModeChangeRequest::VT_IS_VISIBLE, None)} + } + #[inline] + pub fn is_mirrored(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} 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 1d5c3e8a..ec67667e 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,91 +1,91 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> OverlayDisplayModeRequest<'a> { - - #[inline] - pub unsafe 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> OverlayDisplayModeRequest<'a> { + + #[inline] + pub unsafe 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() + } +} 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 ba364109..510fc52b 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,126 +1,126 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> OverlayDisplayModeResponse<'a> { - pub const VT_IS_VISIBLE: flatbuffers::VOffsetT = 4; - pub const VT_IS_MIRRORED: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(OverlayDisplayModeResponse::VT_IS_VISIBLE, Some(false)).unwrap()} - } - #[inline] - pub fn is_mirrored(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> OverlayDisplayModeResponse<'a> { + pub const VT_IS_VISIBLE: flatbuffers::VOffsetT = 4; + pub const VT_IS_MIRRORED: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(OverlayDisplayModeResponse::VT_IS_VISIBLE, Some(false)).unwrap()} + } + #[inline] + pub fn is_mirrored(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} 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 0ee7978f..815983c8 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,108 +1,108 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> RecordBVHRequest<'a> { - pub const VT_STOP: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> RecordBVHRequest<'a> { + pub const VT_STOP: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} 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 771df08d..1ad67a5e 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,108 +1,108 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> RecordBVHStatus<'a> { - pub const VT_RECORDING: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> RecordBVHStatus<'a> { + pub const VT_RECORDING: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} 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 b1a40ddf..175b5216 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,108 +1,108 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> ResetRequest<'a> { - pub const VT_RESET_TYPE: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ResetRequest::VT_RESET_TYPE, Some(ResetType::Yaw)).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::Yaw, - } - } -} - -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::Yaw); - } - #[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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> ResetRequest<'a> { + pub const VT_RESET_TYPE: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ResetRequest::VT_RESET_TYPE, Some(ResetType::Yaw)).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::Yaw, + } + } +} + +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::Yaw); + } + #[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() + } +} 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 6ebdc2b4..ae58f75a 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,125 +1,125 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> ResetResponse<'a> { - pub const VT_RESET_TYPE: flatbuffers::VOffsetT = 4; - pub const VT_STATUS: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe 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.add_status(args.status); - builder.add_reset_type(args.reset_type); - builder.finish() - } - - - #[inline] - pub fn reset_type(&self) -> ResetType { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ResetResponse::VT_RESET_TYPE, Some(ResetType::Yaw)).unwrap()} - } - #[inline] - pub fn status(&self) -> ResetStatus { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ResetResponse::VT_STATUS, Some(ResetStatus::STARTED)).unwrap()} - } -} - -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)? - .visit_field::("reset_type", Self::VT_RESET_TYPE, false)? - .visit_field::("status", Self::VT_STATUS, false)? - .finish(); - Ok(()) - } -} -pub struct ResetResponseArgs { - pub reset_type: ResetType, - pub status: ResetStatus, -} -impl<'a> Default for ResetResponseArgs { - #[inline] - fn default() -> Self { - ResetResponseArgs { - reset_type: ResetType::Yaw, - status: ResetStatus::STARTED, - } - } -} - -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 add_reset_type(&mut self, reset_type: ResetType) { - self.fbb_.push_slot::(ResetResponse::VT_RESET_TYPE, reset_type, ResetType::Yaw); - } - #[inline] - pub fn add_status(&mut self, status: ResetStatus) { - self.fbb_.push_slot::(ResetResponse::VT_STATUS, status, ResetStatus::STARTED); - } - #[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.field("reset_type", &self.reset_type()); - ds.field("status", &self.status()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> ResetResponse<'a> { + pub const VT_RESET_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_STATUS: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe 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.add_status(args.status); + builder.add_reset_type(args.reset_type); + builder.finish() + } + + + #[inline] + pub fn reset_type(&self) -> ResetType { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ResetResponse::VT_RESET_TYPE, Some(ResetType::Yaw)).unwrap()} + } + #[inline] + pub fn status(&self) -> ResetStatus { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ResetResponse::VT_STATUS, Some(ResetStatus::STARTED)).unwrap()} + } +} + +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)? + .visit_field::("reset_type", Self::VT_RESET_TYPE, false)? + .visit_field::("status", Self::VT_STATUS, false)? + .finish(); + Ok(()) + } +} +pub struct ResetResponseArgs { + pub reset_type: ResetType, + pub status: ResetStatus, +} +impl<'a> Default for ResetResponseArgs { + #[inline] + fn default() -> Self { + ResetResponseArgs { + reset_type: ResetType::Yaw, + status: ResetStatus::STARTED, + } + } +} + +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 add_reset_type(&mut self, reset_type: ResetType) { + self.fbb_.push_slot::(ResetResponse::VT_RESET_TYPE, reset_type, ResetType::Yaw); + } + #[inline] + pub fn add_status(&mut self, status: ResetStatus) { + self.fbb_.push_slot::(ResetResponse::VT_STATUS, status, ResetStatus::STARTED); + } + #[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.field("reset_type", &self.reset_type()); + ds.field("status", &self.status()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/reset_status_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/reset_status_generated.rs index ff968be5..f5f234c1 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/reset_status_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/reset_status_generated.rs @@ -1,96 +1,96 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_RESET_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_RESET_STATUS: u8 = 1; -#[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_STATUS: [ResetStatus; 2] = [ - ResetStatus::STARTED, - ResetStatus::FINISHED, -]; - -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[repr(transparent)] -pub struct ResetStatus(pub u8); -#[allow(non_upper_case_globals)] -impl ResetStatus { - pub const STARTED: Self = Self(0); - pub const FINISHED: Self = Self(1); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 1; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::STARTED, - Self::FINISHED, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::STARTED => Some("STARTED"), - Self::FINISHED => Some("FINISHED"), - _ => None, - } - } -} -impl core::fmt::Debug for ResetStatus { - 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 ResetStatus { - type Inner = Self; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for ResetStatus { - type Output = ResetStatus; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for ResetStatus { - type Scalar = u8; - #[inline] - fn to_little_endian(self) -> u8 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u8) -> Self { - let b = u8::from_le(v); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for ResetStatus { - #[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 ResetStatus {} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_RESET_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_RESET_STATUS: u8 = 1; +#[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_STATUS: [ResetStatus; 2] = [ + ResetStatus::STARTED, + ResetStatus::FINISHED, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct ResetStatus(pub u8); +#[allow(non_upper_case_globals)] +impl ResetStatus { + pub const STARTED: Self = Self(0); + pub const FINISHED: Self = Self(1); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 1; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::STARTED, + Self::FINISHED, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::STARTED => Some("STARTED"), + Self::FINISHED => Some("FINISHED"), + _ => None, + } + } +} +impl core::fmt::Debug for ResetStatus { + 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 ResetStatus { + type Inner = Self; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for ResetStatus { + type Output = ResetStatus; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for ResetStatus { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for ResetStatus { + #[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 ResetStatus {} 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 e2cad5f5..0af3024e 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,101 +1,101 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_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; -#[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] = [ - ResetType::Yaw, - ResetType::Full, - 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 Yaw: Self = Self(0); - pub const Full: Self = Self(1); - /// Second pose for calibrating mounting rotation - pub const Mounting: Self = Self(2); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 2; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::Yaw, - Self::Full, - Self::Mounting, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::Yaw => Some("Yaw"), - Self::Full => Some("Full"), - 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for ResetType { - type Output = ResetType; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for ResetType { - type Scalar = u8; - #[inline] - fn to_little_endian(self) -> u8 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u8) -> Self { - let b = u8::from_le(v); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_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; +#[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] = [ + ResetType::Yaw, + ResetType::Full, + 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 Yaw: Self = Self(0); + pub const Full: Self = Self(1); + /// Second pose for calibrating mounting rotation + pub const Mounting: Self = Self(2); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 2; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::Yaw, + Self::Full, + Self::Mounting, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::Yaw => Some("Yaw"), + Self::Full => Some("Full"), + 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for ResetType { + type Output = ResetType; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for ResetType { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for 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/resets_settings_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/resets_settings_generated.rs index 4d66e0bd..13a398bc 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/resets_settings_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/resets_settings_generated.rs @@ -1,176 +1,176 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum ResetsSettingsOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct ResetsSettings<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for ResetsSettings<'a> { - type Inner = ResetsSettings<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> ResetsSettings<'a> { - pub const VT_RESET_MOUNTING_FEET: flatbuffers::VOffsetT = 4; - pub const VT_ARMS_MOUNTING_RESET_MODE: flatbuffers::VOffsetT = 6; - pub const VT_YAW_RESET_SMOOTH_TIME: flatbuffers::VOffsetT = 8; - pub const VT_SAVE_MOUNTING_RESET: flatbuffers::VOffsetT = 10; - pub const VT_RESET_HMD_PITCH: flatbuffers::VOffsetT = 12; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - ResetsSettings { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args ResetsSettingsArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = ResetsSettingsBuilder::new(_fbb); - builder.add_yaw_reset_smooth_time(args.yaw_reset_smooth_time); - builder.add_reset_hmd_pitch(args.reset_hmd_pitch); - builder.add_save_mounting_reset(args.save_mounting_reset); - builder.add_arms_mounting_reset_mode(args.arms_mounting_reset_mode); - builder.add_reset_mounting_feet(args.reset_mounting_feet); - builder.finish() - } - - - #[inline] - pub fn reset_mounting_feet(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ResetsSettings::VT_RESET_MOUNTING_FEET, Some(false)).unwrap()} - } - #[inline] - pub fn arms_mounting_reset_mode(&self) -> ArmsMountingResetMode { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ResetsSettings::VT_ARMS_MOUNTING_RESET_MODE, Some(ArmsMountingResetMode::BACK)).unwrap()} - } - #[inline] - pub fn yaw_reset_smooth_time(&self) -> f32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ResetsSettings::VT_YAW_RESET_SMOOTH_TIME, Some(0.0)).unwrap()} - } - #[inline] - pub fn save_mounting_reset(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ResetsSettings::VT_SAVE_MOUNTING_RESET, Some(false)).unwrap()} - } - #[inline] - pub fn reset_hmd_pitch(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ResetsSettings::VT_RESET_HMD_PITCH, Some(false)).unwrap()} - } -} - -impl flatbuffers::Verifiable for ResetsSettings<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("reset_mounting_feet", Self::VT_RESET_MOUNTING_FEET, false)? - .visit_field::("arms_mounting_reset_mode", Self::VT_ARMS_MOUNTING_RESET_MODE, false)? - .visit_field::("yaw_reset_smooth_time", Self::VT_YAW_RESET_SMOOTH_TIME, false)? - .visit_field::("save_mounting_reset", Self::VT_SAVE_MOUNTING_RESET, false)? - .visit_field::("reset_hmd_pitch", Self::VT_RESET_HMD_PITCH, false)? - .finish(); - Ok(()) - } -} -pub struct ResetsSettingsArgs { - pub reset_mounting_feet: bool, - pub arms_mounting_reset_mode: ArmsMountingResetMode, - pub yaw_reset_smooth_time: f32, - pub save_mounting_reset: bool, - pub reset_hmd_pitch: bool, -} -impl<'a> Default for ResetsSettingsArgs { - #[inline] - fn default() -> Self { - ResetsSettingsArgs { - reset_mounting_feet: false, - arms_mounting_reset_mode: ArmsMountingResetMode::BACK, - yaw_reset_smooth_time: 0.0, - save_mounting_reset: false, - reset_hmd_pitch: false, - } - } -} - -pub struct ResetsSettingsBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> ResetsSettingsBuilder<'a, 'b> { - #[inline] - pub fn add_reset_mounting_feet(&mut self, reset_mounting_feet: bool) { - self.fbb_.push_slot::(ResetsSettings::VT_RESET_MOUNTING_FEET, reset_mounting_feet, false); - } - #[inline] - pub fn add_arms_mounting_reset_mode(&mut self, arms_mounting_reset_mode: ArmsMountingResetMode) { - self.fbb_.push_slot::(ResetsSettings::VT_ARMS_MOUNTING_RESET_MODE, arms_mounting_reset_mode, ArmsMountingResetMode::BACK); - } - #[inline] - pub fn add_yaw_reset_smooth_time(&mut self, yaw_reset_smooth_time: f32) { - self.fbb_.push_slot::(ResetsSettings::VT_YAW_RESET_SMOOTH_TIME, yaw_reset_smooth_time, 0.0); - } - #[inline] - pub fn add_save_mounting_reset(&mut self, save_mounting_reset: bool) { - self.fbb_.push_slot::(ResetsSettings::VT_SAVE_MOUNTING_RESET, save_mounting_reset, false); - } - #[inline] - pub fn add_reset_hmd_pitch(&mut self, reset_hmd_pitch: bool) { - self.fbb_.push_slot::(ResetsSettings::VT_RESET_HMD_PITCH, reset_hmd_pitch, false); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ResetsSettingsBuilder<'a, 'b> { - let start = _fbb.start_table(); - ResetsSettingsBuilder { - 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 ResetsSettings<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("ResetsSettings"); - ds.field("reset_mounting_feet", &self.reset_mounting_feet()); - ds.field("arms_mounting_reset_mode", &self.arms_mounting_reset_mode()); - ds.field("yaw_reset_smooth_time", &self.yaw_reset_smooth_time()); - ds.field("save_mounting_reset", &self.save_mounting_reset()); - ds.field("reset_hmd_pitch", &self.reset_hmd_pitch()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum ResetsSettingsOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct ResetsSettings<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for ResetsSettings<'a> { + type Inner = ResetsSettings<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> ResetsSettings<'a> { + pub const VT_RESET_MOUNTING_FEET: flatbuffers::VOffsetT = 4; + pub const VT_ARMS_MOUNTING_RESET_MODE: flatbuffers::VOffsetT = 6; + pub const VT_YAW_RESET_SMOOTH_TIME: flatbuffers::VOffsetT = 8; + pub const VT_SAVE_MOUNTING_RESET: flatbuffers::VOffsetT = 10; + pub const VT_RESET_HMD_PITCH: flatbuffers::VOffsetT = 12; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ResetsSettings { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args ResetsSettingsArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = ResetsSettingsBuilder::new(_fbb); + builder.add_yaw_reset_smooth_time(args.yaw_reset_smooth_time); + builder.add_reset_hmd_pitch(args.reset_hmd_pitch); + builder.add_save_mounting_reset(args.save_mounting_reset); + builder.add_arms_mounting_reset_mode(args.arms_mounting_reset_mode); + builder.add_reset_mounting_feet(args.reset_mounting_feet); + builder.finish() + } + + + #[inline] + pub fn reset_mounting_feet(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ResetsSettings::VT_RESET_MOUNTING_FEET, Some(false)).unwrap()} + } + #[inline] + pub fn arms_mounting_reset_mode(&self) -> ArmsMountingResetMode { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ResetsSettings::VT_ARMS_MOUNTING_RESET_MODE, Some(ArmsMountingResetMode::BACK)).unwrap()} + } + #[inline] + pub fn yaw_reset_smooth_time(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ResetsSettings::VT_YAW_RESET_SMOOTH_TIME, Some(0.0)).unwrap()} + } + #[inline] + pub fn save_mounting_reset(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ResetsSettings::VT_SAVE_MOUNTING_RESET, Some(false)).unwrap()} + } + #[inline] + pub fn reset_hmd_pitch(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ResetsSettings::VT_RESET_HMD_PITCH, Some(false)).unwrap()} + } +} + +impl flatbuffers::Verifiable for ResetsSettings<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("reset_mounting_feet", Self::VT_RESET_MOUNTING_FEET, false)? + .visit_field::("arms_mounting_reset_mode", Self::VT_ARMS_MOUNTING_RESET_MODE, false)? + .visit_field::("yaw_reset_smooth_time", Self::VT_YAW_RESET_SMOOTH_TIME, false)? + .visit_field::("save_mounting_reset", Self::VT_SAVE_MOUNTING_RESET, false)? + .visit_field::("reset_hmd_pitch", Self::VT_RESET_HMD_PITCH, false)? + .finish(); + Ok(()) + } +} +pub struct ResetsSettingsArgs { + pub reset_mounting_feet: bool, + pub arms_mounting_reset_mode: ArmsMountingResetMode, + pub yaw_reset_smooth_time: f32, + pub save_mounting_reset: bool, + pub reset_hmd_pitch: bool, +} +impl<'a> Default for ResetsSettingsArgs { + #[inline] + fn default() -> Self { + ResetsSettingsArgs { + reset_mounting_feet: false, + arms_mounting_reset_mode: ArmsMountingResetMode::BACK, + yaw_reset_smooth_time: 0.0, + save_mounting_reset: false, + reset_hmd_pitch: false, + } + } +} + +pub struct ResetsSettingsBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> ResetsSettingsBuilder<'a, 'b> { + #[inline] + pub fn add_reset_mounting_feet(&mut self, reset_mounting_feet: bool) { + self.fbb_.push_slot::(ResetsSettings::VT_RESET_MOUNTING_FEET, reset_mounting_feet, false); + } + #[inline] + pub fn add_arms_mounting_reset_mode(&mut self, arms_mounting_reset_mode: ArmsMountingResetMode) { + self.fbb_.push_slot::(ResetsSettings::VT_ARMS_MOUNTING_RESET_MODE, arms_mounting_reset_mode, ArmsMountingResetMode::BACK); + } + #[inline] + pub fn add_yaw_reset_smooth_time(&mut self, yaw_reset_smooth_time: f32) { + self.fbb_.push_slot::(ResetsSettings::VT_YAW_RESET_SMOOTH_TIME, yaw_reset_smooth_time, 0.0); + } + #[inline] + pub fn add_save_mounting_reset(&mut self, save_mounting_reset: bool) { + self.fbb_.push_slot::(ResetsSettings::VT_SAVE_MOUNTING_RESET, save_mounting_reset, false); + } + #[inline] + pub fn add_reset_hmd_pitch(&mut self, reset_hmd_pitch: bool) { + self.fbb_.push_slot::(ResetsSettings::VT_RESET_HMD_PITCH, reset_hmd_pitch, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ResetsSettingsBuilder<'a, 'b> { + let start = _fbb.start_table(); + ResetsSettingsBuilder { + 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 ResetsSettings<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("ResetsSettings"); + ds.field("reset_mounting_feet", &self.reset_mounting_feet()); + ds.field("arms_mounting_reset_mode", &self.arms_mounting_reset_mode()); + ds.field("yaw_reset_smooth_time", &self.yaw_reset_smooth_time()); + ds.field("save_mounting_reset", &self.save_mounting_reset()); + ds.field("reset_hmd_pitch", &self.reset_hmd_pitch()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_generated.rs index 639f6f7c..39289598 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,322 +1,334 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_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 = 57; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -#[allow(non_camel_case_types)] -pub const ENUM_VALUES_RPC_MESSAGE: [RpcMessage; 58] = [ - RpcMessage::NONE, - RpcMessage::HeartbeatRequest, - RpcMessage::HeartbeatResponse, - RpcMessage::ResetRequest, - RpcMessage::ResetResponse, - RpcMessage::AssignTrackerRequest, - RpcMessage::SettingsRequest, - RpcMessage::SettingsResponse, - RpcMessage::ChangeSettingsRequest, - RpcMessage::ClearDriftCompensationRequest, - 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, - RpcMessage::SerialDevicesRequest, - RpcMessage::SerialDevicesResponse, - RpcMessage::NewSerialDeviceResponse, - RpcMessage::StartWifiProvisioningRequest, - RpcMessage::StopWifiProvisioningRequest, - RpcMessage::WifiProvisioningStatusResponse, - RpcMessage::ServerInfosRequest, - RpcMessage::ServerInfosResponse, - RpcMessage::LegTweaksTmpChange, - RpcMessage::LegTweaksTmpClear, - RpcMessage::TapDetectionSetupNotification, - RpcMessage::SetPauseTrackingRequest, - RpcMessage::StatusSystemRequest, - RpcMessage::StatusSystemResponse, - RpcMessage::StatusSystemUpdate, - RpcMessage::StatusSystemFixed, - RpcMessage::ClearMountingResetRequest, - RpcMessage::HeightRequest, - RpcMessage::HeightResponse, - RpcMessage::AutoBoneApplyRequest, - RpcMessage::AutoBoneStopRecordingRequest, - RpcMessage::AutoBoneCancelRecordingRequest, - RpcMessage::SaveFileNotification, - RpcMessage::TrackingPauseStateRequest, - RpcMessage::TrackingPauseStateResponse, - RpcMessage::SerialTrackerGetWifiScanRequest, - RpcMessage::UnknownDeviceHandshakeNotification, - RpcMessage::AddUnknownDeviceRequest, - RpcMessage::ForgetDeviceRequest, -]; - -#[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 ResetResponse: Self = Self(4); - pub const AssignTrackerRequest: Self = Self(5); - pub const SettingsRequest: Self = Self(6); - pub const SettingsResponse: Self = Self(7); - pub const ChangeSettingsRequest: Self = Self(8); - pub const ClearDriftCompensationRequest: Self = Self(9); - pub const RecordBVHRequest: Self = Self(10); - pub const RecordBVHStatus: Self = Self(11); - pub const SkeletonConfigRequest: Self = Self(12); - pub const ChangeSkeletonConfigRequest: Self = Self(13); - pub const SkeletonResetAllRequest: Self = Self(14); - pub const SkeletonConfigResponse: Self = Self(15); - pub const OpenSerialRequest: Self = Self(16); - pub const CloseSerialRequest: Self = Self(17); - pub const SetWifiRequest: Self = Self(18); - pub const SerialUpdateResponse: Self = Self(19); - pub const AutoBoneProcessRequest: Self = Self(20); - pub const AutoBoneProcessStatusResponse: Self = Self(21); - pub const AutoBoneEpochResponse: Self = Self(22); - pub const OverlayDisplayModeRequest: Self = Self(23); - pub const OverlayDisplayModeChangeRequest: Self = Self(24); - pub const OverlayDisplayModeResponse: Self = Self(25); - pub const SerialTrackerRebootRequest: Self = Self(26); - pub const SerialTrackerGetInfoRequest: Self = Self(27); - pub const SerialTrackerFactoryResetRequest: Self = Self(28); - pub const SerialDevicesRequest: Self = Self(29); - pub const SerialDevicesResponse: Self = Self(30); - pub const NewSerialDeviceResponse: Self = Self(31); - pub const StartWifiProvisioningRequest: Self = Self(32); - pub const StopWifiProvisioningRequest: Self = Self(33); - pub const WifiProvisioningStatusResponse: Self = Self(34); - pub const ServerInfosRequest: Self = Self(35); - pub const ServerInfosResponse: Self = Self(36); - pub const LegTweaksTmpChange: Self = Self(37); - pub const LegTweaksTmpClear: Self = Self(38); - pub const TapDetectionSetupNotification: Self = Self(39); - pub const SetPauseTrackingRequest: Self = Self(40); - pub const StatusSystemRequest: Self = Self(41); - pub const StatusSystemResponse: Self = Self(42); - pub const StatusSystemUpdate: Self = Self(43); - pub const StatusSystemFixed: Self = Self(44); - pub const ClearMountingResetRequest: Self = Self(45); - pub const HeightRequest: Self = Self(46); - pub const HeightResponse: Self = Self(47); - pub const AutoBoneApplyRequest: Self = Self(48); - pub const AutoBoneStopRecordingRequest: Self = Self(49); - pub const AutoBoneCancelRecordingRequest: Self = Self(50); - pub const SaveFileNotification: Self = Self(51); - pub const TrackingPauseStateRequest: Self = Self(52); - pub const TrackingPauseStateResponse: Self = Self(53); - pub const SerialTrackerGetWifiScanRequest: Self = Self(54); - pub const UnknownDeviceHandshakeNotification: Self = Self(55); - pub const AddUnknownDeviceRequest: Self = Self(56); - pub const ForgetDeviceRequest: Self = Self(57); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 57; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::NONE, - Self::HeartbeatRequest, - Self::HeartbeatResponse, - Self::ResetRequest, - Self::ResetResponse, - Self::AssignTrackerRequest, - Self::SettingsRequest, - Self::SettingsResponse, - Self::ChangeSettingsRequest, - Self::ClearDriftCompensationRequest, - 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, - Self::SerialDevicesRequest, - Self::SerialDevicesResponse, - Self::NewSerialDeviceResponse, - Self::StartWifiProvisioningRequest, - Self::StopWifiProvisioningRequest, - Self::WifiProvisioningStatusResponse, - Self::ServerInfosRequest, - Self::ServerInfosResponse, - Self::LegTweaksTmpChange, - Self::LegTweaksTmpClear, - Self::TapDetectionSetupNotification, - Self::SetPauseTrackingRequest, - Self::StatusSystemRequest, - Self::StatusSystemResponse, - Self::StatusSystemUpdate, - Self::StatusSystemFixed, - Self::ClearMountingResetRequest, - Self::HeightRequest, - Self::HeightResponse, - Self::AutoBoneApplyRequest, - Self::AutoBoneStopRecordingRequest, - Self::AutoBoneCancelRecordingRequest, - Self::SaveFileNotification, - Self::TrackingPauseStateRequest, - Self::TrackingPauseStateResponse, - Self::SerialTrackerGetWifiScanRequest, - Self::UnknownDeviceHandshakeNotification, - Self::AddUnknownDeviceRequest, - Self::ForgetDeviceRequest, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::NONE => Some("NONE"), - Self::HeartbeatRequest => Some("HeartbeatRequest"), - Self::HeartbeatResponse => Some("HeartbeatResponse"), - Self::ResetRequest => Some("ResetRequest"), - Self::ResetResponse => Some("ResetResponse"), - Self::AssignTrackerRequest => Some("AssignTrackerRequest"), - Self::SettingsRequest => Some("SettingsRequest"), - Self::SettingsResponse => Some("SettingsResponse"), - Self::ChangeSettingsRequest => Some("ChangeSettingsRequest"), - Self::ClearDriftCompensationRequest => Some("ClearDriftCompensationRequest"), - 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"), - Self::SerialDevicesRequest => Some("SerialDevicesRequest"), - Self::SerialDevicesResponse => Some("SerialDevicesResponse"), - Self::NewSerialDeviceResponse => Some("NewSerialDeviceResponse"), - Self::StartWifiProvisioningRequest => Some("StartWifiProvisioningRequest"), - Self::StopWifiProvisioningRequest => Some("StopWifiProvisioningRequest"), - Self::WifiProvisioningStatusResponse => Some("WifiProvisioningStatusResponse"), - Self::ServerInfosRequest => Some("ServerInfosRequest"), - Self::ServerInfosResponse => Some("ServerInfosResponse"), - Self::LegTweaksTmpChange => Some("LegTweaksTmpChange"), - Self::LegTweaksTmpClear => Some("LegTweaksTmpClear"), - Self::TapDetectionSetupNotification => Some("TapDetectionSetupNotification"), - Self::SetPauseTrackingRequest => Some("SetPauseTrackingRequest"), - Self::StatusSystemRequest => Some("StatusSystemRequest"), - Self::StatusSystemResponse => Some("StatusSystemResponse"), - Self::StatusSystemUpdate => Some("StatusSystemUpdate"), - Self::StatusSystemFixed => Some("StatusSystemFixed"), - Self::ClearMountingResetRequest => Some("ClearMountingResetRequest"), - Self::HeightRequest => Some("HeightRequest"), - Self::HeightResponse => Some("HeightResponse"), - Self::AutoBoneApplyRequest => Some("AutoBoneApplyRequest"), - Self::AutoBoneStopRecordingRequest => Some("AutoBoneStopRecordingRequest"), - Self::AutoBoneCancelRecordingRequest => Some("AutoBoneCancelRecordingRequest"), - Self::SaveFileNotification => Some("SaveFileNotification"), - Self::TrackingPauseStateRequest => Some("TrackingPauseStateRequest"), - Self::TrackingPauseStateResponse => Some("TrackingPauseStateResponse"), - Self::SerialTrackerGetWifiScanRequest => Some("SerialTrackerGetWifiScanRequest"), - Self::UnknownDeviceHandshakeNotification => Some("UnknownDeviceHandshakeNotification"), - Self::AddUnknownDeviceRequest => Some("AddUnknownDeviceRequest"), - Self::ForgetDeviceRequest => Some("ForgetDeviceRequest"), - _ => None, - } - } -} -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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for RpcMessage { - type Output = RpcMessage; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for RpcMessage { - type Scalar = u8; - #[inline] - fn to_little_endian(self) -> u8 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u8) -> Self { - let b = u8::from_le(v); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_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 = 60; +#[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; 61] = [ + RpcMessage::NONE, + RpcMessage::HeartbeatRequest, + RpcMessage::HeartbeatResponse, + RpcMessage::ResetRequest, + RpcMessage::ResetResponse, + RpcMessage::AssignTrackerRequest, + RpcMessage::SettingsRequest, + RpcMessage::SettingsResponse, + RpcMessage::ChangeSettingsRequest, + RpcMessage::ClearDriftCompensationRequest, + 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, + RpcMessage::SerialDevicesRequest, + RpcMessage::SerialDevicesResponse, + RpcMessage::NewSerialDeviceResponse, + RpcMessage::StartWifiProvisioningRequest, + RpcMessage::StopWifiProvisioningRequest, + RpcMessage::WifiProvisioningStatusResponse, + RpcMessage::ServerInfosRequest, + RpcMessage::ServerInfosResponse, + RpcMessage::LegTweaksTmpChange, + RpcMessage::LegTweaksTmpClear, + RpcMessage::TapDetectionSetupNotification, + RpcMessage::SetPauseTrackingRequest, + RpcMessage::StatusSystemRequest, + RpcMessage::StatusSystemResponse, + RpcMessage::StatusSystemUpdate, + RpcMessage::StatusSystemFixed, + RpcMessage::ClearMountingResetRequest, + RpcMessage::HeightRequest, + RpcMessage::HeightResponse, + RpcMessage::AutoBoneApplyRequest, + RpcMessage::AutoBoneStopRecordingRequest, + RpcMessage::AutoBoneCancelRecordingRequest, + RpcMessage::SaveFileNotification, + RpcMessage::TrackingPauseStateRequest, + RpcMessage::TrackingPauseStateResponse, + RpcMessage::SerialTrackerGetWifiScanRequest, + RpcMessage::UnknownDeviceHandshakeNotification, + RpcMessage::AddUnknownDeviceRequest, + RpcMessage::ForgetDeviceRequest, + RpcMessage::FirmwareUpdateRequest, + RpcMessage::FirmwareUpdateStatusResponse, + RpcMessage::FirmwareUpdateStopQueuesRequest, +]; + +#[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 ResetResponse: Self = Self(4); + pub const AssignTrackerRequest: Self = Self(5); + pub const SettingsRequest: Self = Self(6); + pub const SettingsResponse: Self = Self(7); + pub const ChangeSettingsRequest: Self = Self(8); + pub const ClearDriftCompensationRequest: Self = Self(9); + pub const RecordBVHRequest: Self = Self(10); + pub const RecordBVHStatus: Self = Self(11); + pub const SkeletonConfigRequest: Self = Self(12); + pub const ChangeSkeletonConfigRequest: Self = Self(13); + pub const SkeletonResetAllRequest: Self = Self(14); + pub const SkeletonConfigResponse: Self = Self(15); + pub const OpenSerialRequest: Self = Self(16); + pub const CloseSerialRequest: Self = Self(17); + pub const SetWifiRequest: Self = Self(18); + pub const SerialUpdateResponse: Self = Self(19); + pub const AutoBoneProcessRequest: Self = Self(20); + pub const AutoBoneProcessStatusResponse: Self = Self(21); + pub const AutoBoneEpochResponse: Self = Self(22); + pub const OverlayDisplayModeRequest: Self = Self(23); + pub const OverlayDisplayModeChangeRequest: Self = Self(24); + pub const OverlayDisplayModeResponse: Self = Self(25); + pub const SerialTrackerRebootRequest: Self = Self(26); + pub const SerialTrackerGetInfoRequest: Self = Self(27); + pub const SerialTrackerFactoryResetRequest: Self = Self(28); + pub const SerialDevicesRequest: Self = Self(29); + pub const SerialDevicesResponse: Self = Self(30); + pub const NewSerialDeviceResponse: Self = Self(31); + pub const StartWifiProvisioningRequest: Self = Self(32); + pub const StopWifiProvisioningRequest: Self = Self(33); + pub const WifiProvisioningStatusResponse: Self = Self(34); + pub const ServerInfosRequest: Self = Self(35); + pub const ServerInfosResponse: Self = Self(36); + pub const LegTweaksTmpChange: Self = Self(37); + pub const LegTweaksTmpClear: Self = Self(38); + pub const TapDetectionSetupNotification: Self = Self(39); + pub const SetPauseTrackingRequest: Self = Self(40); + pub const StatusSystemRequest: Self = Self(41); + pub const StatusSystemResponse: Self = Self(42); + pub const StatusSystemUpdate: Self = Self(43); + pub const StatusSystemFixed: Self = Self(44); + pub const ClearMountingResetRequest: Self = Self(45); + pub const HeightRequest: Self = Self(46); + pub const HeightResponse: Self = Self(47); + pub const AutoBoneApplyRequest: Self = Self(48); + pub const AutoBoneStopRecordingRequest: Self = Self(49); + pub const AutoBoneCancelRecordingRequest: Self = Self(50); + pub const SaveFileNotification: Self = Self(51); + pub const TrackingPauseStateRequest: Self = Self(52); + pub const TrackingPauseStateResponse: Self = Self(53); + pub const SerialTrackerGetWifiScanRequest: Self = Self(54); + pub const UnknownDeviceHandshakeNotification: Self = Self(55); + pub const AddUnknownDeviceRequest: Self = Self(56); + pub const ForgetDeviceRequest: Self = Self(57); + pub const FirmwareUpdateRequest: Self = Self(58); + pub const FirmwareUpdateStatusResponse: Self = Self(59); + pub const FirmwareUpdateStopQueuesRequest: Self = Self(60); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 60; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::NONE, + Self::HeartbeatRequest, + Self::HeartbeatResponse, + Self::ResetRequest, + Self::ResetResponse, + Self::AssignTrackerRequest, + Self::SettingsRequest, + Self::SettingsResponse, + Self::ChangeSettingsRequest, + Self::ClearDriftCompensationRequest, + 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, + Self::SerialDevicesRequest, + Self::SerialDevicesResponse, + Self::NewSerialDeviceResponse, + Self::StartWifiProvisioningRequest, + Self::StopWifiProvisioningRequest, + Self::WifiProvisioningStatusResponse, + Self::ServerInfosRequest, + Self::ServerInfosResponse, + Self::LegTweaksTmpChange, + Self::LegTweaksTmpClear, + Self::TapDetectionSetupNotification, + Self::SetPauseTrackingRequest, + Self::StatusSystemRequest, + Self::StatusSystemResponse, + Self::StatusSystemUpdate, + Self::StatusSystemFixed, + Self::ClearMountingResetRequest, + Self::HeightRequest, + Self::HeightResponse, + Self::AutoBoneApplyRequest, + Self::AutoBoneStopRecordingRequest, + Self::AutoBoneCancelRecordingRequest, + Self::SaveFileNotification, + Self::TrackingPauseStateRequest, + Self::TrackingPauseStateResponse, + Self::SerialTrackerGetWifiScanRequest, + Self::UnknownDeviceHandshakeNotification, + Self::AddUnknownDeviceRequest, + Self::ForgetDeviceRequest, + Self::FirmwareUpdateRequest, + Self::FirmwareUpdateStatusResponse, + Self::FirmwareUpdateStopQueuesRequest, + ]; + /// 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::ResetResponse => Some("ResetResponse"), + Self::AssignTrackerRequest => Some("AssignTrackerRequest"), + Self::SettingsRequest => Some("SettingsRequest"), + Self::SettingsResponse => Some("SettingsResponse"), + Self::ChangeSettingsRequest => Some("ChangeSettingsRequest"), + Self::ClearDriftCompensationRequest => Some("ClearDriftCompensationRequest"), + 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"), + Self::SerialDevicesRequest => Some("SerialDevicesRequest"), + Self::SerialDevicesResponse => Some("SerialDevicesResponse"), + Self::NewSerialDeviceResponse => Some("NewSerialDeviceResponse"), + Self::StartWifiProvisioningRequest => Some("StartWifiProvisioningRequest"), + Self::StopWifiProvisioningRequest => Some("StopWifiProvisioningRequest"), + Self::WifiProvisioningStatusResponse => Some("WifiProvisioningStatusResponse"), + Self::ServerInfosRequest => Some("ServerInfosRequest"), + Self::ServerInfosResponse => Some("ServerInfosResponse"), + Self::LegTweaksTmpChange => Some("LegTweaksTmpChange"), + Self::LegTweaksTmpClear => Some("LegTweaksTmpClear"), + Self::TapDetectionSetupNotification => Some("TapDetectionSetupNotification"), + Self::SetPauseTrackingRequest => Some("SetPauseTrackingRequest"), + Self::StatusSystemRequest => Some("StatusSystemRequest"), + Self::StatusSystemResponse => Some("StatusSystemResponse"), + Self::StatusSystemUpdate => Some("StatusSystemUpdate"), + Self::StatusSystemFixed => Some("StatusSystemFixed"), + Self::ClearMountingResetRequest => Some("ClearMountingResetRequest"), + Self::HeightRequest => Some("HeightRequest"), + Self::HeightResponse => Some("HeightResponse"), + Self::AutoBoneApplyRequest => Some("AutoBoneApplyRequest"), + Self::AutoBoneStopRecordingRequest => Some("AutoBoneStopRecordingRequest"), + Self::AutoBoneCancelRecordingRequest => Some("AutoBoneCancelRecordingRequest"), + Self::SaveFileNotification => Some("SaveFileNotification"), + Self::TrackingPauseStateRequest => Some("TrackingPauseStateRequest"), + Self::TrackingPauseStateResponse => Some("TrackingPauseStateResponse"), + Self::SerialTrackerGetWifiScanRequest => Some("SerialTrackerGetWifiScanRequest"), + Self::UnknownDeviceHandshakeNotification => Some("UnknownDeviceHandshakeNotification"), + Self::AddUnknownDeviceRequest => Some("AddUnknownDeviceRequest"), + Self::ForgetDeviceRequest => Some("ForgetDeviceRequest"), + Self::FirmwareUpdateRequest => Some("FirmwareUpdateRequest"), + Self::FirmwareUpdateStatusResponse => Some("FirmwareUpdateStatusResponse"), + Self::FirmwareUpdateStopQueuesRequest => Some("FirmwareUpdateStopQueuesRequest"), + _ => 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for RpcMessage { + type Output = RpcMessage; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for RpcMessage { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for 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 644facff..0615c694 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,1463 +1,1532 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(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 unsafe 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(RpcMessageHeader::VT_TX_ID, None)} - } - #[inline] - pub fn message_type(&self) -> RpcMessage { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(RpcMessageHeader::VT_MESSAGE_TYPE, Some(RpcMessage::NONE)).unwrap()} - } - #[inline] - pub fn message(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { HeartbeatRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_heartbeat_response(&self) -> Option> { - if self.message_type() == RpcMessage::HeartbeatResponse { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { HeartbeatResponse::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_reset_request(&self) -> Option> { - if self.message_type() == RpcMessage::ResetRequest { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { ResetRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_reset_response(&self) -> Option> { - if self.message_type() == RpcMessage::ResetResponse { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { ResetResponse::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { AssignTrackerRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_settings_request(&self) -> Option> { - if self.message_type() == RpcMessage::SettingsRequest { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { SettingsRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_settings_response(&self) -> Option> { - if self.message_type() == RpcMessage::SettingsResponse { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { SettingsResponse::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { ChangeSettingsRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_clear_drift_compensation_request(&self) -> Option> { - if self.message_type() == RpcMessage::ClearDriftCompensationRequest { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { ClearDriftCompensationRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_record_bvhrequest(&self) -> Option> { - if self.message_type() == RpcMessage::RecordBVHRequest { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { RecordBVHRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_record_bvhstatus(&self) -> Option> { - if self.message_type() == RpcMessage::RecordBVHStatus { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { RecordBVHStatus::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { SkeletonConfigRequest::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { ChangeSkeletonConfigRequest::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { SkeletonResetAllRequest::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { SkeletonConfigResponse::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { OpenSerialRequest::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { CloseSerialRequest::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { SetWifiRequest::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { SerialUpdateResponse::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { AutoBoneProcessRequest::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { AutoBoneProcessStatusResponse::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { AutoBoneEpochResponse::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { OverlayDisplayModeRequest::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { OverlayDisplayModeChangeRequest::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { OverlayDisplayModeResponse::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { SerialTrackerRebootRequest::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { SerialTrackerGetInfoRequest::init_from_table(t) } - }) - } 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(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { SerialTrackerFactoryResetRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_serial_devices_request(&self) -> Option> { - if self.message_type() == RpcMessage::SerialDevicesRequest { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { SerialDevicesRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_serial_devices_response(&self) -> Option> { - if self.message_type() == RpcMessage::SerialDevicesResponse { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { SerialDevicesResponse::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_new_serial_device_response(&self) -> Option> { - if self.message_type() == RpcMessage::NewSerialDeviceResponse { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { NewSerialDeviceResponse::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_start_wifi_provisioning_request(&self) -> Option> { - if self.message_type() == RpcMessage::StartWifiProvisioningRequest { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { StartWifiProvisioningRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_stop_wifi_provisioning_request(&self) -> Option> { - if self.message_type() == RpcMessage::StopWifiProvisioningRequest { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { StopWifiProvisioningRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_wifi_provisioning_status_response(&self) -> Option> { - if self.message_type() == RpcMessage::WifiProvisioningStatusResponse { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { WifiProvisioningStatusResponse::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_server_infos_request(&self) -> Option> { - if self.message_type() == RpcMessage::ServerInfosRequest { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { ServerInfosRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_server_infos_response(&self) -> Option> { - if self.message_type() == RpcMessage::ServerInfosResponse { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { ServerInfosResponse::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_leg_tweaks_tmp_change(&self) -> Option> { - if self.message_type() == RpcMessage::LegTweaksTmpChange { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { LegTweaksTmpChange::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_leg_tweaks_tmp_clear(&self) -> Option> { - if self.message_type() == RpcMessage::LegTweaksTmpClear { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { LegTweaksTmpClear::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_tap_detection_setup_notification(&self) -> Option> { - if self.message_type() == RpcMessage::TapDetectionSetupNotification { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { TapDetectionSetupNotification::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_set_pause_tracking_request(&self) -> Option> { - if self.message_type() == RpcMessage::SetPauseTrackingRequest { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { SetPauseTrackingRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_status_system_request(&self) -> Option> { - if self.message_type() == RpcMessage::StatusSystemRequest { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { StatusSystemRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_status_system_response(&self) -> Option> { - if self.message_type() == RpcMessage::StatusSystemResponse { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { StatusSystemResponse::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_status_system_update(&self) -> Option> { - if self.message_type() == RpcMessage::StatusSystemUpdate { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { StatusSystemUpdate::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_status_system_fixed(&self) -> Option> { - if self.message_type() == RpcMessage::StatusSystemFixed { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { StatusSystemFixed::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_clear_mounting_reset_request(&self) -> Option> { - if self.message_type() == RpcMessage::ClearMountingResetRequest { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { ClearMountingResetRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_height_request(&self) -> Option> { - if self.message_type() == RpcMessage::HeightRequest { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { HeightRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_height_response(&self) -> Option> { - if self.message_type() == RpcMessage::HeightResponse { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { HeightResponse::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_auto_bone_apply_request(&self) -> Option> { - if self.message_type() == RpcMessage::AutoBoneApplyRequest { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { AutoBoneApplyRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_auto_bone_stop_recording_request(&self) -> Option> { - if self.message_type() == RpcMessage::AutoBoneStopRecordingRequest { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { AutoBoneStopRecordingRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_auto_bone_cancel_recording_request(&self) -> Option> { - if self.message_type() == RpcMessage::AutoBoneCancelRecordingRequest { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { AutoBoneCancelRecordingRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_save_file_notification(&self) -> Option> { - if self.message_type() == RpcMessage::SaveFileNotification { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { SaveFileNotification::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_tracking_pause_state_request(&self) -> Option> { - if self.message_type() == RpcMessage::TrackingPauseStateRequest { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { TrackingPauseStateRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_tracking_pause_state_response(&self) -> Option> { - if self.message_type() == RpcMessage::TrackingPauseStateResponse { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { TrackingPauseStateResponse::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_serial_tracker_get_wifi_scan_request(&self) -> Option> { - if self.message_type() == RpcMessage::SerialTrackerGetWifiScanRequest { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { SerialTrackerGetWifiScanRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_unknown_device_handshake_notification(&self) -> Option> { - if self.message_type() == RpcMessage::UnknownDeviceHandshakeNotification { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { UnknownDeviceHandshakeNotification::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_add_unknown_device_request(&self) -> Option> { - if self.message_type() == RpcMessage::AddUnknownDeviceRequest { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { AddUnknownDeviceRequest::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_forget_device_request(&self) -> Option> { - if self.message_type() == RpcMessage::ForgetDeviceRequest { - self.message().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { ForgetDeviceRequest::init_from_table(t) } - }) - } else { - None - } - } - -} - -impl flatbuffers::Verifiable for RpcMessageHeader<'_> { - #[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::ResetResponse => v.verify_union_variant::>("RpcMessage::ResetResponse", 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::ClearDriftCompensationRequest => v.verify_union_variant::>("RpcMessage::ClearDriftCompensationRequest", 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), - RpcMessage::SerialDevicesRequest => v.verify_union_variant::>("RpcMessage::SerialDevicesRequest", pos), - RpcMessage::SerialDevicesResponse => v.verify_union_variant::>("RpcMessage::SerialDevicesResponse", pos), - RpcMessage::NewSerialDeviceResponse => v.verify_union_variant::>("RpcMessage::NewSerialDeviceResponse", pos), - RpcMessage::StartWifiProvisioningRequest => v.verify_union_variant::>("RpcMessage::StartWifiProvisioningRequest", pos), - RpcMessage::StopWifiProvisioningRequest => v.verify_union_variant::>("RpcMessage::StopWifiProvisioningRequest", pos), - RpcMessage::WifiProvisioningStatusResponse => v.verify_union_variant::>("RpcMessage::WifiProvisioningStatusResponse", pos), - RpcMessage::ServerInfosRequest => v.verify_union_variant::>("RpcMessage::ServerInfosRequest", pos), - RpcMessage::ServerInfosResponse => v.verify_union_variant::>("RpcMessage::ServerInfosResponse", pos), - RpcMessage::LegTweaksTmpChange => v.verify_union_variant::>("RpcMessage::LegTweaksTmpChange", pos), - RpcMessage::LegTweaksTmpClear => v.verify_union_variant::>("RpcMessage::LegTweaksTmpClear", pos), - RpcMessage::TapDetectionSetupNotification => v.verify_union_variant::>("RpcMessage::TapDetectionSetupNotification", pos), - RpcMessage::SetPauseTrackingRequest => v.verify_union_variant::>("RpcMessage::SetPauseTrackingRequest", pos), - RpcMessage::StatusSystemRequest => v.verify_union_variant::>("RpcMessage::StatusSystemRequest", pos), - RpcMessage::StatusSystemResponse => v.verify_union_variant::>("RpcMessage::StatusSystemResponse", pos), - RpcMessage::StatusSystemUpdate => v.verify_union_variant::>("RpcMessage::StatusSystemUpdate", pos), - RpcMessage::StatusSystemFixed => v.verify_union_variant::>("RpcMessage::StatusSystemFixed", pos), - RpcMessage::ClearMountingResetRequest => v.verify_union_variant::>("RpcMessage::ClearMountingResetRequest", pos), - RpcMessage::HeightRequest => v.verify_union_variant::>("RpcMessage::HeightRequest", pos), - RpcMessage::HeightResponse => v.verify_union_variant::>("RpcMessage::HeightResponse", pos), - RpcMessage::AutoBoneApplyRequest => v.verify_union_variant::>("RpcMessage::AutoBoneApplyRequest", pos), - RpcMessage::AutoBoneStopRecordingRequest => v.verify_union_variant::>("RpcMessage::AutoBoneStopRecordingRequest", pos), - RpcMessage::AutoBoneCancelRecordingRequest => v.verify_union_variant::>("RpcMessage::AutoBoneCancelRecordingRequest", pos), - RpcMessage::SaveFileNotification => v.verify_union_variant::>("RpcMessage::SaveFileNotification", pos), - RpcMessage::TrackingPauseStateRequest => v.verify_union_variant::>("RpcMessage::TrackingPauseStateRequest", pos), - RpcMessage::TrackingPauseStateResponse => v.verify_union_variant::>("RpcMessage::TrackingPauseStateResponse", pos), - RpcMessage::SerialTrackerGetWifiScanRequest => v.verify_union_variant::>("RpcMessage::SerialTrackerGetWifiScanRequest", pos), - RpcMessage::UnknownDeviceHandshakeNotification => v.verify_union_variant::>("RpcMessage::UnknownDeviceHandshakeNotification", pos), - RpcMessage::AddUnknownDeviceRequest => v.verify_union_variant::>("RpcMessage::AddUnknownDeviceRequest", pos), - RpcMessage::ForgetDeviceRequest => v.verify_union_variant::>("RpcMessage::ForgetDeviceRequest", pos), - _ => Ok(()), - } - })? - .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::ResetResponse => { - if let Some(x) = self.message_as_reset_response() { - 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::ClearDriftCompensationRequest => { - if let Some(x) = self.message_as_clear_drift_compensation_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.") - } - }, - RpcMessage::SerialDevicesRequest => { - if let Some(x) = self.message_as_serial_devices_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::SerialDevicesResponse => { - if let Some(x) = self.message_as_serial_devices_response() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::NewSerialDeviceResponse => { - if let Some(x) = self.message_as_new_serial_device_response() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::StartWifiProvisioningRequest => { - if let Some(x) = self.message_as_start_wifi_provisioning_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::StopWifiProvisioningRequest => { - if let Some(x) = self.message_as_stop_wifi_provisioning_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::WifiProvisioningStatusResponse => { - if let Some(x) = self.message_as_wifi_provisioning_status_response() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::ServerInfosRequest => { - if let Some(x) = self.message_as_server_infos_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::ServerInfosResponse => { - if let Some(x) = self.message_as_server_infos_response() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::LegTweaksTmpChange => { - if let Some(x) = self.message_as_leg_tweaks_tmp_change() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::LegTweaksTmpClear => { - if let Some(x) = self.message_as_leg_tweaks_tmp_clear() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::TapDetectionSetupNotification => { - if let Some(x) = self.message_as_tap_detection_setup_notification() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::SetPauseTrackingRequest => { - if let Some(x) = self.message_as_set_pause_tracking_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::StatusSystemRequest => { - if let Some(x) = self.message_as_status_system_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::StatusSystemResponse => { - if let Some(x) = self.message_as_status_system_response() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::StatusSystemUpdate => { - if let Some(x) = self.message_as_status_system_update() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::StatusSystemFixed => { - if let Some(x) = self.message_as_status_system_fixed() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::ClearMountingResetRequest => { - if let Some(x) = self.message_as_clear_mounting_reset_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::HeightRequest => { - if let Some(x) = self.message_as_height_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::HeightResponse => { - if let Some(x) = self.message_as_height_response() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::AutoBoneApplyRequest => { - if let Some(x) = self.message_as_auto_bone_apply_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::AutoBoneStopRecordingRequest => { - if let Some(x) = self.message_as_auto_bone_stop_recording_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::AutoBoneCancelRecordingRequest => { - if let Some(x) = self.message_as_auto_bone_cancel_recording_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::SaveFileNotification => { - if let Some(x) = self.message_as_save_file_notification() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::TrackingPauseStateRequest => { - if let Some(x) = self.message_as_tracking_pause_state_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::TrackingPauseStateResponse => { - if let Some(x) = self.message_as_tracking_pause_state_response() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::SerialTrackerGetWifiScanRequest => { - if let Some(x) = self.message_as_serial_tracker_get_wifi_scan_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::UnknownDeviceHandshakeNotification => { - if let Some(x) = self.message_as_unknown_device_handshake_notification() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::AddUnknownDeviceRequest => { - if let Some(x) = self.message_as_add_unknown_device_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::ForgetDeviceRequest => { - if let Some(x) = self.message_as_forget_device_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - _ => { - let x: Option<()> = None; - ds.field("message", &x) - }, - }; - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(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 unsafe 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(RpcMessageHeader::VT_TX_ID, None)} + } + #[inline] + pub fn message_type(&self) -> RpcMessage { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(RpcMessageHeader::VT_MESSAGE_TYPE, Some(RpcMessage::NONE)).unwrap()} + } + #[inline] + pub fn message(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { HeartbeatRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_heartbeat_response(&self) -> Option> { + if self.message_type() == RpcMessage::HeartbeatResponse { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { HeartbeatResponse::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_reset_request(&self) -> Option> { + if self.message_type() == RpcMessage::ResetRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { ResetRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_reset_response(&self) -> Option> { + if self.message_type() == RpcMessage::ResetResponse { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { ResetResponse::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { AssignTrackerRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_settings_request(&self) -> Option> { + if self.message_type() == RpcMessage::SettingsRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { SettingsRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_settings_response(&self) -> Option> { + if self.message_type() == RpcMessage::SettingsResponse { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { SettingsResponse::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { ChangeSettingsRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_clear_drift_compensation_request(&self) -> Option> { + if self.message_type() == RpcMessage::ClearDriftCompensationRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { ClearDriftCompensationRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_record_bvhrequest(&self) -> Option> { + if self.message_type() == RpcMessage::RecordBVHRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { RecordBVHRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_record_bvhstatus(&self) -> Option> { + if self.message_type() == RpcMessage::RecordBVHStatus { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { RecordBVHStatus::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { SkeletonConfigRequest::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { ChangeSkeletonConfigRequest::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { SkeletonResetAllRequest::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { SkeletonConfigResponse::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { OpenSerialRequest::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { CloseSerialRequest::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { SetWifiRequest::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { SerialUpdateResponse::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { AutoBoneProcessRequest::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { AutoBoneProcessStatusResponse::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { AutoBoneEpochResponse::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { OverlayDisplayModeRequest::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { OverlayDisplayModeChangeRequest::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { OverlayDisplayModeResponse::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { SerialTrackerRebootRequest::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { SerialTrackerGetInfoRequest::init_from_table(t) } + }) + } 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(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { SerialTrackerFactoryResetRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_serial_devices_request(&self) -> Option> { + if self.message_type() == RpcMessage::SerialDevicesRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { SerialDevicesRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_serial_devices_response(&self) -> Option> { + if self.message_type() == RpcMessage::SerialDevicesResponse { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { SerialDevicesResponse::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_new_serial_device_response(&self) -> Option> { + if self.message_type() == RpcMessage::NewSerialDeviceResponse { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { NewSerialDeviceResponse::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_start_wifi_provisioning_request(&self) -> Option> { + if self.message_type() == RpcMessage::StartWifiProvisioningRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { StartWifiProvisioningRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_stop_wifi_provisioning_request(&self) -> Option> { + if self.message_type() == RpcMessage::StopWifiProvisioningRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { StopWifiProvisioningRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_wifi_provisioning_status_response(&self) -> Option> { + if self.message_type() == RpcMessage::WifiProvisioningStatusResponse { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { WifiProvisioningStatusResponse::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_server_infos_request(&self) -> Option> { + if self.message_type() == RpcMessage::ServerInfosRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { ServerInfosRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_server_infos_response(&self) -> Option> { + if self.message_type() == RpcMessage::ServerInfosResponse { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { ServerInfosResponse::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_leg_tweaks_tmp_change(&self) -> Option> { + if self.message_type() == RpcMessage::LegTweaksTmpChange { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { LegTweaksTmpChange::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_leg_tweaks_tmp_clear(&self) -> Option> { + if self.message_type() == RpcMessage::LegTweaksTmpClear { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { LegTweaksTmpClear::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_tap_detection_setup_notification(&self) -> Option> { + if self.message_type() == RpcMessage::TapDetectionSetupNotification { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { TapDetectionSetupNotification::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_set_pause_tracking_request(&self) -> Option> { + if self.message_type() == RpcMessage::SetPauseTrackingRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { SetPauseTrackingRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_status_system_request(&self) -> Option> { + if self.message_type() == RpcMessage::StatusSystemRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { StatusSystemRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_status_system_response(&self) -> Option> { + if self.message_type() == RpcMessage::StatusSystemResponse { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { StatusSystemResponse::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_status_system_update(&self) -> Option> { + if self.message_type() == RpcMessage::StatusSystemUpdate { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { StatusSystemUpdate::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_status_system_fixed(&self) -> Option> { + if self.message_type() == RpcMessage::StatusSystemFixed { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { StatusSystemFixed::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_clear_mounting_reset_request(&self) -> Option> { + if self.message_type() == RpcMessage::ClearMountingResetRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { ClearMountingResetRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_height_request(&self) -> Option> { + if self.message_type() == RpcMessage::HeightRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { HeightRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_height_response(&self) -> Option> { + if self.message_type() == RpcMessage::HeightResponse { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { HeightResponse::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_auto_bone_apply_request(&self) -> Option> { + if self.message_type() == RpcMessage::AutoBoneApplyRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { AutoBoneApplyRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_auto_bone_stop_recording_request(&self) -> Option> { + if self.message_type() == RpcMessage::AutoBoneStopRecordingRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { AutoBoneStopRecordingRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_auto_bone_cancel_recording_request(&self) -> Option> { + if self.message_type() == RpcMessage::AutoBoneCancelRecordingRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { AutoBoneCancelRecordingRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_save_file_notification(&self) -> Option> { + if self.message_type() == RpcMessage::SaveFileNotification { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { SaveFileNotification::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_tracking_pause_state_request(&self) -> Option> { + if self.message_type() == RpcMessage::TrackingPauseStateRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { TrackingPauseStateRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_tracking_pause_state_response(&self) -> Option> { + if self.message_type() == RpcMessage::TrackingPauseStateResponse { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { TrackingPauseStateResponse::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_serial_tracker_get_wifi_scan_request(&self) -> Option> { + if self.message_type() == RpcMessage::SerialTrackerGetWifiScanRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { SerialTrackerGetWifiScanRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_unknown_device_handshake_notification(&self) -> Option> { + if self.message_type() == RpcMessage::UnknownDeviceHandshakeNotification { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { UnknownDeviceHandshakeNotification::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_add_unknown_device_request(&self) -> Option> { + if self.message_type() == RpcMessage::AddUnknownDeviceRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { AddUnknownDeviceRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_forget_device_request(&self) -> Option> { + if self.message_type() == RpcMessage::ForgetDeviceRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { ForgetDeviceRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_firmware_update_request(&self) -> Option> { + if self.message_type() == RpcMessage::FirmwareUpdateRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { FirmwareUpdateRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_firmware_update_status_response(&self) -> Option> { + if self.message_type() == RpcMessage::FirmwareUpdateStatusResponse { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { FirmwareUpdateStatusResponse::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_firmware_update_stop_queues_request(&self) -> Option> { + if self.message_type() == RpcMessage::FirmwareUpdateStopQueuesRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { FirmwareUpdateStopQueuesRequest::init_from_table(t) } + }) + } 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::ResetResponse => v.verify_union_variant::>("RpcMessage::ResetResponse", 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::ClearDriftCompensationRequest => v.verify_union_variant::>("RpcMessage::ClearDriftCompensationRequest", 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), + RpcMessage::SerialDevicesRequest => v.verify_union_variant::>("RpcMessage::SerialDevicesRequest", pos), + RpcMessage::SerialDevicesResponse => v.verify_union_variant::>("RpcMessage::SerialDevicesResponse", pos), + RpcMessage::NewSerialDeviceResponse => v.verify_union_variant::>("RpcMessage::NewSerialDeviceResponse", pos), + RpcMessage::StartWifiProvisioningRequest => v.verify_union_variant::>("RpcMessage::StartWifiProvisioningRequest", pos), + RpcMessage::StopWifiProvisioningRequest => v.verify_union_variant::>("RpcMessage::StopWifiProvisioningRequest", pos), + RpcMessage::WifiProvisioningStatusResponse => v.verify_union_variant::>("RpcMessage::WifiProvisioningStatusResponse", pos), + RpcMessage::ServerInfosRequest => v.verify_union_variant::>("RpcMessage::ServerInfosRequest", pos), + RpcMessage::ServerInfosResponse => v.verify_union_variant::>("RpcMessage::ServerInfosResponse", pos), + RpcMessage::LegTweaksTmpChange => v.verify_union_variant::>("RpcMessage::LegTweaksTmpChange", pos), + RpcMessage::LegTweaksTmpClear => v.verify_union_variant::>("RpcMessage::LegTweaksTmpClear", pos), + RpcMessage::TapDetectionSetupNotification => v.verify_union_variant::>("RpcMessage::TapDetectionSetupNotification", pos), + RpcMessage::SetPauseTrackingRequest => v.verify_union_variant::>("RpcMessage::SetPauseTrackingRequest", pos), + RpcMessage::StatusSystemRequest => v.verify_union_variant::>("RpcMessage::StatusSystemRequest", pos), + RpcMessage::StatusSystemResponse => v.verify_union_variant::>("RpcMessage::StatusSystemResponse", pos), + RpcMessage::StatusSystemUpdate => v.verify_union_variant::>("RpcMessage::StatusSystemUpdate", pos), + RpcMessage::StatusSystemFixed => v.verify_union_variant::>("RpcMessage::StatusSystemFixed", pos), + RpcMessage::ClearMountingResetRequest => v.verify_union_variant::>("RpcMessage::ClearMountingResetRequest", pos), + RpcMessage::HeightRequest => v.verify_union_variant::>("RpcMessage::HeightRequest", pos), + RpcMessage::HeightResponse => v.verify_union_variant::>("RpcMessage::HeightResponse", pos), + RpcMessage::AutoBoneApplyRequest => v.verify_union_variant::>("RpcMessage::AutoBoneApplyRequest", pos), + RpcMessage::AutoBoneStopRecordingRequest => v.verify_union_variant::>("RpcMessage::AutoBoneStopRecordingRequest", pos), + RpcMessage::AutoBoneCancelRecordingRequest => v.verify_union_variant::>("RpcMessage::AutoBoneCancelRecordingRequest", pos), + RpcMessage::SaveFileNotification => v.verify_union_variant::>("RpcMessage::SaveFileNotification", pos), + RpcMessage::TrackingPauseStateRequest => v.verify_union_variant::>("RpcMessage::TrackingPauseStateRequest", pos), + RpcMessage::TrackingPauseStateResponse => v.verify_union_variant::>("RpcMessage::TrackingPauseStateResponse", pos), + RpcMessage::SerialTrackerGetWifiScanRequest => v.verify_union_variant::>("RpcMessage::SerialTrackerGetWifiScanRequest", pos), + RpcMessage::UnknownDeviceHandshakeNotification => v.verify_union_variant::>("RpcMessage::UnknownDeviceHandshakeNotification", pos), + RpcMessage::AddUnknownDeviceRequest => v.verify_union_variant::>("RpcMessage::AddUnknownDeviceRequest", pos), + RpcMessage::ForgetDeviceRequest => v.verify_union_variant::>("RpcMessage::ForgetDeviceRequest", pos), + RpcMessage::FirmwareUpdateRequest => v.verify_union_variant::>("RpcMessage::FirmwareUpdateRequest", pos), + RpcMessage::FirmwareUpdateStatusResponse => v.verify_union_variant::>("RpcMessage::FirmwareUpdateStatusResponse", pos), + RpcMessage::FirmwareUpdateStopQueuesRequest => v.verify_union_variant::>("RpcMessage::FirmwareUpdateStopQueuesRequest", 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::ResetResponse => { + if let Some(x) = self.message_as_reset_response() { + 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::ClearDriftCompensationRequest => { + if let Some(x) = self.message_as_clear_drift_compensation_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.") + } + }, + RpcMessage::SerialDevicesRequest => { + if let Some(x) = self.message_as_serial_devices_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::SerialDevicesResponse => { + if let Some(x) = self.message_as_serial_devices_response() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::NewSerialDeviceResponse => { + if let Some(x) = self.message_as_new_serial_device_response() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::StartWifiProvisioningRequest => { + if let Some(x) = self.message_as_start_wifi_provisioning_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::StopWifiProvisioningRequest => { + if let Some(x) = self.message_as_stop_wifi_provisioning_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::WifiProvisioningStatusResponse => { + if let Some(x) = self.message_as_wifi_provisioning_status_response() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::ServerInfosRequest => { + if let Some(x) = self.message_as_server_infos_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::ServerInfosResponse => { + if let Some(x) = self.message_as_server_infos_response() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::LegTweaksTmpChange => { + if let Some(x) = self.message_as_leg_tweaks_tmp_change() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::LegTweaksTmpClear => { + if let Some(x) = self.message_as_leg_tweaks_tmp_clear() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::TapDetectionSetupNotification => { + if let Some(x) = self.message_as_tap_detection_setup_notification() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::SetPauseTrackingRequest => { + if let Some(x) = self.message_as_set_pause_tracking_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::StatusSystemRequest => { + if let Some(x) = self.message_as_status_system_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::StatusSystemResponse => { + if let Some(x) = self.message_as_status_system_response() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::StatusSystemUpdate => { + if let Some(x) = self.message_as_status_system_update() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::StatusSystemFixed => { + if let Some(x) = self.message_as_status_system_fixed() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::ClearMountingResetRequest => { + if let Some(x) = self.message_as_clear_mounting_reset_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::HeightRequest => { + if let Some(x) = self.message_as_height_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::HeightResponse => { + if let Some(x) = self.message_as_height_response() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::AutoBoneApplyRequest => { + if let Some(x) = self.message_as_auto_bone_apply_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::AutoBoneStopRecordingRequest => { + if let Some(x) = self.message_as_auto_bone_stop_recording_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::AutoBoneCancelRecordingRequest => { + if let Some(x) = self.message_as_auto_bone_cancel_recording_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::SaveFileNotification => { + if let Some(x) = self.message_as_save_file_notification() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::TrackingPauseStateRequest => { + if let Some(x) = self.message_as_tracking_pause_state_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::TrackingPauseStateResponse => { + if let Some(x) = self.message_as_tracking_pause_state_response() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::SerialTrackerGetWifiScanRequest => { + if let Some(x) = self.message_as_serial_tracker_get_wifi_scan_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::UnknownDeviceHandshakeNotification => { + if let Some(x) = self.message_as_unknown_device_handshake_notification() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::AddUnknownDeviceRequest => { + if let Some(x) = self.message_as_add_unknown_device_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::ForgetDeviceRequest => { + if let Some(x) = self.message_as_forget_device_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::FirmwareUpdateRequest => { + if let Some(x) = self.message_as_firmware_update_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::FirmwareUpdateStatusResponse => { + if let Some(x) = self.message_as_firmware_update_status_response() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::FirmwareUpdateStopQueuesRequest => { + if let Some(x) = self.message_as_firmware_update_stop_queues_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/save_file_notification_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/save_file_notification_generated.rs index d3b2204f..ab2edc97 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/save_file_notification_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/save_file_notification_generated.rs @@ -1,182 +1,182 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum SaveFileNotificationOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Used for the server to save a file and have it prompt in the user side -pub struct SaveFileNotification<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for SaveFileNotification<'a> { - type Inner = SaveFileNotification<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> SaveFileNotification<'a> { - pub const VT_DATA: flatbuffers::VOffsetT = 4; - pub const VT_MIME_TYPE: flatbuffers::VOffsetT = 6; - pub const VT_FILE_EXTENSION: flatbuffers::VOffsetT = 8; - pub const VT_EXPECTED_DIR: flatbuffers::VOffsetT = 10; - pub const VT_EXPECTED_FILENAME: flatbuffers::VOffsetT = 12; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - SaveFileNotification { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args SaveFileNotificationArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = SaveFileNotificationBuilder::new(_fbb); - if let Some(x) = args.expected_filename { builder.add_expected_filename(x); } - if let Some(x) = args.file_extension { builder.add_file_extension(x); } - if let Some(x) = args.mime_type { builder.add_mime_type(x); } - if let Some(x) = args.data { builder.add_data(x); } - if let Some(x) = args.expected_dir { builder.add_expected_dir(x); } - builder.finish() - } - - - /// Binary data of the file - #[inline] - pub fn data(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(SaveFileNotification::VT_DATA, None)} - } - /// MIME type of file if one exists, use `file_extension` otherwise - #[inline] - pub fn mime_type(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SaveFileNotification::VT_MIME_TYPE, None)} - } - /// Use MIME type preferably if one exists - #[inline] - pub fn file_extension(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SaveFileNotification::VT_FILE_EXTENSION, None)} - } - /// Directory recommended to save the file on - #[inline] - pub fn expected_dir(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(SaveFileNotification::VT_EXPECTED_DIR, None)} - } - /// Recommended filename - #[inline] - pub fn expected_filename(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SaveFileNotification::VT_EXPECTED_FILENAME, None)} - } -} - -impl flatbuffers::Verifiable for SaveFileNotification<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>("data", Self::VT_DATA, false)? - .visit_field::>("mime_type", Self::VT_MIME_TYPE, false)? - .visit_field::>("file_extension", Self::VT_FILE_EXTENSION, false)? - .visit_field::("expected_dir", Self::VT_EXPECTED_DIR, false)? - .visit_field::>("expected_filename", Self::VT_EXPECTED_FILENAME, false)? - .finish(); - Ok(()) - } -} -pub struct SaveFileNotificationArgs<'a> { - pub data: Option>>, - pub mime_type: Option>, - pub file_extension: Option>, - pub expected_dir: Option, - pub expected_filename: Option>, -} -impl<'a> Default for SaveFileNotificationArgs<'a> { - #[inline] - fn default() -> Self { - SaveFileNotificationArgs { - data: None, - mime_type: None, - file_extension: None, - expected_dir: None, - expected_filename: None, - } - } -} - -pub struct SaveFileNotificationBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> SaveFileNotificationBuilder<'a, 'b> { - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(SaveFileNotification::VT_DATA, data); - } - #[inline] - pub fn add_mime_type(&mut self, mime_type: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(SaveFileNotification::VT_MIME_TYPE, mime_type); - } - #[inline] - pub fn add_file_extension(&mut self, file_extension: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(SaveFileNotification::VT_FILE_EXTENSION, file_extension); - } - #[inline] - pub fn add_expected_dir(&mut self, expected_dir: ComputerDirectory) { - self.fbb_.push_slot_always::(SaveFileNotification::VT_EXPECTED_DIR, expected_dir); - } - #[inline] - pub fn add_expected_filename(&mut self, expected_filename: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(SaveFileNotification::VT_EXPECTED_FILENAME, expected_filename); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SaveFileNotificationBuilder<'a, 'b> { - let start = _fbb.start_table(); - SaveFileNotificationBuilder { - 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 SaveFileNotification<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("SaveFileNotification"); - ds.field("data", &self.data()); - ds.field("mime_type", &self.mime_type()); - ds.field("file_extension", &self.file_extension()); - ds.field("expected_dir", &self.expected_dir()); - ds.field("expected_filename", &self.expected_filename()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum SaveFileNotificationOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Used for the server to save a file and have it prompt in the user side +pub struct SaveFileNotification<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SaveFileNotification<'a> { + type Inner = SaveFileNotification<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SaveFileNotification<'a> { + pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_MIME_TYPE: flatbuffers::VOffsetT = 6; + pub const VT_FILE_EXTENSION: flatbuffers::VOffsetT = 8; + pub const VT_EXPECTED_DIR: flatbuffers::VOffsetT = 10; + pub const VT_EXPECTED_FILENAME: flatbuffers::VOffsetT = 12; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SaveFileNotification { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args SaveFileNotificationArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = SaveFileNotificationBuilder::new(_fbb); + if let Some(x) = args.expected_filename { builder.add_expected_filename(x); } + if let Some(x) = args.file_extension { builder.add_file_extension(x); } + if let Some(x) = args.mime_type { builder.add_mime_type(x); } + if let Some(x) = args.data { builder.add_data(x); } + if let Some(x) = args.expected_dir { builder.add_expected_dir(x); } + builder.finish() + } + + + /// Binary data of the file + #[inline] + pub fn data(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(SaveFileNotification::VT_DATA, None)} + } + /// MIME type of file if one exists, use `file_extension` otherwise + #[inline] + pub fn mime_type(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SaveFileNotification::VT_MIME_TYPE, None)} + } + /// Use MIME type preferably if one exists + #[inline] + pub fn file_extension(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SaveFileNotification::VT_FILE_EXTENSION, None)} + } + /// Directory recommended to save the file on + #[inline] + pub fn expected_dir(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(SaveFileNotification::VT_EXPECTED_DIR, None)} + } + /// Recommended filename + #[inline] + pub fn expected_filename(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SaveFileNotification::VT_EXPECTED_FILENAME, None)} + } +} + +impl flatbuffers::Verifiable for SaveFileNotification<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>>("data", Self::VT_DATA, false)? + .visit_field::>("mime_type", Self::VT_MIME_TYPE, false)? + .visit_field::>("file_extension", Self::VT_FILE_EXTENSION, false)? + .visit_field::("expected_dir", Self::VT_EXPECTED_DIR, false)? + .visit_field::>("expected_filename", Self::VT_EXPECTED_FILENAME, false)? + .finish(); + Ok(()) + } +} +pub struct SaveFileNotificationArgs<'a> { + pub data: Option>>, + pub mime_type: Option>, + pub file_extension: Option>, + pub expected_dir: Option, + pub expected_filename: Option>, +} +impl<'a> Default for SaveFileNotificationArgs<'a> { + #[inline] + fn default() -> Self { + SaveFileNotificationArgs { + data: None, + mime_type: None, + file_extension: None, + expected_dir: None, + expected_filename: None, + } + } +} + +pub struct SaveFileNotificationBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SaveFileNotificationBuilder<'a, 'b> { + #[inline] + pub fn add_data(&mut self, data: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(SaveFileNotification::VT_DATA, data); + } + #[inline] + pub fn add_mime_type(&mut self, mime_type: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(SaveFileNotification::VT_MIME_TYPE, mime_type); + } + #[inline] + pub fn add_file_extension(&mut self, file_extension: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(SaveFileNotification::VT_FILE_EXTENSION, file_extension); + } + #[inline] + pub fn add_expected_dir(&mut self, expected_dir: ComputerDirectory) { + self.fbb_.push_slot_always::(SaveFileNotification::VT_EXPECTED_DIR, expected_dir); + } + #[inline] + pub fn add_expected_filename(&mut self, expected_filename: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(SaveFileNotification::VT_EXPECTED_FILENAME, expected_filename); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SaveFileNotificationBuilder<'a, 'b> { + let start = _fbb.start_table(); + SaveFileNotificationBuilder { + 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 SaveFileNotification<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("SaveFileNotification"); + ds.field("data", &self.data()); + ds.field("mime_type", &self.mime_type()); + ds.field("file_extension", &self.file_extension()); + ds.field("expected_dir", &self.expected_dir()); + ds.field("expected_filename", &self.expected_filename()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_device_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_device_generated.rs index bf9ec9c9..af6fbf75 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_device_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_device_generated.rs @@ -1,125 +1,125 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum SerialDeviceOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct SerialDevice<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for SerialDevice<'a> { - type Inner = SerialDevice<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> SerialDevice<'a> { - pub const VT_PORT: flatbuffers::VOffsetT = 4; - pub const VT_NAME: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - SerialDevice { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args SerialDeviceArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = SerialDeviceBuilder::new(_fbb); - if let Some(x) = args.name { builder.add_name(x); } - if let Some(x) = args.port { builder.add_port(x); } - builder.finish() - } - - - #[inline] - pub fn port(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SerialDevice::VT_PORT, None)} - } - #[inline] - pub fn name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SerialDevice::VT_NAME, None)} - } -} - -impl flatbuffers::Verifiable for SerialDevice<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("port", Self::VT_PORT, false)? - .visit_field::>("name", Self::VT_NAME, false)? - .finish(); - Ok(()) - } -} -pub struct SerialDeviceArgs<'a> { - pub port: Option>, - pub name: Option>, -} -impl<'a> Default for SerialDeviceArgs<'a> { - #[inline] - fn default() -> Self { - SerialDeviceArgs { - port: None, - name: None, - } - } -} - -pub struct SerialDeviceBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> SerialDeviceBuilder<'a, 'b> { - #[inline] - pub fn add_port(&mut self, port: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(SerialDevice::VT_PORT, port); - } - #[inline] - pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(SerialDevice::VT_NAME, name); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SerialDeviceBuilder<'a, 'b> { - let start = _fbb.start_table(); - SerialDeviceBuilder { - 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 SerialDevice<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("SerialDevice"); - ds.field("port", &self.port()); - ds.field("name", &self.name()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum SerialDeviceOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct SerialDevice<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SerialDevice<'a> { + type Inner = SerialDevice<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SerialDevice<'a> { + pub const VT_PORT: flatbuffers::VOffsetT = 4; + pub const VT_NAME: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SerialDevice { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args SerialDeviceArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = SerialDeviceBuilder::new(_fbb); + if let Some(x) = args.name { builder.add_name(x); } + if let Some(x) = args.port { builder.add_port(x); } + builder.finish() + } + + + #[inline] + pub fn port(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SerialDevice::VT_PORT, None)} + } + #[inline] + pub fn name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SerialDevice::VT_NAME, None)} + } +} + +impl flatbuffers::Verifiable for SerialDevice<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("port", Self::VT_PORT, false)? + .visit_field::>("name", Self::VT_NAME, false)? + .finish(); + Ok(()) + } +} +pub struct SerialDeviceArgs<'a> { + pub port: Option>, + pub name: Option>, +} +impl<'a> Default for SerialDeviceArgs<'a> { + #[inline] + fn default() -> Self { + SerialDeviceArgs { + port: None, + name: None, + } + } +} + +pub struct SerialDeviceBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SerialDeviceBuilder<'a, 'b> { + #[inline] + pub fn add_port(&mut self, port: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(SerialDevice::VT_PORT, port); + } + #[inline] + pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(SerialDevice::VT_NAME, name); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SerialDeviceBuilder<'a, 'b> { + let start = _fbb.start_table(); + SerialDeviceBuilder { + 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 SerialDevice<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("SerialDevice"); + ds.field("port", &self.port()); + ds.field("name", &self.name()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_device_port_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_device_port_generated.rs new file mode 100644 index 00000000..51851ea5 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_device_port_generated.rs @@ -0,0 +1,108 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum SerialDevicePortOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct SerialDevicePort<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SerialDevicePort<'a> { + type Inner = SerialDevicePort<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SerialDevicePort<'a> { + pub const VT_PORT: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SerialDevicePort { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args SerialDevicePortArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = SerialDevicePortBuilder::new(_fbb); + if let Some(x) = args.port { builder.add_port(x); } + builder.finish() + } + + + #[inline] + pub fn port(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SerialDevicePort::VT_PORT, None)} + } +} + +impl flatbuffers::Verifiable for SerialDevicePort<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("port", Self::VT_PORT, false)? + .finish(); + Ok(()) + } +} +pub struct SerialDevicePortArgs<'a> { + pub port: Option>, +} +impl<'a> Default for SerialDevicePortArgs<'a> { + #[inline] + fn default() -> Self { + SerialDevicePortArgs { + port: None, + } + } +} + +pub struct SerialDevicePortBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SerialDevicePortBuilder<'a, 'b> { + #[inline] + pub fn add_port(&mut self, port: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(SerialDevicePort::VT_PORT, port); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SerialDevicePortBuilder<'a, 'b> { + let start = _fbb.start_table(); + SerialDevicePortBuilder { + 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 SerialDevicePort<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("SerialDevicePort"); + ds.field("port", &self.port()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_devices_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_devices_request_generated.rs index 79267f3b..57569a81 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_devices_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_devices_request_generated.rs @@ -1,90 +1,90 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum SerialDevicesRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct SerialDevicesRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for SerialDevicesRequest<'a> { - type Inner = SerialDevicesRequest<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> SerialDevicesRequest<'a> { - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - SerialDevicesRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args SerialDevicesRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = SerialDevicesRequestBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for SerialDevicesRequest<'_> { - #[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 SerialDevicesRequestArgs { -} -impl<'a> Default for SerialDevicesRequestArgs { - #[inline] - fn default() -> Self { - SerialDevicesRequestArgs { - } - } -} - -pub struct SerialDevicesRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> SerialDevicesRequestBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SerialDevicesRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - SerialDevicesRequestBuilder { - 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 SerialDevicesRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("SerialDevicesRequest"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum SerialDevicesRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct SerialDevicesRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SerialDevicesRequest<'a> { + type Inner = SerialDevicesRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SerialDevicesRequest<'a> { + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SerialDevicesRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args SerialDevicesRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = SerialDevicesRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for SerialDevicesRequest<'_> { + #[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 SerialDevicesRequestArgs { +} +impl<'a> Default for SerialDevicesRequestArgs { + #[inline] + fn default() -> Self { + SerialDevicesRequestArgs { + } + } +} + +pub struct SerialDevicesRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SerialDevicesRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SerialDevicesRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + SerialDevicesRequestBuilder { + 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 SerialDevicesRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("SerialDevicesRequest"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_devices_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_devices_response_generated.rs index 40fbf980..a15292dc 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_devices_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_devices_response_generated.rs @@ -1,108 +1,108 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum SerialDevicesResponseOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct SerialDevicesResponse<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for SerialDevicesResponse<'a> { - type Inner = SerialDevicesResponse<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> SerialDevicesResponse<'a> { - pub const VT_DEVICES: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - SerialDevicesResponse { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args SerialDevicesResponseArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = SerialDevicesResponseBuilder::new(_fbb); - if let Some(x) = args.devices { builder.add_devices(x); } - builder.finish() - } - - - #[inline] - pub fn devices(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(SerialDevicesResponse::VT_DEVICES, None)} - } -} - -impl flatbuffers::Verifiable for SerialDevicesResponse<'_> { - #[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)? - .finish(); - Ok(()) - } -} -pub struct SerialDevicesResponseArgs<'a> { - pub devices: Option>>>>, -} -impl<'a> Default for SerialDevicesResponseArgs<'a> { - #[inline] - fn default() -> Self { - SerialDevicesResponseArgs { - devices: None, - } - } -} - -pub struct SerialDevicesResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> SerialDevicesResponseBuilder<'a, 'b> { - #[inline] - pub fn add_devices(&mut self, devices: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(SerialDevicesResponse::VT_DEVICES, devices); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SerialDevicesResponseBuilder<'a, 'b> { - let start = _fbb.start_table(); - SerialDevicesResponseBuilder { - 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 SerialDevicesResponse<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("SerialDevicesResponse"); - ds.field("devices", &self.devices()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum SerialDevicesResponseOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct SerialDevicesResponse<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SerialDevicesResponse<'a> { + type Inner = SerialDevicesResponse<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SerialDevicesResponse<'a> { + pub const VT_DEVICES: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SerialDevicesResponse { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args SerialDevicesResponseArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = SerialDevicesResponseBuilder::new(_fbb); + if let Some(x) = args.devices { builder.add_devices(x); } + builder.finish() + } + + + #[inline] + pub fn devices(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(SerialDevicesResponse::VT_DEVICES, None)} + } +} + +impl flatbuffers::Verifiable for SerialDevicesResponse<'_> { + #[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)? + .finish(); + Ok(()) + } +} +pub struct SerialDevicesResponseArgs<'a> { + pub devices: Option>>>>, +} +impl<'a> Default for SerialDevicesResponseArgs<'a> { + #[inline] + fn default() -> Self { + SerialDevicesResponseArgs { + devices: None, + } + } +} + +pub struct SerialDevicesResponseBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SerialDevicesResponseBuilder<'a, 'b> { + #[inline] + pub fn add_devices(&mut self, devices: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(SerialDevicesResponse::VT_DEVICES, devices); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SerialDevicesResponseBuilder<'a, 'b> { + let start = _fbb.start_table(); + SerialDevicesResponseBuilder { + 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 SerialDevicesResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("SerialDevicesResponse"); + ds.field("devices", &self.devices()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_firmware_update_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_firmware_update_generated.rs new file mode 100644 index 00000000..4d0fd8f9 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_firmware_update_generated.rs @@ -0,0 +1,182 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum SerialFirmwareUpdateOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct SerialFirmwareUpdate<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SerialFirmwareUpdate<'a> { + type Inner = SerialFirmwareUpdate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SerialFirmwareUpdate<'a> { + pub const VT_DEVICE_ID: flatbuffers::VOffsetT = 4; + pub const VT_NEEDMANUALREBOOT: flatbuffers::VOffsetT = 6; + pub const VT_SSID: flatbuffers::VOffsetT = 8; + pub const VT_PASSWORD: flatbuffers::VOffsetT = 10; + pub const VT_FIRMWARE_PART: flatbuffers::VOffsetT = 12; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SerialFirmwareUpdate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args SerialFirmwareUpdateArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = SerialFirmwareUpdateBuilder::new(_fbb); + if let Some(x) = args.firmware_part { builder.add_firmware_part(x); } + if let Some(x) = args.password { builder.add_password(x); } + if let Some(x) = args.ssid { builder.add_ssid(x); } + if let Some(x) = args.device_id { builder.add_device_id(x); } + builder.add_needManualReboot(args.needManualReboot); + builder.finish() + } + + + /// id of the device, this refer to a serial port id + #[inline] + pub fn device_id(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SerialFirmwareUpdate::VT_DEVICE_ID, None)} + } + /// Will make the server ask for the tracker to be manually rebooted by the user + /// after the tracker is done flashing + #[inline] + pub fn needManualReboot(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(SerialFirmwareUpdate::VT_NEEDMANUALREBOOT, Some(false)).unwrap()} + } + /// Credentials to provision after the flashing + /// Only used with Serial flashing, because OTA is already connected to the wifi + #[inline] + pub fn ssid(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SerialFirmwareUpdate::VT_SSID, None)} + } + #[inline] + pub fn password(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SerialFirmwareUpdate::VT_PASSWORD, None)} + } + /// A list of urls and offsets of the different firmware files to flash + #[inline] + pub fn firmware_part(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(SerialFirmwareUpdate::VT_FIRMWARE_PART, None)} + } +} + +impl flatbuffers::Verifiable for SerialFirmwareUpdate<'_> { + #[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::("needManualReboot", Self::VT_NEEDMANUALREBOOT, false)? + .visit_field::>("ssid", Self::VT_SSID, false)? + .visit_field::>("password", Self::VT_PASSWORD, false)? + .visit_field::>>>("firmware_part", Self::VT_FIRMWARE_PART, false)? + .finish(); + Ok(()) + } +} +pub struct SerialFirmwareUpdateArgs<'a> { + pub device_id: Option>>, + pub needManualReboot: bool, + pub ssid: Option>, + pub password: Option>, + pub firmware_part: Option>>>>, +} +impl<'a> Default for SerialFirmwareUpdateArgs<'a> { + #[inline] + fn default() -> Self { + SerialFirmwareUpdateArgs { + device_id: None, + needManualReboot: false, + ssid: None, + password: None, + firmware_part: None, + } + } +} + +pub struct SerialFirmwareUpdateBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SerialFirmwareUpdateBuilder<'a, 'b> { + #[inline] + pub fn add_device_id(&mut self, device_id: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(SerialFirmwareUpdate::VT_DEVICE_ID, device_id); + } + #[inline] + pub fn add_needManualReboot(&mut self, needManualReboot: bool) { + self.fbb_.push_slot::(SerialFirmwareUpdate::VT_NEEDMANUALREBOOT, needManualReboot, false); + } + #[inline] + pub fn add_ssid(&mut self, ssid: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(SerialFirmwareUpdate::VT_SSID, ssid); + } + #[inline] + pub fn add_password(&mut self, password: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(SerialFirmwareUpdate::VT_PASSWORD, password); + } + #[inline] + pub fn add_firmware_part(&mut self, firmware_part: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(SerialFirmwareUpdate::VT_FIRMWARE_PART, firmware_part); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SerialFirmwareUpdateBuilder<'a, 'b> { + let start = _fbb.start_table(); + SerialFirmwareUpdateBuilder { + 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 SerialFirmwareUpdate<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("SerialFirmwareUpdate"); + ds.field("device_id", &self.device_id()); + ds.field("needManualReboot", &self.needManualReboot()); + ds.field("ssid", &self.ssid()); + ds.field("password", &self.password()); + ds.field("firmware_part", &self.firmware_part()); + 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 0ec6141d..bd54aca6 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,91 +1,91 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> SerialTrackerFactoryResetRequest<'a> { - - #[inline] - pub unsafe 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() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SerialTrackerFactoryResetRequest<'a> { + + #[inline] + pub unsafe 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 index 04cee22d..0616339b 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,91 +1,91 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> SerialTrackerGetInfoRequest<'a> { - - #[inline] - pub unsafe 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() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SerialTrackerGetInfoRequest<'a> { + + #[inline] + pub unsafe 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_get_wifi_scan_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_get_wifi_scan_request_generated.rs index 044b54d2..8968f121 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_get_wifi_scan_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_get_wifi_scan_request_generated.rs @@ -1,91 +1,91 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum SerialTrackerGetWifiScanRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Sends the GET WIFISCAN cmd to the current tracker on the serial monitor -pub struct SerialTrackerGetWifiScanRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for SerialTrackerGetWifiScanRequest<'a> { - type Inner = SerialTrackerGetWifiScanRequest<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> SerialTrackerGetWifiScanRequest<'a> { - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - SerialTrackerGetWifiScanRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args SerialTrackerGetWifiScanRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = SerialTrackerGetWifiScanRequestBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for SerialTrackerGetWifiScanRequest<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .finish(); - Ok(()) - } -} -pub struct SerialTrackerGetWifiScanRequestArgs { -} -impl<'a> Default for SerialTrackerGetWifiScanRequestArgs { - #[inline] - fn default() -> Self { - SerialTrackerGetWifiScanRequestArgs { - } - } -} - -pub struct SerialTrackerGetWifiScanRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> SerialTrackerGetWifiScanRequestBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SerialTrackerGetWifiScanRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - SerialTrackerGetWifiScanRequestBuilder { - fbb_: _fbb, - start_: start, - } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } -} - -impl core::fmt::Debug for SerialTrackerGetWifiScanRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("SerialTrackerGetWifiScanRequest"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum SerialTrackerGetWifiScanRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Sends the GET WIFISCAN cmd to the current tracker on the serial monitor +pub struct SerialTrackerGetWifiScanRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SerialTrackerGetWifiScanRequest<'a> { + type Inner = SerialTrackerGetWifiScanRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SerialTrackerGetWifiScanRequest<'a> { + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SerialTrackerGetWifiScanRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args SerialTrackerGetWifiScanRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = SerialTrackerGetWifiScanRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for SerialTrackerGetWifiScanRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .finish(); + Ok(()) + } +} +pub struct SerialTrackerGetWifiScanRequestArgs { +} +impl<'a> Default for SerialTrackerGetWifiScanRequestArgs { + #[inline] + fn default() -> Self { + SerialTrackerGetWifiScanRequestArgs { + } + } +} + +pub struct SerialTrackerGetWifiScanRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SerialTrackerGetWifiScanRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SerialTrackerGetWifiScanRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + SerialTrackerGetWifiScanRequestBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for SerialTrackerGetWifiScanRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("SerialTrackerGetWifiScanRequest"); + ds.finish() + } +} diff --git a/protocol/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 0c0c059f..e5452d7d 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,91 +1,91 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> SerialTrackerRebootRequest<'a> { - - #[inline] - pub unsafe 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() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SerialTrackerRebootRequest<'a> { + + #[inline] + pub unsafe 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/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 cf9dfec0..630bd2ff 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,125 +1,125 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> SerialUpdateResponse<'a> { - pub const VT_LOG: flatbuffers::VOffsetT = 4; - pub const VT_CLOSED: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SerialUpdateResponse::VT_LOG, None)} - } - #[inline] - pub fn closed(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SerialUpdateResponse<'a> { + pub const VT_LOG: flatbuffers::VOffsetT = 4; + pub const VT_CLOSED: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SerialUpdateResponse::VT_LOG, None)} + } + #[inline] + pub fn closed(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/server_infos_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/server_infos_request_generated.rs index 9c1ea95a..d3ecc30e 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/server_infos_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/server_infos_request_generated.rs @@ -1,94 +1,94 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum ServerInfosRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Allows to ask generic infos about the server, -/// like the local ip address, the version of the server, the java version, -/// the current working dir and other informations we might want to show in the gui -/// for information/debug purposes -pub struct ServerInfosRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for ServerInfosRequest<'a> { - type Inner = ServerInfosRequest<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> ServerInfosRequest<'a> { - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - ServerInfosRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args ServerInfosRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = ServerInfosRequestBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for ServerInfosRequest<'_> { - #[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 ServerInfosRequestArgs { -} -impl<'a> Default for ServerInfosRequestArgs { - #[inline] - fn default() -> Self { - ServerInfosRequestArgs { - } - } -} - -pub struct ServerInfosRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> ServerInfosRequestBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ServerInfosRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - ServerInfosRequestBuilder { - 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 ServerInfosRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("ServerInfosRequest"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum ServerInfosRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Allows to ask generic infos about the server, +/// like the local ip address, the version of the server, the java version, +/// the current working dir and other informations we might want to show in the gui +/// for information/debug purposes +pub struct ServerInfosRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for ServerInfosRequest<'a> { + type Inner = ServerInfosRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> ServerInfosRequest<'a> { + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ServerInfosRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args ServerInfosRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = ServerInfosRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for ServerInfosRequest<'_> { + #[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 ServerInfosRequestArgs { +} +impl<'a> Default for ServerInfosRequestArgs { + #[inline] + fn default() -> Self { + ServerInfosRequestArgs { + } + } +} + +pub struct ServerInfosRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> ServerInfosRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ServerInfosRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + ServerInfosRequestBuilder { + 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 ServerInfosRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("ServerInfosRequest"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/server_infos_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/server_infos_response_generated.rs index 052227b5..c4a67a52 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/server_infos_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/server_infos_response_generated.rs @@ -1,112 +1,112 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum ServerInfosResponseOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Holds the Server informations, this is a basic table holding various informations about the currently running server -/// like its local ip address (usefull for standalone users so they can specify the ip of the server more easilly) and any more -/// infos we might want to add in the future. (like java version, working dir, server version ....) -/// This only holds the local ip for now. But there will be other informations added as we chose to display them on the gui for instance -pub struct ServerInfosResponse<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for ServerInfosResponse<'a> { - type Inner = ServerInfosResponse<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> ServerInfosResponse<'a> { - pub const VT_LOCALIP: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - ServerInfosResponse { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args ServerInfosResponseArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = ServerInfosResponseBuilder::new(_fbb); - if let Some(x) = args.localIp { builder.add_localIp(x); } - builder.finish() - } - - - #[inline] - pub fn localIp(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ServerInfosResponse::VT_LOCALIP, None)} - } -} - -impl flatbuffers::Verifiable for ServerInfosResponse<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("localIp", Self::VT_LOCALIP, false)? - .finish(); - Ok(()) - } -} -pub struct ServerInfosResponseArgs<'a> { - pub localIp: Option>, -} -impl<'a> Default for ServerInfosResponseArgs<'a> { - #[inline] - fn default() -> Self { - ServerInfosResponseArgs { - localIp: None, - } - } -} - -pub struct ServerInfosResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> ServerInfosResponseBuilder<'a, 'b> { - #[inline] - pub fn add_localIp(&mut self, localIp: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(ServerInfosResponse::VT_LOCALIP, localIp); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ServerInfosResponseBuilder<'a, 'b> { - let start = _fbb.start_table(); - ServerInfosResponseBuilder { - 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 ServerInfosResponse<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("ServerInfosResponse"); - ds.field("localIp", &self.localIp()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum ServerInfosResponseOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Holds the Server informations, this is a basic table holding various informations about the currently running server +/// like its local ip address (usefull for standalone users so they can specify the ip of the server more easilly) and any more +/// infos we might want to add in the future. (like java version, working dir, server version ....) +/// This only holds the local ip for now. But there will be other informations added as we chose to display them on the gui for instance +pub struct ServerInfosResponse<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for ServerInfosResponse<'a> { + type Inner = ServerInfosResponse<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> ServerInfosResponse<'a> { + pub const VT_LOCALIP: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ServerInfosResponse { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args ServerInfosResponseArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = ServerInfosResponseBuilder::new(_fbb); + if let Some(x) = args.localIp { builder.add_localIp(x); } + builder.finish() + } + + + #[inline] + pub fn localIp(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(ServerInfosResponse::VT_LOCALIP, None)} + } +} + +impl flatbuffers::Verifiable for ServerInfosResponse<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("localIp", Self::VT_LOCALIP, false)? + .finish(); + Ok(()) + } +} +pub struct ServerInfosResponseArgs<'a> { + pub localIp: Option>, +} +impl<'a> Default for ServerInfosResponseArgs<'a> { + #[inline] + fn default() -> Self { + ServerInfosResponseArgs { + localIp: None, + } + } +} + +pub struct ServerInfosResponseBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> ServerInfosResponseBuilder<'a, 'b> { + #[inline] + pub fn add_localIp(&mut self, localIp: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(ServerInfosResponse::VT_LOCALIP, localIp); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ServerInfosResponseBuilder<'a, 'b> { + let start = _fbb.start_table(); + ServerInfosResponseBuilder { + 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 ServerInfosResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("ServerInfosResponse"); + ds.field("localIp", &self.localIp()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/set_pause_tracking_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/set_pause_tracking_request_generated.rs index 9a62544b..0fa6b766 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/set_pause_tracking_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/set_pause_tracking_request_generated.rs @@ -1,109 +1,109 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum SetPauseTrackingRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct SetPauseTrackingRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for SetPauseTrackingRequest<'a> { - type Inner = SetPauseTrackingRequest<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> SetPauseTrackingRequest<'a> { - pub const VT_PAUSETRACKING: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - SetPauseTrackingRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args SetPauseTrackingRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = SetPauseTrackingRequestBuilder::new(_fbb); - builder.add_pauseTracking(args.pauseTracking); - builder.finish() - } - - - /// Pauses skeleton tracking if true, resumes skeleton tracking if false. - #[inline] - pub fn pauseTracking(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(SetPauseTrackingRequest::VT_PAUSETRACKING, Some(false)).unwrap()} - } -} - -impl flatbuffers::Verifiable for SetPauseTrackingRequest<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("pauseTracking", Self::VT_PAUSETRACKING, false)? - .finish(); - Ok(()) - } -} -pub struct SetPauseTrackingRequestArgs { - pub pauseTracking: bool, -} -impl<'a> Default for SetPauseTrackingRequestArgs { - #[inline] - fn default() -> Self { - SetPauseTrackingRequestArgs { - pauseTracking: false, - } - } -} - -pub struct SetPauseTrackingRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> SetPauseTrackingRequestBuilder<'a, 'b> { - #[inline] - pub fn add_pauseTracking(&mut self, pauseTracking: bool) { - self.fbb_.push_slot::(SetPauseTrackingRequest::VT_PAUSETRACKING, pauseTracking, false); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SetPauseTrackingRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - SetPauseTrackingRequestBuilder { - 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 SetPauseTrackingRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("SetPauseTrackingRequest"); - ds.field("pauseTracking", &self.pauseTracking()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum SetPauseTrackingRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct SetPauseTrackingRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SetPauseTrackingRequest<'a> { + type Inner = SetPauseTrackingRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SetPauseTrackingRequest<'a> { + pub const VT_PAUSETRACKING: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SetPauseTrackingRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args SetPauseTrackingRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = SetPauseTrackingRequestBuilder::new(_fbb); + builder.add_pauseTracking(args.pauseTracking); + builder.finish() + } + + + /// Pauses skeleton tracking if true, resumes skeleton tracking if false. + #[inline] + pub fn pauseTracking(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(SetPauseTrackingRequest::VT_PAUSETRACKING, Some(false)).unwrap()} + } +} + +impl flatbuffers::Verifiable for SetPauseTrackingRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("pauseTracking", Self::VT_PAUSETRACKING, false)? + .finish(); + Ok(()) + } +} +pub struct SetPauseTrackingRequestArgs { + pub pauseTracking: bool, +} +impl<'a> Default for SetPauseTrackingRequestArgs { + #[inline] + fn default() -> Self { + SetPauseTrackingRequestArgs { + pauseTracking: false, + } + } +} + +pub struct SetPauseTrackingRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SetPauseTrackingRequestBuilder<'a, 'b> { + #[inline] + pub fn add_pauseTracking(&mut self, pauseTracking: bool) { + self.fbb_.push_slot::(SetPauseTrackingRequest::VT_PAUSETRACKING, pauseTracking, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SetPauseTrackingRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + SetPauseTrackingRequestBuilder { + 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 SetPauseTrackingRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("SetPauseTrackingRequest"); + ds.field("pauseTracking", &self.pauseTracking()); + 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 0e0bee60..f5b87c18 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,125 +1,125 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> SetWifiRequest<'a> { - pub const VT_SSID: flatbuffers::VOffsetT = 4; - pub const VT_PASSWORD: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SetWifiRequest::VT_SSID, None)} - } - #[inline] - pub fn password(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SetWifiRequest<'a> { + pub const VT_SSID: flatbuffers::VOffsetT = 4; + pub const VT_PASSWORD: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SetWifiRequest::VT_SSID, None)} + } + #[inline] + pub fn password(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/settings/leg_tweaks_settings_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/settings/leg_tweaks_settings_generated.rs index 39a24c5c..64f94928 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/settings/leg_tweaks_settings_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/settings/leg_tweaks_settings_generated.rs @@ -1,108 +1,108 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum LegTweaksSettingsOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct LegTweaksSettings<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for LegTweaksSettings<'a> { - type Inner = LegTweaksSettings<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> LegTweaksSettings<'a> { - pub const VT_CORRECTION_STRENGTH: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - LegTweaksSettings { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args LegTweaksSettingsArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = LegTweaksSettingsBuilder::new(_fbb); - if let Some(x) = args.correction_strength { builder.add_correction_strength(x); } - builder.finish() - } - - - #[inline] - pub fn correction_strength(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(LegTweaksSettings::VT_CORRECTION_STRENGTH, None)} - } -} - -impl flatbuffers::Verifiable for LegTweaksSettings<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("correction_strength", Self::VT_CORRECTION_STRENGTH, false)? - .finish(); - Ok(()) - } -} -pub struct LegTweaksSettingsArgs { - pub correction_strength: Option, -} -impl<'a> Default for LegTweaksSettingsArgs { - #[inline] - fn default() -> Self { - LegTweaksSettingsArgs { - correction_strength: None, - } - } -} - -pub struct LegTweaksSettingsBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> LegTweaksSettingsBuilder<'a, 'b> { - #[inline] - pub fn add_correction_strength(&mut self, correction_strength: f32) { - self.fbb_.push_slot_always::(LegTweaksSettings::VT_CORRECTION_STRENGTH, correction_strength); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> LegTweaksSettingsBuilder<'a, 'b> { - let start = _fbb.start_table(); - LegTweaksSettingsBuilder { - 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 LegTweaksSettings<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("LegTweaksSettings"); - ds.field("correction_strength", &self.correction_strength()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum LegTweaksSettingsOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct LegTweaksSettings<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for LegTweaksSettings<'a> { + type Inner = LegTweaksSettings<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> LegTweaksSettings<'a> { + pub const VT_CORRECTION_STRENGTH: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + LegTweaksSettings { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args LegTweaksSettingsArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = LegTweaksSettingsBuilder::new(_fbb); + if let Some(x) = args.correction_strength { builder.add_correction_strength(x); } + builder.finish() + } + + + #[inline] + pub fn correction_strength(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(LegTweaksSettings::VT_CORRECTION_STRENGTH, None)} + } +} + +impl flatbuffers::Verifiable for LegTweaksSettings<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("correction_strength", Self::VT_CORRECTION_STRENGTH, false)? + .finish(); + Ok(()) + } +} +pub struct LegTweaksSettingsArgs { + pub correction_strength: Option, +} +impl<'a> Default for LegTweaksSettingsArgs { + #[inline] + fn default() -> Self { + LegTweaksSettingsArgs { + correction_strength: None, + } + } +} + +pub struct LegTweaksSettingsBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> LegTweaksSettingsBuilder<'a, 'b> { + #[inline] + pub fn add_correction_strength(&mut self, correction_strength: f32) { + self.fbb_.push_slot_always::(LegTweaksSettings::VT_CORRECTION_STRENGTH, correction_strength); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> LegTweaksSettingsBuilder<'a, 'b> { + let start = _fbb.start_table(); + LegTweaksSettingsBuilder { + 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 LegTweaksSettings<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("LegTweaksSettings"); + ds.field("correction_strength", &self.correction_strength()); + 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 6af21232..ac1ec7c6 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,215 +1,215 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(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; - pub const VT_INTERP_KNEE_ANKLE: flatbuffers::VOffsetT = 16; - - #[inline] - pub unsafe 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_ankle { builder.add_interp_knee_ankle(x); } - 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ModelRatios::VT_IMPUTE_WAIST_FROM_CHEST_HIP, None)} - } - #[inline] - pub fn impute_waist_from_chest_legs(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ModelRatios::VT_IMPUTE_WAIST_FROM_CHEST_LEGS, None)} - } - #[inline] - pub fn impute_hip_from_chest_legs(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ModelRatios::VT_IMPUTE_HIP_FROM_CHEST_LEGS, None)} - } - #[inline] - pub fn impute_hip_from_waist_legs(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ModelRatios::VT_INTERP_HIP_LEGS, None)} - } - /// Knee trackers' yaw and roll is set to the lower leg's when 1.0 - #[inline] - pub fn interp_knee_tracker_ankle(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ModelRatios::VT_INTERP_KNEE_TRACKER_ANKLE, None)} - } - /// Upper leg's yaw and roll is set to the lower leg's when 1.0 - #[inline] - pub fn interp_knee_ankle(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ModelRatios::VT_INTERP_KNEE_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)? - .visit_field::("interp_knee_ankle", Self::VT_INTERP_KNEE_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, - pub interp_knee_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, - interp_knee_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 add_interp_knee_ankle(&mut self, interp_knee_ankle: f32) { - self.fbb_.push_slot_always::(ModelRatios::VT_INTERP_KNEE_ANKLE, interp_knee_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.field("interp_knee_ankle", &self.interp_knee_ankle()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(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; + pub const VT_INTERP_KNEE_ANKLE: flatbuffers::VOffsetT = 16; + + #[inline] + pub unsafe 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_ankle { builder.add_interp_knee_ankle(x); } + 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ModelRatios::VT_IMPUTE_WAIST_FROM_CHEST_HIP, None)} + } + #[inline] + pub fn impute_waist_from_chest_legs(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ModelRatios::VT_IMPUTE_WAIST_FROM_CHEST_LEGS, None)} + } + #[inline] + pub fn impute_hip_from_chest_legs(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ModelRatios::VT_IMPUTE_HIP_FROM_CHEST_LEGS, None)} + } + #[inline] + pub fn impute_hip_from_waist_legs(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ModelRatios::VT_INTERP_HIP_LEGS, None)} + } + /// Knee trackers' yaw and roll is set to the lower leg's when 1.0 + #[inline] + pub fn interp_knee_tracker_ankle(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ModelRatios::VT_INTERP_KNEE_TRACKER_ANKLE, None)} + } + /// Upper leg's yaw and roll is set to the lower leg's when 1.0 + #[inline] + pub fn interp_knee_ankle(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ModelRatios::VT_INTERP_KNEE_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)? + .visit_field::("interp_knee_ankle", Self::VT_INTERP_KNEE_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, + pub interp_knee_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, + interp_knee_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 add_interp_knee_ankle(&mut self, interp_knee_ankle: f32) { + self.fbb_.push_slot_always::(ModelRatios::VT_INTERP_KNEE_ANKLE, interp_knee_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.field("interp_knee_ankle", &self.interp_knee_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 251370f6..84eb45fc 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,143 +1,143 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> ModelSettings<'a> { - pub const VT_TOGGLES: flatbuffers::VOffsetT = 4; - pub const VT_RATIOS: flatbuffers::VOffsetT = 6; - pub const VT_LEG_TWEAKS: flatbuffers::VOffsetT = 8; - - #[inline] - pub unsafe 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.leg_tweaks { builder.add_leg_tweaks(x); } - 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ModelSettings::VT_TOGGLES, None)} - } - #[inline] - pub fn ratios(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ModelSettings::VT_RATIOS, None)} - } - #[inline] - pub fn leg_tweaks(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ModelSettings::VT_LEG_TWEAKS, 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)? - .visit_field::>("leg_tweaks", Self::VT_LEG_TWEAKS, false)? - .finish(); - Ok(()) - } -} -pub struct ModelSettingsArgs<'a> { - pub toggles: Option>>, - pub ratios: Option>>, - pub leg_tweaks: Option>>, -} -impl<'a> Default for ModelSettingsArgs<'a> { - #[inline] - fn default() -> Self { - ModelSettingsArgs { - toggles: None, - ratios: None, - leg_tweaks: 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 add_leg_tweaks(&mut self, leg_tweaks: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(ModelSettings::VT_LEG_TWEAKS, leg_tweaks); - } - #[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.field("leg_tweaks", &self.leg_tweaks()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> ModelSettings<'a> { + pub const VT_TOGGLES: flatbuffers::VOffsetT = 4; + pub const VT_RATIOS: flatbuffers::VOffsetT = 6; + pub const VT_LEG_TWEAKS: flatbuffers::VOffsetT = 8; + + #[inline] + pub unsafe 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.leg_tweaks { builder.add_leg_tweaks(x); } + 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(ModelSettings::VT_TOGGLES, None)} + } + #[inline] + pub fn ratios(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(ModelSettings::VT_RATIOS, None)} + } + #[inline] + pub fn leg_tweaks(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(ModelSettings::VT_LEG_TWEAKS, 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)? + .visit_field::>("leg_tweaks", Self::VT_LEG_TWEAKS, false)? + .finish(); + Ok(()) + } +} +pub struct ModelSettingsArgs<'a> { + pub toggles: Option>>, + pub ratios: Option>>, + pub leg_tweaks: Option>>, +} +impl<'a> Default for ModelSettingsArgs<'a> { + #[inline] + fn default() -> Self { + ModelSettingsArgs { + toggles: None, + ratios: None, + leg_tweaks: 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 add_leg_tweaks(&mut self, leg_tweaks: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(ModelSettings::VT_LEG_TWEAKS, leg_tweaks); + } + #[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.field("leg_tweaks", &self.leg_tweaks()); + 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 946782a2..de49c5ab 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,279 +1,279 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(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; - pub const VT_VIVE_EMULATION: flatbuffers::VOffsetT = 16; - pub const VT_TOE_SNAP: flatbuffers::VOffsetT = 18; - pub const VT_FOOT_PLANT: flatbuffers::VOffsetT = 20; - pub const VT_SELF_LOCALIZATION: flatbuffers::VOffsetT = 22; - pub const VT_USE_POSITION: flatbuffers::VOffsetT = 24; - - #[inline] - pub unsafe 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.use_position { builder.add_use_position(x); } - if let Some(x) = args.self_localization { builder.add_self_localization(x); } - if let Some(x) = args.foot_plant { builder.add_foot_plant(x); } - if let Some(x) = args.toe_snap { builder.add_toe_snap(x); } - if let Some(x) = args.vive_emulation { builder.add_vive_emulation(x); } - 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ModelToggles::VT_EXTENDED_SPINE, None)} - } - #[inline] - pub fn extended_pelvis(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ModelToggles::VT_EXTENDED_PELVIS, None)} - } - #[inline] - pub fn extended_knee(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ModelToggles::VT_EXTENDED_KNEE, None)} - } - #[inline] - pub fn force_arms_from_hmd(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ModelToggles::VT_FORCE_ARMS_FROM_HMD, None)} - } - #[inline] - pub fn floor_clip(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ModelToggles::VT_FLOOR_CLIP, None)} - } - #[inline] - pub fn skating_correction(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ModelToggles::VT_SKATING_CORRECTION, None)} - } - #[inline] - pub fn vive_emulation(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ModelToggles::VT_VIVE_EMULATION, None)} - } - #[inline] - pub fn toe_snap(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ModelToggles::VT_TOE_SNAP, None)} - } - #[inline] - pub fn foot_plant(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ModelToggles::VT_FOOT_PLANT, None)} - } - #[inline] - pub fn self_localization(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ModelToggles::VT_SELF_LOCALIZATION, None)} - } - #[inline] - pub fn use_position(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ModelToggles::VT_USE_POSITION, 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)? - .visit_field::("vive_emulation", Self::VT_VIVE_EMULATION, false)? - .visit_field::("toe_snap", Self::VT_TOE_SNAP, false)? - .visit_field::("foot_plant", Self::VT_FOOT_PLANT, false)? - .visit_field::("self_localization", Self::VT_SELF_LOCALIZATION, false)? - .visit_field::("use_position", Self::VT_USE_POSITION, 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, - pub vive_emulation: Option, - pub toe_snap: Option, - pub foot_plant: Option, - pub self_localization: Option, - pub use_position: 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, - vive_emulation: None, - toe_snap: None, - foot_plant: None, - self_localization: None, - use_position: 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 add_vive_emulation(&mut self, vive_emulation: bool) { - self.fbb_.push_slot_always::(ModelToggles::VT_VIVE_EMULATION, vive_emulation); - } - #[inline] - pub fn add_toe_snap(&mut self, toe_snap: bool) { - self.fbb_.push_slot_always::(ModelToggles::VT_TOE_SNAP, toe_snap); - } - #[inline] - pub fn add_foot_plant(&mut self, foot_plant: bool) { - self.fbb_.push_slot_always::(ModelToggles::VT_FOOT_PLANT, foot_plant); - } - #[inline] - pub fn add_self_localization(&mut self, self_localization: bool) { - self.fbb_.push_slot_always::(ModelToggles::VT_SELF_LOCALIZATION, self_localization); - } - #[inline] - pub fn add_use_position(&mut self, use_position: bool) { - self.fbb_.push_slot_always::(ModelToggles::VT_USE_POSITION, use_position); - } - #[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.field("vive_emulation", &self.vive_emulation()); - ds.field("toe_snap", &self.toe_snap()); - ds.field("foot_plant", &self.foot_plant()); - ds.field("self_localization", &self.self_localization()); - ds.field("use_position", &self.use_position()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(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; + pub const VT_VIVE_EMULATION: flatbuffers::VOffsetT = 16; + pub const VT_TOE_SNAP: flatbuffers::VOffsetT = 18; + pub const VT_FOOT_PLANT: flatbuffers::VOffsetT = 20; + pub const VT_SELF_LOCALIZATION: flatbuffers::VOffsetT = 22; + pub const VT_USE_POSITION: flatbuffers::VOffsetT = 24; + + #[inline] + pub unsafe 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.use_position { builder.add_use_position(x); } + if let Some(x) = args.self_localization { builder.add_self_localization(x); } + if let Some(x) = args.foot_plant { builder.add_foot_plant(x); } + if let Some(x) = args.toe_snap { builder.add_toe_snap(x); } + if let Some(x) = args.vive_emulation { builder.add_vive_emulation(x); } + 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ModelToggles::VT_EXTENDED_SPINE, None)} + } + #[inline] + pub fn extended_pelvis(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ModelToggles::VT_EXTENDED_PELVIS, None)} + } + #[inline] + pub fn extended_knee(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ModelToggles::VT_EXTENDED_KNEE, None)} + } + #[inline] + pub fn force_arms_from_hmd(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ModelToggles::VT_FORCE_ARMS_FROM_HMD, None)} + } + #[inline] + pub fn floor_clip(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ModelToggles::VT_FLOOR_CLIP, None)} + } + #[inline] + pub fn skating_correction(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ModelToggles::VT_SKATING_CORRECTION, None)} + } + #[inline] + pub fn vive_emulation(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ModelToggles::VT_VIVE_EMULATION, None)} + } + #[inline] + pub fn toe_snap(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ModelToggles::VT_TOE_SNAP, None)} + } + #[inline] + pub fn foot_plant(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ModelToggles::VT_FOOT_PLANT, None)} + } + #[inline] + pub fn self_localization(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ModelToggles::VT_SELF_LOCALIZATION, None)} + } + #[inline] + pub fn use_position(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ModelToggles::VT_USE_POSITION, 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)? + .visit_field::("vive_emulation", Self::VT_VIVE_EMULATION, false)? + .visit_field::("toe_snap", Self::VT_TOE_SNAP, false)? + .visit_field::("foot_plant", Self::VT_FOOT_PLANT, false)? + .visit_field::("self_localization", Self::VT_SELF_LOCALIZATION, false)? + .visit_field::("use_position", Self::VT_USE_POSITION, 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, + pub vive_emulation: Option, + pub toe_snap: Option, + pub foot_plant: Option, + pub self_localization: Option, + pub use_position: 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, + vive_emulation: None, + toe_snap: None, + foot_plant: None, + self_localization: None, + use_position: 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 add_vive_emulation(&mut self, vive_emulation: bool) { + self.fbb_.push_slot_always::(ModelToggles::VT_VIVE_EMULATION, vive_emulation); + } + #[inline] + pub fn add_toe_snap(&mut self, toe_snap: bool) { + self.fbb_.push_slot_always::(ModelToggles::VT_TOE_SNAP, toe_snap); + } + #[inline] + pub fn add_foot_plant(&mut self, foot_plant: bool) { + self.fbb_.push_slot_always::(ModelToggles::VT_FOOT_PLANT, foot_plant); + } + #[inline] + pub fn add_self_localization(&mut self, self_localization: bool) { + self.fbb_.push_slot_always::(ModelToggles::VT_SELF_LOCALIZATION, self_localization); + } + #[inline] + pub fn add_use_position(&mut self, use_position: bool) { + self.fbb_.push_slot_always::(ModelToggles::VT_USE_POSITION, use_position); + } + #[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.field("vive_emulation", &self.vive_emulation()); + ds.field("toe_snap", &self.toe_snap()); + ds.field("foot_plant", &self.foot_plant()); + ds.field("self_localization", &self.self_localization()); + ds.field("use_position", &self.use_position()); + 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 23376956..d559e547 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,90 +1,90 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> SettingsRequest<'a> { - - #[inline] - pub unsafe 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SettingsRequest<'a> { + + #[inline] + pub unsafe 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() + } +} 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 4326a755..c25472f0 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,261 +1,261 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(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_DRIFT_COMPENSATION: flatbuffers::VOffsetT = 8; - pub const VT_OSC_ROUTER: flatbuffers::VOffsetT = 10; - pub const VT_VRC_OSC: flatbuffers::VOffsetT = 12; - pub const VT_VMC_OSC: flatbuffers::VOffsetT = 14; - pub const VT_MODEL_SETTINGS: flatbuffers::VOffsetT = 16; - pub const VT_TAP_DETECTION_SETTINGS: flatbuffers::VOffsetT = 18; - pub const VT_AUTO_BONE_SETTINGS: flatbuffers::VOffsetT = 20; - pub const VT_RESETS_SETTINGS: flatbuffers::VOffsetT = 22; - - #[inline] - pub unsafe 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.resets_settings { builder.add_resets_settings(x); } - if let Some(x) = args.auto_bone_settings { builder.add_auto_bone_settings(x); } - if let Some(x) = args.tap_detection_settings { builder.add_tap_detection_settings(x); } - if let Some(x) = args.model_settings { builder.add_model_settings(x); } - if let Some(x) = args.vmc_osc { builder.add_vmc_osc(x); } - if let Some(x) = args.vrc_osc { builder.add_vrc_osc(x); } - if let Some(x) = args.osc_router { builder.add_osc_router(x); } - if let Some(x) = args.drift_compensation { builder.add_drift_compensation(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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SettingsResponse::VT_STEAM_VR_TRACKERS, None)} - } - #[inline] - pub fn filtering(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SettingsResponse::VT_FILTERING, None)} - } - #[inline] - pub fn drift_compensation(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SettingsResponse::VT_DRIFT_COMPENSATION, None)} - } - #[inline] - pub fn osc_router(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SettingsResponse::VT_OSC_ROUTER, None)} - } - #[inline] - pub fn vrc_osc(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SettingsResponse::VT_VRC_OSC, None)} - } - #[inline] - pub fn vmc_osc(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SettingsResponse::VT_VMC_OSC, None)} - } - #[inline] - pub fn model_settings(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SettingsResponse::VT_MODEL_SETTINGS, None)} - } - #[inline] - pub fn tap_detection_settings(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SettingsResponse::VT_TAP_DETECTION_SETTINGS, None)} - } - #[inline] - pub fn auto_bone_settings(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SettingsResponse::VT_AUTO_BONE_SETTINGS, None)} - } - #[inline] - pub fn resets_settings(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SettingsResponse::VT_RESETS_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::>("drift_compensation", Self::VT_DRIFT_COMPENSATION, false)? - .visit_field::>("osc_router", Self::VT_OSC_ROUTER, false)? - .visit_field::>("vrc_osc", Self::VT_VRC_OSC, false)? - .visit_field::>("vmc_osc", Self::VT_VMC_OSC, false)? - .visit_field::>("model_settings", Self::VT_MODEL_SETTINGS, false)? - .visit_field::>("tap_detection_settings", Self::VT_TAP_DETECTION_SETTINGS, false)? - .visit_field::>("auto_bone_settings", Self::VT_AUTO_BONE_SETTINGS, false)? - .visit_field::>("resets_settings", Self::VT_RESETS_SETTINGS, false)? - .finish(); - Ok(()) - } -} -pub struct SettingsResponseArgs<'a> { - pub steam_vr_trackers: Option>>, - pub filtering: Option>>, - pub drift_compensation: Option>>, - pub osc_router: Option>>, - pub vrc_osc: Option>>, - pub vmc_osc: Option>>, - pub model_settings: Option>>, - pub tap_detection_settings: Option>>, - pub auto_bone_settings: Option>>, - pub resets_settings: Option>>, -} -impl<'a> Default for SettingsResponseArgs<'a> { - #[inline] - fn default() -> Self { - SettingsResponseArgs { - steam_vr_trackers: None, - filtering: None, - drift_compensation: None, - osc_router: None, - vrc_osc: None, - vmc_osc: None, - model_settings: None, - tap_detection_settings: None, - auto_bone_settings: None, - resets_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_drift_compensation(&mut self, drift_compensation: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(SettingsResponse::VT_DRIFT_COMPENSATION, drift_compensation); - } - #[inline] - pub fn add_osc_router(&mut self, osc_router: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(SettingsResponse::VT_OSC_ROUTER, osc_router); - } - #[inline] - pub fn add_vrc_osc(&mut self, vrc_osc: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(SettingsResponse::VT_VRC_OSC, vrc_osc); - } - #[inline] - pub fn add_vmc_osc(&mut self, vmc_osc: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(SettingsResponse::VT_VMC_OSC, vmc_osc); - } - #[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 add_tap_detection_settings(&mut self, tap_detection_settings: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(SettingsResponse::VT_TAP_DETECTION_SETTINGS, tap_detection_settings); - } - #[inline] - pub fn add_auto_bone_settings(&mut self, auto_bone_settings: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(SettingsResponse::VT_AUTO_BONE_SETTINGS, auto_bone_settings); - } - #[inline] - pub fn add_resets_settings(&mut self, resets_settings: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(SettingsResponse::VT_RESETS_SETTINGS, resets_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("drift_compensation", &self.drift_compensation()); - ds.field("osc_router", &self.osc_router()); - ds.field("vrc_osc", &self.vrc_osc()); - ds.field("vmc_osc", &self.vmc_osc()); - ds.field("model_settings", &self.model_settings()); - ds.field("tap_detection_settings", &self.tap_detection_settings()); - ds.field("auto_bone_settings", &self.auto_bone_settings()); - ds.field("resets_settings", &self.resets_settings()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(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_DRIFT_COMPENSATION: flatbuffers::VOffsetT = 8; + pub const VT_OSC_ROUTER: flatbuffers::VOffsetT = 10; + pub const VT_VRC_OSC: flatbuffers::VOffsetT = 12; + pub const VT_VMC_OSC: flatbuffers::VOffsetT = 14; + pub const VT_MODEL_SETTINGS: flatbuffers::VOffsetT = 16; + pub const VT_TAP_DETECTION_SETTINGS: flatbuffers::VOffsetT = 18; + pub const VT_AUTO_BONE_SETTINGS: flatbuffers::VOffsetT = 20; + pub const VT_RESETS_SETTINGS: flatbuffers::VOffsetT = 22; + + #[inline] + pub unsafe 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.resets_settings { builder.add_resets_settings(x); } + if let Some(x) = args.auto_bone_settings { builder.add_auto_bone_settings(x); } + if let Some(x) = args.tap_detection_settings { builder.add_tap_detection_settings(x); } + if let Some(x) = args.model_settings { builder.add_model_settings(x); } + if let Some(x) = args.vmc_osc { builder.add_vmc_osc(x); } + if let Some(x) = args.vrc_osc { builder.add_vrc_osc(x); } + if let Some(x) = args.osc_router { builder.add_osc_router(x); } + if let Some(x) = args.drift_compensation { builder.add_drift_compensation(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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SettingsResponse::VT_STEAM_VR_TRACKERS, None)} + } + #[inline] + pub fn filtering(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SettingsResponse::VT_FILTERING, None)} + } + #[inline] + pub fn drift_compensation(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SettingsResponse::VT_DRIFT_COMPENSATION, None)} + } + #[inline] + pub fn osc_router(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SettingsResponse::VT_OSC_ROUTER, None)} + } + #[inline] + pub fn vrc_osc(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SettingsResponse::VT_VRC_OSC, None)} + } + #[inline] + pub fn vmc_osc(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SettingsResponse::VT_VMC_OSC, None)} + } + #[inline] + pub fn model_settings(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SettingsResponse::VT_MODEL_SETTINGS, None)} + } + #[inline] + pub fn tap_detection_settings(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SettingsResponse::VT_TAP_DETECTION_SETTINGS, None)} + } + #[inline] + pub fn auto_bone_settings(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SettingsResponse::VT_AUTO_BONE_SETTINGS, None)} + } + #[inline] + pub fn resets_settings(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SettingsResponse::VT_RESETS_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::>("drift_compensation", Self::VT_DRIFT_COMPENSATION, false)? + .visit_field::>("osc_router", Self::VT_OSC_ROUTER, false)? + .visit_field::>("vrc_osc", Self::VT_VRC_OSC, false)? + .visit_field::>("vmc_osc", Self::VT_VMC_OSC, false)? + .visit_field::>("model_settings", Self::VT_MODEL_SETTINGS, false)? + .visit_field::>("tap_detection_settings", Self::VT_TAP_DETECTION_SETTINGS, false)? + .visit_field::>("auto_bone_settings", Self::VT_AUTO_BONE_SETTINGS, false)? + .visit_field::>("resets_settings", Self::VT_RESETS_SETTINGS, false)? + .finish(); + Ok(()) + } +} +pub struct SettingsResponseArgs<'a> { + pub steam_vr_trackers: Option>>, + pub filtering: Option>>, + pub drift_compensation: Option>>, + pub osc_router: Option>>, + pub vrc_osc: Option>>, + pub vmc_osc: Option>>, + pub model_settings: Option>>, + pub tap_detection_settings: Option>>, + pub auto_bone_settings: Option>>, + pub resets_settings: Option>>, +} +impl<'a> Default for SettingsResponseArgs<'a> { + #[inline] + fn default() -> Self { + SettingsResponseArgs { + steam_vr_trackers: None, + filtering: None, + drift_compensation: None, + osc_router: None, + vrc_osc: None, + vmc_osc: None, + model_settings: None, + tap_detection_settings: None, + auto_bone_settings: None, + resets_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_drift_compensation(&mut self, drift_compensation: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(SettingsResponse::VT_DRIFT_COMPENSATION, drift_compensation); + } + #[inline] + pub fn add_osc_router(&mut self, osc_router: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(SettingsResponse::VT_OSC_ROUTER, osc_router); + } + #[inline] + pub fn add_vrc_osc(&mut self, vrc_osc: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(SettingsResponse::VT_VRC_OSC, vrc_osc); + } + #[inline] + pub fn add_vmc_osc(&mut self, vmc_osc: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(SettingsResponse::VT_VMC_OSC, vmc_osc); + } + #[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 add_tap_detection_settings(&mut self, tap_detection_settings: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(SettingsResponse::VT_TAP_DETECTION_SETTINGS, tap_detection_settings); + } + #[inline] + pub fn add_auto_bone_settings(&mut self, auto_bone_settings: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(SettingsResponse::VT_AUTO_BONE_SETTINGS, auto_bone_settings); + } + #[inline] + pub fn add_resets_settings(&mut self, resets_settings: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(SettingsResponse::VT_RESETS_SETTINGS, resets_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("drift_compensation", &self.drift_compensation()); + ds.field("osc_router", &self.osc_router()); + ds.field("vrc_osc", &self.vrc_osc()); + ds.field("vmc_osc", &self.vmc_osc()); + ds.field("model_settings", &self.model_settings()); + ds.field("tap_detection_settings", &self.tap_detection_settings()); + ds.field("auto_bone_settings", &self.auto_bone_settings()); + ds.field("resets_settings", &self.resets_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 b8125bb1..5766ff22 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,176 +1,176 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_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 = 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_SKELETON_BONE: [SkeletonBone; 22] = [ - SkeletonBone::NONE, - SkeletonBone::HEAD, - SkeletonBone::NECK, - SkeletonBone::CHEST, - SkeletonBone::CHEST_OFFSET, - SkeletonBone::WAIST, - SkeletonBone::HIP, - SkeletonBone::HIP_OFFSET, - SkeletonBone::HIPS_WIDTH, - SkeletonBone::UPPER_LEG, - SkeletonBone::LOWER_LEG, - SkeletonBone::FOOT_LENGTH, - SkeletonBone::FOOT_SHIFT, - SkeletonBone::SKELETON_OFFSET, - SkeletonBone::SHOULDERS_DISTANCE, - SkeletonBone::SHOULDERS_WIDTH, - SkeletonBone::UPPER_ARM, - SkeletonBone::LOWER_ARM, - SkeletonBone::HAND_Y, - SkeletonBone::HAND_Z, - SkeletonBone::ELBOW_OFFSET, - SkeletonBone::UPPER_CHEST, -]; - -#[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 CHEST: Self = Self(3); - pub const CHEST_OFFSET: Self = Self(4); - pub const WAIST: Self = Self(5); - pub const HIP: Self = Self(6); - pub const HIP_OFFSET: Self = Self(7); - pub const HIPS_WIDTH: Self = Self(8); - pub const UPPER_LEG: Self = Self(9); - pub const LOWER_LEG: Self = Self(10); - pub const FOOT_LENGTH: Self = Self(11); - pub const FOOT_SHIFT: Self = Self(12); - pub const SKELETON_OFFSET: Self = Self(13); - pub const SHOULDERS_DISTANCE: Self = Self(14); - pub const SHOULDERS_WIDTH: Self = Self(15); - pub const UPPER_ARM: Self = Self(16); - pub const LOWER_ARM: Self = Self(17); - pub const HAND_Y: Self = Self(18); - pub const HAND_Z: Self = Self(19); - pub const ELBOW_OFFSET: Self = Self(20); - pub const UPPER_CHEST: 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::CHEST_OFFSET, - Self::WAIST, - Self::HIP, - Self::HIP_OFFSET, - Self::HIPS_WIDTH, - Self::UPPER_LEG, - Self::LOWER_LEG, - Self::FOOT_LENGTH, - Self::FOOT_SHIFT, - Self::SKELETON_OFFSET, - Self::SHOULDERS_DISTANCE, - Self::SHOULDERS_WIDTH, - Self::UPPER_ARM, - Self::LOWER_ARM, - Self::HAND_Y, - Self::HAND_Z, - Self::ELBOW_OFFSET, - Self::UPPER_CHEST, - ]; - /// 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::CHEST_OFFSET => Some("CHEST_OFFSET"), - Self::WAIST => Some("WAIST"), - Self::HIP => Some("HIP"), - Self::HIP_OFFSET => Some("HIP_OFFSET"), - Self::HIPS_WIDTH => Some("HIPS_WIDTH"), - Self::UPPER_LEG => Some("UPPER_LEG"), - Self::LOWER_LEG => Some("LOWER_LEG"), - Self::FOOT_LENGTH => Some("FOOT_LENGTH"), - Self::FOOT_SHIFT => Some("FOOT_SHIFT"), - Self::SKELETON_OFFSET => Some("SKELETON_OFFSET"), - Self::SHOULDERS_DISTANCE => Some("SHOULDERS_DISTANCE"), - Self::SHOULDERS_WIDTH => Some("SHOULDERS_WIDTH"), - Self::UPPER_ARM => Some("UPPER_ARM"), - Self::LOWER_ARM => Some("LOWER_ARM"), - Self::HAND_Y => Some("HAND_Y"), - Self::HAND_Z => Some("HAND_Z"), - Self::ELBOW_OFFSET => Some("ELBOW_OFFSET"), - Self::UPPER_CHEST => Some("UPPER_CHEST"), - _ => 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for SkeletonBone { - type Output = SkeletonBone; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for SkeletonBone { - type Scalar = u8; - #[inline] - fn to_little_endian(self) -> u8 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u8) -> Self { - let b = u8::from_le(v); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_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 = 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_SKELETON_BONE: [SkeletonBone; 22] = [ + SkeletonBone::NONE, + SkeletonBone::HEAD, + SkeletonBone::NECK, + SkeletonBone::CHEST, + SkeletonBone::CHEST_OFFSET, + SkeletonBone::WAIST, + SkeletonBone::HIP, + SkeletonBone::HIP_OFFSET, + SkeletonBone::HIPS_WIDTH, + SkeletonBone::UPPER_LEG, + SkeletonBone::LOWER_LEG, + SkeletonBone::FOOT_LENGTH, + SkeletonBone::FOOT_SHIFT, + SkeletonBone::SKELETON_OFFSET, + SkeletonBone::SHOULDERS_DISTANCE, + SkeletonBone::SHOULDERS_WIDTH, + SkeletonBone::UPPER_ARM, + SkeletonBone::LOWER_ARM, + SkeletonBone::HAND_Y, + SkeletonBone::HAND_Z, + SkeletonBone::ELBOW_OFFSET, + SkeletonBone::UPPER_CHEST, +]; + +#[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 CHEST: Self = Self(3); + pub const CHEST_OFFSET: Self = Self(4); + pub const WAIST: Self = Self(5); + pub const HIP: Self = Self(6); + pub const HIP_OFFSET: Self = Self(7); + pub const HIPS_WIDTH: Self = Self(8); + pub const UPPER_LEG: Self = Self(9); + pub const LOWER_LEG: Self = Self(10); + pub const FOOT_LENGTH: Self = Self(11); + pub const FOOT_SHIFT: Self = Self(12); + pub const SKELETON_OFFSET: Self = Self(13); + pub const SHOULDERS_DISTANCE: Self = Self(14); + pub const SHOULDERS_WIDTH: Self = Self(15); + pub const UPPER_ARM: Self = Self(16); + pub const LOWER_ARM: Self = Self(17); + pub const HAND_Y: Self = Self(18); + pub const HAND_Z: Self = Self(19); + pub const ELBOW_OFFSET: Self = Self(20); + pub const UPPER_CHEST: 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::CHEST_OFFSET, + Self::WAIST, + Self::HIP, + Self::HIP_OFFSET, + Self::HIPS_WIDTH, + Self::UPPER_LEG, + Self::LOWER_LEG, + Self::FOOT_LENGTH, + Self::FOOT_SHIFT, + Self::SKELETON_OFFSET, + Self::SHOULDERS_DISTANCE, + Self::SHOULDERS_WIDTH, + Self::UPPER_ARM, + Self::LOWER_ARM, + Self::HAND_Y, + Self::HAND_Z, + Self::ELBOW_OFFSET, + Self::UPPER_CHEST, + ]; + /// 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::CHEST_OFFSET => Some("CHEST_OFFSET"), + Self::WAIST => Some("WAIST"), + Self::HIP => Some("HIP"), + Self::HIP_OFFSET => Some("HIP_OFFSET"), + Self::HIPS_WIDTH => Some("HIPS_WIDTH"), + Self::UPPER_LEG => Some("UPPER_LEG"), + Self::LOWER_LEG => Some("LOWER_LEG"), + Self::FOOT_LENGTH => Some("FOOT_LENGTH"), + Self::FOOT_SHIFT => Some("FOOT_SHIFT"), + Self::SKELETON_OFFSET => Some("SKELETON_OFFSET"), + Self::SHOULDERS_DISTANCE => Some("SHOULDERS_DISTANCE"), + Self::SHOULDERS_WIDTH => Some("SHOULDERS_WIDTH"), + Self::UPPER_ARM => Some("UPPER_ARM"), + Self::LOWER_ARM => Some("LOWER_ARM"), + Self::HAND_Y => Some("HAND_Y"), + Self::HAND_Z => Some("HAND_Z"), + Self::ELBOW_OFFSET => Some("ELBOW_OFFSET"), + Self::UPPER_CHEST => Some("UPPER_CHEST"), + _ => 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for SkeletonBone { + type Output = SkeletonBone; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for SkeletonBone { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for 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 08d9c43a..83666d47 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,90 +1,90 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> SkeletonConfigRequest<'a> { - - #[inline] - pub unsafe 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SkeletonConfigRequest<'a> { + + #[inline] + pub unsafe 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() + } +} 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 64bfdbed..aff7407e 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,108 +1,108 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> SkeletonConfigResponse<'a> { - pub const VT_SKELETON_PARTS: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe 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>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SkeletonConfigResponse<'a> { + pub const VT_SKELETON_PARTS: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe 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>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} 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 774f117d..2c3b3a04 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,125 +1,125 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> SkeletonPart<'a> { - pub const VT_BONE: flatbuffers::VOffsetT = 4; - pub const VT_VALUE: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe 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 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(SkeletonPart::VT_BONE, Some(SkeletonBone::NONE)).unwrap()} - } - #[inline] - pub fn value(&self) -> f32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SkeletonPart<'a> { + pub const VT_BONE: flatbuffers::VOffsetT = 4; + pub const VT_VALUE: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe 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 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(SkeletonPart::VT_BONE, Some(SkeletonBone::NONE)).unwrap()} + } + #[inline] + pub fn value(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { 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() + } +} 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 4a3328bd..d666e173 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,90 +1,90 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> SkeletonResetAllRequest<'a> { - - #[inline] - pub unsafe 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 +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SkeletonResetAllRequest<'a> { + + #[inline] + pub unsafe 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() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/start_wifi_provisioning_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/start_wifi_provisioning_request_generated.rs index 020fc4bb..c19b7c6f 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/start_wifi_provisioning_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/start_wifi_provisioning_request_generated.rs @@ -1,142 +1,142 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum StartWifiProvisioningRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct StartWifiProvisioningRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for StartWifiProvisioningRequest<'a> { - type Inner = StartWifiProvisioningRequest<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> StartWifiProvisioningRequest<'a> { - pub const VT_SSID: flatbuffers::VOffsetT = 4; - pub const VT_PASSWORD: flatbuffers::VOffsetT = 6; - pub const VT_PORT: flatbuffers::VOffsetT = 8; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - StartWifiProvisioningRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args StartWifiProvisioningRequestArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = StartWifiProvisioningRequestBuilder::new(_fbb); - if let Some(x) = args.port { builder.add_port(x); } - 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> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(StartWifiProvisioningRequest::VT_SSID, None)} - } - #[inline] - pub fn password(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(StartWifiProvisioningRequest::VT_PASSWORD, None)} - } - #[inline] - pub fn port(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(StartWifiProvisioningRequest::VT_PORT, None)} - } -} - -impl flatbuffers::Verifiable for StartWifiProvisioningRequest<'_> { - #[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)? - .visit_field::>("port", Self::VT_PORT, false)? - .finish(); - Ok(()) - } -} -pub struct StartWifiProvisioningRequestArgs<'a> { - pub ssid: Option>, - pub password: Option>, - pub port: Option>, -} -impl<'a> Default for StartWifiProvisioningRequestArgs<'a> { - #[inline] - fn default() -> Self { - StartWifiProvisioningRequestArgs { - ssid: None, - password: None, - port: None, - } - } -} - -pub struct StartWifiProvisioningRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> StartWifiProvisioningRequestBuilder<'a, 'b> { - #[inline] - pub fn add_ssid(&mut self, ssid: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(StartWifiProvisioningRequest::VT_SSID, ssid); - } - #[inline] - pub fn add_password(&mut self, password: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(StartWifiProvisioningRequest::VT_PASSWORD, password); - } - #[inline] - pub fn add_port(&mut self, port: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(StartWifiProvisioningRequest::VT_PORT, port); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StartWifiProvisioningRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - StartWifiProvisioningRequestBuilder { - 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 StartWifiProvisioningRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("StartWifiProvisioningRequest"); - ds.field("ssid", &self.ssid()); - ds.field("password", &self.password()); - ds.field("port", &self.port()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum StartWifiProvisioningRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct StartWifiProvisioningRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for StartWifiProvisioningRequest<'a> { + type Inner = StartWifiProvisioningRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> StartWifiProvisioningRequest<'a> { + pub const VT_SSID: flatbuffers::VOffsetT = 4; + pub const VT_PASSWORD: flatbuffers::VOffsetT = 6; + pub const VT_PORT: flatbuffers::VOffsetT = 8; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + StartWifiProvisioningRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args StartWifiProvisioningRequestArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = StartWifiProvisioningRequestBuilder::new(_fbb); + if let Some(x) = args.port { builder.add_port(x); } + 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> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(StartWifiProvisioningRequest::VT_SSID, None)} + } + #[inline] + pub fn password(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(StartWifiProvisioningRequest::VT_PASSWORD, None)} + } + #[inline] + pub fn port(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(StartWifiProvisioningRequest::VT_PORT, None)} + } +} + +impl flatbuffers::Verifiable for StartWifiProvisioningRequest<'_> { + #[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)? + .visit_field::>("port", Self::VT_PORT, false)? + .finish(); + Ok(()) + } +} +pub struct StartWifiProvisioningRequestArgs<'a> { + pub ssid: Option>, + pub password: Option>, + pub port: Option>, +} +impl<'a> Default for StartWifiProvisioningRequestArgs<'a> { + #[inline] + fn default() -> Self { + StartWifiProvisioningRequestArgs { + ssid: None, + password: None, + port: None, + } + } +} + +pub struct StartWifiProvisioningRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> StartWifiProvisioningRequestBuilder<'a, 'b> { + #[inline] + pub fn add_ssid(&mut self, ssid: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(StartWifiProvisioningRequest::VT_SSID, ssid); + } + #[inline] + pub fn add_password(&mut self, password: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(StartWifiProvisioningRequest::VT_PASSWORD, password); + } + #[inline] + pub fn add_port(&mut self, port: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(StartWifiProvisioningRequest::VT_PORT, port); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StartWifiProvisioningRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + StartWifiProvisioningRequestBuilder { + 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 StartWifiProvisioningRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("StartWifiProvisioningRequest"); + ds.field("ssid", &self.ssid()); + ds.field("password", &self.password()); + ds.field("port", &self.port()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/status_data_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/status_data_generated.rs index 11121adc..b46b924a 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/status_data_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/status_data_generated.rs @@ -1,110 +1,110 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_STATUS_DATA: u8 = 0; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_STATUS_DATA: 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_STATUS_DATA: [StatusData; 5] = [ - StatusData::NONE, - StatusData::StatusTrackerReset, - StatusData::StatusTrackerError, - StatusData::StatusSteamVRDisconnected, - StatusData::StatusUnassignedHMD, -]; - -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[repr(transparent)] -pub struct StatusData(pub u8); -#[allow(non_upper_case_globals)] -impl StatusData { - pub const NONE: Self = Self(0); - pub const StatusTrackerReset: Self = Self(1); - pub const StatusTrackerError: Self = Self(2); - pub const StatusSteamVRDisconnected: Self = Self(3); - pub const StatusUnassignedHMD: Self = Self(4); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 4; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::NONE, - Self::StatusTrackerReset, - Self::StatusTrackerError, - Self::StatusSteamVRDisconnected, - Self::StatusUnassignedHMD, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::NONE => Some("NONE"), - Self::StatusTrackerReset => Some("StatusTrackerReset"), - Self::StatusTrackerError => Some("StatusTrackerError"), - Self::StatusSteamVRDisconnected => Some("StatusSteamVRDisconnected"), - Self::StatusUnassignedHMD => Some("StatusUnassignedHMD"), - _ => None, - } - } -} -impl core::fmt::Debug for StatusData { - 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 StatusData { - type Inner = Self; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for StatusData { - type Output = StatusData; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for StatusData { - type Scalar = u8; - #[inline] - fn to_little_endian(self) -> u8 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u8) -> Self { - let b = u8::from_le(v); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for StatusData { - #[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 StatusData {} -pub struct StatusDataUnionTableOffset {} - +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_STATUS_DATA: u8 = 0; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MAX_STATUS_DATA: 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_STATUS_DATA: [StatusData; 5] = [ + StatusData::NONE, + StatusData::StatusTrackerReset, + StatusData::StatusTrackerError, + StatusData::StatusSteamVRDisconnected, + StatusData::StatusUnassignedHMD, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct StatusData(pub u8); +#[allow(non_upper_case_globals)] +impl StatusData { + pub const NONE: Self = Self(0); + pub const StatusTrackerReset: Self = Self(1); + pub const StatusTrackerError: Self = Self(2); + pub const StatusSteamVRDisconnected: Self = Self(3); + pub const StatusUnassignedHMD: Self = Self(4); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 4; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::NONE, + Self::StatusTrackerReset, + Self::StatusTrackerError, + Self::StatusSteamVRDisconnected, + Self::StatusUnassignedHMD, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::NONE => Some("NONE"), + Self::StatusTrackerReset => Some("StatusTrackerReset"), + Self::StatusTrackerError => Some("StatusTrackerError"), + Self::StatusSteamVRDisconnected => Some("StatusSteamVRDisconnected"), + Self::StatusUnassignedHMD => Some("StatusUnassignedHMD"), + _ => None, + } + } +} +impl core::fmt::Debug for StatusData { + 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 StatusData { + type Inner = Self; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for StatusData { + type Output = StatusData; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for StatusData { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for StatusData { + #[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 StatusData {} +pub struct StatusDataUnionTableOffset {} + diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/status_message_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/status_message_generated.rs index d5fa56f8..bf88f9f0 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/status_message_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/status_message_generated.rs @@ -1,263 +1,263 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum StatusMessageOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// An status is some kind of warning sent by the server, it's mainly made for -/// showing problems with the server and need attention from the user. -pub struct StatusMessage<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for StatusMessage<'a> { - type Inner = StatusMessage<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> StatusMessage<'a> { - pub const VT_ID: flatbuffers::VOffsetT = 4; - pub const VT_PRIORITIZED: flatbuffers::VOffsetT = 6; - pub const VT_DATA_TYPE: flatbuffers::VOffsetT = 8; - pub const VT_DATA: flatbuffers::VOffsetT = 10; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - StatusMessage { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args StatusMessageArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = StatusMessageBuilder::new(_fbb); - if let Some(x) = args.data { builder.add_data(x); } - builder.add_id(args.id); - builder.add_data_type(args.data_type); - builder.add_prioritized(args.prioritized); - builder.finish() - } - - - /// The status ID - #[inline] - pub fn id(&self) -> u32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(StatusMessage::VT_ID, Some(0)).unwrap()} - } - /// This should be prioritized in the GUI in some way if true - #[inline] - pub fn prioritized(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(StatusMessage::VT_PRIORITIZED, Some(false)).unwrap()} - } - #[inline] - pub fn data_type(&self) -> StatusData { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(StatusMessage::VT_DATA_TYPE, Some(StatusData::NONE)).unwrap()} - } - #[inline] - pub fn data(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(StatusMessage::VT_DATA, None)} - } - #[inline] - #[allow(non_snake_case)] - pub fn data_as_status_tracker_reset(&self) -> Option> { - if self.data_type() == StatusData::StatusTrackerReset { - self.data().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { StatusTrackerReset::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn data_as_status_tracker_error(&self) -> Option> { - if self.data_type() == StatusData::StatusTrackerError { - self.data().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { StatusTrackerError::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn data_as_status_steam_vrdisconnected(&self) -> Option> { - if self.data_type() == StatusData::StatusSteamVRDisconnected { - self.data().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { StatusSteamVRDisconnected::init_from_table(t) } - }) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn data_as_status_unassigned_hmd(&self) -> Option> { - if self.data_type() == StatusData::StatusUnassignedHMD { - self.data().map(|t| { - // Safety: - // Created from a valid Table for this object - // Which contains a valid union in this slot - unsafe { StatusUnassignedHMD::init_from_table(t) } - }) - } else { - None - } - } - -} - -impl flatbuffers::Verifiable for StatusMessage<'_> { - #[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::("prioritized", Self::VT_PRIORITIZED, false)? - .visit_union::("data_type", Self::VT_DATA_TYPE, "data", Self::VT_DATA, false, |key, v, pos| { - match key { - StatusData::StatusTrackerReset => v.verify_union_variant::>("StatusData::StatusTrackerReset", pos), - StatusData::StatusTrackerError => v.verify_union_variant::>("StatusData::StatusTrackerError", pos), - StatusData::StatusSteamVRDisconnected => v.verify_union_variant::>("StatusData::StatusSteamVRDisconnected", pos), - StatusData::StatusUnassignedHMD => v.verify_union_variant::>("StatusData::StatusUnassignedHMD", pos), - _ => Ok(()), - } - })? - .finish(); - Ok(()) - } -} -pub struct StatusMessageArgs { - pub id: u32, - pub prioritized: bool, - pub data_type: StatusData, - pub data: Option>, -} -impl<'a> Default for StatusMessageArgs { - #[inline] - fn default() -> Self { - StatusMessageArgs { - id: 0, - prioritized: false, - data_type: StatusData::NONE, - data: None, - } - } -} - -pub struct StatusMessageBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> StatusMessageBuilder<'a, 'b> { - #[inline] - pub fn add_id(&mut self, id: u32) { - self.fbb_.push_slot::(StatusMessage::VT_ID, id, 0); - } - #[inline] - pub fn add_prioritized(&mut self, prioritized: bool) { - self.fbb_.push_slot::(StatusMessage::VT_PRIORITIZED, prioritized, false); - } - #[inline] - pub fn add_data_type(&mut self, data_type: StatusData) { - self.fbb_.push_slot::(StatusMessage::VT_DATA_TYPE, data_type, StatusData::NONE); - } - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset) { - self.fbb_.push_slot_always::>(StatusMessage::VT_DATA, data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StatusMessageBuilder<'a, 'b> { - let start = _fbb.start_table(); - StatusMessageBuilder { - 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 StatusMessage<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("StatusMessage"); - ds.field("id", &self.id()); - ds.field("prioritized", &self.prioritized()); - ds.field("data_type", &self.data_type()); - match self.data_type() { - StatusData::StatusTrackerReset => { - if let Some(x) = self.data_as_status_tracker_reset() { - ds.field("data", &x) - } else { - ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - StatusData::StatusTrackerError => { - if let Some(x) = self.data_as_status_tracker_error() { - ds.field("data", &x) - } else { - ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - StatusData::StatusSteamVRDisconnected => { - if let Some(x) = self.data_as_status_steam_vrdisconnected() { - ds.field("data", &x) - } else { - ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - StatusData::StatusUnassignedHMD => { - if let Some(x) = self.data_as_status_unassigned_hmd() { - ds.field("data", &x) - } else { - ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - _ => { - let x: Option<()> = None; - ds.field("data", &x) - }, - }; - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum StatusMessageOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// An status is some kind of warning sent by the server, it's mainly made for +/// showing problems with the server and need attention from the user. +pub struct StatusMessage<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for StatusMessage<'a> { + type Inner = StatusMessage<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> StatusMessage<'a> { + pub const VT_ID: flatbuffers::VOffsetT = 4; + pub const VT_PRIORITIZED: flatbuffers::VOffsetT = 6; + pub const VT_DATA_TYPE: flatbuffers::VOffsetT = 8; + pub const VT_DATA: flatbuffers::VOffsetT = 10; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + StatusMessage { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args StatusMessageArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = StatusMessageBuilder::new(_fbb); + if let Some(x) = args.data { builder.add_data(x); } + builder.add_id(args.id); + builder.add_data_type(args.data_type); + builder.add_prioritized(args.prioritized); + builder.finish() + } + + + /// The status ID + #[inline] + pub fn id(&self) -> u32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StatusMessage::VT_ID, Some(0)).unwrap()} + } + /// This should be prioritized in the GUI in some way if true + #[inline] + pub fn prioritized(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StatusMessage::VT_PRIORITIZED, Some(false)).unwrap()} + } + #[inline] + pub fn data_type(&self) -> StatusData { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StatusMessage::VT_DATA_TYPE, Some(StatusData::NONE)).unwrap()} + } + #[inline] + pub fn data(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(StatusMessage::VT_DATA, None)} + } + #[inline] + #[allow(non_snake_case)] + pub fn data_as_status_tracker_reset(&self) -> Option> { + if self.data_type() == StatusData::StatusTrackerReset { + self.data().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { StatusTrackerReset::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn data_as_status_tracker_error(&self) -> Option> { + if self.data_type() == StatusData::StatusTrackerError { + self.data().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { StatusTrackerError::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn data_as_status_steam_vrdisconnected(&self) -> Option> { + if self.data_type() == StatusData::StatusSteamVRDisconnected { + self.data().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { StatusSteamVRDisconnected::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn data_as_status_unassigned_hmd(&self) -> Option> { + if self.data_type() == StatusData::StatusUnassignedHMD { + self.data().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { StatusUnassignedHMD::init_from_table(t) } + }) + } else { + None + } + } + +} + +impl flatbuffers::Verifiable for StatusMessage<'_> { + #[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::("prioritized", Self::VT_PRIORITIZED, false)? + .visit_union::("data_type", Self::VT_DATA_TYPE, "data", Self::VT_DATA, false, |key, v, pos| { + match key { + StatusData::StatusTrackerReset => v.verify_union_variant::>("StatusData::StatusTrackerReset", pos), + StatusData::StatusTrackerError => v.verify_union_variant::>("StatusData::StatusTrackerError", pos), + StatusData::StatusSteamVRDisconnected => v.verify_union_variant::>("StatusData::StatusSteamVRDisconnected", pos), + StatusData::StatusUnassignedHMD => v.verify_union_variant::>("StatusData::StatusUnassignedHMD", pos), + _ => Ok(()), + } + })? + .finish(); + Ok(()) + } +} +pub struct StatusMessageArgs { + pub id: u32, + pub prioritized: bool, + pub data_type: StatusData, + pub data: Option>, +} +impl<'a> Default for StatusMessageArgs { + #[inline] + fn default() -> Self { + StatusMessageArgs { + id: 0, + prioritized: false, + data_type: StatusData::NONE, + data: None, + } + } +} + +pub struct StatusMessageBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> StatusMessageBuilder<'a, 'b> { + #[inline] + pub fn add_id(&mut self, id: u32) { + self.fbb_.push_slot::(StatusMessage::VT_ID, id, 0); + } + #[inline] + pub fn add_prioritized(&mut self, prioritized: bool) { + self.fbb_.push_slot::(StatusMessage::VT_PRIORITIZED, prioritized, false); + } + #[inline] + pub fn add_data_type(&mut self, data_type: StatusData) { + self.fbb_.push_slot::(StatusMessage::VT_DATA_TYPE, data_type, StatusData::NONE); + } + #[inline] + pub fn add_data(&mut self, data: flatbuffers::WIPOffset) { + self.fbb_.push_slot_always::>(StatusMessage::VT_DATA, data); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StatusMessageBuilder<'a, 'b> { + let start = _fbb.start_table(); + StatusMessageBuilder { + 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 StatusMessage<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("StatusMessage"); + ds.field("id", &self.id()); + ds.field("prioritized", &self.prioritized()); + ds.field("data_type", &self.data_type()); + match self.data_type() { + StatusData::StatusTrackerReset => { + if let Some(x) = self.data_as_status_tracker_reset() { + ds.field("data", &x) + } else { + ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + StatusData::StatusTrackerError => { + if let Some(x) = self.data_as_status_tracker_error() { + ds.field("data", &x) + } else { + ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + StatusData::StatusSteamVRDisconnected => { + if let Some(x) = self.data_as_status_steam_vrdisconnected() { + ds.field("data", &x) + } else { + ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + StatusData::StatusUnassignedHMD => { + if let Some(x) = self.data_as_status_unassigned_hmd() { + ds.field("data", &x) + } else { + ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + _ => { + let x: Option<()> = None; + ds.field("data", &x) + }, + }; + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/status_steam_vrdisconnected_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/status_steam_vrdisconnected_generated.rs index 875e14f0..2410e063 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/status_steam_vrdisconnected_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/status_steam_vrdisconnected_generated.rs @@ -1,110 +1,110 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum StatusSteamVRDisconnectedOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// SteamVR bridge is disconnected -pub struct StatusSteamVRDisconnected<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for StatusSteamVRDisconnected<'a> { - type Inner = StatusSteamVRDisconnected<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> StatusSteamVRDisconnected<'a> { - pub const VT_BRIDGE_SETTINGS_NAME: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - StatusSteamVRDisconnected { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args StatusSteamVRDisconnectedArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = StatusSteamVRDisconnectedBuilder::new(_fbb); - if let Some(x) = args.bridge_settings_name { builder.add_bridge_settings_name(x); } - builder.finish() - } - - - /// Name of bridge in the server's config - #[inline] - pub fn bridge_settings_name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(StatusSteamVRDisconnected::VT_BRIDGE_SETTINGS_NAME, None)} - } -} - -impl flatbuffers::Verifiable for StatusSteamVRDisconnected<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("bridge_settings_name", Self::VT_BRIDGE_SETTINGS_NAME, false)? - .finish(); - Ok(()) - } -} -pub struct StatusSteamVRDisconnectedArgs<'a> { - pub bridge_settings_name: Option>, -} -impl<'a> Default for StatusSteamVRDisconnectedArgs<'a> { - #[inline] - fn default() -> Self { - StatusSteamVRDisconnectedArgs { - bridge_settings_name: None, - } - } -} - -pub struct StatusSteamVRDisconnectedBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> StatusSteamVRDisconnectedBuilder<'a, 'b> { - #[inline] - pub fn add_bridge_settings_name(&mut self, bridge_settings_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(StatusSteamVRDisconnected::VT_BRIDGE_SETTINGS_NAME, bridge_settings_name); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StatusSteamVRDisconnectedBuilder<'a, 'b> { - let start = _fbb.start_table(); - StatusSteamVRDisconnectedBuilder { - 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 StatusSteamVRDisconnected<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("StatusSteamVRDisconnected"); - ds.field("bridge_settings_name", &self.bridge_settings_name()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum StatusSteamVRDisconnectedOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// SteamVR bridge is disconnected +pub struct StatusSteamVRDisconnected<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for StatusSteamVRDisconnected<'a> { + type Inner = StatusSteamVRDisconnected<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> StatusSteamVRDisconnected<'a> { + pub const VT_BRIDGE_SETTINGS_NAME: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + StatusSteamVRDisconnected { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args StatusSteamVRDisconnectedArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = StatusSteamVRDisconnectedBuilder::new(_fbb); + if let Some(x) = args.bridge_settings_name { builder.add_bridge_settings_name(x); } + builder.finish() + } + + + /// Name of bridge in the server's config + #[inline] + pub fn bridge_settings_name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(StatusSteamVRDisconnected::VT_BRIDGE_SETTINGS_NAME, None)} + } +} + +impl flatbuffers::Verifiable for StatusSteamVRDisconnected<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("bridge_settings_name", Self::VT_BRIDGE_SETTINGS_NAME, false)? + .finish(); + Ok(()) + } +} +pub struct StatusSteamVRDisconnectedArgs<'a> { + pub bridge_settings_name: Option>, +} +impl<'a> Default for StatusSteamVRDisconnectedArgs<'a> { + #[inline] + fn default() -> Self { + StatusSteamVRDisconnectedArgs { + bridge_settings_name: None, + } + } +} + +pub struct StatusSteamVRDisconnectedBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> StatusSteamVRDisconnectedBuilder<'a, 'b> { + #[inline] + pub fn add_bridge_settings_name(&mut self, bridge_settings_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(StatusSteamVRDisconnected::VT_BRIDGE_SETTINGS_NAME, bridge_settings_name); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StatusSteamVRDisconnectedBuilder<'a, 'b> { + let start = _fbb.start_table(); + StatusSteamVRDisconnectedBuilder { + 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 StatusSteamVRDisconnected<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("StatusSteamVRDisconnected"); + ds.field("bridge_settings_name", &self.bridge_settings_name()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/status_system_fixed_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/status_system_fixed_generated.rs index 748d2348..bd88c5bd 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/status_system_fixed_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/status_system_fixed_generated.rs @@ -1,109 +1,109 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum StatusSystemFixedOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// When an status is fixed and it's removed, it's ID is sent -pub struct StatusSystemFixed<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for StatusSystemFixed<'a> { - type Inner = StatusSystemFixed<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> StatusSystemFixed<'a> { - pub const VT_FIXED_STATUS_ID: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - StatusSystemFixed { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args StatusSystemFixedArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = StatusSystemFixedBuilder::new(_fbb); - builder.add_fixed_status_id(args.fixed_status_id); - builder.finish() - } - - - #[inline] - pub fn fixed_status_id(&self) -> u32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(StatusSystemFixed::VT_FIXED_STATUS_ID, Some(0)).unwrap()} - } -} - -impl flatbuffers::Verifiable for StatusSystemFixed<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("fixed_status_id", Self::VT_FIXED_STATUS_ID, false)? - .finish(); - Ok(()) - } -} -pub struct StatusSystemFixedArgs { - pub fixed_status_id: u32, -} -impl<'a> Default for StatusSystemFixedArgs { - #[inline] - fn default() -> Self { - StatusSystemFixedArgs { - fixed_status_id: 0, - } - } -} - -pub struct StatusSystemFixedBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> StatusSystemFixedBuilder<'a, 'b> { - #[inline] - pub fn add_fixed_status_id(&mut self, fixed_status_id: u32) { - self.fbb_.push_slot::(StatusSystemFixed::VT_FIXED_STATUS_ID, fixed_status_id, 0); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StatusSystemFixedBuilder<'a, 'b> { - let start = _fbb.start_table(); - StatusSystemFixedBuilder { - 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 StatusSystemFixed<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("StatusSystemFixed"); - ds.field("fixed_status_id", &self.fixed_status_id()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum StatusSystemFixedOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// When an status is fixed and it's removed, it's ID is sent +pub struct StatusSystemFixed<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for StatusSystemFixed<'a> { + type Inner = StatusSystemFixed<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> StatusSystemFixed<'a> { + pub const VT_FIXED_STATUS_ID: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + StatusSystemFixed { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args StatusSystemFixedArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = StatusSystemFixedBuilder::new(_fbb); + builder.add_fixed_status_id(args.fixed_status_id); + builder.finish() + } + + + #[inline] + pub fn fixed_status_id(&self) -> u32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StatusSystemFixed::VT_FIXED_STATUS_ID, Some(0)).unwrap()} + } +} + +impl flatbuffers::Verifiable for StatusSystemFixed<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("fixed_status_id", Self::VT_FIXED_STATUS_ID, false)? + .finish(); + Ok(()) + } +} +pub struct StatusSystemFixedArgs { + pub fixed_status_id: u32, +} +impl<'a> Default for StatusSystemFixedArgs { + #[inline] + fn default() -> Self { + StatusSystemFixedArgs { + fixed_status_id: 0, + } + } +} + +pub struct StatusSystemFixedBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> StatusSystemFixedBuilder<'a, 'b> { + #[inline] + pub fn add_fixed_status_id(&mut self, fixed_status_id: u32) { + self.fbb_.push_slot::(StatusSystemFixed::VT_FIXED_STATUS_ID, fixed_status_id, 0); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StatusSystemFixedBuilder<'a, 'b> { + let start = _fbb.start_table(); + StatusSystemFixedBuilder { + 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 StatusSystemFixed<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("StatusSystemFixed"); + ds.field("fixed_status_id", &self.fixed_status_id()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/status_system_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/status_system_request_generated.rs index a11ddb75..620d1c46 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/status_system_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/status_system_request_generated.rs @@ -1,91 +1,91 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum StatusSystemRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Request current statuses that we have -pub struct StatusSystemRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for StatusSystemRequest<'a> { - type Inner = StatusSystemRequest<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> StatusSystemRequest<'a> { - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - StatusSystemRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args StatusSystemRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = StatusSystemRequestBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for StatusSystemRequest<'_> { - #[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 StatusSystemRequestArgs { -} -impl<'a> Default for StatusSystemRequestArgs { - #[inline] - fn default() -> Self { - StatusSystemRequestArgs { - } - } -} - -pub struct StatusSystemRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> StatusSystemRequestBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StatusSystemRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - StatusSystemRequestBuilder { - 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 StatusSystemRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("StatusSystemRequest"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum StatusSystemRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Request current statuses that we have +pub struct StatusSystemRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for StatusSystemRequest<'a> { + type Inner = StatusSystemRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> StatusSystemRequest<'a> { + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + StatusSystemRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args StatusSystemRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = StatusSystemRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for StatusSystemRequest<'_> { + #[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 StatusSystemRequestArgs { +} +impl<'a> Default for StatusSystemRequestArgs { + #[inline] + fn default() -> Self { + StatusSystemRequestArgs { + } + } +} + +pub struct StatusSystemRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> StatusSystemRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StatusSystemRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + StatusSystemRequestBuilder { + 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 StatusSystemRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("StatusSystemRequest"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/status_system_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/status_system_response_generated.rs index c656f3f7..255b7428 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/status_system_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/status_system_response_generated.rs @@ -1,109 +1,109 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum StatusSystemResponseOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Response containing all current valid statuses -pub struct StatusSystemResponse<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for StatusSystemResponse<'a> { - type Inner = StatusSystemResponse<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> StatusSystemResponse<'a> { - pub const VT_CURRENT_STATUSES: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - StatusSystemResponse { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args StatusSystemResponseArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = StatusSystemResponseBuilder::new(_fbb); - if let Some(x) = args.current_statuses { builder.add_current_statuses(x); } - builder.finish() - } - - - #[inline] - pub fn current_statuses(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(StatusSystemResponse::VT_CURRENT_STATUSES, None)} - } -} - -impl flatbuffers::Verifiable for StatusSystemResponse<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("current_statuses", Self::VT_CURRENT_STATUSES, false)? - .finish(); - Ok(()) - } -} -pub struct StatusSystemResponseArgs<'a> { - pub current_statuses: Option>>>>, -} -impl<'a> Default for StatusSystemResponseArgs<'a> { - #[inline] - fn default() -> Self { - StatusSystemResponseArgs { - current_statuses: None, - } - } -} - -pub struct StatusSystemResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> StatusSystemResponseBuilder<'a, 'b> { - #[inline] - pub fn add_current_statuses(&mut self, current_statuses: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(StatusSystemResponse::VT_CURRENT_STATUSES, current_statuses); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StatusSystemResponseBuilder<'a, 'b> { - let start = _fbb.start_table(); - StatusSystemResponseBuilder { - 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 StatusSystemResponse<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("StatusSystemResponse"); - ds.field("current_statuses", &self.current_statuses()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum StatusSystemResponseOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Response containing all current valid statuses +pub struct StatusSystemResponse<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for StatusSystemResponse<'a> { + type Inner = StatusSystemResponse<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> StatusSystemResponse<'a> { + pub const VT_CURRENT_STATUSES: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + StatusSystemResponse { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args StatusSystemResponseArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = StatusSystemResponseBuilder::new(_fbb); + if let Some(x) = args.current_statuses { builder.add_current_statuses(x); } + builder.finish() + } + + + #[inline] + pub fn current_statuses(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(StatusSystemResponse::VT_CURRENT_STATUSES, None)} + } +} + +impl flatbuffers::Verifiable for StatusSystemResponse<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>>>("current_statuses", Self::VT_CURRENT_STATUSES, false)? + .finish(); + Ok(()) + } +} +pub struct StatusSystemResponseArgs<'a> { + pub current_statuses: Option>>>>, +} +impl<'a> Default for StatusSystemResponseArgs<'a> { + #[inline] + fn default() -> Self { + StatusSystemResponseArgs { + current_statuses: None, + } + } +} + +pub struct StatusSystemResponseBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> StatusSystemResponseBuilder<'a, 'b> { + #[inline] + pub fn add_current_statuses(&mut self, current_statuses: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(StatusSystemResponse::VT_CURRENT_STATUSES, current_statuses); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StatusSystemResponseBuilder<'a, 'b> { + let start = _fbb.start_table(); + StatusSystemResponseBuilder { + 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 StatusSystemResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("StatusSystemResponse"); + ds.field("current_statuses", &self.current_statuses()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/status_system_update_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/status_system_update_generated.rs index d4639465..ffb4be8f 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/status_system_update_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/status_system_update_generated.rs @@ -1,109 +1,109 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum StatusSystemUpdateOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// When a new status appears, it's sent alone -pub struct StatusSystemUpdate<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for StatusSystemUpdate<'a> { - type Inner = StatusSystemUpdate<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> StatusSystemUpdate<'a> { - pub const VT_NEW_STATUS: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - StatusSystemUpdate { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args StatusSystemUpdateArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = StatusSystemUpdateBuilder::new(_fbb); - if let Some(x) = args.new_status { builder.add_new_status(x); } - builder.finish() - } - - - #[inline] - pub fn new_status(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(StatusSystemUpdate::VT_NEW_STATUS, None)} - } -} - -impl flatbuffers::Verifiable for StatusSystemUpdate<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("new_status", Self::VT_NEW_STATUS, false)? - .finish(); - Ok(()) - } -} -pub struct StatusSystemUpdateArgs<'a> { - pub new_status: Option>>, -} -impl<'a> Default for StatusSystemUpdateArgs<'a> { - #[inline] - fn default() -> Self { - StatusSystemUpdateArgs { - new_status: None, - } - } -} - -pub struct StatusSystemUpdateBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> StatusSystemUpdateBuilder<'a, 'b> { - #[inline] - pub fn add_new_status(&mut self, new_status: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(StatusSystemUpdate::VT_NEW_STATUS, new_status); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StatusSystemUpdateBuilder<'a, 'b> { - let start = _fbb.start_table(); - StatusSystemUpdateBuilder { - 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 StatusSystemUpdate<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("StatusSystemUpdate"); - ds.field("new_status", &self.new_status()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum StatusSystemUpdateOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// When a new status appears, it's sent alone +pub struct StatusSystemUpdate<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for StatusSystemUpdate<'a> { + type Inner = StatusSystemUpdate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> StatusSystemUpdate<'a> { + pub const VT_NEW_STATUS: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + StatusSystemUpdate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args StatusSystemUpdateArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = StatusSystemUpdateBuilder::new(_fbb); + if let Some(x) = args.new_status { builder.add_new_status(x); } + builder.finish() + } + + + #[inline] + pub fn new_status(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(StatusSystemUpdate::VT_NEW_STATUS, None)} + } +} + +impl flatbuffers::Verifiable for StatusSystemUpdate<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("new_status", Self::VT_NEW_STATUS, false)? + .finish(); + Ok(()) + } +} +pub struct StatusSystemUpdateArgs<'a> { + pub new_status: Option>>, +} +impl<'a> Default for StatusSystemUpdateArgs<'a> { + #[inline] + fn default() -> Self { + StatusSystemUpdateArgs { + new_status: None, + } + } +} + +pub struct StatusSystemUpdateBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> StatusSystemUpdateBuilder<'a, 'b> { + #[inline] + pub fn add_new_status(&mut self, new_status: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(StatusSystemUpdate::VT_NEW_STATUS, new_status); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StatusSystemUpdateBuilder<'a, 'b> { + let start = _fbb.start_table(); + StatusSystemUpdateBuilder { + 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 StatusSystemUpdate<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("StatusSystemUpdate"); + ds.field("new_status", &self.new_status()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/status_tracker_error_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/status_tracker_error_generated.rs index 40e5e096..7dcf9840 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/status_tracker_error_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/status_tracker_error_generated.rs @@ -1,109 +1,109 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum StatusTrackerErrorOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Tracker has error state -pub struct StatusTrackerError<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for StatusTrackerError<'a> { - type Inner = StatusTrackerError<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> StatusTrackerError<'a> { - pub const VT_TRACKER_ID: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - StatusTrackerError { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args StatusTrackerErrorArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = StatusTrackerErrorBuilder::new(_fbb); - if let Some(x) = args.tracker_id { builder.add_tracker_id(x); } - builder.finish() - } - - - #[inline] - pub fn tracker_id(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(StatusTrackerError::VT_TRACKER_ID, None)} - } -} - -impl flatbuffers::Verifiable for StatusTrackerError<'_> { - #[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)? - .finish(); - Ok(()) - } -} -pub struct StatusTrackerErrorArgs<'a> { - pub tracker_id: Option>>, -} -impl<'a> Default for StatusTrackerErrorArgs<'a> { - #[inline] - fn default() -> Self { - StatusTrackerErrorArgs { - tracker_id: None, - } - } -} - -pub struct StatusTrackerErrorBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> StatusTrackerErrorBuilder<'a, 'b> { - #[inline] - pub fn add_tracker_id(&mut self, tracker_id: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(StatusTrackerError::VT_TRACKER_ID, tracker_id); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StatusTrackerErrorBuilder<'a, 'b> { - let start = _fbb.start_table(); - StatusTrackerErrorBuilder { - 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 StatusTrackerError<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("StatusTrackerError"); - ds.field("tracker_id", &self.tracker_id()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum StatusTrackerErrorOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Tracker has error state +pub struct StatusTrackerError<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for StatusTrackerError<'a> { + type Inner = StatusTrackerError<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> StatusTrackerError<'a> { + pub const VT_TRACKER_ID: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + StatusTrackerError { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args StatusTrackerErrorArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = StatusTrackerErrorBuilder::new(_fbb); + if let Some(x) = args.tracker_id { builder.add_tracker_id(x); } + builder.finish() + } + + + #[inline] + pub fn tracker_id(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(StatusTrackerError::VT_TRACKER_ID, None)} + } +} + +impl flatbuffers::Verifiable for StatusTrackerError<'_> { + #[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)? + .finish(); + Ok(()) + } +} +pub struct StatusTrackerErrorArgs<'a> { + pub tracker_id: Option>>, +} +impl<'a> Default for StatusTrackerErrorArgs<'a> { + #[inline] + fn default() -> Self { + StatusTrackerErrorArgs { + tracker_id: None, + } + } +} + +pub struct StatusTrackerErrorBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> StatusTrackerErrorBuilder<'a, 'b> { + #[inline] + pub fn add_tracker_id(&mut self, tracker_id: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(StatusTrackerError::VT_TRACKER_ID, tracker_id); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StatusTrackerErrorBuilder<'a, 'b> { + let start = _fbb.start_table(); + StatusTrackerErrorBuilder { + 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 StatusTrackerError<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("StatusTrackerError"); + ds.field("tracker_id", &self.tracker_id()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/status_tracker_reset_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/status_tracker_reset_generated.rs index c9c0d337..adf0b3fc 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/status_tracker_reset_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/status_tracker_reset_generated.rs @@ -1,109 +1,109 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum StatusTrackerResetOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Tracker requires full reset -pub struct StatusTrackerReset<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for StatusTrackerReset<'a> { - type Inner = StatusTrackerReset<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> StatusTrackerReset<'a> { - pub const VT_TRACKER_ID: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - StatusTrackerReset { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args StatusTrackerResetArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = StatusTrackerResetBuilder::new(_fbb); - if let Some(x) = args.tracker_id { builder.add_tracker_id(x); } - builder.finish() - } - - - #[inline] - pub fn tracker_id(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(StatusTrackerReset::VT_TRACKER_ID, None)} - } -} - -impl flatbuffers::Verifiable for StatusTrackerReset<'_> { - #[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)? - .finish(); - Ok(()) - } -} -pub struct StatusTrackerResetArgs<'a> { - pub tracker_id: Option>>, -} -impl<'a> Default for StatusTrackerResetArgs<'a> { - #[inline] - fn default() -> Self { - StatusTrackerResetArgs { - tracker_id: None, - } - } -} - -pub struct StatusTrackerResetBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> StatusTrackerResetBuilder<'a, 'b> { - #[inline] - pub fn add_tracker_id(&mut self, tracker_id: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(StatusTrackerReset::VT_TRACKER_ID, tracker_id); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StatusTrackerResetBuilder<'a, 'b> { - let start = _fbb.start_table(); - StatusTrackerResetBuilder { - 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 StatusTrackerReset<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("StatusTrackerReset"); - ds.field("tracker_id", &self.tracker_id()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum StatusTrackerResetOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Tracker requires full reset +pub struct StatusTrackerReset<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for StatusTrackerReset<'a> { + type Inner = StatusTrackerReset<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> StatusTrackerReset<'a> { + pub const VT_TRACKER_ID: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + StatusTrackerReset { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args StatusTrackerResetArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = StatusTrackerResetBuilder::new(_fbb); + if let Some(x) = args.tracker_id { builder.add_tracker_id(x); } + builder.finish() + } + + + #[inline] + pub fn tracker_id(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(StatusTrackerReset::VT_TRACKER_ID, None)} + } +} + +impl flatbuffers::Verifiable for StatusTrackerReset<'_> { + #[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)? + .finish(); + Ok(()) + } +} +pub struct StatusTrackerResetArgs<'a> { + pub tracker_id: Option>>, +} +impl<'a> Default for StatusTrackerResetArgs<'a> { + #[inline] + fn default() -> Self { + StatusTrackerResetArgs { + tracker_id: None, + } + } +} + +pub struct StatusTrackerResetBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> StatusTrackerResetBuilder<'a, 'b> { + #[inline] + pub fn add_tracker_id(&mut self, tracker_id: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(StatusTrackerReset::VT_TRACKER_ID, tracker_id); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StatusTrackerResetBuilder<'a, 'b> { + let start = _fbb.start_table(); + StatusTrackerResetBuilder { + 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 StatusTrackerReset<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("StatusTrackerReset"); + ds.field("tracker_id", &self.tracker_id()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/status_unassigned_hmd_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/status_unassigned_hmd_generated.rs index 3e728c0e..3ff00c90 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/status_unassigned_hmd_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/status_unassigned_hmd_generated.rs @@ -1,109 +1,109 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum StatusUnassignedHMDOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// There is an available HMD tracker and it's not assigned to head -pub struct StatusUnassignedHMD<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for StatusUnassignedHMD<'a> { - type Inner = StatusUnassignedHMD<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> StatusUnassignedHMD<'a> { - pub const VT_TRACKER_ID: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - StatusUnassignedHMD { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args StatusUnassignedHMDArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = StatusUnassignedHMDBuilder::new(_fbb); - if let Some(x) = args.tracker_id { builder.add_tracker_id(x); } - builder.finish() - } - - - #[inline] - pub fn tracker_id(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(StatusUnassignedHMD::VT_TRACKER_ID, None)} - } -} - -impl flatbuffers::Verifiable for StatusUnassignedHMD<'_> { - #[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)? - .finish(); - Ok(()) - } -} -pub struct StatusUnassignedHMDArgs<'a> { - pub tracker_id: Option>>, -} -impl<'a> Default for StatusUnassignedHMDArgs<'a> { - #[inline] - fn default() -> Self { - StatusUnassignedHMDArgs { - tracker_id: None, - } - } -} - -pub struct StatusUnassignedHMDBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> StatusUnassignedHMDBuilder<'a, 'b> { - #[inline] - pub fn add_tracker_id(&mut self, tracker_id: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(StatusUnassignedHMD::VT_TRACKER_ID, tracker_id); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StatusUnassignedHMDBuilder<'a, 'b> { - let start = _fbb.start_table(); - StatusUnassignedHMDBuilder { - 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 StatusUnassignedHMD<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("StatusUnassignedHMD"); - ds.field("tracker_id", &self.tracker_id()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum StatusUnassignedHMDOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// There is an available HMD tracker and it's not assigned to head +pub struct StatusUnassignedHMD<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for StatusUnassignedHMD<'a> { + type Inner = StatusUnassignedHMD<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> StatusUnassignedHMD<'a> { + pub const VT_TRACKER_ID: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + StatusUnassignedHMD { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args StatusUnassignedHMDArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = StatusUnassignedHMDBuilder::new(_fbb); + if let Some(x) = args.tracker_id { builder.add_tracker_id(x); } + builder.finish() + } + + + #[inline] + pub fn tracker_id(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(StatusUnassignedHMD::VT_TRACKER_ID, None)} + } +} + +impl flatbuffers::Verifiable for StatusUnassignedHMD<'_> { + #[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)? + .finish(); + Ok(()) + } +} +pub struct StatusUnassignedHMDArgs<'a> { + pub tracker_id: Option>>, +} +impl<'a> Default for StatusUnassignedHMDArgs<'a> { + #[inline] + fn default() -> Self { + StatusUnassignedHMDArgs { + tracker_id: None, + } + } +} + +pub struct StatusUnassignedHMDBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> StatusUnassignedHMDBuilder<'a, 'b> { + #[inline] + pub fn add_tracker_id(&mut self, tracker_id: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(StatusUnassignedHMD::VT_TRACKER_ID, tracker_id); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StatusUnassignedHMDBuilder<'a, 'b> { + let start = _fbb.start_table(); + StatusUnassignedHMDBuilder { + 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 StatusUnassignedHMD<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("StatusUnassignedHMD"); + ds.field("tracker_id", &self.tracker_id()); + 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 77165e29..b278633a 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,278 +1,278 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum 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] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> SteamVRTrackersSetting<'a> { - pub const VT_WAIST: flatbuffers::VOffsetT = 4; - pub const VT_CHEST: flatbuffers::VOffsetT = 6; - pub const VT_AUTOMATICTRACKERTOGGLE: flatbuffers::VOffsetT = 16; - pub const VT_LEFT_FOOT: flatbuffers::VOffsetT = 18; - pub const VT_RIGHT_FOOT: flatbuffers::VOffsetT = 20; - pub const VT_LEFT_KNEE: flatbuffers::VOffsetT = 22; - pub const VT_RIGHT_KNEE: flatbuffers::VOffsetT = 24; - pub const VT_LEFT_ELBOW: flatbuffers::VOffsetT = 26; - pub const VT_RIGHT_ELBOW: flatbuffers::VOffsetT = 28; - pub const VT_LEFT_HAND: flatbuffers::VOffsetT = 30; - pub const VT_RIGHT_HAND: flatbuffers::VOffsetT = 32; - - #[inline] - pub unsafe 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_right_hand(args.right_hand); - builder.add_left_hand(args.left_hand); - builder.add_right_elbow(args.right_elbow); - builder.add_left_elbow(args.left_elbow); - builder.add_right_knee(args.right_knee); - builder.add_left_knee(args.left_knee); - builder.add_right_foot(args.right_foot); - builder.add_left_foot(args.left_foot); - builder.add_automaticTrackerToggle(args.automaticTrackerToggle); - builder.add_chest(args.chest); - builder.add_waist(args.waist); - builder.finish() - } - - - #[inline] - pub fn waist(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(SteamVRTrackersSetting::VT_WAIST, Some(false)).unwrap()} - } - #[inline] - pub fn chest(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(SteamVRTrackersSetting::VT_CHEST, Some(false)).unwrap()} - } - #[inline] - pub fn automaticTrackerToggle(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(SteamVRTrackersSetting::VT_AUTOMATICTRACKERTOGGLE, Some(false)).unwrap()} - } - #[inline] - pub fn left_foot(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(SteamVRTrackersSetting::VT_LEFT_FOOT, Some(false)).unwrap()} - } - #[inline] - pub fn right_foot(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(SteamVRTrackersSetting::VT_RIGHT_FOOT, Some(false)).unwrap()} - } - #[inline] - pub fn left_knee(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(SteamVRTrackersSetting::VT_LEFT_KNEE, Some(false)).unwrap()} - } - #[inline] - pub fn right_knee(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(SteamVRTrackersSetting::VT_RIGHT_KNEE, Some(false)).unwrap()} - } - #[inline] - pub fn left_elbow(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(SteamVRTrackersSetting::VT_LEFT_ELBOW, Some(false)).unwrap()} - } - #[inline] - pub fn right_elbow(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(SteamVRTrackersSetting::VT_RIGHT_ELBOW, Some(false)).unwrap()} - } - #[inline] - pub fn left_hand(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(SteamVRTrackersSetting::VT_LEFT_HAND, Some(false)).unwrap()} - } - #[inline] - pub fn right_hand(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(SteamVRTrackersSetting::VT_RIGHT_HAND, 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::("automaticTrackerToggle", Self::VT_AUTOMATICTRACKERTOGGLE, false)? - .visit_field::("left_foot", Self::VT_LEFT_FOOT, false)? - .visit_field::("right_foot", Self::VT_RIGHT_FOOT, false)? - .visit_field::("left_knee", Self::VT_LEFT_KNEE, false)? - .visit_field::("right_knee", Self::VT_RIGHT_KNEE, false)? - .visit_field::("left_elbow", Self::VT_LEFT_ELBOW, false)? - .visit_field::("right_elbow", Self::VT_RIGHT_ELBOW, false)? - .visit_field::("left_hand", Self::VT_LEFT_HAND, false)? - .visit_field::("right_hand", Self::VT_RIGHT_HAND, false)? - .finish(); - Ok(()) - } -} -pub struct SteamVRTrackersSettingArgs { - pub waist: bool, - pub chest: bool, - pub automaticTrackerToggle: bool, - pub left_foot: bool, - pub right_foot: bool, - pub left_knee: bool, - pub right_knee: bool, - pub left_elbow: bool, - pub right_elbow: bool, - pub left_hand: bool, - pub right_hand: bool, -} -impl<'a> Default for SteamVRTrackersSettingArgs { - #[inline] - fn default() -> Self { - SteamVRTrackersSettingArgs { - waist: false, - chest: false, - automaticTrackerToggle: false, - left_foot: false, - right_foot: false, - left_knee: false, - right_knee: false, - left_elbow: false, - right_elbow: false, - left_hand: false, - right_hand: 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_automaticTrackerToggle(&mut self, automaticTrackerToggle: bool) { - self.fbb_.push_slot::(SteamVRTrackersSetting::VT_AUTOMATICTRACKERTOGGLE, automaticTrackerToggle, false); - } - #[inline] - pub fn add_left_foot(&mut self, left_foot: bool) { - self.fbb_.push_slot::(SteamVRTrackersSetting::VT_LEFT_FOOT, left_foot, false); - } - #[inline] - pub fn add_right_foot(&mut self, right_foot: bool) { - self.fbb_.push_slot::(SteamVRTrackersSetting::VT_RIGHT_FOOT, right_foot, false); - } - #[inline] - pub fn add_left_knee(&mut self, left_knee: bool) { - self.fbb_.push_slot::(SteamVRTrackersSetting::VT_LEFT_KNEE, left_knee, false); - } - #[inline] - pub fn add_right_knee(&mut self, right_knee: bool) { - self.fbb_.push_slot::(SteamVRTrackersSetting::VT_RIGHT_KNEE, right_knee, false); - } - #[inline] - pub fn add_left_elbow(&mut self, left_elbow: bool) { - self.fbb_.push_slot::(SteamVRTrackersSetting::VT_LEFT_ELBOW, left_elbow, false); - } - #[inline] - pub fn add_right_elbow(&mut self, right_elbow: bool) { - self.fbb_.push_slot::(SteamVRTrackersSetting::VT_RIGHT_ELBOW, right_elbow, false); - } - #[inline] - pub fn add_left_hand(&mut self, left_hand: bool) { - self.fbb_.push_slot::(SteamVRTrackersSetting::VT_LEFT_HAND, left_hand, false); - } - #[inline] - pub fn add_right_hand(&mut self, right_hand: bool) { - self.fbb_.push_slot::(SteamVRTrackersSetting::VT_RIGHT_HAND, right_hand, 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("automaticTrackerToggle", &self.automaticTrackerToggle()); - ds.field("left_foot", &self.left_foot()); - ds.field("right_foot", &self.right_foot()); - ds.field("left_knee", &self.left_knee()); - ds.field("right_knee", &self.right_knee()); - ds.field("left_elbow", &self.left_elbow()); - ds.field("right_elbow", &self.right_elbow()); - ds.field("left_hand", &self.left_hand()); - ds.field("right_hand", &self.right_hand()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum 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] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SteamVRTrackersSetting<'a> { + pub const VT_WAIST: flatbuffers::VOffsetT = 4; + pub const VT_CHEST: flatbuffers::VOffsetT = 6; + pub const VT_AUTOMATICTRACKERTOGGLE: flatbuffers::VOffsetT = 16; + pub const VT_LEFT_FOOT: flatbuffers::VOffsetT = 18; + pub const VT_RIGHT_FOOT: flatbuffers::VOffsetT = 20; + pub const VT_LEFT_KNEE: flatbuffers::VOffsetT = 22; + pub const VT_RIGHT_KNEE: flatbuffers::VOffsetT = 24; + pub const VT_LEFT_ELBOW: flatbuffers::VOffsetT = 26; + pub const VT_RIGHT_ELBOW: flatbuffers::VOffsetT = 28; + pub const VT_LEFT_HAND: flatbuffers::VOffsetT = 30; + pub const VT_RIGHT_HAND: flatbuffers::VOffsetT = 32; + + #[inline] + pub unsafe 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_right_hand(args.right_hand); + builder.add_left_hand(args.left_hand); + builder.add_right_elbow(args.right_elbow); + builder.add_left_elbow(args.left_elbow); + builder.add_right_knee(args.right_knee); + builder.add_left_knee(args.left_knee); + builder.add_right_foot(args.right_foot); + builder.add_left_foot(args.left_foot); + builder.add_automaticTrackerToggle(args.automaticTrackerToggle); + builder.add_chest(args.chest); + builder.add_waist(args.waist); + builder.finish() + } + + + #[inline] + pub fn waist(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(SteamVRTrackersSetting::VT_WAIST, Some(false)).unwrap()} + } + #[inline] + pub fn chest(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(SteamVRTrackersSetting::VT_CHEST, Some(false)).unwrap()} + } + #[inline] + pub fn automaticTrackerToggle(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(SteamVRTrackersSetting::VT_AUTOMATICTRACKERTOGGLE, Some(false)).unwrap()} + } + #[inline] + pub fn left_foot(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(SteamVRTrackersSetting::VT_LEFT_FOOT, Some(false)).unwrap()} + } + #[inline] + pub fn right_foot(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(SteamVRTrackersSetting::VT_RIGHT_FOOT, Some(false)).unwrap()} + } + #[inline] + pub fn left_knee(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(SteamVRTrackersSetting::VT_LEFT_KNEE, Some(false)).unwrap()} + } + #[inline] + pub fn right_knee(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(SteamVRTrackersSetting::VT_RIGHT_KNEE, Some(false)).unwrap()} + } + #[inline] + pub fn left_elbow(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(SteamVRTrackersSetting::VT_LEFT_ELBOW, Some(false)).unwrap()} + } + #[inline] + pub fn right_elbow(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(SteamVRTrackersSetting::VT_RIGHT_ELBOW, Some(false)).unwrap()} + } + #[inline] + pub fn left_hand(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(SteamVRTrackersSetting::VT_LEFT_HAND, Some(false)).unwrap()} + } + #[inline] + pub fn right_hand(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(SteamVRTrackersSetting::VT_RIGHT_HAND, 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::("automaticTrackerToggle", Self::VT_AUTOMATICTRACKERTOGGLE, false)? + .visit_field::("left_foot", Self::VT_LEFT_FOOT, false)? + .visit_field::("right_foot", Self::VT_RIGHT_FOOT, false)? + .visit_field::("left_knee", Self::VT_LEFT_KNEE, false)? + .visit_field::("right_knee", Self::VT_RIGHT_KNEE, false)? + .visit_field::("left_elbow", Self::VT_LEFT_ELBOW, false)? + .visit_field::("right_elbow", Self::VT_RIGHT_ELBOW, false)? + .visit_field::("left_hand", Self::VT_LEFT_HAND, false)? + .visit_field::("right_hand", Self::VT_RIGHT_HAND, false)? + .finish(); + Ok(()) + } +} +pub struct SteamVRTrackersSettingArgs { + pub waist: bool, + pub chest: bool, + pub automaticTrackerToggle: bool, + pub left_foot: bool, + pub right_foot: bool, + pub left_knee: bool, + pub right_knee: bool, + pub left_elbow: bool, + pub right_elbow: bool, + pub left_hand: bool, + pub right_hand: bool, +} +impl<'a> Default for SteamVRTrackersSettingArgs { + #[inline] + fn default() -> Self { + SteamVRTrackersSettingArgs { + waist: false, + chest: false, + automaticTrackerToggle: false, + left_foot: false, + right_foot: false, + left_knee: false, + right_knee: false, + left_elbow: false, + right_elbow: false, + left_hand: false, + right_hand: 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_automaticTrackerToggle(&mut self, automaticTrackerToggle: bool) { + self.fbb_.push_slot::(SteamVRTrackersSetting::VT_AUTOMATICTRACKERTOGGLE, automaticTrackerToggle, false); + } + #[inline] + pub fn add_left_foot(&mut self, left_foot: bool) { + self.fbb_.push_slot::(SteamVRTrackersSetting::VT_LEFT_FOOT, left_foot, false); + } + #[inline] + pub fn add_right_foot(&mut self, right_foot: bool) { + self.fbb_.push_slot::(SteamVRTrackersSetting::VT_RIGHT_FOOT, right_foot, false); + } + #[inline] + pub fn add_left_knee(&mut self, left_knee: bool) { + self.fbb_.push_slot::(SteamVRTrackersSetting::VT_LEFT_KNEE, left_knee, false); + } + #[inline] + pub fn add_right_knee(&mut self, right_knee: bool) { + self.fbb_.push_slot::(SteamVRTrackersSetting::VT_RIGHT_KNEE, right_knee, false); + } + #[inline] + pub fn add_left_elbow(&mut self, left_elbow: bool) { + self.fbb_.push_slot::(SteamVRTrackersSetting::VT_LEFT_ELBOW, left_elbow, false); + } + #[inline] + pub fn add_right_elbow(&mut self, right_elbow: bool) { + self.fbb_.push_slot::(SteamVRTrackersSetting::VT_RIGHT_ELBOW, right_elbow, false); + } + #[inline] + pub fn add_left_hand(&mut self, left_hand: bool) { + self.fbb_.push_slot::(SteamVRTrackersSetting::VT_LEFT_HAND, left_hand, false); + } + #[inline] + pub fn add_right_hand(&mut self, right_hand: bool) { + self.fbb_.push_slot::(SteamVRTrackersSetting::VT_RIGHT_HAND, right_hand, 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("automaticTrackerToggle", &self.automaticTrackerToggle()); + ds.field("left_foot", &self.left_foot()); + ds.field("right_foot", &self.right_foot()); + ds.field("left_knee", &self.left_knee()); + ds.field("right_knee", &self.right_knee()); + ds.field("left_elbow", &self.left_elbow()); + ds.field("right_elbow", &self.right_elbow()); + ds.field("left_hand", &self.left_hand()); + ds.field("right_hand", &self.right_hand()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/stop_wifi_provisioning_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/stop_wifi_provisioning_request_generated.rs index cb902718..75b4f2dd 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/stop_wifi_provisioning_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/stop_wifi_provisioning_request_generated.rs @@ -1,90 +1,90 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum StopWifiProvisioningRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct StopWifiProvisioningRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for StopWifiProvisioningRequest<'a> { - type Inner = StopWifiProvisioningRequest<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> StopWifiProvisioningRequest<'a> { - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - StopWifiProvisioningRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args StopWifiProvisioningRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = StopWifiProvisioningRequestBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for StopWifiProvisioningRequest<'_> { - #[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 StopWifiProvisioningRequestArgs { -} -impl<'a> Default for StopWifiProvisioningRequestArgs { - #[inline] - fn default() -> Self { - StopWifiProvisioningRequestArgs { - } - } -} - -pub struct StopWifiProvisioningRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> StopWifiProvisioningRequestBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StopWifiProvisioningRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - StopWifiProvisioningRequestBuilder { - 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 StopWifiProvisioningRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("StopWifiProvisioningRequest"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum StopWifiProvisioningRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct StopWifiProvisioningRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for StopWifiProvisioningRequest<'a> { + type Inner = StopWifiProvisioningRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> StopWifiProvisioningRequest<'a> { + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + StopWifiProvisioningRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args StopWifiProvisioningRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = StopWifiProvisioningRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for StopWifiProvisioningRequest<'_> { + #[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 StopWifiProvisioningRequestArgs { +} +impl<'a> Default for StopWifiProvisioningRequestArgs { + #[inline] + fn default() -> Self { + StopWifiProvisioningRequestArgs { + } + } +} + +pub struct StopWifiProvisioningRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> StopWifiProvisioningRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StopWifiProvisioningRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + StopWifiProvisioningRequestBuilder { + 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 StopWifiProvisioningRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("StopWifiProvisioningRequest"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/tap_detection_settings_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/tap_detection_settings_generated.rs index 79052ba2..a98a8e4f 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/tap_detection_settings_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/tap_detection_settings_generated.rs @@ -1,280 +1,280 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum TapDetectionSettingsOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct TapDetectionSettings<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for TapDetectionSettings<'a> { - type Inner = TapDetectionSettings<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> TapDetectionSettings<'a> { - pub const VT_FULL_RESET_DELAY: flatbuffers::VOffsetT = 4; - pub const VT_FULL_RESET_ENABLED: flatbuffers::VOffsetT = 6; - pub const VT_FULL_RESET_TAPS: flatbuffers::VOffsetT = 8; - pub const VT_YAW_RESET_DELAY: flatbuffers::VOffsetT = 10; - pub const VT_YAW_RESET_ENABLED: flatbuffers::VOffsetT = 12; - pub const VT_YAW_RESET_TAPS: flatbuffers::VOffsetT = 14; - pub const VT_MOUNTING_RESET_DELAY: flatbuffers::VOffsetT = 16; - pub const VT_MOUNTING_RESET_ENABLED: flatbuffers::VOffsetT = 18; - pub const VT_MOUNTING_RESET_TAPS: flatbuffers::VOffsetT = 20; - pub const VT_SETUP_MODE: flatbuffers::VOffsetT = 22; - pub const VT_NUMBER_TRACKERS_OVER_THRESHOLD: flatbuffers::VOffsetT = 24; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - TapDetectionSettings { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args TapDetectionSettingsArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = TapDetectionSettingsBuilder::new(_fbb); - if let Some(x) = args.mounting_reset_delay { builder.add_mounting_reset_delay(x); } - if let Some(x) = args.yaw_reset_delay { builder.add_yaw_reset_delay(x); } - if let Some(x) = args.full_reset_delay { builder.add_full_reset_delay(x); } - if let Some(x) = args.number_trackers_over_threshold { builder.add_number_trackers_over_threshold(x); } - if let Some(x) = args.setup_mode { builder.add_setup_mode(x); } - if let Some(x) = args.mounting_reset_taps { builder.add_mounting_reset_taps(x); } - if let Some(x) = args.mounting_reset_enabled { builder.add_mounting_reset_enabled(x); } - if let Some(x) = args.yaw_reset_taps { builder.add_yaw_reset_taps(x); } - if let Some(x) = args.yaw_reset_enabled { builder.add_yaw_reset_enabled(x); } - if let Some(x) = args.full_reset_taps { builder.add_full_reset_taps(x); } - if let Some(x) = args.full_reset_enabled { builder.add_full_reset_enabled(x); } - builder.finish() - } - - - #[inline] - pub fn full_reset_delay(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TapDetectionSettings::VT_FULL_RESET_DELAY, None)} - } - #[inline] - pub fn full_reset_enabled(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TapDetectionSettings::VT_FULL_RESET_ENABLED, None)} - } - #[inline] - pub fn full_reset_taps(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TapDetectionSettings::VT_FULL_RESET_TAPS, None)} - } - #[inline] - pub fn yaw_reset_delay(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TapDetectionSettings::VT_YAW_RESET_DELAY, None)} - } - #[inline] - pub fn yaw_reset_enabled(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TapDetectionSettings::VT_YAW_RESET_ENABLED, None)} - } - #[inline] - pub fn yaw_reset_taps(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TapDetectionSettings::VT_YAW_RESET_TAPS, None)} - } - #[inline] - pub fn mounting_reset_delay(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TapDetectionSettings::VT_MOUNTING_RESET_DELAY, None)} - } - #[inline] - pub fn mounting_reset_enabled(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TapDetectionSettings::VT_MOUNTING_RESET_ENABLED, None)} - } - #[inline] - pub fn mounting_reset_taps(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TapDetectionSettings::VT_MOUNTING_RESET_TAPS, None)} - } - /// If true, disables reset behavior of tap detection and sends a - /// TapDetectionSetupNotification, each time 2 taps are detected on any tracker - #[inline] - pub fn setup_mode(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TapDetectionSettings::VT_SETUP_MODE, None)} - } - #[inline] - pub fn number_trackers_over_threshold(&self) -> Option { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TapDetectionSettings::VT_NUMBER_TRACKERS_OVER_THRESHOLD, None)} - } -} - -impl flatbuffers::Verifiable for TapDetectionSettings<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("full_reset_delay", Self::VT_FULL_RESET_DELAY, false)? - .visit_field::("full_reset_enabled", Self::VT_FULL_RESET_ENABLED, false)? - .visit_field::("full_reset_taps", Self::VT_FULL_RESET_TAPS, false)? - .visit_field::("yaw_reset_delay", Self::VT_YAW_RESET_DELAY, false)? - .visit_field::("yaw_reset_enabled", Self::VT_YAW_RESET_ENABLED, false)? - .visit_field::("yaw_reset_taps", Self::VT_YAW_RESET_TAPS, false)? - .visit_field::("mounting_reset_delay", Self::VT_MOUNTING_RESET_DELAY, false)? - .visit_field::("mounting_reset_enabled", Self::VT_MOUNTING_RESET_ENABLED, false)? - .visit_field::("mounting_reset_taps", Self::VT_MOUNTING_RESET_TAPS, false)? - .visit_field::("setup_mode", Self::VT_SETUP_MODE, false)? - .visit_field::("number_trackers_over_threshold", Self::VT_NUMBER_TRACKERS_OVER_THRESHOLD, false)? - .finish(); - Ok(()) - } -} -pub struct TapDetectionSettingsArgs { - pub full_reset_delay: Option, - pub full_reset_enabled: Option, - pub full_reset_taps: Option, - pub yaw_reset_delay: Option, - pub yaw_reset_enabled: Option, - pub yaw_reset_taps: Option, - pub mounting_reset_delay: Option, - pub mounting_reset_enabled: Option, - pub mounting_reset_taps: Option, - pub setup_mode: Option, - pub number_trackers_over_threshold: Option, -} -impl<'a> Default for TapDetectionSettingsArgs { - #[inline] - fn default() -> Self { - TapDetectionSettingsArgs { - full_reset_delay: None, - full_reset_enabled: None, - full_reset_taps: None, - yaw_reset_delay: None, - yaw_reset_enabled: None, - yaw_reset_taps: None, - mounting_reset_delay: None, - mounting_reset_enabled: None, - mounting_reset_taps: None, - setup_mode: None, - number_trackers_over_threshold: None, - } - } -} - -pub struct TapDetectionSettingsBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> TapDetectionSettingsBuilder<'a, 'b> { - #[inline] - pub fn add_full_reset_delay(&mut self, full_reset_delay: f32) { - self.fbb_.push_slot_always::(TapDetectionSettings::VT_FULL_RESET_DELAY, full_reset_delay); - } - #[inline] - pub fn add_full_reset_enabled(&mut self, full_reset_enabled: bool) { - self.fbb_.push_slot_always::(TapDetectionSettings::VT_FULL_RESET_ENABLED, full_reset_enabled); - } - #[inline] - pub fn add_full_reset_taps(&mut self, full_reset_taps: u8) { - self.fbb_.push_slot_always::(TapDetectionSettings::VT_FULL_RESET_TAPS, full_reset_taps); - } - #[inline] - pub fn add_yaw_reset_delay(&mut self, yaw_reset_delay: f32) { - self.fbb_.push_slot_always::(TapDetectionSettings::VT_YAW_RESET_DELAY, yaw_reset_delay); - } - #[inline] - pub fn add_yaw_reset_enabled(&mut self, yaw_reset_enabled: bool) { - self.fbb_.push_slot_always::(TapDetectionSettings::VT_YAW_RESET_ENABLED, yaw_reset_enabled); - } - #[inline] - pub fn add_yaw_reset_taps(&mut self, yaw_reset_taps: u8) { - self.fbb_.push_slot_always::(TapDetectionSettings::VT_YAW_RESET_TAPS, yaw_reset_taps); - } - #[inline] - pub fn add_mounting_reset_delay(&mut self, mounting_reset_delay: f32) { - self.fbb_.push_slot_always::(TapDetectionSettings::VT_MOUNTING_RESET_DELAY, mounting_reset_delay); - } - #[inline] - pub fn add_mounting_reset_enabled(&mut self, mounting_reset_enabled: bool) { - self.fbb_.push_slot_always::(TapDetectionSettings::VT_MOUNTING_RESET_ENABLED, mounting_reset_enabled); - } - #[inline] - pub fn add_mounting_reset_taps(&mut self, mounting_reset_taps: u8) { - self.fbb_.push_slot_always::(TapDetectionSettings::VT_MOUNTING_RESET_TAPS, mounting_reset_taps); - } - #[inline] - pub fn add_setup_mode(&mut self, setup_mode: bool) { - self.fbb_.push_slot_always::(TapDetectionSettings::VT_SETUP_MODE, setup_mode); - } - #[inline] - pub fn add_number_trackers_over_threshold(&mut self, number_trackers_over_threshold: u8) { - self.fbb_.push_slot_always::(TapDetectionSettings::VT_NUMBER_TRACKERS_OVER_THRESHOLD, number_trackers_over_threshold); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TapDetectionSettingsBuilder<'a, 'b> { - let start = _fbb.start_table(); - TapDetectionSettingsBuilder { - 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 TapDetectionSettings<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("TapDetectionSettings"); - ds.field("full_reset_delay", &self.full_reset_delay()); - ds.field("full_reset_enabled", &self.full_reset_enabled()); - ds.field("full_reset_taps", &self.full_reset_taps()); - ds.field("yaw_reset_delay", &self.yaw_reset_delay()); - ds.field("yaw_reset_enabled", &self.yaw_reset_enabled()); - ds.field("yaw_reset_taps", &self.yaw_reset_taps()); - ds.field("mounting_reset_delay", &self.mounting_reset_delay()); - ds.field("mounting_reset_enabled", &self.mounting_reset_enabled()); - ds.field("mounting_reset_taps", &self.mounting_reset_taps()); - ds.field("setup_mode", &self.setup_mode()); - ds.field("number_trackers_over_threshold", &self.number_trackers_over_threshold()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum TapDetectionSettingsOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct TapDetectionSettings<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for TapDetectionSettings<'a> { + type Inner = TapDetectionSettings<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> TapDetectionSettings<'a> { + pub const VT_FULL_RESET_DELAY: flatbuffers::VOffsetT = 4; + pub const VT_FULL_RESET_ENABLED: flatbuffers::VOffsetT = 6; + pub const VT_FULL_RESET_TAPS: flatbuffers::VOffsetT = 8; + pub const VT_YAW_RESET_DELAY: flatbuffers::VOffsetT = 10; + pub const VT_YAW_RESET_ENABLED: flatbuffers::VOffsetT = 12; + pub const VT_YAW_RESET_TAPS: flatbuffers::VOffsetT = 14; + pub const VT_MOUNTING_RESET_DELAY: flatbuffers::VOffsetT = 16; + pub const VT_MOUNTING_RESET_ENABLED: flatbuffers::VOffsetT = 18; + pub const VT_MOUNTING_RESET_TAPS: flatbuffers::VOffsetT = 20; + pub const VT_SETUP_MODE: flatbuffers::VOffsetT = 22; + pub const VT_NUMBER_TRACKERS_OVER_THRESHOLD: flatbuffers::VOffsetT = 24; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + TapDetectionSettings { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args TapDetectionSettingsArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = TapDetectionSettingsBuilder::new(_fbb); + if let Some(x) = args.mounting_reset_delay { builder.add_mounting_reset_delay(x); } + if let Some(x) = args.yaw_reset_delay { builder.add_yaw_reset_delay(x); } + if let Some(x) = args.full_reset_delay { builder.add_full_reset_delay(x); } + if let Some(x) = args.number_trackers_over_threshold { builder.add_number_trackers_over_threshold(x); } + if let Some(x) = args.setup_mode { builder.add_setup_mode(x); } + if let Some(x) = args.mounting_reset_taps { builder.add_mounting_reset_taps(x); } + if let Some(x) = args.mounting_reset_enabled { builder.add_mounting_reset_enabled(x); } + if let Some(x) = args.yaw_reset_taps { builder.add_yaw_reset_taps(x); } + if let Some(x) = args.yaw_reset_enabled { builder.add_yaw_reset_enabled(x); } + if let Some(x) = args.full_reset_taps { builder.add_full_reset_taps(x); } + if let Some(x) = args.full_reset_enabled { builder.add_full_reset_enabled(x); } + builder.finish() + } + + + #[inline] + pub fn full_reset_delay(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TapDetectionSettings::VT_FULL_RESET_DELAY, None)} + } + #[inline] + pub fn full_reset_enabled(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TapDetectionSettings::VT_FULL_RESET_ENABLED, None)} + } + #[inline] + pub fn full_reset_taps(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TapDetectionSettings::VT_FULL_RESET_TAPS, None)} + } + #[inline] + pub fn yaw_reset_delay(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TapDetectionSettings::VT_YAW_RESET_DELAY, None)} + } + #[inline] + pub fn yaw_reset_enabled(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TapDetectionSettings::VT_YAW_RESET_ENABLED, None)} + } + #[inline] + pub fn yaw_reset_taps(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TapDetectionSettings::VT_YAW_RESET_TAPS, None)} + } + #[inline] + pub fn mounting_reset_delay(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TapDetectionSettings::VT_MOUNTING_RESET_DELAY, None)} + } + #[inline] + pub fn mounting_reset_enabled(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TapDetectionSettings::VT_MOUNTING_RESET_ENABLED, None)} + } + #[inline] + pub fn mounting_reset_taps(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TapDetectionSettings::VT_MOUNTING_RESET_TAPS, None)} + } + /// If true, disables reset behavior of tap detection and sends a + /// TapDetectionSetupNotification, each time 2 taps are detected on any tracker + #[inline] + pub fn setup_mode(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TapDetectionSettings::VT_SETUP_MODE, None)} + } + #[inline] + pub fn number_trackers_over_threshold(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TapDetectionSettings::VT_NUMBER_TRACKERS_OVER_THRESHOLD, None)} + } +} + +impl flatbuffers::Verifiable for TapDetectionSettings<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("full_reset_delay", Self::VT_FULL_RESET_DELAY, false)? + .visit_field::("full_reset_enabled", Self::VT_FULL_RESET_ENABLED, false)? + .visit_field::("full_reset_taps", Self::VT_FULL_RESET_TAPS, false)? + .visit_field::("yaw_reset_delay", Self::VT_YAW_RESET_DELAY, false)? + .visit_field::("yaw_reset_enabled", Self::VT_YAW_RESET_ENABLED, false)? + .visit_field::("yaw_reset_taps", Self::VT_YAW_RESET_TAPS, false)? + .visit_field::("mounting_reset_delay", Self::VT_MOUNTING_RESET_DELAY, false)? + .visit_field::("mounting_reset_enabled", Self::VT_MOUNTING_RESET_ENABLED, false)? + .visit_field::("mounting_reset_taps", Self::VT_MOUNTING_RESET_TAPS, false)? + .visit_field::("setup_mode", Self::VT_SETUP_MODE, false)? + .visit_field::("number_trackers_over_threshold", Self::VT_NUMBER_TRACKERS_OVER_THRESHOLD, false)? + .finish(); + Ok(()) + } +} +pub struct TapDetectionSettingsArgs { + pub full_reset_delay: Option, + pub full_reset_enabled: Option, + pub full_reset_taps: Option, + pub yaw_reset_delay: Option, + pub yaw_reset_enabled: Option, + pub yaw_reset_taps: Option, + pub mounting_reset_delay: Option, + pub mounting_reset_enabled: Option, + pub mounting_reset_taps: Option, + pub setup_mode: Option, + pub number_trackers_over_threshold: Option, +} +impl<'a> Default for TapDetectionSettingsArgs { + #[inline] + fn default() -> Self { + TapDetectionSettingsArgs { + full_reset_delay: None, + full_reset_enabled: None, + full_reset_taps: None, + yaw_reset_delay: None, + yaw_reset_enabled: None, + yaw_reset_taps: None, + mounting_reset_delay: None, + mounting_reset_enabled: None, + mounting_reset_taps: None, + setup_mode: None, + number_trackers_over_threshold: None, + } + } +} + +pub struct TapDetectionSettingsBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> TapDetectionSettingsBuilder<'a, 'b> { + #[inline] + pub fn add_full_reset_delay(&mut self, full_reset_delay: f32) { + self.fbb_.push_slot_always::(TapDetectionSettings::VT_FULL_RESET_DELAY, full_reset_delay); + } + #[inline] + pub fn add_full_reset_enabled(&mut self, full_reset_enabled: bool) { + self.fbb_.push_slot_always::(TapDetectionSettings::VT_FULL_RESET_ENABLED, full_reset_enabled); + } + #[inline] + pub fn add_full_reset_taps(&mut self, full_reset_taps: u8) { + self.fbb_.push_slot_always::(TapDetectionSettings::VT_FULL_RESET_TAPS, full_reset_taps); + } + #[inline] + pub fn add_yaw_reset_delay(&mut self, yaw_reset_delay: f32) { + self.fbb_.push_slot_always::(TapDetectionSettings::VT_YAW_RESET_DELAY, yaw_reset_delay); + } + #[inline] + pub fn add_yaw_reset_enabled(&mut self, yaw_reset_enabled: bool) { + self.fbb_.push_slot_always::(TapDetectionSettings::VT_YAW_RESET_ENABLED, yaw_reset_enabled); + } + #[inline] + pub fn add_yaw_reset_taps(&mut self, yaw_reset_taps: u8) { + self.fbb_.push_slot_always::(TapDetectionSettings::VT_YAW_RESET_TAPS, yaw_reset_taps); + } + #[inline] + pub fn add_mounting_reset_delay(&mut self, mounting_reset_delay: f32) { + self.fbb_.push_slot_always::(TapDetectionSettings::VT_MOUNTING_RESET_DELAY, mounting_reset_delay); + } + #[inline] + pub fn add_mounting_reset_enabled(&mut self, mounting_reset_enabled: bool) { + self.fbb_.push_slot_always::(TapDetectionSettings::VT_MOUNTING_RESET_ENABLED, mounting_reset_enabled); + } + #[inline] + pub fn add_mounting_reset_taps(&mut self, mounting_reset_taps: u8) { + self.fbb_.push_slot_always::(TapDetectionSettings::VT_MOUNTING_RESET_TAPS, mounting_reset_taps); + } + #[inline] + pub fn add_setup_mode(&mut self, setup_mode: bool) { + self.fbb_.push_slot_always::(TapDetectionSettings::VT_SETUP_MODE, setup_mode); + } + #[inline] + pub fn add_number_trackers_over_threshold(&mut self, number_trackers_over_threshold: u8) { + self.fbb_.push_slot_always::(TapDetectionSettings::VT_NUMBER_TRACKERS_OVER_THRESHOLD, number_trackers_over_threshold); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TapDetectionSettingsBuilder<'a, 'b> { + let start = _fbb.start_table(); + TapDetectionSettingsBuilder { + 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 TapDetectionSettings<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("TapDetectionSettings"); + ds.field("full_reset_delay", &self.full_reset_delay()); + ds.field("full_reset_enabled", &self.full_reset_enabled()); + ds.field("full_reset_taps", &self.full_reset_taps()); + ds.field("yaw_reset_delay", &self.yaw_reset_delay()); + ds.field("yaw_reset_enabled", &self.yaw_reset_enabled()); + ds.field("yaw_reset_taps", &self.yaw_reset_taps()); + ds.field("mounting_reset_delay", &self.mounting_reset_delay()); + ds.field("mounting_reset_enabled", &self.mounting_reset_enabled()); + ds.field("mounting_reset_taps", &self.mounting_reset_taps()); + ds.field("setup_mode", &self.setup_mode()); + ds.field("number_trackers_over_threshold", &self.number_trackers_over_threshold()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/tap_detection_setup_notification_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/tap_detection_setup_notification_generated.rs index d0fe0c48..54f46396 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/tap_detection_setup_notification_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/tap_detection_setup_notification_generated.rs @@ -1,109 +1,109 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum TapDetectionSetupNotificationOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// See TapDetectionSettings::setup_mode -pub struct TapDetectionSetupNotification<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for TapDetectionSetupNotification<'a> { - type Inner = TapDetectionSetupNotification<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> TapDetectionSetupNotification<'a> { - pub const VT_TRACKER_ID: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - TapDetectionSetupNotification { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args TapDetectionSetupNotificationArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = TapDetectionSetupNotificationBuilder::new(_fbb); - if let Some(x) = args.tracker_id { builder.add_tracker_id(x); } - builder.finish() - } - - - #[inline] - pub fn tracker_id(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(TapDetectionSetupNotification::VT_TRACKER_ID, None)} - } -} - -impl flatbuffers::Verifiable for TapDetectionSetupNotification<'_> { - #[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)? - .finish(); - Ok(()) - } -} -pub struct TapDetectionSetupNotificationArgs<'a> { - pub tracker_id: Option>>, -} -impl<'a> Default for TapDetectionSetupNotificationArgs<'a> { - #[inline] - fn default() -> Self { - TapDetectionSetupNotificationArgs { - tracker_id: None, - } - } -} - -pub struct TapDetectionSetupNotificationBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> TapDetectionSetupNotificationBuilder<'a, 'b> { - #[inline] - pub fn add_tracker_id(&mut self, tracker_id: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(TapDetectionSetupNotification::VT_TRACKER_ID, tracker_id); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TapDetectionSetupNotificationBuilder<'a, 'b> { - let start = _fbb.start_table(); - TapDetectionSetupNotificationBuilder { - 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 TapDetectionSetupNotification<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("TapDetectionSetupNotification"); - ds.field("tracker_id", &self.tracker_id()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum TapDetectionSetupNotificationOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// See TapDetectionSettings::setup_mode +pub struct TapDetectionSetupNotification<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for TapDetectionSetupNotification<'a> { + type Inner = TapDetectionSetupNotification<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> TapDetectionSetupNotification<'a> { + pub const VT_TRACKER_ID: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + TapDetectionSetupNotification { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args TapDetectionSetupNotificationArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = TapDetectionSetupNotificationBuilder::new(_fbb); + if let Some(x) = args.tracker_id { builder.add_tracker_id(x); } + builder.finish() + } + + + #[inline] + pub fn tracker_id(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(TapDetectionSetupNotification::VT_TRACKER_ID, None)} + } +} + +impl flatbuffers::Verifiable for TapDetectionSetupNotification<'_> { + #[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)? + .finish(); + Ok(()) + } +} +pub struct TapDetectionSetupNotificationArgs<'a> { + pub tracker_id: Option>>, +} +impl<'a> Default for TapDetectionSetupNotificationArgs<'a> { + #[inline] + fn default() -> Self { + TapDetectionSetupNotificationArgs { + tracker_id: None, + } + } +} + +pub struct TapDetectionSetupNotificationBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> TapDetectionSetupNotificationBuilder<'a, 'b> { + #[inline] + pub fn add_tracker_id(&mut self, tracker_id: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(TapDetectionSetupNotification::VT_TRACKER_ID, tracker_id); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TapDetectionSetupNotificationBuilder<'a, 'b> { + let start = _fbb.start_table(); + TapDetectionSetupNotificationBuilder { + 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 TapDetectionSetupNotification<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("TapDetectionSetupNotification"); + ds.field("tracker_id", &self.tracker_id()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/tracking_pause_state_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/tracking_pause_state_request_generated.rs index f1ba88e0..aceb1981 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/tracking_pause_state_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/tracking_pause_state_request_generated.rs @@ -1,91 +1,91 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum TrackingPauseStateRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Requests the current state of tracking pause -pub struct TrackingPauseStateRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for TrackingPauseStateRequest<'a> { - type Inner = TrackingPauseStateRequest<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> TrackingPauseStateRequest<'a> { - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - TrackingPauseStateRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args TrackingPauseStateRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = TrackingPauseStateRequestBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for TrackingPauseStateRequest<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .finish(); - Ok(()) - } -} -pub struct TrackingPauseStateRequestArgs { -} -impl<'a> Default for TrackingPauseStateRequestArgs { - #[inline] - fn default() -> Self { - TrackingPauseStateRequestArgs { - } - } -} - -pub struct TrackingPauseStateRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> TrackingPauseStateRequestBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TrackingPauseStateRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - TrackingPauseStateRequestBuilder { - fbb_: _fbb, - start_: start, - } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } -} - -impl core::fmt::Debug for TrackingPauseStateRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("TrackingPauseStateRequest"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum TrackingPauseStateRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Requests the current state of tracking pause +pub struct TrackingPauseStateRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for TrackingPauseStateRequest<'a> { + type Inner = TrackingPauseStateRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> TrackingPauseStateRequest<'a> { + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + TrackingPauseStateRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args TrackingPauseStateRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = TrackingPauseStateRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for TrackingPauseStateRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .finish(); + Ok(()) + } +} +pub struct TrackingPauseStateRequestArgs { +} +impl<'a> Default for TrackingPauseStateRequestArgs { + #[inline] + fn default() -> Self { + TrackingPauseStateRequestArgs { + } + } +} + +pub struct TrackingPauseStateRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> TrackingPauseStateRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TrackingPauseStateRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + TrackingPauseStateRequestBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for TrackingPauseStateRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("TrackingPauseStateRequest"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/tracking_pause_state_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/tracking_pause_state_response_generated.rs index 210e6b35..10894b56 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/tracking_pause_state_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/tracking_pause_state_response_generated.rs @@ -1,109 +1,109 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum TrackingPauseStateResponseOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct TrackingPauseStateResponse<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for TrackingPauseStateResponse<'a> { - type Inner = TrackingPauseStateResponse<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> TrackingPauseStateResponse<'a> { - pub const VT_TRACKINGPAUSED: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - TrackingPauseStateResponse { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args TrackingPauseStateResponseArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = TrackingPauseStateResponseBuilder::new(_fbb); - builder.add_trackingPaused(args.trackingPaused); - builder.finish() - } - - - /// Skeleton tracking is paused if true, skeleton tracking is unpaused if false. - #[inline] - pub fn trackingPaused(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TrackingPauseStateResponse::VT_TRACKINGPAUSED, Some(false)).unwrap()} - } -} - -impl flatbuffers::Verifiable for TrackingPauseStateResponse<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("trackingPaused", Self::VT_TRACKINGPAUSED, false)? - .finish(); - Ok(()) - } -} -pub struct TrackingPauseStateResponseArgs { - pub trackingPaused: bool, -} -impl<'a> Default for TrackingPauseStateResponseArgs { - #[inline] - fn default() -> Self { - TrackingPauseStateResponseArgs { - trackingPaused: false, - } - } -} - -pub struct TrackingPauseStateResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> TrackingPauseStateResponseBuilder<'a, 'b> { - #[inline] - pub fn add_trackingPaused(&mut self, trackingPaused: bool) { - self.fbb_.push_slot::(TrackingPauseStateResponse::VT_TRACKINGPAUSED, trackingPaused, false); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TrackingPauseStateResponseBuilder<'a, 'b> { - let start = _fbb.start_table(); - TrackingPauseStateResponseBuilder { - fbb_: _fbb, - start_: start, - } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } -} - -impl core::fmt::Debug for TrackingPauseStateResponse<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("TrackingPauseStateResponse"); - ds.field("trackingPaused", &self.trackingPaused()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum TrackingPauseStateResponseOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct TrackingPauseStateResponse<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for TrackingPauseStateResponse<'a> { + type Inner = TrackingPauseStateResponse<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> TrackingPauseStateResponse<'a> { + pub const VT_TRACKINGPAUSED: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + TrackingPauseStateResponse { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args TrackingPauseStateResponseArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = TrackingPauseStateResponseBuilder::new(_fbb); + builder.add_trackingPaused(args.trackingPaused); + builder.finish() + } + + + /// Skeleton tracking is paused if true, skeleton tracking is unpaused if false. + #[inline] + pub fn trackingPaused(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackingPauseStateResponse::VT_TRACKINGPAUSED, Some(false)).unwrap()} + } +} + +impl flatbuffers::Verifiable for TrackingPauseStateResponse<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("trackingPaused", Self::VT_TRACKINGPAUSED, false)? + .finish(); + Ok(()) + } +} +pub struct TrackingPauseStateResponseArgs { + pub trackingPaused: bool, +} +impl<'a> Default for TrackingPauseStateResponseArgs { + #[inline] + fn default() -> Self { + TrackingPauseStateResponseArgs { + trackingPaused: false, + } + } +} + +pub struct TrackingPauseStateResponseBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> TrackingPauseStateResponseBuilder<'a, 'b> { + #[inline] + pub fn add_trackingPaused(&mut self, trackingPaused: bool) { + self.fbb_.push_slot::(TrackingPauseStateResponse::VT_TRACKINGPAUSED, trackingPaused, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TrackingPauseStateResponseBuilder<'a, 'b> { + let start = _fbb.start_table(); + TrackingPauseStateResponseBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for TrackingPauseStateResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("TrackingPauseStateResponse"); + ds.field("trackingPaused", &self.trackingPaused()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/unknown_device_handshake_notification_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/unknown_device_handshake_notification_generated.rs index 99ba50df..bdda79ba 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/unknown_device_handshake_notification_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/unknown_device_handshake_notification_generated.rs @@ -1,111 +1,111 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum UnknownDeviceHandshakeNotificationOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Server notifies connection of an unknown device. -/// If the notification is no longer sent, it means the device connected to another -/// server, got connected to this server or it was turned off. -pub struct UnknownDeviceHandshakeNotification<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for UnknownDeviceHandshakeNotification<'a> { - type Inner = UnknownDeviceHandshakeNotification<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> UnknownDeviceHandshakeNotification<'a> { - pub const VT_MAC_ADDRESS: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - UnknownDeviceHandshakeNotification { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args UnknownDeviceHandshakeNotificationArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = UnknownDeviceHandshakeNotificationBuilder::new(_fbb); - if let Some(x) = args.mac_address { builder.add_mac_address(x); } - builder.finish() - } - - - #[inline] - pub fn mac_address(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(UnknownDeviceHandshakeNotification::VT_MAC_ADDRESS, None)} - } -} - -impl flatbuffers::Verifiable for UnknownDeviceHandshakeNotification<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("mac_address", Self::VT_MAC_ADDRESS, false)? - .finish(); - Ok(()) - } -} -pub struct UnknownDeviceHandshakeNotificationArgs<'a> { - pub mac_address: Option>, -} -impl<'a> Default for UnknownDeviceHandshakeNotificationArgs<'a> { - #[inline] - fn default() -> Self { - UnknownDeviceHandshakeNotificationArgs { - mac_address: None, - } - } -} - -pub struct UnknownDeviceHandshakeNotificationBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> UnknownDeviceHandshakeNotificationBuilder<'a, 'b> { - #[inline] - pub fn add_mac_address(&mut self, mac_address: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(UnknownDeviceHandshakeNotification::VT_MAC_ADDRESS, mac_address); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> UnknownDeviceHandshakeNotificationBuilder<'a, 'b> { - let start = _fbb.start_table(); - UnknownDeviceHandshakeNotificationBuilder { - fbb_: _fbb, - start_: start, - } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } -} - -impl core::fmt::Debug for UnknownDeviceHandshakeNotification<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("UnknownDeviceHandshakeNotification"); - ds.field("mac_address", &self.mac_address()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum UnknownDeviceHandshakeNotificationOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Server notifies connection of an unknown device. +/// If the notification is no longer sent, it means the device connected to another +/// server, got connected to this server or it was turned off. +pub struct UnknownDeviceHandshakeNotification<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for UnknownDeviceHandshakeNotification<'a> { + type Inner = UnknownDeviceHandshakeNotification<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> UnknownDeviceHandshakeNotification<'a> { + pub const VT_MAC_ADDRESS: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + UnknownDeviceHandshakeNotification { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args UnknownDeviceHandshakeNotificationArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = UnknownDeviceHandshakeNotificationBuilder::new(_fbb); + if let Some(x) = args.mac_address { builder.add_mac_address(x); } + builder.finish() + } + + + #[inline] + pub fn mac_address(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(UnknownDeviceHandshakeNotification::VT_MAC_ADDRESS, None)} + } +} + +impl flatbuffers::Verifiable for UnknownDeviceHandshakeNotification<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("mac_address", Self::VT_MAC_ADDRESS, false)? + .finish(); + Ok(()) + } +} +pub struct UnknownDeviceHandshakeNotificationArgs<'a> { + pub mac_address: Option>, +} +impl<'a> Default for UnknownDeviceHandshakeNotificationArgs<'a> { + #[inline] + fn default() -> Self { + UnknownDeviceHandshakeNotificationArgs { + mac_address: None, + } + } +} + +pub struct UnknownDeviceHandshakeNotificationBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> UnknownDeviceHandshakeNotificationBuilder<'a, 'b> { + #[inline] + pub fn add_mac_address(&mut self, mac_address: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(UnknownDeviceHandshakeNotification::VT_MAC_ADDRESS, mac_address); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> UnknownDeviceHandshakeNotificationBuilder<'a, 'b> { + let start = _fbb.start_table(); + UnknownDeviceHandshakeNotificationBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for UnknownDeviceHandshakeNotification<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("UnknownDeviceHandshakeNotification"); + ds.field("mac_address", &self.mac_address()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/vmcoscsettings_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/vmcoscsettings_generated.rs index 7002828c..3cdb8db5 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/vmcoscsettings_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/vmcoscsettings_generated.rs @@ -1,160 +1,160 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum VMCOSCSettingsOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// OSC Settings specific to VMC -pub struct VMCOSCSettings<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for VMCOSCSettings<'a> { - type Inner = VMCOSCSettings<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> VMCOSCSettings<'a> { - pub const VT_OSC_SETTINGS: flatbuffers::VOffsetT = 4; - pub const VT_VRM_JSON: flatbuffers::VOffsetT = 6; - pub const VT_ANCHOR_HIP: flatbuffers::VOffsetT = 8; - pub const VT_MIRROR_TRACKING: flatbuffers::VOffsetT = 10; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - VMCOSCSettings { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args VMCOSCSettingsArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = VMCOSCSettingsBuilder::new(_fbb); - if let Some(x) = args.vrm_json { builder.add_vrm_json(x); } - if let Some(x) = args.osc_settings { builder.add_osc_settings(x); } - builder.add_mirror_tracking(args.mirror_tracking); - builder.add_anchor_hip(args.anchor_hip); - builder.finish() - } - - - #[inline] - pub fn osc_settings(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(VMCOSCSettings::VT_OSC_SETTINGS, None)} - } - #[inline] - pub fn vrm_json(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(VMCOSCSettings::VT_VRM_JSON, None)} - } - #[inline] - pub fn anchor_hip(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(VMCOSCSettings::VT_ANCHOR_HIP, Some(false)).unwrap()} - } - #[inline] - pub fn mirror_tracking(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(VMCOSCSettings::VT_MIRROR_TRACKING, Some(false)).unwrap()} - } -} - -impl flatbuffers::Verifiable for VMCOSCSettings<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("osc_settings", Self::VT_OSC_SETTINGS, false)? - .visit_field::>("vrm_json", Self::VT_VRM_JSON, false)? - .visit_field::("anchor_hip", Self::VT_ANCHOR_HIP, false)? - .visit_field::("mirror_tracking", Self::VT_MIRROR_TRACKING, false)? - .finish(); - Ok(()) - } -} -pub struct VMCOSCSettingsArgs<'a> { - pub osc_settings: Option>>, - pub vrm_json: Option>, - pub anchor_hip: bool, - pub mirror_tracking: bool, -} -impl<'a> Default for VMCOSCSettingsArgs<'a> { - #[inline] - fn default() -> Self { - VMCOSCSettingsArgs { - osc_settings: None, - vrm_json: None, - anchor_hip: false, - mirror_tracking: false, - } - } -} - -pub struct VMCOSCSettingsBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> VMCOSCSettingsBuilder<'a, 'b> { - #[inline] - pub fn add_osc_settings(&mut self, osc_settings: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(VMCOSCSettings::VT_OSC_SETTINGS, osc_settings); - } - #[inline] - pub fn add_vrm_json(&mut self, vrm_json: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(VMCOSCSettings::VT_VRM_JSON, vrm_json); - } - #[inline] - pub fn add_anchor_hip(&mut self, anchor_hip: bool) { - self.fbb_.push_slot::(VMCOSCSettings::VT_ANCHOR_HIP, anchor_hip, false); - } - #[inline] - pub fn add_mirror_tracking(&mut self, mirror_tracking: bool) { - self.fbb_.push_slot::(VMCOSCSettings::VT_MIRROR_TRACKING, mirror_tracking, false); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> VMCOSCSettingsBuilder<'a, 'b> { - let start = _fbb.start_table(); - VMCOSCSettingsBuilder { - 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 VMCOSCSettings<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("VMCOSCSettings"); - ds.field("osc_settings", &self.osc_settings()); - ds.field("vrm_json", &self.vrm_json()); - ds.field("anchor_hip", &self.anchor_hip()); - ds.field("mirror_tracking", &self.mirror_tracking()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum VMCOSCSettingsOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// OSC Settings specific to VMC +pub struct VMCOSCSettings<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for VMCOSCSettings<'a> { + type Inner = VMCOSCSettings<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> VMCOSCSettings<'a> { + pub const VT_OSC_SETTINGS: flatbuffers::VOffsetT = 4; + pub const VT_VRM_JSON: flatbuffers::VOffsetT = 6; + pub const VT_ANCHOR_HIP: flatbuffers::VOffsetT = 8; + pub const VT_MIRROR_TRACKING: flatbuffers::VOffsetT = 10; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + VMCOSCSettings { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args VMCOSCSettingsArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = VMCOSCSettingsBuilder::new(_fbb); + if let Some(x) = args.vrm_json { builder.add_vrm_json(x); } + if let Some(x) = args.osc_settings { builder.add_osc_settings(x); } + builder.add_mirror_tracking(args.mirror_tracking); + builder.add_anchor_hip(args.anchor_hip); + builder.finish() + } + + + #[inline] + pub fn osc_settings(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(VMCOSCSettings::VT_OSC_SETTINGS, None)} + } + #[inline] + pub fn vrm_json(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(VMCOSCSettings::VT_VRM_JSON, None)} + } + #[inline] + pub fn anchor_hip(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(VMCOSCSettings::VT_ANCHOR_HIP, Some(false)).unwrap()} + } + #[inline] + pub fn mirror_tracking(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(VMCOSCSettings::VT_MIRROR_TRACKING, Some(false)).unwrap()} + } +} + +impl flatbuffers::Verifiable for VMCOSCSettings<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("osc_settings", Self::VT_OSC_SETTINGS, false)? + .visit_field::>("vrm_json", Self::VT_VRM_JSON, false)? + .visit_field::("anchor_hip", Self::VT_ANCHOR_HIP, false)? + .visit_field::("mirror_tracking", Self::VT_MIRROR_TRACKING, false)? + .finish(); + Ok(()) + } +} +pub struct VMCOSCSettingsArgs<'a> { + pub osc_settings: Option>>, + pub vrm_json: Option>, + pub anchor_hip: bool, + pub mirror_tracking: bool, +} +impl<'a> Default for VMCOSCSettingsArgs<'a> { + #[inline] + fn default() -> Self { + VMCOSCSettingsArgs { + osc_settings: None, + vrm_json: None, + anchor_hip: false, + mirror_tracking: false, + } + } +} + +pub struct VMCOSCSettingsBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> VMCOSCSettingsBuilder<'a, 'b> { + #[inline] + pub fn add_osc_settings(&mut self, osc_settings: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(VMCOSCSettings::VT_OSC_SETTINGS, osc_settings); + } + #[inline] + pub fn add_vrm_json(&mut self, vrm_json: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(VMCOSCSettings::VT_VRM_JSON, vrm_json); + } + #[inline] + pub fn add_anchor_hip(&mut self, anchor_hip: bool) { + self.fbb_.push_slot::(VMCOSCSettings::VT_ANCHOR_HIP, anchor_hip, false); + } + #[inline] + pub fn add_mirror_tracking(&mut self, mirror_tracking: bool) { + self.fbb_.push_slot::(VMCOSCSettings::VT_MIRROR_TRACKING, mirror_tracking, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> VMCOSCSettingsBuilder<'a, 'b> { + let start = _fbb.start_table(); + VMCOSCSettingsBuilder { + 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 VMCOSCSettings<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("VMCOSCSettings"); + ds.field("osc_settings", &self.osc_settings()); + ds.field("vrm_json", &self.vrm_json()); + ds.field("anchor_hip", &self.anchor_hip()); + ds.field("mirror_tracking", &self.mirror_tracking()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/vrcoscsettings_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/vrcoscsettings_generated.rs index e6b8eebc..013e54f8 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/vrcoscsettings_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/vrcoscsettings_generated.rs @@ -1,126 +1,126 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum VRCOSCSettingsOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// OSC Settings specific to VRChat -pub struct VRCOSCSettings<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for VRCOSCSettings<'a> { - type Inner = VRCOSCSettings<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> VRCOSCSettings<'a> { - pub const VT_OSC_SETTINGS: flatbuffers::VOffsetT = 4; - pub const VT_TRACKERS: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - VRCOSCSettings { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args VRCOSCSettingsArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = VRCOSCSettingsBuilder::new(_fbb); - if let Some(x) = args.trackers { builder.add_trackers(x); } - if let Some(x) = args.osc_settings { builder.add_osc_settings(x); } - builder.finish() - } - - - #[inline] - pub fn osc_settings(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(VRCOSCSettings::VT_OSC_SETTINGS, None)} - } - #[inline] - pub fn trackers(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(VRCOSCSettings::VT_TRACKERS, None)} - } -} - -impl flatbuffers::Verifiable for VRCOSCSettings<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("osc_settings", Self::VT_OSC_SETTINGS, false)? - .visit_field::>("trackers", Self::VT_TRACKERS, false)? - .finish(); - Ok(()) - } -} -pub struct VRCOSCSettingsArgs<'a> { - pub osc_settings: Option>>, - pub trackers: Option>>, -} -impl<'a> Default for VRCOSCSettingsArgs<'a> { - #[inline] - fn default() -> Self { - VRCOSCSettingsArgs { - osc_settings: None, - trackers: None, - } - } -} - -pub struct VRCOSCSettingsBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> VRCOSCSettingsBuilder<'a, 'b> { - #[inline] - pub fn add_osc_settings(&mut self, osc_settings: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(VRCOSCSettings::VT_OSC_SETTINGS, osc_settings); - } - #[inline] - pub fn add_trackers(&mut self, trackers: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(VRCOSCSettings::VT_TRACKERS, trackers); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> VRCOSCSettingsBuilder<'a, 'b> { - let start = _fbb.start_table(); - VRCOSCSettingsBuilder { - 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 VRCOSCSettings<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("VRCOSCSettings"); - ds.field("osc_settings", &self.osc_settings()); - ds.field("trackers", &self.trackers()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum VRCOSCSettingsOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// OSC Settings specific to VRChat +pub struct VRCOSCSettings<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for VRCOSCSettings<'a> { + type Inner = VRCOSCSettings<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> VRCOSCSettings<'a> { + pub const VT_OSC_SETTINGS: flatbuffers::VOffsetT = 4; + pub const VT_TRACKERS: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + VRCOSCSettings { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args VRCOSCSettingsArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = VRCOSCSettingsBuilder::new(_fbb); + if let Some(x) = args.trackers { builder.add_trackers(x); } + if let Some(x) = args.osc_settings { builder.add_osc_settings(x); } + builder.finish() + } + + + #[inline] + pub fn osc_settings(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(VRCOSCSettings::VT_OSC_SETTINGS, None)} + } + #[inline] + pub fn trackers(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(VRCOSCSettings::VT_TRACKERS, None)} + } +} + +impl flatbuffers::Verifiable for VRCOSCSettings<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("osc_settings", Self::VT_OSC_SETTINGS, false)? + .visit_field::>("trackers", Self::VT_TRACKERS, false)? + .finish(); + Ok(()) + } +} +pub struct VRCOSCSettingsArgs<'a> { + pub osc_settings: Option>>, + pub trackers: Option>>, +} +impl<'a> Default for VRCOSCSettingsArgs<'a> { + #[inline] + fn default() -> Self { + VRCOSCSettingsArgs { + osc_settings: None, + trackers: None, + } + } +} + +pub struct VRCOSCSettingsBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> VRCOSCSettingsBuilder<'a, 'b> { + #[inline] + pub fn add_osc_settings(&mut self, osc_settings: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(VRCOSCSettings::VT_OSC_SETTINGS, osc_settings); + } + #[inline] + pub fn add_trackers(&mut self, trackers: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(VRCOSCSettings::VT_TRACKERS, trackers); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> VRCOSCSettingsBuilder<'a, 'b> { + let start = _fbb.start_table(); + VRCOSCSettingsBuilder { + 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 VRCOSCSettings<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("VRCOSCSettings"); + ds.field("osc_settings", &self.osc_settings()); + ds.field("trackers", &self.trackers()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/wifi_provisioning_status_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/wifi_provisioning_status_generated.rs index 73918528..286a4dae 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/wifi_provisioning_status_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/wifi_provisioning_status_generated.rs @@ -1,120 +1,124 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_WIFI_PROVISIONING_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_WIFI_PROVISIONING_STATUS: u8 = 7; -#[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_WIFI_PROVISIONING_STATUS: [WifiProvisioningStatus; 8] = [ - WifiProvisioningStatus::NONE, - WifiProvisioningStatus::SERIAL_INIT, - WifiProvisioningStatus::PROVISIONING, - WifiProvisioningStatus::CONNECTING, - WifiProvisioningStatus::CONNECTION_ERROR, - WifiProvisioningStatus::LOOKING_FOR_SERVER, - WifiProvisioningStatus::COULD_NOT_FIND_SERVER, - WifiProvisioningStatus::DONE, -]; - -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[repr(transparent)] -pub struct WifiProvisioningStatus(pub u8); -#[allow(non_upper_case_globals)] -impl WifiProvisioningStatus { - pub const NONE: Self = Self(0); - pub const SERIAL_INIT: Self = Self(1); - pub const PROVISIONING: Self = Self(2); - pub const CONNECTING: Self = Self(3); - pub const CONNECTION_ERROR: Self = Self(4); - pub const LOOKING_FOR_SERVER: Self = Self(5); - pub const COULD_NOT_FIND_SERVER: Self = Self(6); - pub const DONE: Self = Self(7); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 7; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::NONE, - Self::SERIAL_INIT, - Self::PROVISIONING, - Self::CONNECTING, - Self::CONNECTION_ERROR, - Self::LOOKING_FOR_SERVER, - Self::COULD_NOT_FIND_SERVER, - Self::DONE, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::NONE => Some("NONE"), - Self::SERIAL_INIT => Some("SERIAL_INIT"), - Self::PROVISIONING => Some("PROVISIONING"), - Self::CONNECTING => Some("CONNECTING"), - Self::CONNECTION_ERROR => Some("CONNECTION_ERROR"), - Self::LOOKING_FOR_SERVER => Some("LOOKING_FOR_SERVER"), - Self::COULD_NOT_FIND_SERVER => Some("COULD_NOT_FIND_SERVER"), - Self::DONE => Some("DONE"), - _ => None, - } - } -} -impl core::fmt::Debug for WifiProvisioningStatus { - 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 WifiProvisioningStatus { - type Inner = Self; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for WifiProvisioningStatus { - type Output = WifiProvisioningStatus; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for WifiProvisioningStatus { - type Scalar = u8; - #[inline] - fn to_little_endian(self) -> u8 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u8) -> Self { - let b = u8::from_le(v); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for WifiProvisioningStatus { - #[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 WifiProvisioningStatus {} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_WIFI_PROVISIONING_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_WIFI_PROVISIONING_STATUS: u8 = 8; +#[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_WIFI_PROVISIONING_STATUS: [WifiProvisioningStatus; 9] = [ + WifiProvisioningStatus::NONE, + WifiProvisioningStatus::SERIAL_INIT, + WifiProvisioningStatus::PROVISIONING, + WifiProvisioningStatus::OPTAINING_MAC_ADDRESS, + WifiProvisioningStatus::CONNECTING, + WifiProvisioningStatus::CONNECTION_ERROR, + WifiProvisioningStatus::LOOKING_FOR_SERVER, + WifiProvisioningStatus::COULD_NOT_FIND_SERVER, + WifiProvisioningStatus::DONE, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct WifiProvisioningStatus(pub u8); +#[allow(non_upper_case_globals)] +impl WifiProvisioningStatus { + pub const NONE: Self = Self(0); + pub const SERIAL_INIT: Self = Self(1); + pub const PROVISIONING: Self = Self(2); + pub const OPTAINING_MAC_ADDRESS: Self = Self(3); + pub const CONNECTING: Self = Self(4); + pub const CONNECTION_ERROR: Self = Self(5); + pub const LOOKING_FOR_SERVER: Self = Self(6); + pub const COULD_NOT_FIND_SERVER: Self = Self(7); + pub const DONE: Self = Self(8); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 8; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::NONE, + Self::SERIAL_INIT, + Self::PROVISIONING, + Self::OPTAINING_MAC_ADDRESS, + Self::CONNECTING, + Self::CONNECTION_ERROR, + Self::LOOKING_FOR_SERVER, + Self::COULD_NOT_FIND_SERVER, + Self::DONE, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::NONE => Some("NONE"), + Self::SERIAL_INIT => Some("SERIAL_INIT"), + Self::PROVISIONING => Some("PROVISIONING"), + Self::OPTAINING_MAC_ADDRESS => Some("OPTAINING_MAC_ADDRESS"), + Self::CONNECTING => Some("CONNECTING"), + Self::CONNECTION_ERROR => Some("CONNECTION_ERROR"), + Self::LOOKING_FOR_SERVER => Some("LOOKING_FOR_SERVER"), + Self::COULD_NOT_FIND_SERVER => Some("COULD_NOT_FIND_SERVER"), + Self::DONE => Some("DONE"), + _ => None, + } + } +} +impl core::fmt::Debug for WifiProvisioningStatus { + 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 WifiProvisioningStatus { + type Inner = Self; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for WifiProvisioningStatus { + type Output = WifiProvisioningStatus; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for WifiProvisioningStatus { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for WifiProvisioningStatus { + #[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 WifiProvisioningStatus {} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/wifi_provisioning_status_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/wifi_provisioning_status_response_generated.rs index 9621a878..ef7df931 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/wifi_provisioning_status_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/wifi_provisioning_status_response_generated.rs @@ -1,108 +1,108 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum WifiProvisioningStatusResponseOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct WifiProvisioningStatusResponse<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for WifiProvisioningStatusResponse<'a> { - type Inner = WifiProvisioningStatusResponse<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> WifiProvisioningStatusResponse<'a> { - pub const VT_STATUS: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - WifiProvisioningStatusResponse { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args WifiProvisioningStatusResponseArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = WifiProvisioningStatusResponseBuilder::new(_fbb); - builder.add_status(args.status); - builder.finish() - } - - - #[inline] - pub fn status(&self) -> WifiProvisioningStatus { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(WifiProvisioningStatusResponse::VT_STATUS, Some(WifiProvisioningStatus::NONE)).unwrap()} - } -} - -impl flatbuffers::Verifiable for WifiProvisioningStatusResponse<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("status", Self::VT_STATUS, false)? - .finish(); - Ok(()) - } -} -pub struct WifiProvisioningStatusResponseArgs { - pub status: WifiProvisioningStatus, -} -impl<'a> Default for WifiProvisioningStatusResponseArgs { - #[inline] - fn default() -> Self { - WifiProvisioningStatusResponseArgs { - status: WifiProvisioningStatus::NONE, - } - } -} - -pub struct WifiProvisioningStatusResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> WifiProvisioningStatusResponseBuilder<'a, 'b> { - #[inline] - pub fn add_status(&mut self, status: WifiProvisioningStatus) { - self.fbb_.push_slot::(WifiProvisioningStatusResponse::VT_STATUS, status, WifiProvisioningStatus::NONE); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> WifiProvisioningStatusResponseBuilder<'a, 'b> { - let start = _fbb.start_table(); - WifiProvisioningStatusResponseBuilder { - 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 WifiProvisioningStatusResponse<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("WifiProvisioningStatusResponse"); - ds.field("status", &self.status()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum WifiProvisioningStatusResponseOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct WifiProvisioningStatusResponse<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for WifiProvisioningStatusResponse<'a> { + type Inner = WifiProvisioningStatusResponse<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> WifiProvisioningStatusResponse<'a> { + pub const VT_STATUS: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + WifiProvisioningStatusResponse { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args WifiProvisioningStatusResponseArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = WifiProvisioningStatusResponseBuilder::new(_fbb); + builder.add_status(args.status); + builder.finish() + } + + + #[inline] + pub fn status(&self) -> WifiProvisioningStatus { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(WifiProvisioningStatusResponse::VT_STATUS, Some(WifiProvisioningStatus::NONE)).unwrap()} + } +} + +impl flatbuffers::Verifiable for WifiProvisioningStatusResponse<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("status", Self::VT_STATUS, false)? + .finish(); + Ok(()) + } +} +pub struct WifiProvisioningStatusResponseArgs { + pub status: WifiProvisioningStatus, +} +impl<'a> Default for WifiProvisioningStatusResponseArgs { + #[inline] + fn default() -> Self { + WifiProvisioningStatusResponseArgs { + status: WifiProvisioningStatus::NONE, + } + } +} + +pub struct WifiProvisioningStatusResponseBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> WifiProvisioningStatusResponseBuilder<'a, 'b> { + #[inline] + pub fn add_status(&mut self, status: WifiProvisioningStatus) { + self.fbb_.push_slot::(WifiProvisioningStatusResponse::VT_STATUS, status, WifiProvisioningStatus::NONE); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> WifiProvisioningStatusResponseBuilder<'a, 'b> { + let start = _fbb.start_table(); + WifiProvisioningStatusResponseBuilder { + 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 WifiProvisioningStatusResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("WifiProvisioningStatusResponse"); + ds.field("status", &self.status()); + ds.finish() + } +} diff --git a/protocol/typescript/src/all_generated.ts b/protocol/typescript/src/all_generated.ts index f4305b48..dfa91a81 100644 --- a/protocol/typescript/src/all_generated.ts +++ b/protocol/typescript/src/all_generated.ts @@ -1,136 +1,148 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -export { MessageBundle, MessageBundleT } from './solarxr-protocol/message-bundle.js'; -export { Bone, BoneT } from './solarxr-protocol/data-feed/bone.js'; -export { DataFeedConfig, DataFeedConfigT } from './solarxr-protocol/data-feed/data-feed-config.js'; -export { DataFeedMessage, unionToDataFeedMessage, unionListToDataFeedMessage } from './solarxr-protocol/data-feed/data-feed-message.js'; -export { DataFeedMessageHeader, DataFeedMessageHeaderT } from './solarxr-protocol/data-feed/data-feed-message-header.js'; -export { DataFeedUpdate, DataFeedUpdateT } from './solarxr-protocol/data-feed/data-feed-update.js'; -export { PollDataFeed, PollDataFeedT } from './solarxr-protocol/data-feed/poll-data-feed.js'; -export { StartDataFeed, StartDataFeedT } from './solarxr-protocol/data-feed/start-data-feed.js'; -export { DeviceData, DeviceDataT } from './solarxr-protocol/data-feed/device-data/device-data.js'; -export { DeviceDataMask, DeviceDataMaskT } from './solarxr-protocol/data-feed/device-data/device-data-mask.js'; -export { TrackerData, TrackerDataT } from './solarxr-protocol/data-feed/tracker/tracker-data.js'; -export { TrackerDataMask, TrackerDataMaskT } from './solarxr-protocol/data-feed/tracker/tracker-data-mask.js'; -export { TrackerInfo, TrackerInfoT } from './solarxr-protocol/data-feed/tracker/tracker-info.js'; -export { BodyPart } from './solarxr-protocol/datatypes/body-part.js'; -export { Bytes, BytesT } from './solarxr-protocol/datatypes/bytes.js'; -export { DeviceId, DeviceIdT } from './solarxr-protocol/datatypes/device-id.js'; -export { FilteringType } from './solarxr-protocol/datatypes/filtering-type.js'; -export { FirmwareErrorCode } from './solarxr-protocol/datatypes/firmware-error-code.js'; -export { HzF32, HzF32T } from './solarxr-protocol/datatypes/hz-f32.js'; -export { Ipv4Address, Ipv4AddressT } from './solarxr-protocol/datatypes/ipv4-address.js'; -export { LogData, LogDataT } from './solarxr-protocol/datatypes/log-data.js'; -export { StringTable, StringTableT } from './solarxr-protocol/datatypes/string-table.js'; -export { Temperature, TemperatureT } from './solarxr-protocol/datatypes/temperature.js'; -export { TrackerId, TrackerIdT } from './solarxr-protocol/datatypes/tracker-id.js'; -export { TrackerStatus } from './solarxr-protocol/datatypes/tracker-status.js'; -export { TransactionId, TransactionIdT } from './solarxr-protocol/datatypes/transaction-id.js'; -export { FirmwareStatusMask, FirmwareStatusMaskT } from './solarxr-protocol/datatypes/hardware-info/firmware-status-mask.js'; -export { HardwareAddress, HardwareAddressT } from './solarxr-protocol/datatypes/hardware-info/hardware-address.js'; -export { HardwareInfo, HardwareInfoT } from './solarxr-protocol/datatypes/hardware-info/hardware-info.js'; -export { HardwareStatus, HardwareStatusT } from './solarxr-protocol/datatypes/hardware-info/hardware-status.js'; -export { ImuType } from './solarxr-protocol/datatypes/hardware-info/imu-type.js'; -export { McuType } from './solarxr-protocol/datatypes/hardware-info/mcu-type.js'; -export { Quat, QuatT } from './solarxr-protocol/datatypes/math/quat.js'; -export { Vec3f, Vec3fT } from './solarxr-protocol/datatypes/math/vec3f.js'; -export { KeyValues, KeyValuesT } from './solarxr-protocol/pub-sub/key-values.js'; -export { Message, MessageT } from './solarxr-protocol/pub-sub/message.js'; -export { Payload, unionToPayload, unionListToPayload } from './solarxr-protocol/pub-sub/payload.js'; -export { PubSubHeader, PubSubHeaderT } from './solarxr-protocol/pub-sub/pub-sub-header.js'; -export { PubSubUnion, unionToPubSubUnion, unionListToPubSubUnion } from './solarxr-protocol/pub-sub/pub-sub-union.js'; -export { SubscriptionRequest, SubscriptionRequestT } from './solarxr-protocol/pub-sub/subscription-request.js'; -export { Topic, unionToTopic, unionListToTopic } from './solarxr-protocol/pub-sub/topic.js'; -export { TopicHandle, TopicHandleT } from './solarxr-protocol/pub-sub/topic-handle.js'; -export { TopicHandleRequest, TopicHandleRequestT } from './solarxr-protocol/pub-sub/topic-handle-request.js'; -export { TopicId, TopicIdT } from './solarxr-protocol/pub-sub/topic-id.js'; -export { TopicMapping, TopicMappingT } from './solarxr-protocol/pub-sub/topic-mapping.js'; -export { AddUnknownDeviceRequest, AddUnknownDeviceRequestT } from './solarxr-protocol/rpc/add-unknown-device-request.js'; -export { ArmsMountingResetMode } from './solarxr-protocol/rpc/arms-mounting-reset-mode.js'; -export { AssignTrackerRequest, AssignTrackerRequestT } from './solarxr-protocol/rpc/assign-tracker-request.js'; -export { AutoBoneApplyRequest, AutoBoneApplyRequestT } from './solarxr-protocol/rpc/auto-bone-apply-request.js'; -export { AutoBoneCancelRecordingRequest, AutoBoneCancelRecordingRequestT } from './solarxr-protocol/rpc/auto-bone-cancel-recording-request.js'; -export { AutoBoneEpochResponse, AutoBoneEpochResponseT } from './solarxr-protocol/rpc/auto-bone-epoch-response.js'; -export { AutoBoneProcessRequest, AutoBoneProcessRequestT } from './solarxr-protocol/rpc/auto-bone-process-request.js'; -export { AutoBoneProcessStatusResponse, AutoBoneProcessStatusResponseT } from './solarxr-protocol/rpc/auto-bone-process-status-response.js'; -export { AutoBoneProcessType } from './solarxr-protocol/rpc/auto-bone-process-type.js'; -export { AutoBoneSettings, AutoBoneSettingsT } from './solarxr-protocol/rpc/auto-bone-settings.js'; -export { AutoBoneStopRecordingRequest, AutoBoneStopRecordingRequestT } from './solarxr-protocol/rpc/auto-bone-stop-recording-request.js'; -export { ChangeSettingsRequest, ChangeSettingsRequestT } from './solarxr-protocol/rpc/change-settings-request.js'; -export { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from './solarxr-protocol/rpc/change-skeleton-config-request.js'; -export { ClearDriftCompensationRequest, ClearDriftCompensationRequestT } from './solarxr-protocol/rpc/clear-drift-compensation-request.js'; -export { ClearMountingResetRequest, ClearMountingResetRequestT } from './solarxr-protocol/rpc/clear-mounting-reset-request.js'; -export { CloseSerialRequest, CloseSerialRequestT } from './solarxr-protocol/rpc/close-serial-request.js'; -export { ComputerDirectory } from './solarxr-protocol/rpc/computer-directory.js'; -export { DriftCompensationSettings, DriftCompensationSettingsT } from './solarxr-protocol/rpc/drift-compensation-settings.js'; -export { FilteringSettings, FilteringSettingsT } from './solarxr-protocol/rpc/filtering-settings.js'; -export { ForgetDeviceRequest, ForgetDeviceRequestT } from './solarxr-protocol/rpc/forget-device-request.js'; -export { HeartbeatRequest, HeartbeatRequestT } from './solarxr-protocol/rpc/heartbeat-request.js'; -export { HeartbeatResponse, HeartbeatResponseT } from './solarxr-protocol/rpc/heartbeat-response.js'; -export { HeightRequest, HeightRequestT } from './solarxr-protocol/rpc/height-request.js'; -export { HeightResponse, HeightResponseT } from './solarxr-protocol/rpc/height-response.js'; -export { LegTweaksTmpChange, LegTweaksTmpChangeT } from './solarxr-protocol/rpc/leg-tweaks-tmp-change.js'; -export { LegTweaksTmpClear, LegTweaksTmpClearT } from './solarxr-protocol/rpc/leg-tweaks-tmp-clear.js'; -export { NewSerialDeviceResponse, NewSerialDeviceResponseT } from './solarxr-protocol/rpc/new-serial-device-response.js'; -export { OSCRouterSettings, OSCRouterSettingsT } from './solarxr-protocol/rpc/oscrouter-settings.js'; -export { OSCSettings, OSCSettingsT } from './solarxr-protocol/rpc/oscsettings.js'; -export { OSCTrackersSetting, OSCTrackersSettingT } from './solarxr-protocol/rpc/osctrackers-setting.js'; -export { OpenSerialRequest, OpenSerialRequestT } from './solarxr-protocol/rpc/open-serial-request.js'; -export { OverlayDisplayModeChangeRequest, OverlayDisplayModeChangeRequestT } from './solarxr-protocol/rpc/overlay-display-mode-change-request.js'; -export { OverlayDisplayModeRequest, OverlayDisplayModeRequestT } from './solarxr-protocol/rpc/overlay-display-mode-request.js'; -export { OverlayDisplayModeResponse, OverlayDisplayModeResponseT } from './solarxr-protocol/rpc/overlay-display-mode-response.js'; -export { RecordBVHRequest, RecordBVHRequestT } from './solarxr-protocol/rpc/record-bvhrequest.js'; -export { RecordBVHStatus, RecordBVHStatusT } from './solarxr-protocol/rpc/record-bvhstatus.js'; -export { ResetRequest, ResetRequestT } from './solarxr-protocol/rpc/reset-request.js'; -export { ResetResponse, ResetResponseT } from './solarxr-protocol/rpc/reset-response.js'; -export { ResetStatus } from './solarxr-protocol/rpc/reset-status.js'; -export { ResetType } from './solarxr-protocol/rpc/reset-type.js'; -export { ResetsSettings, ResetsSettingsT } from './solarxr-protocol/rpc/resets-settings.js'; -export { RpcMessage, unionToRpcMessage, unionListToRpcMessage } from './solarxr-protocol/rpc/rpc-message.js'; -export { RpcMessageHeader, RpcMessageHeaderT } from './solarxr-protocol/rpc/rpc-message-header.js'; -export { SaveFileNotification, SaveFileNotificationT } from './solarxr-protocol/rpc/save-file-notification.js'; -export { SerialDevice, SerialDeviceT } from './solarxr-protocol/rpc/serial-device.js'; -export { SerialDevicesRequest, SerialDevicesRequestT } from './solarxr-protocol/rpc/serial-devices-request.js'; -export { SerialDevicesResponse, SerialDevicesResponseT } from './solarxr-protocol/rpc/serial-devices-response.js'; -export { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from './solarxr-protocol/rpc/serial-tracker-factory-reset-request.js'; -export { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from './solarxr-protocol/rpc/serial-tracker-get-info-request.js'; -export { SerialTrackerGetWifiScanRequest, SerialTrackerGetWifiScanRequestT } from './solarxr-protocol/rpc/serial-tracker-get-wifi-scan-request.js'; -export { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from './solarxr-protocol/rpc/serial-tracker-reboot-request.js'; -export { SerialUpdateResponse, SerialUpdateResponseT } from './solarxr-protocol/rpc/serial-update-response.js'; -export { ServerInfosRequest, ServerInfosRequestT } from './solarxr-protocol/rpc/server-infos-request.js'; -export { ServerInfosResponse, ServerInfosResponseT } from './solarxr-protocol/rpc/server-infos-response.js'; -export { SetPauseTrackingRequest, SetPauseTrackingRequestT } from './solarxr-protocol/rpc/set-pause-tracking-request.js'; -export { SetWifiRequest, SetWifiRequestT } from './solarxr-protocol/rpc/set-wifi-request.js'; -export { SettingsRequest, SettingsRequestT } from './solarxr-protocol/rpc/settings-request.js'; -export { SettingsResponse, SettingsResponseT } from './solarxr-protocol/rpc/settings-response.js'; -export { SkeletonBone } from './solarxr-protocol/rpc/skeleton-bone.js'; -export { SkeletonConfigRequest, SkeletonConfigRequestT } from './solarxr-protocol/rpc/skeleton-config-request.js'; -export { SkeletonConfigResponse, SkeletonConfigResponseT } from './solarxr-protocol/rpc/skeleton-config-response.js'; -export { SkeletonPart, SkeletonPartT } from './solarxr-protocol/rpc/skeleton-part.js'; -export { SkeletonResetAllRequest, SkeletonResetAllRequestT } from './solarxr-protocol/rpc/skeleton-reset-all-request.js'; -export { StartWifiProvisioningRequest, StartWifiProvisioningRequestT } from './solarxr-protocol/rpc/start-wifi-provisioning-request.js'; -export { StatusData, unionToStatusData, unionListToStatusData } from './solarxr-protocol/rpc/status-data.js'; -export { StatusMessage, StatusMessageT } from './solarxr-protocol/rpc/status-message.js'; -export { StatusSteamVRDisconnected, StatusSteamVRDisconnectedT } from './solarxr-protocol/rpc/status-steam-vrdisconnected.js'; -export { StatusSystemFixed, StatusSystemFixedT } from './solarxr-protocol/rpc/status-system-fixed.js'; -export { StatusSystemRequest, StatusSystemRequestT } from './solarxr-protocol/rpc/status-system-request.js'; -export { StatusSystemResponse, StatusSystemResponseT } from './solarxr-protocol/rpc/status-system-response.js'; -export { StatusSystemUpdate, StatusSystemUpdateT } from './solarxr-protocol/rpc/status-system-update.js'; -export { StatusTrackerError, StatusTrackerErrorT } from './solarxr-protocol/rpc/status-tracker-error.js'; -export { StatusTrackerReset, StatusTrackerResetT } from './solarxr-protocol/rpc/status-tracker-reset.js'; -export { StatusUnassignedHMD, StatusUnassignedHMDT } from './solarxr-protocol/rpc/status-unassigned-hmd.js'; -export { SteamVRTrackersSetting, SteamVRTrackersSettingT } from './solarxr-protocol/rpc/steam-vrtrackers-setting.js'; -export { StopWifiProvisioningRequest, StopWifiProvisioningRequestT } from './solarxr-protocol/rpc/stop-wifi-provisioning-request.js'; -export { TapDetectionSettings, TapDetectionSettingsT } from './solarxr-protocol/rpc/tap-detection-settings.js'; -export { TapDetectionSetupNotification, TapDetectionSetupNotificationT } from './solarxr-protocol/rpc/tap-detection-setup-notification.js'; -export { TrackingPauseStateRequest, TrackingPauseStateRequestT } from './solarxr-protocol/rpc/tracking-pause-state-request.js'; -export { TrackingPauseStateResponse, TrackingPauseStateResponseT } from './solarxr-protocol/rpc/tracking-pause-state-response.js'; -export { UnknownDeviceHandshakeNotification, UnknownDeviceHandshakeNotificationT } from './solarxr-protocol/rpc/unknown-device-handshake-notification.js'; -export { VMCOSCSettings, VMCOSCSettingsT } from './solarxr-protocol/rpc/vmcoscsettings.js'; -export { VRCOSCSettings, VRCOSCSettingsT } from './solarxr-protocol/rpc/vrcoscsettings.js'; -export { WifiProvisioningStatus } from './solarxr-protocol/rpc/wifi-provisioning-status.js'; -export { WifiProvisioningStatusResponse, WifiProvisioningStatusResponseT } from './solarxr-protocol/rpc/wifi-provisioning-status-response.js'; -export { LegTweaksSettings, LegTweaksSettingsT } from './solarxr-protocol/rpc/settings/leg-tweaks-settings.js'; -export { ModelRatios, ModelRatiosT } from './solarxr-protocol/rpc/settings/model-ratios.js'; -export { ModelSettings, ModelSettingsT } from './solarxr-protocol/rpc/settings/model-settings.js'; -export { ModelToggles, ModelTogglesT } from './solarxr-protocol/rpc/settings/model-toggles.js'; +// automatically generated by the FlatBuffers compiler, do not modify + +export { MessageBundle, MessageBundleT } from './solarxr-protocol/message-bundle.js'; +export { Bone, BoneT } from './solarxr-protocol/data-feed/bone.js'; +export { DataFeedConfig, DataFeedConfigT } from './solarxr-protocol/data-feed/data-feed-config.js'; +export { DataFeedMessage, unionToDataFeedMessage, unionListToDataFeedMessage } from './solarxr-protocol/data-feed/data-feed-message.js'; +export { DataFeedMessageHeader, DataFeedMessageHeaderT } from './solarxr-protocol/data-feed/data-feed-message-header.js'; +export { DataFeedUpdate, DataFeedUpdateT } from './solarxr-protocol/data-feed/data-feed-update.js'; +export { PollDataFeed, PollDataFeedT } from './solarxr-protocol/data-feed/poll-data-feed.js'; +export { StartDataFeed, StartDataFeedT } from './solarxr-protocol/data-feed/start-data-feed.js'; +export { DeviceData, DeviceDataT } from './solarxr-protocol/data-feed/device-data/device-data.js'; +export { DeviceDataMask, DeviceDataMaskT } from './solarxr-protocol/data-feed/device-data/device-data-mask.js'; +export { TrackerData, TrackerDataT } from './solarxr-protocol/data-feed/tracker/tracker-data.js'; +export { TrackerDataMask, TrackerDataMaskT } from './solarxr-protocol/data-feed/tracker/tracker-data-mask.js'; +export { TrackerInfo, TrackerInfoT } from './solarxr-protocol/data-feed/tracker/tracker-info.js'; +export { BodyPart } from './solarxr-protocol/datatypes/body-part.js'; +export { Bytes, BytesT } from './solarxr-protocol/datatypes/bytes.js'; +export { DeviceId, DeviceIdT } from './solarxr-protocol/datatypes/device-id.js'; +export { DeviceIdTable, DeviceIdTableT } from './solarxr-protocol/datatypes/device-id-table.js'; +export { FilteringType } from './solarxr-protocol/datatypes/filtering-type.js'; +export { FirmwareErrorCode } from './solarxr-protocol/datatypes/firmware-error-code.js'; +export { HzF32, HzF32T } from './solarxr-protocol/datatypes/hz-f32.js'; +export { Ipv4Address, Ipv4AddressT } from './solarxr-protocol/datatypes/ipv4-address.js'; +export { LogData, LogDataT } from './solarxr-protocol/datatypes/log-data.js'; +export { StringTable, StringTableT } from './solarxr-protocol/datatypes/string-table.js'; +export { Temperature, TemperatureT } from './solarxr-protocol/datatypes/temperature.js'; +export { TrackerId, TrackerIdT } from './solarxr-protocol/datatypes/tracker-id.js'; +export { TrackerStatus } from './solarxr-protocol/datatypes/tracker-status.js'; +export { TransactionId, TransactionIdT } from './solarxr-protocol/datatypes/transaction-id.js'; +export { BoardType } from './solarxr-protocol/datatypes/hardware-info/board-type.js'; +export { FirmwareStatusMask, FirmwareStatusMaskT } from './solarxr-protocol/datatypes/hardware-info/firmware-status-mask.js'; +export { HardwareAddress, HardwareAddressT } from './solarxr-protocol/datatypes/hardware-info/hardware-address.js'; +export { HardwareInfo, HardwareInfoT } from './solarxr-protocol/datatypes/hardware-info/hardware-info.js'; +export { HardwareStatus, HardwareStatusT } from './solarxr-protocol/datatypes/hardware-info/hardware-status.js'; +export { ImuType } from './solarxr-protocol/datatypes/hardware-info/imu-type.js'; +export { McuType } from './solarxr-protocol/datatypes/hardware-info/mcu-type.js'; +export { Quat, QuatT } from './solarxr-protocol/datatypes/math/quat.js'; +export { Vec3f, Vec3fT } from './solarxr-protocol/datatypes/math/vec3f.js'; +export { KeyValues, KeyValuesT } from './solarxr-protocol/pub-sub/key-values.js'; +export { Message, MessageT } from './solarxr-protocol/pub-sub/message.js'; +export { Payload, unionToPayload, unionListToPayload } from './solarxr-protocol/pub-sub/payload.js'; +export { PubSubHeader, PubSubHeaderT } from './solarxr-protocol/pub-sub/pub-sub-header.js'; +export { PubSubUnion, unionToPubSubUnion, unionListToPubSubUnion } from './solarxr-protocol/pub-sub/pub-sub-union.js'; +export { SubscriptionRequest, SubscriptionRequestT } from './solarxr-protocol/pub-sub/subscription-request.js'; +export { Topic, unionToTopic, unionListToTopic } from './solarxr-protocol/pub-sub/topic.js'; +export { TopicHandle, TopicHandleT } from './solarxr-protocol/pub-sub/topic-handle.js'; +export { TopicHandleRequest, TopicHandleRequestT } from './solarxr-protocol/pub-sub/topic-handle-request.js'; +export { TopicId, TopicIdT } from './solarxr-protocol/pub-sub/topic-id.js'; +export { TopicMapping, TopicMappingT } from './solarxr-protocol/pub-sub/topic-mapping.js'; +export { AddUnknownDeviceRequest, AddUnknownDeviceRequestT } from './solarxr-protocol/rpc/add-unknown-device-request.js'; +export { ArmsMountingResetMode } from './solarxr-protocol/rpc/arms-mounting-reset-mode.js'; +export { AssignTrackerRequest, AssignTrackerRequestT } from './solarxr-protocol/rpc/assign-tracker-request.js'; +export { AutoBoneApplyRequest, AutoBoneApplyRequestT } from './solarxr-protocol/rpc/auto-bone-apply-request.js'; +export { AutoBoneCancelRecordingRequest, AutoBoneCancelRecordingRequestT } from './solarxr-protocol/rpc/auto-bone-cancel-recording-request.js'; +export { AutoBoneEpochResponse, AutoBoneEpochResponseT } from './solarxr-protocol/rpc/auto-bone-epoch-response.js'; +export { AutoBoneProcessRequest, AutoBoneProcessRequestT } from './solarxr-protocol/rpc/auto-bone-process-request.js'; +export { AutoBoneProcessStatusResponse, AutoBoneProcessStatusResponseT } from './solarxr-protocol/rpc/auto-bone-process-status-response.js'; +export { AutoBoneProcessType } from './solarxr-protocol/rpc/auto-bone-process-type.js'; +export { AutoBoneSettings, AutoBoneSettingsT } from './solarxr-protocol/rpc/auto-bone-settings.js'; +export { AutoBoneStopRecordingRequest, AutoBoneStopRecordingRequestT } from './solarxr-protocol/rpc/auto-bone-stop-recording-request.js'; +export { ChangeSettingsRequest, ChangeSettingsRequestT } from './solarxr-protocol/rpc/change-settings-request.js'; +export { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from './solarxr-protocol/rpc/change-skeleton-config-request.js'; +export { ClearDriftCompensationRequest, ClearDriftCompensationRequestT } from './solarxr-protocol/rpc/clear-drift-compensation-request.js'; +export { ClearMountingResetRequest, ClearMountingResetRequestT } from './solarxr-protocol/rpc/clear-mounting-reset-request.js'; +export { CloseSerialRequest, CloseSerialRequestT } from './solarxr-protocol/rpc/close-serial-request.js'; +export { ComputerDirectory } from './solarxr-protocol/rpc/computer-directory.js'; +export { DriftCompensationSettings, DriftCompensationSettingsT } from './solarxr-protocol/rpc/drift-compensation-settings.js'; +export { FilteringSettings, FilteringSettingsT } from './solarxr-protocol/rpc/filtering-settings.js'; +export { FirmwarePart, FirmwarePartT } from './solarxr-protocol/rpc/firmware-part.js'; +export { FirmwareUpdateDeviceId, unionToFirmwareUpdateDeviceId, unionListToFirmwareUpdateDeviceId } from './solarxr-protocol/rpc/firmware-update-device-id.js'; +export { FirmwareUpdateMethod, unionToFirmwareUpdateMethod, unionListToFirmwareUpdateMethod } from './solarxr-protocol/rpc/firmware-update-method.js'; +export { FirmwareUpdateRequest, FirmwareUpdateRequestT } from './solarxr-protocol/rpc/firmware-update-request.js'; +export { FirmwareUpdateStatus } from './solarxr-protocol/rpc/firmware-update-status.js'; +export { FirmwareUpdateStatusResponse, FirmwareUpdateStatusResponseT } from './solarxr-protocol/rpc/firmware-update-status-response.js'; +export { FirmwareUpdateStopQueuesRequest, FirmwareUpdateStopQueuesRequestT } from './solarxr-protocol/rpc/firmware-update-stop-queues-request.js'; +export { ForgetDeviceRequest, ForgetDeviceRequestT } from './solarxr-protocol/rpc/forget-device-request.js'; +export { HeartbeatRequest, HeartbeatRequestT } from './solarxr-protocol/rpc/heartbeat-request.js'; +export { HeartbeatResponse, HeartbeatResponseT } from './solarxr-protocol/rpc/heartbeat-response.js'; +export { HeightRequest, HeightRequestT } from './solarxr-protocol/rpc/height-request.js'; +export { HeightResponse, HeightResponseT } from './solarxr-protocol/rpc/height-response.js'; +export { LegTweaksTmpChange, LegTweaksTmpChangeT } from './solarxr-protocol/rpc/leg-tweaks-tmp-change.js'; +export { LegTweaksTmpClear, LegTweaksTmpClearT } from './solarxr-protocol/rpc/leg-tweaks-tmp-clear.js'; +export { NewSerialDeviceResponse, NewSerialDeviceResponseT } from './solarxr-protocol/rpc/new-serial-device-response.js'; +export { OSCRouterSettings, OSCRouterSettingsT } from './solarxr-protocol/rpc/oscrouter-settings.js'; +export { OSCSettings, OSCSettingsT } from './solarxr-protocol/rpc/oscsettings.js'; +export { OSCTrackersSetting, OSCTrackersSettingT } from './solarxr-protocol/rpc/osctrackers-setting.js'; +export { OTAFirmwareUpdate, OTAFirmwareUpdateT } from './solarxr-protocol/rpc/otafirmware-update.js'; +export { OpenSerialRequest, OpenSerialRequestT } from './solarxr-protocol/rpc/open-serial-request.js'; +export { OverlayDisplayModeChangeRequest, OverlayDisplayModeChangeRequestT } from './solarxr-protocol/rpc/overlay-display-mode-change-request.js'; +export { OverlayDisplayModeRequest, OverlayDisplayModeRequestT } from './solarxr-protocol/rpc/overlay-display-mode-request.js'; +export { OverlayDisplayModeResponse, OverlayDisplayModeResponseT } from './solarxr-protocol/rpc/overlay-display-mode-response.js'; +export { RecordBVHRequest, RecordBVHRequestT } from './solarxr-protocol/rpc/record-bvhrequest.js'; +export { RecordBVHStatus, RecordBVHStatusT } from './solarxr-protocol/rpc/record-bvhstatus.js'; +export { ResetRequest, ResetRequestT } from './solarxr-protocol/rpc/reset-request.js'; +export { ResetResponse, ResetResponseT } from './solarxr-protocol/rpc/reset-response.js'; +export { ResetStatus } from './solarxr-protocol/rpc/reset-status.js'; +export { ResetType } from './solarxr-protocol/rpc/reset-type.js'; +export { ResetsSettings, ResetsSettingsT } from './solarxr-protocol/rpc/resets-settings.js'; +export { RpcMessage, unionToRpcMessage, unionListToRpcMessage } from './solarxr-protocol/rpc/rpc-message.js'; +export { RpcMessageHeader, RpcMessageHeaderT } from './solarxr-protocol/rpc/rpc-message-header.js'; +export { SaveFileNotification, SaveFileNotificationT } from './solarxr-protocol/rpc/save-file-notification.js'; +export { SerialDevice, SerialDeviceT } from './solarxr-protocol/rpc/serial-device.js'; +export { SerialDevicePort, SerialDevicePortT } from './solarxr-protocol/rpc/serial-device-port.js'; +export { SerialDevicesRequest, SerialDevicesRequestT } from './solarxr-protocol/rpc/serial-devices-request.js'; +export { SerialDevicesResponse, SerialDevicesResponseT } from './solarxr-protocol/rpc/serial-devices-response.js'; +export { SerialFirmwareUpdate, SerialFirmwareUpdateT } from './solarxr-protocol/rpc/serial-firmware-update.js'; +export { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from './solarxr-protocol/rpc/serial-tracker-factory-reset-request.js'; +export { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from './solarxr-protocol/rpc/serial-tracker-get-info-request.js'; +export { SerialTrackerGetWifiScanRequest, SerialTrackerGetWifiScanRequestT } from './solarxr-protocol/rpc/serial-tracker-get-wifi-scan-request.js'; +export { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from './solarxr-protocol/rpc/serial-tracker-reboot-request.js'; +export { SerialUpdateResponse, SerialUpdateResponseT } from './solarxr-protocol/rpc/serial-update-response.js'; +export { ServerInfosRequest, ServerInfosRequestT } from './solarxr-protocol/rpc/server-infos-request.js'; +export { ServerInfosResponse, ServerInfosResponseT } from './solarxr-protocol/rpc/server-infos-response.js'; +export { SetPauseTrackingRequest, SetPauseTrackingRequestT } from './solarxr-protocol/rpc/set-pause-tracking-request.js'; +export { SetWifiRequest, SetWifiRequestT } from './solarxr-protocol/rpc/set-wifi-request.js'; +export { SettingsRequest, SettingsRequestT } from './solarxr-protocol/rpc/settings-request.js'; +export { SettingsResponse, SettingsResponseT } from './solarxr-protocol/rpc/settings-response.js'; +export { SkeletonBone } from './solarxr-protocol/rpc/skeleton-bone.js'; +export { SkeletonConfigRequest, SkeletonConfigRequestT } from './solarxr-protocol/rpc/skeleton-config-request.js'; +export { SkeletonConfigResponse, SkeletonConfigResponseT } from './solarxr-protocol/rpc/skeleton-config-response.js'; +export { SkeletonPart, SkeletonPartT } from './solarxr-protocol/rpc/skeleton-part.js'; +export { SkeletonResetAllRequest, SkeletonResetAllRequestT } from './solarxr-protocol/rpc/skeleton-reset-all-request.js'; +export { StartWifiProvisioningRequest, StartWifiProvisioningRequestT } from './solarxr-protocol/rpc/start-wifi-provisioning-request.js'; +export { StatusData, unionToStatusData, unionListToStatusData } from './solarxr-protocol/rpc/status-data.js'; +export { StatusMessage, StatusMessageT } from './solarxr-protocol/rpc/status-message.js'; +export { StatusSteamVRDisconnected, StatusSteamVRDisconnectedT } from './solarxr-protocol/rpc/status-steam-vrdisconnected.js'; +export { StatusSystemFixed, StatusSystemFixedT } from './solarxr-protocol/rpc/status-system-fixed.js'; +export { StatusSystemRequest, StatusSystemRequestT } from './solarxr-protocol/rpc/status-system-request.js'; +export { StatusSystemResponse, StatusSystemResponseT } from './solarxr-protocol/rpc/status-system-response.js'; +export { StatusSystemUpdate, StatusSystemUpdateT } from './solarxr-protocol/rpc/status-system-update.js'; +export { StatusTrackerError, StatusTrackerErrorT } from './solarxr-protocol/rpc/status-tracker-error.js'; +export { StatusTrackerReset, StatusTrackerResetT } from './solarxr-protocol/rpc/status-tracker-reset.js'; +export { StatusUnassignedHMD, StatusUnassignedHMDT } from './solarxr-protocol/rpc/status-unassigned-hmd.js'; +export { SteamVRTrackersSetting, SteamVRTrackersSettingT } from './solarxr-protocol/rpc/steam-vrtrackers-setting.js'; +export { StopWifiProvisioningRequest, StopWifiProvisioningRequestT } from './solarxr-protocol/rpc/stop-wifi-provisioning-request.js'; +export { TapDetectionSettings, TapDetectionSettingsT } from './solarxr-protocol/rpc/tap-detection-settings.js'; +export { TapDetectionSetupNotification, TapDetectionSetupNotificationT } from './solarxr-protocol/rpc/tap-detection-setup-notification.js'; +export { TrackingPauseStateRequest, TrackingPauseStateRequestT } from './solarxr-protocol/rpc/tracking-pause-state-request.js'; +export { TrackingPauseStateResponse, TrackingPauseStateResponseT } from './solarxr-protocol/rpc/tracking-pause-state-response.js'; +export { UnknownDeviceHandshakeNotification, UnknownDeviceHandshakeNotificationT } from './solarxr-protocol/rpc/unknown-device-handshake-notification.js'; +export { VMCOSCSettings, VMCOSCSettingsT } from './solarxr-protocol/rpc/vmcoscsettings.js'; +export { VRCOSCSettings, VRCOSCSettingsT } from './solarxr-protocol/rpc/vrcoscsettings.js'; +export { WifiProvisioningStatus } from './solarxr-protocol/rpc/wifi-provisioning-status.js'; +export { WifiProvisioningStatusResponse, WifiProvisioningStatusResponseT } from './solarxr-protocol/rpc/wifi-provisioning-status-response.js'; +export { LegTweaksSettings, LegTweaksSettingsT } from './solarxr-protocol/rpc/settings/leg-tweaks-settings.js'; +export { ModelRatios, ModelRatiosT } from './solarxr-protocol/rpc/settings/model-ratios.js'; +export { ModelSettings, ModelSettingsT } from './solarxr-protocol/rpc/settings/model-settings.js'; +export { ModelToggles, ModelTogglesT } from './solarxr-protocol/rpc/settings/model-toggles.js'; diff --git a/protocol/typescript/src/solarxr-protocol/data-feed/bone.ts b/protocol/typescript/src/solarxr-protocol/data-feed/bone.ts index 5f89f173..e0597bd5 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.js'; -import { Quat, QuatT } from '../../solarxr-protocol/datatypes/math/quat.js'; -import { Vec3f, Vec3fT } from '../../solarxr-protocol/datatypes/math/vec3f.js'; - - -export class Bone implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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.js'; +import { Quat, QuatT } from '../../solarxr-protocol/datatypes/math/quat.js'; +import { Vec3f, Vec3fT } from '../../solarxr-protocol/datatypes/math/vec3f.js'; + + +export class Bone implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 1dab9869..f98bbaa7 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.js'; -import { TrackerDataMask, TrackerDataMaskT } from '../../solarxr-protocol/data-feed/tracker/tracker-data-mask.js'; - - -/** - * All information related to the configuration of a data feed. This may be sent - * as part of a `StartFeed`. - */ -export class DataFeedConfig implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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.js'; +import { TrackerDataMask, TrackerDataMaskT } from '../../solarxr-protocol/data-feed/tracker/tracker-data-mask.js'; + + +/** + * All information related to the configuration of a data feed. This may be sent + * as part of a `StartFeed`. + */ +export class DataFeedConfig implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index b2094a6d..2ba8c589 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.js'; -import { DataFeedMessage, unionToDataFeedMessage, unionListToDataFeedMessage } from '../../solarxr-protocol/data-feed/data-feed-message.js'; -import { DataFeedUpdate, DataFeedUpdateT } from '../../solarxr-protocol/data-feed/data-feed-update.js'; -import { PollDataFeed, PollDataFeedT } from '../../solarxr-protocol/data-feed/poll-data-feed.js'; -import { StartDataFeed, StartDataFeedT } from '../../solarxr-protocol/data-feed/start-data-feed.js'; - - -export class DataFeedMessageHeader implements flatbuffers.IUnpackableObject { - 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(), - (() => { - const 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 = (() => { - const temp = unionToDataFeedMessage(this.messageType(), this.message.bind(this)); - if(temp === null) { return null; } - return temp.unpack() - })(); -} -} - -export class DataFeedMessageHeaderT implements flatbuffers.IGeneratedObject { -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.js'; +import { DataFeedMessage, unionToDataFeedMessage, unionListToDataFeedMessage } from '../../solarxr-protocol/data-feed/data-feed-message.js'; +import { DataFeedUpdate, DataFeedUpdateT } from '../../solarxr-protocol/data-feed/data-feed-update.js'; +import { PollDataFeed, PollDataFeedT } from '../../solarxr-protocol/data-feed/poll-data-feed.js'; +import { StartDataFeed, StartDataFeedT } from '../../solarxr-protocol/data-feed/start-data-feed.js'; + + +export class DataFeedMessageHeader implements flatbuffers.IUnpackableObject { + 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(), + (() => { + const 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 = (() => { + const temp = unionToDataFeedMessage(this.messageType(), this.message.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })(); +} +} + +export class DataFeedMessageHeaderT implements flatbuffers.IGeneratedObject { +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 index e7236d71..a9e8d90c 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,44 +1,44 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import { DataFeedConfig, DataFeedConfigT } from '../../solarxr-protocol/data-feed/data-feed-config.js'; -import { DataFeedUpdate, DataFeedUpdateT } from '../../solarxr-protocol/data-feed/data-feed-update.js'; -import { PollDataFeed, PollDataFeedT } from '../../solarxr-protocol/data-feed/poll-data-feed.js'; -import { StartDataFeed, StartDataFeedT } from '../../solarxr-protocol/data-feed/start-data-feed.js'; - - -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.js'; +import { DataFeedUpdate, DataFeedUpdateT } from '../../solarxr-protocol/data-feed/data-feed-update.js'; +import { PollDataFeed, PollDataFeedT } from '../../solarxr-protocol/data-feed/poll-data-feed.js'; +import { StartDataFeed, StartDataFeedT } from '../../solarxr-protocol/data-feed/start-data-feed.js'; + + +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 index 842cb385..cf3d4c39 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.js'; -import { DeviceData, DeviceDataT } from '../../solarxr-protocol/data-feed/device-data/device-data.js'; -import { TrackerData, TrackerDataT } from '../../solarxr-protocol/data-feed/tracker/tracker-data.js'; - - -/** - * 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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.js'; +import { DeviceData, DeviceDataT } from '../../solarxr-protocol/data-feed/device-data/device-data.js'; +import { TrackerData, TrackerDataT } from '../../solarxr-protocol/data-feed/tracker/tracker-data.js'; + + +/** + * 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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 2f18870c..e19483f2 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.js'; - - -/** - * 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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.js'; + + +/** + * 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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index cf35b8de..4f0593fa 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.js'; -import { DeviceId, DeviceIdT } from '../../../solarxr-protocol/datatypes/device-id.js'; -import { HardwareInfo, HardwareInfoT } from '../../../solarxr-protocol/datatypes/hardware-info/hardware-info.js'; -import { HardwareStatus, HardwareStatusT } from '../../../solarxr-protocol/datatypes/hardware-info/hardware-status.js'; - - -/** - * 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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.js'; +import { DeviceId, DeviceIdT } from '../../../solarxr-protocol/datatypes/device-id.js'; +import { HardwareInfo, HardwareInfoT } from '../../../solarxr-protocol/datatypes/hardware-info/hardware-info.js'; +import { HardwareStatus, HardwareStatusT } from '../../../solarxr-protocol/datatypes/hardware-info/hardware-status.js'; + + +/** + * 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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index f03b966f..2724d405 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.js'; - - -/** - * Requests for a single `Update` to be sent. This is helpful when getting - * initial info about the device. - */ -export class PollDataFeed implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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.js'; + + +/** + * Requests for a single `Update` to be sent. This is helpful when getting + * initial info about the device. + */ +export class PollDataFeed implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index c1107acc..9b4d4ec8 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.js'; - - -/** - * 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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.js'; + + +/** + * 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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 4db4b26c..05f914bf 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,215 +1,215 @@ -// 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 implements flatbuffers.IUnpackableObject { - 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; -} - -rawAngularVelocity():boolean { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -rawAcceleration():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; -} - -linearAcceleration():boolean { - const offset = this.bb!.__offset(this.bb_pos, 18); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -rotationReferenceAdjusted():boolean { - const offset = this.bb!.__offset(this.bb_pos, 20); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -rotationIdentityAdjusted():boolean { - const offset = this.bb!.__offset(this.bb_pos, 22); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -tps():boolean { - const offset = this.bb!.__offset(this.bb_pos, 24); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startTrackerDataMask(builder:flatbuffers.Builder) { - builder.startObject(11); -} - -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 addRawAngularVelocity(builder:flatbuffers.Builder, rawAngularVelocity:boolean) { - builder.addFieldInt8(4, +rawAngularVelocity, +false); -} - -static addRawAcceleration(builder:flatbuffers.Builder, rawAcceleration:boolean) { - builder.addFieldInt8(5, +rawAcceleration, +false); -} - -static addTemp(builder:flatbuffers.Builder, temp:boolean) { - builder.addFieldInt8(6, +temp, +false); -} - -static addLinearAcceleration(builder:flatbuffers.Builder, linearAcceleration:boolean) { - builder.addFieldInt8(7, +linearAcceleration, +false); -} - -static addRotationReferenceAdjusted(builder:flatbuffers.Builder, rotationReferenceAdjusted:boolean) { - builder.addFieldInt8(8, +rotationReferenceAdjusted, +false); -} - -static addRotationIdentityAdjusted(builder:flatbuffers.Builder, rotationIdentityAdjusted:boolean) { - builder.addFieldInt8(9, +rotationIdentityAdjusted, +false); -} - -static addTps(builder:flatbuffers.Builder, tps:boolean) { - builder.addFieldInt8(10, +tps, +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, rawAngularVelocity:boolean, rawAcceleration:boolean, temp:boolean, linearAcceleration:boolean, rotationReferenceAdjusted:boolean, rotationIdentityAdjusted:boolean, tps:boolean):flatbuffers.Offset { - TrackerDataMask.startTrackerDataMask(builder); - TrackerDataMask.addInfo(builder, info); - TrackerDataMask.addStatus(builder, status); - TrackerDataMask.addRotation(builder, rotation); - TrackerDataMask.addPosition(builder, position); - TrackerDataMask.addRawAngularVelocity(builder, rawAngularVelocity); - TrackerDataMask.addRawAcceleration(builder, rawAcceleration); - TrackerDataMask.addTemp(builder, temp); - TrackerDataMask.addLinearAcceleration(builder, linearAcceleration); - TrackerDataMask.addRotationReferenceAdjusted(builder, rotationReferenceAdjusted); - TrackerDataMask.addRotationIdentityAdjusted(builder, rotationIdentityAdjusted); - TrackerDataMask.addTps(builder, tps); - return TrackerDataMask.endTrackerDataMask(builder); -} - -unpack(): TrackerDataMaskT { - return new TrackerDataMaskT( - this.info(), - this.status(), - this.rotation(), - this.position(), - this.rawAngularVelocity(), - this.rawAcceleration(), - this.temp(), - this.linearAcceleration(), - this.rotationReferenceAdjusted(), - this.rotationIdentityAdjusted(), - this.tps() - ); -} - - -unpackTo(_o: TrackerDataMaskT): void { - _o.info = this.info(); - _o.status = this.status(); - _o.rotation = this.rotation(); - _o.position = this.position(); - _o.rawAngularVelocity = this.rawAngularVelocity(); - _o.rawAcceleration = this.rawAcceleration(); - _o.temp = this.temp(); - _o.linearAcceleration = this.linearAcceleration(); - _o.rotationReferenceAdjusted = this.rotationReferenceAdjusted(); - _o.rotationIdentityAdjusted = this.rotationIdentityAdjusted(); - _o.tps = this.tps(); -} -} - -export class TrackerDataMaskT implements flatbuffers.IGeneratedObject { -constructor( - public info: boolean = false, - public status: boolean = false, - public rotation: boolean = false, - public position: boolean = false, - public rawAngularVelocity: boolean = false, - public rawAcceleration: boolean = false, - public temp: boolean = false, - public linearAcceleration: boolean = false, - public rotationReferenceAdjusted: boolean = false, - public rotationIdentityAdjusted: boolean = false, - public tps: boolean = false -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return TrackerDataMask.createTrackerDataMask(builder, - this.info, - this.status, - this.rotation, - this.position, - this.rawAngularVelocity, - this.rawAcceleration, - this.temp, - this.linearAcceleration, - this.rotationReferenceAdjusted, - this.rotationIdentityAdjusted, - this.tps - ); -} -} +// 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 implements flatbuffers.IUnpackableObject { + 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; +} + +rawAngularVelocity():boolean { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +rawAcceleration():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; +} + +linearAcceleration():boolean { + const offset = this.bb!.__offset(this.bb_pos, 18); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +rotationReferenceAdjusted():boolean { + const offset = this.bb!.__offset(this.bb_pos, 20); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +rotationIdentityAdjusted():boolean { + const offset = this.bb!.__offset(this.bb_pos, 22); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +tps():boolean { + const offset = this.bb!.__offset(this.bb_pos, 24); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startTrackerDataMask(builder:flatbuffers.Builder) { + builder.startObject(11); +} + +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 addRawAngularVelocity(builder:flatbuffers.Builder, rawAngularVelocity:boolean) { + builder.addFieldInt8(4, +rawAngularVelocity, +false); +} + +static addRawAcceleration(builder:flatbuffers.Builder, rawAcceleration:boolean) { + builder.addFieldInt8(5, +rawAcceleration, +false); +} + +static addTemp(builder:flatbuffers.Builder, temp:boolean) { + builder.addFieldInt8(6, +temp, +false); +} + +static addLinearAcceleration(builder:flatbuffers.Builder, linearAcceleration:boolean) { + builder.addFieldInt8(7, +linearAcceleration, +false); +} + +static addRotationReferenceAdjusted(builder:flatbuffers.Builder, rotationReferenceAdjusted:boolean) { + builder.addFieldInt8(8, +rotationReferenceAdjusted, +false); +} + +static addRotationIdentityAdjusted(builder:flatbuffers.Builder, rotationIdentityAdjusted:boolean) { + builder.addFieldInt8(9, +rotationIdentityAdjusted, +false); +} + +static addTps(builder:flatbuffers.Builder, tps:boolean) { + builder.addFieldInt8(10, +tps, +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, rawAngularVelocity:boolean, rawAcceleration:boolean, temp:boolean, linearAcceleration:boolean, rotationReferenceAdjusted:boolean, rotationIdentityAdjusted:boolean, tps:boolean):flatbuffers.Offset { + TrackerDataMask.startTrackerDataMask(builder); + TrackerDataMask.addInfo(builder, info); + TrackerDataMask.addStatus(builder, status); + TrackerDataMask.addRotation(builder, rotation); + TrackerDataMask.addPosition(builder, position); + TrackerDataMask.addRawAngularVelocity(builder, rawAngularVelocity); + TrackerDataMask.addRawAcceleration(builder, rawAcceleration); + TrackerDataMask.addTemp(builder, temp); + TrackerDataMask.addLinearAcceleration(builder, linearAcceleration); + TrackerDataMask.addRotationReferenceAdjusted(builder, rotationReferenceAdjusted); + TrackerDataMask.addRotationIdentityAdjusted(builder, rotationIdentityAdjusted); + TrackerDataMask.addTps(builder, tps); + return TrackerDataMask.endTrackerDataMask(builder); +} + +unpack(): TrackerDataMaskT { + return new TrackerDataMaskT( + this.info(), + this.status(), + this.rotation(), + this.position(), + this.rawAngularVelocity(), + this.rawAcceleration(), + this.temp(), + this.linearAcceleration(), + this.rotationReferenceAdjusted(), + this.rotationIdentityAdjusted(), + this.tps() + ); +} + + +unpackTo(_o: TrackerDataMaskT): void { + _o.info = this.info(); + _o.status = this.status(); + _o.rotation = this.rotation(); + _o.position = this.position(); + _o.rawAngularVelocity = this.rawAngularVelocity(); + _o.rawAcceleration = this.rawAcceleration(); + _o.temp = this.temp(); + _o.linearAcceleration = this.linearAcceleration(); + _o.rotationReferenceAdjusted = this.rotationReferenceAdjusted(); + _o.rotationIdentityAdjusted = this.rotationIdentityAdjusted(); + _o.tps = this.tps(); +} +} + +export class TrackerDataMaskT implements flatbuffers.IGeneratedObject { +constructor( + public info: boolean = false, + public status: boolean = false, + public rotation: boolean = false, + public position: boolean = false, + public rawAngularVelocity: boolean = false, + public rawAcceleration: boolean = false, + public temp: boolean = false, + public linearAcceleration: boolean = false, + public rotationReferenceAdjusted: boolean = false, + public rotationIdentityAdjusted: boolean = false, + public tps: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return TrackerDataMask.createTrackerDataMask(builder, + this.info, + this.status, + this.rotation, + this.position, + this.rawAngularVelocity, + this.rawAcceleration, + this.temp, + this.linearAcceleration, + this.rotationReferenceAdjusted, + this.rotationIdentityAdjusted, + this.tps + ); +} +} 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 index ec2234b9..e3a119f4 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,265 +1,265 @@ -// 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.js'; -import { Temperature, TemperatureT } from '../../../solarxr-protocol/datatypes/temperature.js'; -import { TrackerId, TrackerIdT } from '../../../solarxr-protocol/datatypes/tracker-id.js'; -import { TrackerStatus } from '../../../solarxr-protocol/datatypes/tracker-status.js'; -import { Quat, QuatT } from '../../../solarxr-protocol/datatypes/math/quat.js'; -import { Vec3f, Vec3fT } from '../../../solarxr-protocol/datatypes/math/vec3f.js'; - - -/** - * 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 implements flatbuffers.IUnpackableObject { - 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; -} - -/** - * Sensor rotation after fusion - */ -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 angular velocity, in euler angles, rad/s - */ -rawAngularVelocity(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 acceleration, in m/s^2 - */ -rawAcceleration(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; -} - -/** - * Acceleration without gravity, in m/s^2 - */ -linearAcceleration(obj?:Vec3f):Vec3f|null { - const offset = this.bb!.__offset(this.bb_pos, 20); - return offset ? (obj || new Vec3f()).__init(this.bb_pos + offset, this.bb!) : null; -} - -/** - * Reference-adjusted rotation for IMU-only trackers (VR HMD yaw is used as a reset reference). - * In other words, a rotation that is aligned to a reliable source of rotation ((0, VR HMD YAW, 0)), - * triggered after user input (using reset buttons). - * This is a SlimeVR-specific field and computed exclusively by SlimeVR server. - * Includes: mounting orientation, full, quick and mounting reset adjustments. - * This rotation can be used to reconstruct a skeleton pose using forward kinematics. - */ -rotationReferenceAdjusted(obj?:Quat):Quat|null { - const offset = this.bb!.__offset(this.bb_pos, 22); - return offset ? (obj || new Quat()).__init(this.bb_pos + offset, this.bb!) : null; -} - -/** - * Zero-reference-adjusted rotation for IMU-only trackers (identity quaternion is used as a reset reference). - * In other words, a rotation that is aligned to a zero vector ((0, 0, 0)) by - * inverting the current rotation, triggered after user input (using reset buttons). - * This is a SlimeVR-specific field and computed exclusively by SlimeVR server. - * Includes: only full and quick reset adjustments. - * This rotation can be used in visualizations for IMU debugging. - */ -rotationIdentityAdjusted(obj?:Quat):Quat|null { - const offset = this.bb!.__offset(this.bb_pos, 24); - return offset ? (obj || new Quat()).__init(this.bb_pos + offset, this.bb!) : null; -} - -/** - * Data ticks per second, processed by SlimeVR server - */ -tps():number|null { - const offset = this.bb!.__offset(this.bb_pos, 26); - return offset ? this.bb!.readUint16(this.bb_pos + offset) : null; -} - -static startTrackerData(builder:flatbuffers.Builder) { - builder.startObject(12); -} - -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 addRawAngularVelocity(builder:flatbuffers.Builder, rawAngularVelocityOffset:flatbuffers.Offset) { - builder.addFieldStruct(5, rawAngularVelocityOffset, 0); -} - -static addRawAcceleration(builder:flatbuffers.Builder, rawAccelerationOffset:flatbuffers.Offset) { - builder.addFieldStruct(6, rawAccelerationOffset, 0); -} - -static addTemp(builder:flatbuffers.Builder, tempOffset:flatbuffers.Offset) { - builder.addFieldStruct(7, tempOffset, 0); -} - -static addLinearAcceleration(builder:flatbuffers.Builder, linearAccelerationOffset:flatbuffers.Offset) { - builder.addFieldStruct(8, linearAccelerationOffset, 0); -} - -static addRotationReferenceAdjusted(builder:flatbuffers.Builder, rotationReferenceAdjustedOffset:flatbuffers.Offset) { - builder.addFieldStruct(9, rotationReferenceAdjustedOffset, 0); -} - -static addRotationIdentityAdjusted(builder:flatbuffers.Builder, rotationIdentityAdjustedOffset:flatbuffers.Offset) { - builder.addFieldStruct(10, rotationIdentityAdjustedOffset, 0); -} - -static addTps(builder:flatbuffers.Builder, tps:number) { - builder.addFieldInt16(11, tps, 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.rawAngularVelocity() !== null ? this.rawAngularVelocity()!.unpack() : null), - (this.rawAcceleration() !== null ? this.rawAcceleration()!.unpack() : null), - (this.temp() !== null ? this.temp()!.unpack() : null), - (this.linearAcceleration() !== null ? this.linearAcceleration()!.unpack() : null), - (this.rotationReferenceAdjusted() !== null ? this.rotationReferenceAdjusted()!.unpack() : null), - (this.rotationIdentityAdjusted() !== null ? this.rotationIdentityAdjusted()!.unpack() : null), - this.tps() - ); -} - - -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.rawAngularVelocity = (this.rawAngularVelocity() !== null ? this.rawAngularVelocity()!.unpack() : null); - _o.rawAcceleration = (this.rawAcceleration() !== null ? this.rawAcceleration()!.unpack() : null); - _o.temp = (this.temp() !== null ? this.temp()!.unpack() : null); - _o.linearAcceleration = (this.linearAcceleration() !== null ? this.linearAcceleration()!.unpack() : null); - _o.rotationReferenceAdjusted = (this.rotationReferenceAdjusted() !== null ? this.rotationReferenceAdjusted()!.unpack() : null); - _o.rotationIdentityAdjusted = (this.rotationIdentityAdjusted() !== null ? this.rotationIdentityAdjusted()!.unpack() : null); - _o.tps = this.tps(); -} -} - -export class TrackerDataT implements flatbuffers.IGeneratedObject { -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 rawAngularVelocity: Vec3fT|null = null, - public rawAcceleration: Vec3fT|null = null, - public temp: TemperatureT|null = null, - public linearAcceleration: Vec3fT|null = null, - public rotationReferenceAdjusted: QuatT|null = null, - public rotationIdentityAdjusted: QuatT|null = null, - public tps: number|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.addRawAngularVelocity(builder, (this.rawAngularVelocity !== null ? this.rawAngularVelocity!.pack(builder) : 0)); - TrackerData.addRawAcceleration(builder, (this.rawAcceleration !== null ? this.rawAcceleration!.pack(builder) : 0)); - TrackerData.addTemp(builder, (this.temp !== null ? this.temp!.pack(builder) : 0)); - TrackerData.addLinearAcceleration(builder, (this.linearAcceleration !== null ? this.linearAcceleration!.pack(builder) : 0)); - TrackerData.addRotationReferenceAdjusted(builder, (this.rotationReferenceAdjusted !== null ? this.rotationReferenceAdjusted!.pack(builder) : 0)); - TrackerData.addRotationIdentityAdjusted(builder, (this.rotationIdentityAdjusted !== null ? this.rotationIdentityAdjusted!.pack(builder) : 0)); - if (this.tps !== null) - TrackerData.addTps(builder, this.tps); - - 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.js'; +import { Temperature, TemperatureT } from '../../../solarxr-protocol/datatypes/temperature.js'; +import { TrackerId, TrackerIdT } from '../../../solarxr-protocol/datatypes/tracker-id.js'; +import { TrackerStatus } from '../../../solarxr-protocol/datatypes/tracker-status.js'; +import { Quat, QuatT } from '../../../solarxr-protocol/datatypes/math/quat.js'; +import { Vec3f, Vec3fT } from '../../../solarxr-protocol/datatypes/math/vec3f.js'; + + +/** + * 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 implements flatbuffers.IUnpackableObject { + 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; +} + +/** + * Sensor rotation after fusion + */ +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 angular velocity, in euler angles, rad/s + */ +rawAngularVelocity(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 acceleration, in m/s^2 + */ +rawAcceleration(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; +} + +/** + * Acceleration without gravity, in m/s^2 + */ +linearAcceleration(obj?:Vec3f):Vec3f|null { + const offset = this.bb!.__offset(this.bb_pos, 20); + return offset ? (obj || new Vec3f()).__init(this.bb_pos + offset, this.bb!) : null; +} + +/** + * Reference-adjusted rotation for IMU-only trackers (VR HMD yaw is used as a reset reference). + * In other words, a rotation that is aligned to a reliable source of rotation ((0, VR HMD YAW, 0)), + * triggered after user input (using reset buttons). + * This is a SlimeVR-specific field and computed exclusively by SlimeVR server. + * Includes: mounting orientation, full, quick and mounting reset adjustments. + * This rotation can be used to reconstruct a skeleton pose using forward kinematics. + */ +rotationReferenceAdjusted(obj?:Quat):Quat|null { + const offset = this.bb!.__offset(this.bb_pos, 22); + return offset ? (obj || new Quat()).__init(this.bb_pos + offset, this.bb!) : null; +} + +/** + * Zero-reference-adjusted rotation for IMU-only trackers (identity quaternion is used as a reset reference). + * In other words, a rotation that is aligned to a zero vector ((0, 0, 0)) by + * inverting the current rotation, triggered after user input (using reset buttons). + * This is a SlimeVR-specific field and computed exclusively by SlimeVR server. + * Includes: only full and quick reset adjustments. + * This rotation can be used in visualizations for IMU debugging. + */ +rotationIdentityAdjusted(obj?:Quat):Quat|null { + const offset = this.bb!.__offset(this.bb_pos, 24); + return offset ? (obj || new Quat()).__init(this.bb_pos + offset, this.bb!) : null; +} + +/** + * Data ticks per second, processed by SlimeVR server + */ +tps():number|null { + const offset = this.bb!.__offset(this.bb_pos, 26); + return offset ? this.bb!.readUint16(this.bb_pos + offset) : null; +} + +static startTrackerData(builder:flatbuffers.Builder) { + builder.startObject(12); +} + +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 addRawAngularVelocity(builder:flatbuffers.Builder, rawAngularVelocityOffset:flatbuffers.Offset) { + builder.addFieldStruct(5, rawAngularVelocityOffset, 0); +} + +static addRawAcceleration(builder:flatbuffers.Builder, rawAccelerationOffset:flatbuffers.Offset) { + builder.addFieldStruct(6, rawAccelerationOffset, 0); +} + +static addTemp(builder:flatbuffers.Builder, tempOffset:flatbuffers.Offset) { + builder.addFieldStruct(7, tempOffset, 0); +} + +static addLinearAcceleration(builder:flatbuffers.Builder, linearAccelerationOffset:flatbuffers.Offset) { + builder.addFieldStruct(8, linearAccelerationOffset, 0); +} + +static addRotationReferenceAdjusted(builder:flatbuffers.Builder, rotationReferenceAdjustedOffset:flatbuffers.Offset) { + builder.addFieldStruct(9, rotationReferenceAdjustedOffset, 0); +} + +static addRotationIdentityAdjusted(builder:flatbuffers.Builder, rotationIdentityAdjustedOffset:flatbuffers.Offset) { + builder.addFieldStruct(10, rotationIdentityAdjustedOffset, 0); +} + +static addTps(builder:flatbuffers.Builder, tps:number) { + builder.addFieldInt16(11, tps, 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.rawAngularVelocity() !== null ? this.rawAngularVelocity()!.unpack() : null), + (this.rawAcceleration() !== null ? this.rawAcceleration()!.unpack() : null), + (this.temp() !== null ? this.temp()!.unpack() : null), + (this.linearAcceleration() !== null ? this.linearAcceleration()!.unpack() : null), + (this.rotationReferenceAdjusted() !== null ? this.rotationReferenceAdjusted()!.unpack() : null), + (this.rotationIdentityAdjusted() !== null ? this.rotationIdentityAdjusted()!.unpack() : null), + this.tps() + ); +} + + +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.rawAngularVelocity = (this.rawAngularVelocity() !== null ? this.rawAngularVelocity()!.unpack() : null); + _o.rawAcceleration = (this.rawAcceleration() !== null ? this.rawAcceleration()!.unpack() : null); + _o.temp = (this.temp() !== null ? this.temp()!.unpack() : null); + _o.linearAcceleration = (this.linearAcceleration() !== null ? this.linearAcceleration()!.unpack() : null); + _o.rotationReferenceAdjusted = (this.rotationReferenceAdjusted() !== null ? this.rotationReferenceAdjusted()!.unpack() : null); + _o.rotationIdentityAdjusted = (this.rotationIdentityAdjusted() !== null ? this.rotationIdentityAdjusted()!.unpack() : null); + _o.tps = this.tps(); +} +} + +export class TrackerDataT implements flatbuffers.IGeneratedObject { +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 rawAngularVelocity: Vec3fT|null = null, + public rawAcceleration: Vec3fT|null = null, + public temp: TemperatureT|null = null, + public linearAcceleration: Vec3fT|null = null, + public rotationReferenceAdjusted: QuatT|null = null, + public rotationIdentityAdjusted: QuatT|null = null, + public tps: number|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.addRawAngularVelocity(builder, (this.rawAngularVelocity !== null ? this.rawAngularVelocity!.pack(builder) : 0)); + TrackerData.addRawAcceleration(builder, (this.rawAcceleration !== null ? this.rawAcceleration!.pack(builder) : 0)); + TrackerData.addTemp(builder, (this.temp !== null ? this.temp!.pack(builder) : 0)); + TrackerData.addLinearAcceleration(builder, (this.linearAcceleration !== null ? this.linearAcceleration!.pack(builder) : 0)); + TrackerData.addRotationReferenceAdjusted(builder, (this.rotationReferenceAdjusted !== null ? this.rotationReferenceAdjusted!.pack(builder) : 0)); + TrackerData.addRotationIdentityAdjusted(builder, (this.rotationIdentityAdjusted !== null ? this.rotationIdentityAdjusted!.pack(builder) : 0)); + if (this.tps !== null) + TrackerData.addTps(builder, this.tps); + + 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 index 75fe3ad1..df313dab 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,260 +1,260 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { BodyPart } from '../../../solarxr-protocol/datatypes/body-part.js'; -import { HzF32, HzF32T } from '../../../solarxr-protocol/datatypes/hz-f32.js'; -import { ImuType } from '../../../solarxr-protocol/datatypes/hardware-info/imu-type.js'; -import { Quat, QuatT } from '../../../solarxr-protocol/datatypes/math/quat.js'; - - -/** - * Static description of a tracker - */ -export class TrackerInfo implements flatbuffers.IUnpackableObject { - 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; -} - -/** - * Should the tracker's settings be editable by the user - */ -editable():boolean { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -/** - * Indicates if the tracker is computed (solved position and rotation) - */ -isComputed():boolean { - const offset = this.bb!.__offset(this.bb_pos, 14); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -/** - * Indicates if the tracker is using an IMU for its tracking data - */ -isImu():boolean { - const offset = this.bb!.__offset(this.bb_pos, 16); - 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, 18); - 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, 20); - return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; -} - -/** - * Whether to allow yaw drift compensation for this tracker or not. - */ -allowDriftCompensation():boolean { - const offset = this.bb!.__offset(this.bb_pos, 22); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -/** - * Mounting Reset orientation overrides the current `mounting_orientation` of - * the tracker, this orientation is not saved and needs to be calculated - * each time the server is ran - */ -mountingResetOrientation(obj?:Quat):Quat|null { - const offset = this.bb!.__offset(this.bb_pos, 24); - return offset ? (obj || new Quat()).__init(this.bb_pos + offset, this.bb!) : null; -} - -/** - * Indicates if the tracker is actually an HMD - */ -isHmd():boolean { - const offset = this.bb!.__offset(this.bb_pos, 26); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startTrackerInfo(builder:flatbuffers.Builder) { - builder.startObject(12); -} - -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 addIsComputed(builder:flatbuffers.Builder, isComputed:boolean) { - builder.addFieldInt8(5, +isComputed, +false); -} - -static addIsImu(builder:flatbuffers.Builder, isImu:boolean) { - builder.addFieldInt8(6, +isImu, +false); -} - -static addDisplayName(builder:flatbuffers.Builder, displayNameOffset:flatbuffers.Offset) { - builder.addFieldOffset(7, displayNameOffset, 0); -} - -static addCustomName(builder:flatbuffers.Builder, customNameOffset:flatbuffers.Offset) { - builder.addFieldOffset(8, customNameOffset, 0); -} - -static addAllowDriftCompensation(builder:flatbuffers.Builder, allowDriftCompensation:boolean) { - builder.addFieldInt8(9, +allowDriftCompensation, +false); -} - -static addMountingResetOrientation(builder:flatbuffers.Builder, mountingResetOrientationOffset:flatbuffers.Offset) { - builder.addFieldStruct(10, mountingResetOrientationOffset, 0); -} - -static addIsHmd(builder:flatbuffers.Builder, isHmd:boolean) { - builder.addFieldInt8(11, +isHmd, +false); -} - -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.isComputed(), - this.isImu(), - this.displayName(), - this.customName(), - this.allowDriftCompensation(), - (this.mountingResetOrientation() !== null ? this.mountingResetOrientation()!.unpack() : null), - this.isHmd() - ); -} - - -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.isComputed = this.isComputed(); - _o.isImu = this.isImu(); - _o.displayName = this.displayName(); - _o.customName = this.customName(); - _o.allowDriftCompensation = this.allowDriftCompensation(); - _o.mountingResetOrientation = (this.mountingResetOrientation() !== null ? this.mountingResetOrientation()!.unpack() : null); - _o.isHmd = this.isHmd(); -} -} - -export class TrackerInfoT implements flatbuffers.IGeneratedObject { -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 isComputed: boolean = false, - public isImu: boolean = false, - public displayName: string|Uint8Array|null = null, - public customName: string|Uint8Array|null = null, - public allowDriftCompensation: boolean = false, - public mountingResetOrientation: QuatT|null = null, - public isHmd: boolean = false -){} - - -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.addIsComputed(builder, this.isComputed); - TrackerInfo.addIsImu(builder, this.isImu); - TrackerInfo.addDisplayName(builder, displayName); - TrackerInfo.addCustomName(builder, customName); - TrackerInfo.addAllowDriftCompensation(builder, this.allowDriftCompensation); - TrackerInfo.addMountingResetOrientation(builder, (this.mountingResetOrientation !== null ? this.mountingResetOrientation!.pack(builder) : 0)); - TrackerInfo.addIsHmd(builder, this.isHmd); - - 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.js'; +import { HzF32, HzF32T } from '../../../solarxr-protocol/datatypes/hz-f32.js'; +import { ImuType } from '../../../solarxr-protocol/datatypes/hardware-info/imu-type.js'; +import { Quat, QuatT } from '../../../solarxr-protocol/datatypes/math/quat.js'; + + +/** + * Static description of a tracker + */ +export class TrackerInfo implements flatbuffers.IUnpackableObject { + 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; +} + +/** + * Should the tracker's settings be editable by the user + */ +editable():boolean { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +/** + * Indicates if the tracker is computed (solved position and rotation) + */ +isComputed():boolean { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +/** + * Indicates if the tracker is using an IMU for its tracking data + */ +isImu():boolean { + const offset = this.bb!.__offset(this.bb_pos, 16); + 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, 18); + 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, 20); + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; +} + +/** + * Whether to allow yaw drift compensation for this tracker or not. + */ +allowDriftCompensation():boolean { + const offset = this.bb!.__offset(this.bb_pos, 22); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +/** + * Mounting Reset orientation overrides the current `mounting_orientation` of + * the tracker, this orientation is not saved and needs to be calculated + * each time the server is ran + */ +mountingResetOrientation(obj?:Quat):Quat|null { + const offset = this.bb!.__offset(this.bb_pos, 24); + return offset ? (obj || new Quat()).__init(this.bb_pos + offset, this.bb!) : null; +} + +/** + * Indicates if the tracker is actually an HMD + */ +isHmd():boolean { + const offset = this.bb!.__offset(this.bb_pos, 26); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startTrackerInfo(builder:flatbuffers.Builder) { + builder.startObject(12); +} + +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 addIsComputed(builder:flatbuffers.Builder, isComputed:boolean) { + builder.addFieldInt8(5, +isComputed, +false); +} + +static addIsImu(builder:flatbuffers.Builder, isImu:boolean) { + builder.addFieldInt8(6, +isImu, +false); +} + +static addDisplayName(builder:flatbuffers.Builder, displayNameOffset:flatbuffers.Offset) { + builder.addFieldOffset(7, displayNameOffset, 0); +} + +static addCustomName(builder:flatbuffers.Builder, customNameOffset:flatbuffers.Offset) { + builder.addFieldOffset(8, customNameOffset, 0); +} + +static addAllowDriftCompensation(builder:flatbuffers.Builder, allowDriftCompensation:boolean) { + builder.addFieldInt8(9, +allowDriftCompensation, +false); +} + +static addMountingResetOrientation(builder:flatbuffers.Builder, mountingResetOrientationOffset:flatbuffers.Offset) { + builder.addFieldStruct(10, mountingResetOrientationOffset, 0); +} + +static addIsHmd(builder:flatbuffers.Builder, isHmd:boolean) { + builder.addFieldInt8(11, +isHmd, +false); +} + +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.isComputed(), + this.isImu(), + this.displayName(), + this.customName(), + this.allowDriftCompensation(), + (this.mountingResetOrientation() !== null ? this.mountingResetOrientation()!.unpack() : null), + this.isHmd() + ); +} + + +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.isComputed = this.isComputed(); + _o.isImu = this.isImu(); + _o.displayName = this.displayName(); + _o.customName = this.customName(); + _o.allowDriftCompensation = this.allowDriftCompensation(); + _o.mountingResetOrientation = (this.mountingResetOrientation() !== null ? this.mountingResetOrientation()!.unpack() : null); + _o.isHmd = this.isHmd(); +} +} + +export class TrackerInfoT implements flatbuffers.IGeneratedObject { +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 isComputed: boolean = false, + public isImu: boolean = false, + public displayName: string|Uint8Array|null = null, + public customName: string|Uint8Array|null = null, + public allowDriftCompensation: boolean = false, + public mountingResetOrientation: QuatT|null = null, + public isHmd: boolean = false +){} + + +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.addIsComputed(builder, this.isComputed); + TrackerInfo.addIsImu(builder, this.isImu); + TrackerInfo.addDisplayName(builder, displayName); + TrackerInfo.addCustomName(builder, customName); + TrackerInfo.addAllowDriftCompensation(builder, this.allowDriftCompensation); + TrackerInfo.addMountingResetOrientation(builder, (this.mountingResetOrientation !== null ? this.mountingResetOrientation!.pack(builder) : 0)); + TrackerInfo.addIsHmd(builder, this.isHmd); + + 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 index 66bfe303..ac8b5196 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. Maps to each possible non-tracker 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_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, - UPPER_CHEST = 22, - LEFT_HIP = 23, - RIGHT_HIP = 24 -} +// automatically generated by the FlatBuffers compiler, do not modify + +/** + * Different parts of the body. Maps to each possible non-tracker 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_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, + UPPER_CHEST = 22, + LEFT_HIP = 23, + RIGHT_HIP = 24 +} diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/bytes.ts b/protocol/typescript/src/solarxr-protocol/datatypes/bytes.ts index 0e6eb939..a1bd68cf 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/bytes.ts +++ b/protocol/typescript/src/solarxr-protocol/datatypes/bytes.ts @@ -1,96 +1,96 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class Bytes implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -constructor( - public b: (number)[] = [] -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const b = Bytes.createBVector(builder, this.b); - - return Bytes.createBytes(builder, - b - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class Bytes implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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-table.ts b/protocol/typescript/src/solarxr-protocol/datatypes/device-id-table.ts new file mode 100644 index 00000000..6d7a66cb --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/datatypes/device-id-table.ts @@ -0,0 +1,76 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { DeviceId, DeviceIdT } from '../../solarxr-protocol/datatypes/device-id.js'; + + +/** + * To be used inside unions + */ +export class DeviceIdTable implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):DeviceIdTable { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsDeviceIdTable(bb:flatbuffers.ByteBuffer, obj?:DeviceIdTable):DeviceIdTable { + return (obj || new DeviceIdTable()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsDeviceIdTable(bb:flatbuffers.ByteBuffer, obj?:DeviceIdTable):DeviceIdTable { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new DeviceIdTable()).__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; +} + +static startDeviceIdTable(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addId(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset) { + builder.addFieldStruct(0, idOffset, 0); +} + +static endDeviceIdTable(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createDeviceIdTable(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset):flatbuffers.Offset { + DeviceIdTable.startDeviceIdTable(builder); + DeviceIdTable.addId(builder, idOffset); + return DeviceIdTable.endDeviceIdTable(builder); +} + +unpack(): DeviceIdTableT { + return new DeviceIdTableT( + (this.id() !== null ? this.id()!.unpack() : null) + ); +} + + +unpackTo(_o: DeviceIdTableT): void { + _o.id = (this.id() !== null ? this.id()!.unpack() : null); +} +} + +export class DeviceIdTableT implements flatbuffers.IGeneratedObject { +constructor( + public id: DeviceIdT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return DeviceIdTable.createDeviceIdTable(builder, + (this.id !== null ? this.id!.pack(builder) : 0) + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/device-id.ts b/protocol/typescript/src/solarxr-protocol/datatypes/device-id.ts index f39f2cbe..ef4379b0 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 06d506b8..b1532e16 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/filtering-type.ts +++ b/protocol/typescript/src/solarxr-protocol/datatypes/filtering-type.ts @@ -1,10 +1,10 @@ -// 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 index bacf1a51..2af9a3f2 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/firmware-error-code.ts +++ b/protocol/typescript/src/solarxr-protocol/datatypes/firmware-error-code.ts @@ -1,11 +1,11 @@ -// 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/board-type.ts b/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/board-type.ts new file mode 100644 index 00000000..1a04e9bb --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/board-type.ts @@ -0,0 +1,17 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +export enum BoardType { + UNKNOWN = 0, + SLIMEVR_LEGACY = 1, + SLIMEVR_DEV = 2, + NODEMCU = 3, + CUSTOM = 4, + WROOM32 = 5, + WEMOSD1MINI = 6, + TTGO_TBASE = 7, + ESP01 = 8, + SLIMEVR = 9, + LOLIN_C3_MINI = 10, + BEETLE32C3 = 11, + ES32C3DEVKITM1 = 12 +} 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 index 88ae7de2..f92c539b 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 0bcbf4cf..24c1138a 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 4ec31731..50d0f3e9 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,249 +1,269 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { Ipv4Address, Ipv4AddressT } from '../../../solarxr-protocol/datatypes/ipv4-address.js'; -import { HardwareAddress, HardwareAddressT } from '../../../solarxr-protocol/datatypes/hardware-info/hardware-address.js'; -import { McuType } from '../../../solarxr-protocol/datatypes/hardware-info/mcu-type.js'; - - -/** - * Mostly static info about the device's hardware/firmware. - */ -export class HardwareInfo implements flatbuffers.IUnpackableObject { - 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; -} - -boardType():string|null -boardType(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -boardType(optionalEncoding?:any):string|Uint8Array|null { - const offset = this.bb!.__offset(this.bb_pos, 20); - return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; -} - -/** - * A unique identifier for the device. Depending on the type of device it can be the MAC address, - * the IP address, or some other unique identifier like what USB device it is. - */ -hardwareIdentifier():string|null -hardwareIdentifier(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -hardwareIdentifier(optionalEncoding?:any):string|Uint8Array|null { - const offset = this.bb!.__offset(this.bb_pos, 22); - return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; -} - -/** - * The version of the protocol it's using to communicate with server - */ -networkProtocolVersion():number|null { - const offset = this.bb!.__offset(this.bb_pos, 24); - return offset ? this.bb!.readUint16(this.bb_pos + offset) : null; -} - -static startHardwareInfo(builder:flatbuffers.Builder) { - builder.startObject(11); -} - -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 addBoardType(builder:flatbuffers.Builder, boardTypeOffset:flatbuffers.Offset) { - builder.addFieldOffset(8, boardTypeOffset, 0); -} - -static addHardwareIdentifier(builder:flatbuffers.Builder, hardwareIdentifierOffset:flatbuffers.Offset) { - builder.addFieldOffset(9, hardwareIdentifierOffset, 0); -} - -static addNetworkProtocolVersion(builder:flatbuffers.Builder, networkProtocolVersion:number) { - builder.addFieldInt16(10, networkProtocolVersion, 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), - this.boardType(), - this.hardwareIdentifier(), - this.networkProtocolVersion() - ); -} - - -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); - _o.boardType = this.boardType(); - _o.hardwareIdentifier = this.hardwareIdentifier(); - _o.networkProtocolVersion = this.networkProtocolVersion(); -} -} - -export class HardwareInfoT implements flatbuffers.IGeneratedObject { -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, - public boardType: string|Uint8Array|null = null, - public hardwareIdentifier: string|Uint8Array|null = null, - public networkProtocolVersion: number|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); - const boardType = (this.boardType !== null ? builder.createString(this.boardType!) : 0); - const hardwareIdentifier = (this.hardwareIdentifier !== null ? builder.createString(this.hardwareIdentifier!) : 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)); - HardwareInfo.addBoardType(builder, boardType); - HardwareInfo.addHardwareIdentifier(builder, hardwareIdentifier); - if (this.networkProtocolVersion !== null) - HardwareInfo.addNetworkProtocolVersion(builder, this.networkProtocolVersion); - - 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.js'; +import { BoardType } from '../../../solarxr-protocol/datatypes/hardware-info/board-type.js'; +import { HardwareAddress, HardwareAddressT } from '../../../solarxr-protocol/datatypes/hardware-info/hardware-address.js'; +import { McuType } from '../../../solarxr-protocol/datatypes/hardware-info/mcu-type.js'; + + +/** + * Mostly static info about the device's hardware/firmware. + */ +export class HardwareInfo implements flatbuffers.IUnpackableObject { + 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; +} + +/** + * A board type string that can be used to name a board. if possible you should use official board type + */ +boardType():string|null +boardType(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +boardType(optionalEncoding?:any):string|Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 20); + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; +} + +/** + * An enum listing all the board types supported by the firmware + */ +officialBoardType():BoardType { + const offset = this.bb!.__offset(this.bb_pos, 22); + return offset ? this.bb!.readUint16(this.bb_pos + offset) : BoardType.UNKNOWN; +} + +/** + * A unique identifier for the device. Depending on the type of device it can be the MAC address, + * the IP address, or some other unique identifier like what USB device it is. + */ +hardwareIdentifier():string|null +hardwareIdentifier(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +hardwareIdentifier(optionalEncoding?:any):string|Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 24); + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; +} + +/** + * The version of the protocol it's using to communicate with server + */ +networkProtocolVersion():number|null { + const offset = this.bb!.__offset(this.bb_pos, 26); + return offset ? this.bb!.readUint16(this.bb_pos + offset) : null; +} + +static startHardwareInfo(builder:flatbuffers.Builder) { + builder.startObject(12); +} + +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 addBoardType(builder:flatbuffers.Builder, boardTypeOffset:flatbuffers.Offset) { + builder.addFieldOffset(8, boardTypeOffset, 0); +} + +static addOfficialBoardType(builder:flatbuffers.Builder, officialBoardType:BoardType) { + builder.addFieldInt16(9, officialBoardType, BoardType.UNKNOWN); +} + +static addHardwareIdentifier(builder:flatbuffers.Builder, hardwareIdentifierOffset:flatbuffers.Offset) { + builder.addFieldOffset(10, hardwareIdentifierOffset, 0); +} + +static addNetworkProtocolVersion(builder:flatbuffers.Builder, networkProtocolVersion:number) { + builder.addFieldInt16(11, networkProtocolVersion, 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), + this.boardType(), + this.officialBoardType(), + this.hardwareIdentifier(), + this.networkProtocolVersion() + ); +} + + +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); + _o.boardType = this.boardType(); + _o.officialBoardType = this.officialBoardType(); + _o.hardwareIdentifier = this.hardwareIdentifier(); + _o.networkProtocolVersion = this.networkProtocolVersion(); +} +} + +export class HardwareInfoT implements flatbuffers.IGeneratedObject { +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, + public boardType: string|Uint8Array|null = null, + public officialBoardType: BoardType = BoardType.UNKNOWN, + public hardwareIdentifier: string|Uint8Array|null = null, + public networkProtocolVersion: number|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); + const boardType = (this.boardType !== null ? builder.createString(this.boardType!) : 0); + const hardwareIdentifier = (this.hardwareIdentifier !== null ? builder.createString(this.hardwareIdentifier!) : 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)); + HardwareInfo.addBoardType(builder, boardType); + HardwareInfo.addOfficialBoardType(builder, this.officialBoardType); + HardwareInfo.addHardwareIdentifier(builder, hardwareIdentifier); + if (this.networkProtocolVersion !== null) + HardwareInfo.addNetworkProtocolVersion(builder, this.networkProtocolVersion); + + 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 index 0890b859..6ea83095 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,165 +1,165 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { FirmwareErrorCode } from '../../../solarxr-protocol/datatypes/firmware-error-code.js'; -import { LogData, LogDataT } from '../../../solarxr-protocol/datatypes/log-data.js'; - - -/** - * Mostly-dynamic status info about a tracked device's firmware - */ -export class HardwareStatus implements flatbuffers.IUnpackableObject { - 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; -} - -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 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.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.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 implements flatbuffers.IGeneratedObject { -constructor( - public errorStatus: FirmwareErrorCode|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.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.js'; +import { LogData, LogDataT } from '../../../solarxr-protocol/datatypes/log-data.js'; + + +/** + * Mostly-dynamic status info about a tracked device's firmware + */ +export class HardwareStatus implements flatbuffers.IUnpackableObject { + 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; +} + +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 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.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.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 implements flatbuffers.IGeneratedObject { +constructor( + public errorStatus: FirmwareErrorCode|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.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 index 0581c8e2..4d243bd2 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,15 +1,15 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -export enum ImuType { - Other = 0, - MPU9250 = 1, - MPU6500 = 2, - BNO080 = 3, - BNO085 = 4, - BNO055 = 5, - MPU6050 = 6, - BNO086 = 7, - BMI160 = 8, - ICM20948 = 9, - ICM42688 = 10 -} +// automatically generated by the FlatBuffers compiler, do not modify + +export enum ImuType { + Other = 0, + MPU9250 = 1, + MPU6500 = 2, + BNO080 = 3, + BNO085 = 4, + BNO055 = 5, + MPU6050 = 6, + BNO086 = 7, + BMI160 = 8, + ICM20948 = 9, + ICM42688 = 10 +} diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/mcu-type.ts b/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/mcu-type.ts index c2b60003..729e2e0d 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,13 +1,13 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -export enum McuType { - Other = 0, - ESP8266 = 1, - ESP32 = 2, - OWOTRACK_ANDROID = 3, - WRANGLER = 4, - OWOTRACK_IOS = 5, - ESP32_C3 = 6, - MOCOPI = 7, - DEV_RESERVED = 250 -} +// automatically generated by the FlatBuffers compiler, do not modify + +export enum McuType { + Other = 0, + ESP8266 = 1, + ESP32 = 2, + OWOTRACK_ANDROID = 3, + WRANGLER = 4, + OWOTRACK_IOS = 5, + ESP32_C3 = 6, + MOCOPI = 7, + DEV_RESERVED = 250 +} diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/hz-f32.ts b/protocol/typescript/src/solarxr-protocol/datatypes/hz-f32.ts index f3432e1c..0c243594 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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/ipv4-address.ts b/protocol/typescript/src/solarxr-protocol/datatypes/ipv4-address.ts index bf11110e..65eccdcf 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/ipv4-address.ts +++ b/protocol/typescript/src/solarxr-protocol/datatypes/ipv4-address.ts @@ -1,58 +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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -constructor( - public addr: number = 0 -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return Ipv4Address.createIpv4Address(builder, - this.addr - ); -} -} +// 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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +constructor( + public addr: number = 0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return Ipv4Address.createIpv4Address(builder, + this.addr + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/log-data.ts b/protocol/typescript/src/solarxr-protocol/datatypes/log-data.ts index 213172aa..9d0ca95f 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 7f8677ce..61488923 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 56a84948..c6dd32f6 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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-table.ts b/protocol/typescript/src/solarxr-protocol/datatypes/string-table.ts index e6548a07..b8583052 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/string-table.ts +++ b/protocol/typescript/src/solarxr-protocol/datatypes/string-table.ts @@ -1,76 +1,76 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class StringTable implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):StringTable { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsStringTable(bb:flatbuffers.ByteBuffer, obj?:StringTable):StringTable { - return (obj || new StringTable()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsStringTable(bb:flatbuffers.ByteBuffer, obj?:StringTable):StringTable { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new StringTable()).__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 startStringTable(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addS(builder:flatbuffers.Builder, sOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, sOffset, 0); -} - -static endStringTable(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createStringTable(builder:flatbuffers.Builder, sOffset:flatbuffers.Offset):flatbuffers.Offset { - StringTable.startStringTable(builder); - StringTable.addS(builder, sOffset); - return StringTable.endStringTable(builder); -} - -unpack(): StringTableT { - return new StringTableT( - this.s() - ); -} - - -unpackTo(_o: StringTableT): void { - _o.s = this.s(); -} -} - -export class StringTableT implements flatbuffers.IGeneratedObject { -constructor( - public s: string|Uint8Array|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const s = (this.s !== null ? builder.createString(this.s!) : 0); - - return StringTable.createStringTable(builder, - s - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class StringTable implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):StringTable { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsStringTable(bb:flatbuffers.ByteBuffer, obj?:StringTable):StringTable { + return (obj || new StringTable()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsStringTable(bb:flatbuffers.ByteBuffer, obj?:StringTable):StringTable { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new StringTable()).__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 startStringTable(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addS(builder:flatbuffers.Builder, sOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, sOffset, 0); +} + +static endStringTable(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createStringTable(builder:flatbuffers.Builder, sOffset:flatbuffers.Offset):flatbuffers.Offset { + StringTable.startStringTable(builder); + StringTable.addS(builder, sOffset); + return StringTable.endStringTable(builder); +} + +unpack(): StringTableT { + return new StringTableT( + this.s() + ); +} + + +unpackTo(_o: StringTableT): void { + _o.s = this.s(); +} +} + +export class StringTableT implements flatbuffers.IGeneratedObject { +constructor( + public s: string|Uint8Array|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const s = (this.s !== null ? builder.createString(this.s!) : 0); + + 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 index 456f5306..14279bfc 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index c662e32d..c970a96a 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.js'; - - -export class TrackerId implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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.js'; + + +export class TrackerId implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 950178dd..004993ff 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/tracker-role.ts +++ b/protocol/typescript/src/solarxr-protocol/datatypes/tracker-role.ts @@ -1,32 +1,32 @@ -// 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 index a283b659..373530fe 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, - TIMED_OUT = 6 -} +// automatically generated by the FlatBuffers compiler, do not modify + +export enum TrackerStatus { + NONE = 0, + DISCONNECTED = 1, + OK = 2, + BUSY = 3, + ERROR = 4, + OCCLUDED = 5, + TIMED_OUT = 6 +} diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/transaction-id.ts b/protocol/typescript/src/solarxr-protocol/datatypes/transaction-id.ts index 77c9be33..dd0506d0 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 3eb8c51c..290a6758 100644 --- a/protocol/typescript/src/solarxr-protocol/message-bundle.ts +++ b/protocol/typescript/src/solarxr-protocol/message-bundle.ts @@ -1,162 +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.js'; -import { PubSubHeader, PubSubHeaderT } from '../solarxr-protocol/pub-sub/pub-sub-header.js'; -import { RpcMessageHeader, RpcMessageHeaderT } from '../solarxr-protocol/rpc/rpc-message-header.js'; - - -/** - * 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 - ); -} -} +// 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.js'; +import { PubSubHeader, PubSubHeaderT } from '../solarxr-protocol/pub-sub/pub-sub-header.js'; +import { RpcMessageHeader, RpcMessageHeaderT } from '../solarxr-protocol/rpc/rpc-message-header.js'; + + +/** + * 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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 62457ada..758d4d7d 100644 --- a/protocol/typescript/src/solarxr-protocol/pub-sub/key-values.ts +++ b/protocol/typescript/src/solarxr-protocol/pub-sub/key-values.ts @@ -1,127 +1,127 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class KeyValues implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class KeyValues implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 39356746..cc79e4ec 100644 --- a/protocol/typescript/src/solarxr-protocol/pub-sub/message.ts +++ b/protocol/typescript/src/solarxr-protocol/pub-sub/message.ts @@ -1,143 +1,143 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { Bytes, BytesT } from '../../solarxr-protocol/datatypes/bytes.js'; -import { StringTable, StringTableT } from '../../solarxr-protocol/datatypes/string-table.js'; -import { KeyValues, KeyValuesT } from '../../solarxr-protocol/pub-sub/key-values.js'; -import { Payload, unionToPayload, unionListToPayload } from '../../solarxr-protocol/pub-sub/payload.js'; -import { Topic, unionToTopic, unionListToTopic } from '../../solarxr-protocol/pub-sub/topic.js'; -import { TopicHandle, TopicHandleT } from '../../solarxr-protocol/pub-sub/topic-handle.js'; -import { TopicId, TopicIdT } from '../../solarxr-protocol/pub-sub/topic-id.js'; - - -/** - * Data that is sent from publishers to subscribers - */ -export class Message implements flatbuffers.IUnpackableObject { - 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(), - (() => { - const temp = unionToTopic(this.topicType(), this.topic.bind(this)); - if(temp === null) { return null; } - return temp.unpack() - })(), - this.payloadType(), - (() => { - const 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 = (() => { - const temp = unionToTopic(this.topicType(), this.topic.bind(this)); - if(temp === null) { return null; } - return temp.unpack() - })(); - _o.payloadType = this.payloadType(); - _o.payload = (() => { - const temp = unionToPayload(this.payloadType(), this.payload.bind(this)); - if(temp === null) { return null; } - return temp.unpack() - })(); -} -} - -export class MessageT implements flatbuffers.IGeneratedObject { -constructor( - public topicType: Topic = Topic.NONE, - public topic: TopicHandleT|TopicIdT|null = null, - public payloadType: Payload = Payload.NONE, - public payload: BytesT|KeyValuesT|StringTableT|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 - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { Bytes, BytesT } from '../../solarxr-protocol/datatypes/bytes.js'; +import { StringTable, StringTableT } from '../../solarxr-protocol/datatypes/string-table.js'; +import { KeyValues, KeyValuesT } from '../../solarxr-protocol/pub-sub/key-values.js'; +import { Payload, unionToPayload, unionListToPayload } from '../../solarxr-protocol/pub-sub/payload.js'; +import { Topic, unionToTopic, unionListToTopic } from '../../solarxr-protocol/pub-sub/topic.js'; +import { TopicHandle, TopicHandleT } from '../../solarxr-protocol/pub-sub/topic-handle.js'; +import { TopicId, TopicIdT } from '../../solarxr-protocol/pub-sub/topic-id.js'; + + +/** + * Data that is sent from publishers to subscribers + */ +export class Message implements flatbuffers.IUnpackableObject { + 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(), + (() => { + const temp = unionToTopic(this.topicType(), this.topic.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })(), + this.payloadType(), + (() => { + const 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 = (() => { + const temp = unionToTopic(this.topicType(), this.topic.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })(); + _o.payloadType = this.payloadType(); + _o.payload = (() => { + const temp = unionToPayload(this.payloadType(), this.payload.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })(); +} +} + +export class MessageT implements flatbuffers.IGeneratedObject { +constructor( + public topicType: Topic = Topic.NONE, + public topic: TopicHandleT|TopicIdT|null = null, + public payloadType: Payload = Payload.NONE, + public payload: BytesT|KeyValuesT|StringTableT|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 index 621e9125..df71f392 100644 --- a/protocol/typescript/src/solarxr-protocol/pub-sub/payload.ts +++ b/protocol/typescript/src/solarxr-protocol/pub-sub/payload.ts @@ -1,40 +1,40 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import { Bytes, BytesT } from '../../solarxr-protocol/datatypes/bytes.js'; -import { StringTable, StringTableT } from '../../solarxr-protocol/datatypes/string-table.js'; -import { KeyValues, KeyValuesT } from '../../solarxr-protocol/pub-sub/key-values.js'; - - -export enum Payload { - NONE = 0, - solarxr_protocol_datatypes_StringTable = 1, - solarxr_protocol_datatypes_Bytes = 2, - KeyValues = 3 -} - -export function unionToPayload( - type: Payload, - accessor: (obj:Bytes|KeyValues|StringTable) => Bytes|KeyValues|StringTable|null -): Bytes|KeyValues|StringTable|null { - switch(Payload[type]) { - case 'NONE': return null; - 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; - } -} - -export function unionListToPayload( - type: Payload, - accessor: (index: number, obj:Bytes|KeyValues|StringTable) => Bytes|KeyValues|StringTable|null, - index: number -): Bytes|KeyValues|StringTable|null { - switch(Payload[type]) { - case 'NONE': return null; - 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; - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +import { Bytes, BytesT } from '../../solarxr-protocol/datatypes/bytes.js'; +import { StringTable, StringTableT } from '../../solarxr-protocol/datatypes/string-table.js'; +import { KeyValues, KeyValuesT } from '../../solarxr-protocol/pub-sub/key-values.js'; + + +export enum Payload { + NONE = 0, + solarxr_protocol_datatypes_StringTable = 1, + solarxr_protocol_datatypes_Bytes = 2, + KeyValues = 3 +} + +export function unionToPayload( + type: Payload, + accessor: (obj:Bytes|KeyValues|StringTable) => Bytes|KeyValues|StringTable|null +): Bytes|KeyValues|StringTable|null { + switch(Payload[type]) { + case 'NONE': return null; + 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; + } +} + +export function unionListToPayload( + type: Payload, + accessor: (index: number, obj:Bytes|KeyValues|StringTable) => Bytes|KeyValues|StringTable|null, + index: number +): Bytes|KeyValues|StringTable|null { + switch(Payload[type]) { + case 'NONE': return null; + 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 index c5fc22ea..66518bdd 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 @@ -1,101 +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.js'; -import { PubSubUnion, unionToPubSubUnion, unionListToPubSubUnion } from '../../solarxr-protocol/pub-sub/pub-sub-union.js'; -import { SubscriptionRequest, SubscriptionRequestT } from '../../solarxr-protocol/pub-sub/subscription-request.js'; -import { TopicHandleRequest, TopicHandleRequestT } from '../../solarxr-protocol/pub-sub/topic-handle-request.js'; -import { TopicMapping, TopicMappingT } from '../../solarxr-protocol/pub-sub/topic-mapping.js'; - - -export class PubSubHeader implements flatbuffers.IUnpackableObject { - 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(), - (() => { - const 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 = (() => { - const temp = unionToPubSubUnion(this.uType(), this.u.bind(this)); - if(temp === null) { return null; } - return temp.unpack() - })(); -} -} - -export class PubSubHeaderT implements flatbuffers.IGeneratedObject { -constructor( - public uType: PubSubUnion = PubSubUnion.NONE, - public u: MessageT|SubscriptionRequestT|TopicHandleRequestT|TopicMappingT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const u = builder.createObjectOffset(this.u); - - return PubSubHeader.createPubSubHeader(builder, - this.uType, - u - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { Message, MessageT } from '../../solarxr-protocol/pub-sub/message.js'; +import { PubSubUnion, unionToPubSubUnion, unionListToPubSubUnion } from '../../solarxr-protocol/pub-sub/pub-sub-union.js'; +import { SubscriptionRequest, SubscriptionRequestT } from '../../solarxr-protocol/pub-sub/subscription-request.js'; +import { TopicHandleRequest, TopicHandleRequestT } from '../../solarxr-protocol/pub-sub/topic-handle-request.js'; +import { TopicMapping, TopicMappingT } from '../../solarxr-protocol/pub-sub/topic-mapping.js'; + + +export class PubSubHeader implements flatbuffers.IUnpackableObject { + 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(), + (() => { + const 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 = (() => { + const temp = unionToPubSubUnion(this.uType(), this.u.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })(); +} +} + +export class PubSubHeaderT implements flatbuffers.IGeneratedObject { +constructor( + public uType: PubSubUnion = PubSubUnion.NONE, + public u: MessageT|SubscriptionRequestT|TopicHandleRequestT|TopicMappingT|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 index 03214a95..1cdcd2e9 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,44 +1,44 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import { Message, MessageT } from '../../solarxr-protocol/pub-sub/message.js'; -import { SubscriptionRequest, SubscriptionRequestT } from '../../solarxr-protocol/pub-sub/subscription-request.js'; -import { TopicHandleRequest, TopicHandleRequestT } from '../../solarxr-protocol/pub-sub/topic-handle-request.js'; -import { TopicMapping, TopicMappingT } from '../../solarxr-protocol/pub-sub/topic-mapping.js'; - - -export enum PubSubUnion { - NONE = 0, - Message = 1, - SubscriptionRequest = 2, - TopicHandleRequest = 3, - TopicMapping = 4 -} - -export function unionToPubSubUnion( - type: PubSubUnion, - 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 'TopicMapping': return accessor(new TopicMapping())! as TopicMapping; - default: return null; - } -} - -export function unionListToPubSubUnion( - type: PubSubUnion, - accessor: (index: number, obj:Message|SubscriptionRequest|TopicHandleRequest|TopicMapping) => Message|SubscriptionRequest|TopicHandleRequest|TopicMapping|null, - index: number -): 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 'TopicMapping': return accessor(index, new TopicMapping())! as TopicMapping; - default: return null; - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +import { Message, MessageT } from '../../solarxr-protocol/pub-sub/message.js'; +import { SubscriptionRequest, SubscriptionRequestT } from '../../solarxr-protocol/pub-sub/subscription-request.js'; +import { TopicHandleRequest, TopicHandleRequestT } from '../../solarxr-protocol/pub-sub/topic-handle-request.js'; +import { TopicMapping, TopicMappingT } from '../../solarxr-protocol/pub-sub/topic-mapping.js'; + + +export enum PubSubUnion { + NONE = 0, + Message = 1, + SubscriptionRequest = 2, + TopicHandleRequest = 3, + TopicMapping = 4 +} + +export function unionToPubSubUnion( + type: PubSubUnion, + 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 'TopicMapping': return accessor(new TopicMapping())! as TopicMapping; + default: return null; + } +} + +export function unionListToPubSubUnion( + type: PubSubUnion, + accessor: (index: number, obj:Message|SubscriptionRequest|TopicHandleRequest|TopicMapping) => Message|SubscriptionRequest|TopicHandleRequest|TopicMapping|null, + index: number +): 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 '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 2ad82e78..8c0e0d2e 100644 --- a/protocol/typescript/src/solarxr-protocol/pub-sub/subscription-request.ts +++ b/protocol/typescript/src/solarxr-protocol/pub-sub/subscription-request.ts @@ -1,102 +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.js'; -import { TopicHandle, TopicHandleT } from '../../solarxr-protocol/pub-sub/topic-handle.js'; -import { TopicId, TopicIdT } from '../../solarxr-protocol/pub-sub/topic-id.js'; - - -/** - * Requests a subscription to `topic`. Replies with a `TopicMapping`. - */ -export class SubscriptionRequest implements flatbuffers.IUnpackableObject { - 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(), - (() => { - const 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 = (() => { - const temp = unionToTopic(this.topicType(), this.topic.bind(this)); - if(temp === null) { return null; } - return temp.unpack() - })(); -} -} - -export class SubscriptionRequestT implements flatbuffers.IGeneratedObject { -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 - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { Topic, unionToTopic, unionListToTopic } from '../../solarxr-protocol/pub-sub/topic.js'; +import { TopicHandle, TopicHandleT } from '../../solarxr-protocol/pub-sub/topic-handle.js'; +import { TopicId, TopicIdT } from '../../solarxr-protocol/pub-sub/topic-id.js'; + + +/** + * Requests a subscription to `topic`. Replies with a `TopicMapping`. + */ +export class SubscriptionRequest implements flatbuffers.IUnpackableObject { + 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(), + (() => { + const 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 = (() => { + const temp = unionToTopic(this.topicType(), this.topic.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })(); +} +} + +export class SubscriptionRequestT implements flatbuffers.IGeneratedObject { +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 index 5d1bfaa7..086b7b5d 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 @@ -1,79 +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.js'; - - -/** - * Request to get the `FeatureHandle` from a `FeatureId`. This is useful for reducing - * bandwidth, since `FeatureId` can be large. - */ -export class TopicHandleRequest implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { TopicId, TopicIdT } from '../../solarxr-protocol/pub-sub/topic-id.js'; + + +/** + * Request to get the `FeatureHandle` from a `FeatureId`. This is useful for reducing + * bandwidth, since `FeatureId` can be large. + */ +export class TopicHandleRequest implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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.ts b/protocol/typescript/src/solarxr-protocol/pub-sub/topic-handle.ts index 2044b5c2..c921d896 100644 --- a/protocol/typescript/src/solarxr-protocol/pub-sub/topic-handle.ts +++ b/protocol/typescript/src/solarxr-protocol/pub-sub/topic-handle.ts @@ -1,76 +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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -constructor( - public id: number = 0 -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return TopicHandle.createTopicHandle(builder, - this.id - ); -} -} +// 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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index fda5d7b9..b496a868 100644 --- a/protocol/typescript/src/solarxr-protocol/pub-sub/topic-id.ts +++ b/protocol/typescript/src/solarxr-protocol/pub-sub/topic-id.ts @@ -1,129 +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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 - ); -} -} +// 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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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-mapping.ts b/protocol/typescript/src/solarxr-protocol/pub-sub/topic-mapping.ts index 6d7769f4..c3ddb4d9 100644 --- a/protocol/typescript/src/solarxr-protocol/pub-sub/topic-mapping.ts +++ b/protocol/typescript/src/solarxr-protocol/pub-sub/topic-mapping.ts @@ -1,89 +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.js'; -import { TopicId, TopicIdT } from '../../solarxr-protocol/pub-sub/topic-id.js'; - - -/** - * Response for `TopicHandleRequest` or `SubscriptionRequest`. - */ -export class TopicMapping implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { TopicHandle, TopicHandleT } from '../../solarxr-protocol/pub-sub/topic-handle.js'; +import { TopicId, TopicIdT } from '../../solarxr-protocol/pub-sub/topic-id.js'; + + +/** + * Response for `TopicHandleRequest` or `SubscriptionRequest`. + */ +export class TopicMapping implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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/protocol/typescript/src/solarxr-protocol/pub-sub/topic.ts b/protocol/typescript/src/solarxr-protocol/pub-sub/topic.ts index 697121e9..c1d14a10 100644 --- a/protocol/typescript/src/solarxr-protocol/pub-sub/topic.ts +++ b/protocol/typescript/src/solarxr-protocol/pub-sub/topic.ts @@ -1,36 +1,36 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import { TopicHandle, TopicHandleT } from '../../solarxr-protocol/pub-sub/topic-handle.js'; -import { TopicId, TopicIdT } from '../../solarxr-protocol/pub-sub/topic-id.js'; - - -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; - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +import { TopicHandle, TopicHandleT } from '../../solarxr-protocol/pub-sub/topic-handle.js'; +import { TopicId, TopicIdT } from '../../solarxr-protocol/pub-sub/topic-id.js'; + + +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/add-unknown-device-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/add-unknown-device-request.ts index a8b69dbb..e932854c 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/add-unknown-device-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/add-unknown-device-request.ts @@ -1,76 +1,76 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class AddUnknownDeviceRequest implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):AddUnknownDeviceRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsAddUnknownDeviceRequest(bb:flatbuffers.ByteBuffer, obj?:AddUnknownDeviceRequest):AddUnknownDeviceRequest { - return (obj || new AddUnknownDeviceRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsAddUnknownDeviceRequest(bb:flatbuffers.ByteBuffer, obj?:AddUnknownDeviceRequest):AddUnknownDeviceRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new AddUnknownDeviceRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -macAddress():string|null -macAddress(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -macAddress(optionalEncoding?:any):string|Uint8Array|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; -} - -static startAddUnknownDeviceRequest(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addMacAddress(builder:flatbuffers.Builder, macAddressOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, macAddressOffset, 0); -} - -static endAddUnknownDeviceRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createAddUnknownDeviceRequest(builder:flatbuffers.Builder, macAddressOffset:flatbuffers.Offset):flatbuffers.Offset { - AddUnknownDeviceRequest.startAddUnknownDeviceRequest(builder); - AddUnknownDeviceRequest.addMacAddress(builder, macAddressOffset); - return AddUnknownDeviceRequest.endAddUnknownDeviceRequest(builder); -} - -unpack(): AddUnknownDeviceRequestT { - return new AddUnknownDeviceRequestT( - this.macAddress() - ); -} - - -unpackTo(_o: AddUnknownDeviceRequestT): void { - _o.macAddress = this.macAddress(); -} -} - -export class AddUnknownDeviceRequestT implements flatbuffers.IGeneratedObject { -constructor( - public macAddress: string|Uint8Array|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const macAddress = (this.macAddress !== null ? builder.createString(this.macAddress!) : 0); - - return AddUnknownDeviceRequest.createAddUnknownDeviceRequest(builder, - macAddress - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class AddUnknownDeviceRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):AddUnknownDeviceRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsAddUnknownDeviceRequest(bb:flatbuffers.ByteBuffer, obj?:AddUnknownDeviceRequest):AddUnknownDeviceRequest { + return (obj || new AddUnknownDeviceRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsAddUnknownDeviceRequest(bb:flatbuffers.ByteBuffer, obj?:AddUnknownDeviceRequest):AddUnknownDeviceRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new AddUnknownDeviceRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +macAddress():string|null +macAddress(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +macAddress(optionalEncoding?:any):string|Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; +} + +static startAddUnknownDeviceRequest(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addMacAddress(builder:flatbuffers.Builder, macAddressOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, macAddressOffset, 0); +} + +static endAddUnknownDeviceRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createAddUnknownDeviceRequest(builder:flatbuffers.Builder, macAddressOffset:flatbuffers.Offset):flatbuffers.Offset { + AddUnknownDeviceRequest.startAddUnknownDeviceRequest(builder); + AddUnknownDeviceRequest.addMacAddress(builder, macAddressOffset); + return AddUnknownDeviceRequest.endAddUnknownDeviceRequest(builder); +} + +unpack(): AddUnknownDeviceRequestT { + return new AddUnknownDeviceRequestT( + this.macAddress() + ); +} + + +unpackTo(_o: AddUnknownDeviceRequestT): void { + _o.macAddress = this.macAddress(); +} +} + +export class AddUnknownDeviceRequestT implements flatbuffers.IGeneratedObject { +constructor( + public macAddress: string|Uint8Array|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const macAddress = (this.macAddress !== null ? builder.createString(this.macAddress!) : 0); + + return AddUnknownDeviceRequest.createAddUnknownDeviceRequest(builder, + macAddress + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/arms-mounting-reset-mode.ts b/protocol/typescript/src/solarxr-protocol/rpc/arms-mounting-reset-mode.ts index a0ad1407..4c50bb01 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/arms-mounting-reset-mode.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/arms-mounting-reset-mode.ts @@ -1,23 +1,23 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -export enum ArmsMountingResetMode { - /** - * Upper arm going back and forearm going forward - */ - BACK = 0, - - /** - * Arms going forward - */ - FORWARD = 1, - - /** - * Arms going up to the sides into a tpose - */ - TPOSE_UP = 2, - - /** - * Arms going down to the sides from a tpose - */ - TPOSE_DOWN = 3 -} +// automatically generated by the FlatBuffers compiler, do not modify + +export enum ArmsMountingResetMode { + /** + * Upper arm going back and forearm going forward + */ + BACK = 0, + + /** + * Arms going forward + */ + FORWARD = 1, + + /** + * Arms going up to the sides into a tpose + */ + TPOSE_UP = 2, + + /** + * Arms going down to the sides from a tpose + */ + TPOSE_DOWN = 3 +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/assign-tracker-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/assign-tracker-request.ts index 692e050f..3af3cfa3 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/assign-tracker-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/assign-tracker-request.ts @@ -1,128 +1,128 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { BodyPart } from '../../solarxr-protocol/datatypes/body-part.js'; -import { TrackerId, TrackerIdT } from '../../solarxr-protocol/datatypes/tracker-id.js'; -import { Quat, QuatT } from '../../solarxr-protocol/datatypes/math/quat.js'; - - -export class AssignTrackerRequest implements flatbuffers.IUnpackableObject { - 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; -} - -mountingOrientation(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; -} - -allowDriftCompensation():boolean { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startAssignTrackerRequest(builder:flatbuffers.Builder) { - builder.startObject(5); -} - -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 addMountingOrientation(builder:flatbuffers.Builder, mountingOrientationOffset:flatbuffers.Offset) { - builder.addFieldStruct(2, mountingOrientationOffset, 0); -} - -static addDisplayName(builder:flatbuffers.Builder, displayNameOffset:flatbuffers.Offset) { - builder.addFieldOffset(3, displayNameOffset, 0); -} - -static addAllowDriftCompensation(builder:flatbuffers.Builder, allowDriftCompensation:boolean) { - builder.addFieldInt8(4, +allowDriftCompensation, +false); -} - -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.mountingOrientation() !== null ? this.mountingOrientation()!.unpack() : null), - this.displayName(), - this.allowDriftCompensation() - ); -} - - -unpackTo(_o: AssignTrackerRequestT): void { - _o.trackerId = (this.trackerId() !== null ? this.trackerId()!.unpack() : null); - _o.bodyPosition = this.bodyPosition(); - _o.mountingOrientation = (this.mountingOrientation() !== null ? this.mountingOrientation()!.unpack() : null); - _o.displayName = this.displayName(); - _o.allowDriftCompensation = this.allowDriftCompensation(); -} -} - -export class AssignTrackerRequestT implements flatbuffers.IGeneratedObject { -constructor( - public trackerId: TrackerIdT|null = null, - public bodyPosition: BodyPart = BodyPart.NONE, - public mountingOrientation: QuatT|null = null, - public displayName: string|Uint8Array|null = null, - public allowDriftCompensation: boolean = false -){} - - -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.addMountingOrientation(builder, (this.mountingOrientation !== null ? this.mountingOrientation!.pack(builder) : 0)); - AssignTrackerRequest.addDisplayName(builder, displayName); - AssignTrackerRequest.addAllowDriftCompensation(builder, this.allowDriftCompensation); - - 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.js'; +import { TrackerId, TrackerIdT } from '../../solarxr-protocol/datatypes/tracker-id.js'; +import { Quat, QuatT } from '../../solarxr-protocol/datatypes/math/quat.js'; + + +export class AssignTrackerRequest implements flatbuffers.IUnpackableObject { + 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; +} + +mountingOrientation(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; +} + +allowDriftCompensation():boolean { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startAssignTrackerRequest(builder:flatbuffers.Builder) { + builder.startObject(5); +} + +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 addMountingOrientation(builder:flatbuffers.Builder, mountingOrientationOffset:flatbuffers.Offset) { + builder.addFieldStruct(2, mountingOrientationOffset, 0); +} + +static addDisplayName(builder:flatbuffers.Builder, displayNameOffset:flatbuffers.Offset) { + builder.addFieldOffset(3, displayNameOffset, 0); +} + +static addAllowDriftCompensation(builder:flatbuffers.Builder, allowDriftCompensation:boolean) { + builder.addFieldInt8(4, +allowDriftCompensation, +false); +} + +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.mountingOrientation() !== null ? this.mountingOrientation()!.unpack() : null), + this.displayName(), + this.allowDriftCompensation() + ); +} + + +unpackTo(_o: AssignTrackerRequestT): void { + _o.trackerId = (this.trackerId() !== null ? this.trackerId()!.unpack() : null); + _o.bodyPosition = this.bodyPosition(); + _o.mountingOrientation = (this.mountingOrientation() !== null ? this.mountingOrientation()!.unpack() : null); + _o.displayName = this.displayName(); + _o.allowDriftCompensation = this.allowDriftCompensation(); +} +} + +export class AssignTrackerRequestT implements flatbuffers.IGeneratedObject { +constructor( + public trackerId: TrackerIdT|null = null, + public bodyPosition: BodyPart = BodyPart.NONE, + public mountingOrientation: QuatT|null = null, + public displayName: string|Uint8Array|null = null, + public allowDriftCompensation: boolean = false +){} + + +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.addMountingOrientation(builder, (this.mountingOrientation !== null ? this.mountingOrientation!.pack(builder) : 0)); + AssignTrackerRequest.addDisplayName(builder, displayName); + AssignTrackerRequest.addAllowDriftCompensation(builder, this.allowDriftCompensation); + + return AssignTrackerRequest.endAssignTrackerRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-apply-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-apply-request.ts index 7e428fef..1902fce0 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-apply-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-apply-request.ts @@ -1,57 +1,57 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * Applies the estimated proportions - */ -export class AutoBoneApplyRequest implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):AutoBoneApplyRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsAutoBoneApplyRequest(bb:flatbuffers.ByteBuffer, obj?:AutoBoneApplyRequest):AutoBoneApplyRequest { - return (obj || new AutoBoneApplyRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsAutoBoneApplyRequest(bb:flatbuffers.ByteBuffer, obj?:AutoBoneApplyRequest):AutoBoneApplyRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new AutoBoneApplyRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startAutoBoneApplyRequest(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endAutoBoneApplyRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createAutoBoneApplyRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - AutoBoneApplyRequest.startAutoBoneApplyRequest(builder); - return AutoBoneApplyRequest.endAutoBoneApplyRequest(builder); -} - -unpack(): AutoBoneApplyRequestT { - return new AutoBoneApplyRequestT(); -} - - -unpackTo(_o: AutoBoneApplyRequestT): void {} -} - -export class AutoBoneApplyRequestT implements flatbuffers.IGeneratedObject { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return AutoBoneApplyRequest.createAutoBoneApplyRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Applies the estimated proportions + */ +export class AutoBoneApplyRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):AutoBoneApplyRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsAutoBoneApplyRequest(bb:flatbuffers.ByteBuffer, obj?:AutoBoneApplyRequest):AutoBoneApplyRequest { + return (obj || new AutoBoneApplyRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsAutoBoneApplyRequest(bb:flatbuffers.ByteBuffer, obj?:AutoBoneApplyRequest):AutoBoneApplyRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new AutoBoneApplyRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startAutoBoneApplyRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endAutoBoneApplyRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createAutoBoneApplyRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + AutoBoneApplyRequest.startAutoBoneApplyRequest(builder); + return AutoBoneApplyRequest.endAutoBoneApplyRequest(builder); +} + +unpack(): AutoBoneApplyRequestT { + return new AutoBoneApplyRequestT(); +} + + +unpackTo(_o: AutoBoneApplyRequestT): void {} +} + +export class AutoBoneApplyRequestT implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return AutoBoneApplyRequest.createAutoBoneApplyRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-cancel-recording-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-cancel-recording-request.ts index 7b5cf258..f013912b 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-cancel-recording-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-cancel-recording-request.ts @@ -1,57 +1,57 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * Cancels the current recording, aborting the process and discarding the data - */ -export class AutoBoneCancelRecordingRequest implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):AutoBoneCancelRecordingRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsAutoBoneCancelRecordingRequest(bb:flatbuffers.ByteBuffer, obj?:AutoBoneCancelRecordingRequest):AutoBoneCancelRecordingRequest { - return (obj || new AutoBoneCancelRecordingRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsAutoBoneCancelRecordingRequest(bb:flatbuffers.ByteBuffer, obj?:AutoBoneCancelRecordingRequest):AutoBoneCancelRecordingRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new AutoBoneCancelRecordingRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startAutoBoneCancelRecordingRequest(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endAutoBoneCancelRecordingRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createAutoBoneCancelRecordingRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - AutoBoneCancelRecordingRequest.startAutoBoneCancelRecordingRequest(builder); - return AutoBoneCancelRecordingRequest.endAutoBoneCancelRecordingRequest(builder); -} - -unpack(): AutoBoneCancelRecordingRequestT { - return new AutoBoneCancelRecordingRequestT(); -} - - -unpackTo(_o: AutoBoneCancelRecordingRequestT): void {} -} - -export class AutoBoneCancelRecordingRequestT implements flatbuffers.IGeneratedObject { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return AutoBoneCancelRecordingRequest.createAutoBoneCancelRecordingRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Cancels the current recording, aborting the process and discarding the data + */ +export class AutoBoneCancelRecordingRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):AutoBoneCancelRecordingRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsAutoBoneCancelRecordingRequest(bb:flatbuffers.ByteBuffer, obj?:AutoBoneCancelRecordingRequest):AutoBoneCancelRecordingRequest { + return (obj || new AutoBoneCancelRecordingRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsAutoBoneCancelRecordingRequest(bb:flatbuffers.ByteBuffer, obj?:AutoBoneCancelRecordingRequest):AutoBoneCancelRecordingRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new AutoBoneCancelRecordingRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startAutoBoneCancelRecordingRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endAutoBoneCancelRecordingRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createAutoBoneCancelRecordingRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + AutoBoneCancelRecordingRequest.startAutoBoneCancelRecordingRequest(builder); + return AutoBoneCancelRecordingRequest.endAutoBoneCancelRecordingRequest(builder); +} + +unpack(): AutoBoneCancelRecordingRequestT { + return new AutoBoneCancelRecordingRequestT(); +} + + +unpackTo(_o: AutoBoneCancelRecordingRequestT): void {} +} + +export class AutoBoneCancelRecordingRequestT implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return AutoBoneCancelRecordingRequest.createAutoBoneCancelRecordingRequest(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 index 24e8ff43..3cb85564 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,140 +1,140 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { SkeletonPart, SkeletonPartT } from '../../solarxr-protocol/rpc/skeleton-part.js'; - - -export class AutoBoneEpochResponse implements flatbuffers.IUnpackableObject { - 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; -} - -/** - * The current error value. This can be any positive number, where lower is better. - */ -epochError():number { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; -} - -/** - * A list of the current estimated body proportions. - */ -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 implements flatbuffers.IGeneratedObject { -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.js'; + + +export class AutoBoneEpochResponse implements flatbuffers.IUnpackableObject { + 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; +} + +/** + * The current error value. This can be any positive number, where lower is better. + */ +epochError():number { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +/** + * A list of the current estimated body proportions. + */ +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 implements flatbuffers.IGeneratedObject { +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 index 85e87432..51d45897 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.js'; - - -export class AutoBoneProcessRequest implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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.js'; + + +export class AutoBoneProcessRequest implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 5b5b10b2..3a3a9d15 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,158 +1,158 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { AutoBoneProcessType } from '../../solarxr-protocol/rpc/auto-bone-process-type.js'; - - -export class AutoBoneProcessStatusResponse implements flatbuffers.IUnpackableObject { - 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; -} - -/** - * The current count. This value is -1 if there is nothing to report. - */ -current():number { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; -} - -/** - * The total count. This value is -1 if there is nothing to report. - */ -total():number { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; -} - -/** - * True if the operation has completed with any result, successful or not. - */ -completed():boolean { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -/** - * True if the completed operation was successful, only observe if `completed` is true. - */ -success():boolean { - const offset = this.bb!.__offset(this.bb_pos, 14); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -/** - * The time remaining in seconds. This value is -1 if there is nothing to report. - */ -eta():number { - const offset = this.bb!.__offset(this.bb_pos, 16); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; -} - -static startAutoBoneProcessStatusResponse(builder:flatbuffers.Builder) { - builder.startObject(7); -} - -static addProcessType(builder:flatbuffers.Builder, processType:AutoBoneProcessType) { - builder.addFieldInt8(0, processType, AutoBoneProcessType.NONE); -} - -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 addEta(builder:flatbuffers.Builder, eta:number) { - builder.addFieldFloat32(6, eta, 0.0); -} - -static endAutoBoneProcessStatusResponse(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createAutoBoneProcessStatusResponse(builder:flatbuffers.Builder, processType:AutoBoneProcessType, current:number, total:number, completed:boolean, success:boolean, eta:number):flatbuffers.Offset { - AutoBoneProcessStatusResponse.startAutoBoneProcessStatusResponse(builder); - AutoBoneProcessStatusResponse.addProcessType(builder, processType); - AutoBoneProcessStatusResponse.addCurrent(builder, current); - AutoBoneProcessStatusResponse.addTotal(builder, total); - AutoBoneProcessStatusResponse.addCompleted(builder, completed); - AutoBoneProcessStatusResponse.addSuccess(builder, success); - AutoBoneProcessStatusResponse.addEta(builder, eta); - return AutoBoneProcessStatusResponse.endAutoBoneProcessStatusResponse(builder); -} - -unpack(): AutoBoneProcessStatusResponseT { - return new AutoBoneProcessStatusResponseT( - this.processType(), - this.current(), - this.total(), - this.completed(), - this.success(), - this.eta() - ); -} - - -unpackTo(_o: AutoBoneProcessStatusResponseT): void { - _o.processType = this.processType(); - _o.current = this.current(); - _o.total = this.total(); - _o.completed = this.completed(); - _o.success = this.success(); - _o.eta = this.eta(); -} -} - -export class AutoBoneProcessStatusResponseT implements flatbuffers.IGeneratedObject { -constructor( - public processType: AutoBoneProcessType = AutoBoneProcessType.NONE, - public current: number = 0, - public total: number = 0, - public completed: boolean = false, - public success: boolean = false, - public eta: number = 0.0 -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return AutoBoneProcessStatusResponse.createAutoBoneProcessStatusResponse(builder, - this.processType, - this.current, - this.total, - this.completed, - this.success, - this.eta - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { AutoBoneProcessType } from '../../solarxr-protocol/rpc/auto-bone-process-type.js'; + + +export class AutoBoneProcessStatusResponse implements flatbuffers.IUnpackableObject { + 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; +} + +/** + * The current count. This value is -1 if there is nothing to report. + */ +current():number { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; +} + +/** + * The total count. This value is -1 if there is nothing to report. + */ +total():number { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; +} + +/** + * True if the operation has completed with any result, successful or not. + */ +completed():boolean { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +/** + * True if the completed operation was successful, only observe if `completed` is true. + */ +success():boolean { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +/** + * The time remaining in seconds. This value is -1 if there is nothing to report. + */ +eta():number { + const offset = this.bb!.__offset(this.bb_pos, 16); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +static startAutoBoneProcessStatusResponse(builder:flatbuffers.Builder) { + builder.startObject(7); +} + +static addProcessType(builder:flatbuffers.Builder, processType:AutoBoneProcessType) { + builder.addFieldInt8(0, processType, AutoBoneProcessType.NONE); +} + +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 addEta(builder:flatbuffers.Builder, eta:number) { + builder.addFieldFloat32(6, eta, 0.0); +} + +static endAutoBoneProcessStatusResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createAutoBoneProcessStatusResponse(builder:flatbuffers.Builder, processType:AutoBoneProcessType, current:number, total:number, completed:boolean, success:boolean, eta:number):flatbuffers.Offset { + AutoBoneProcessStatusResponse.startAutoBoneProcessStatusResponse(builder); + AutoBoneProcessStatusResponse.addProcessType(builder, processType); + AutoBoneProcessStatusResponse.addCurrent(builder, current); + AutoBoneProcessStatusResponse.addTotal(builder, total); + AutoBoneProcessStatusResponse.addCompleted(builder, completed); + AutoBoneProcessStatusResponse.addSuccess(builder, success); + AutoBoneProcessStatusResponse.addEta(builder, eta); + return AutoBoneProcessStatusResponse.endAutoBoneProcessStatusResponse(builder); +} + +unpack(): AutoBoneProcessStatusResponseT { + return new AutoBoneProcessStatusResponseT( + this.processType(), + this.current(), + this.total(), + this.completed(), + this.success(), + this.eta() + ); +} + + +unpackTo(_o: AutoBoneProcessStatusResponseT): void { + _o.processType = this.processType(); + _o.current = this.current(); + _o.total = this.total(); + _o.completed = this.completed(); + _o.success = this.success(); + _o.eta = this.eta(); +} +} + +export class AutoBoneProcessStatusResponseT implements flatbuffers.IGeneratedObject { +constructor( + public processType: AutoBoneProcessType = AutoBoneProcessType.NONE, + public current: number = 0, + public total: number = 0, + public completed: boolean = false, + public success: boolean = false, + public eta: number = 0.0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return AutoBoneProcessStatusResponse.createAutoBoneProcessStatusResponse(builder, + this.processType, + this.current, + this.total, + this.completed, + this.success, + this.eta + ); +} +} 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 index 8c87dbeb..092bfdf6 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,14 +1,14 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -export enum AutoBoneProcessType { - NONE = 0, - RECORD = 1, - SAVE = 2, - PROCESS = 3, - - /** - * @deprecated - * Use AutoBoneApplyRequest instead - */ - APPLY = 4 -} +// automatically generated by the FlatBuffers compiler, do not modify + +export enum AutoBoneProcessType { + NONE = 0, + RECORD = 1, + SAVE = 2, + PROCESS = 3, + + /** + * @deprecated + * Use AutoBoneApplyRequest instead + */ + APPLY = 4 +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-settings.ts b/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-settings.ts index 1c652c45..e791f070 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-settings.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-settings.ts @@ -1,421 +1,421 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * https://github.com/SlimeVR/SlimeVR-Server/blob/v0.8.3/server/src/main/java/dev/slimevr/config/AutoBoneConfig.kt - */ -export class AutoBoneSettings implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):AutoBoneSettings { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsAutoBoneSettings(bb:flatbuffers.ByteBuffer, obj?:AutoBoneSettings):AutoBoneSettings { - return (obj || new AutoBoneSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsAutoBoneSettings(bb:flatbuffers.ByteBuffer, obj?:AutoBoneSettings):AutoBoneSettings { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new AutoBoneSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -cursorIncrement():number|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readInt32(this.bb_pos + offset) : null; -} - -minDataDistance():number|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.readInt32(this.bb_pos + offset) : null; -} - -maxDataDistance():number|null { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.readInt32(this.bb_pos + offset) : null; -} - -numEpochs():number|null { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? this.bb!.readInt32(this.bb_pos + offset) : null; -} - -printEveryNumEpochs():number|null { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? this.bb!.readInt32(this.bb_pos + offset) : null; -} - -initialAdjustRate():number|null { - const offset = this.bb!.__offset(this.bb_pos, 14); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -adjustRateDecay():number|null { - const offset = this.bb!.__offset(this.bb_pos, 16); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -slideErrorFactor():number|null { - const offset = this.bb!.__offset(this.bb_pos, 18); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -offsetSlideErrorFactor():number|null { - const offset = this.bb!.__offset(this.bb_pos, 20); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -footHeightOffsetErrorFactor():number|null { - const offset = this.bb!.__offset(this.bb_pos, 22); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -bodyProportionErrorFactor():number|null { - const offset = this.bb!.__offset(this.bb_pos, 24); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -heightErrorFactor():number|null { - const offset = this.bb!.__offset(this.bb_pos, 26); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -positionErrorFactor():number|null { - const offset = this.bb!.__offset(this.bb_pos, 28); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -positionOffsetErrorFactor():number|null { - const offset = this.bb!.__offset(this.bb_pos, 30); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -calcInitError():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 32); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -targetHmdHeight():number|null { - const offset = this.bb!.__offset(this.bb_pos, 34); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -targetFullHeight():number|null { - const offset = this.bb!.__offset(this.bb_pos, 36); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -randomizeFrameOrder():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 38); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -scaleEachStep():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 40); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -sampleCount():number|null { - const offset = this.bb!.__offset(this.bb_pos, 42); - return offset ? this.bb!.readInt32(this.bb_pos + offset) : null; -} - -sampleRateMs():bigint|null { - const offset = this.bb!.__offset(this.bb_pos, 44); - return offset ? this.bb!.readInt64(this.bb_pos + offset) : null; -} - -saveRecordings():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 46); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -useSkeletonHeight():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 48); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -randSeed():bigint|null { - const offset = this.bb!.__offset(this.bb_pos, 50); - return offset ? this.bb!.readInt64(this.bb_pos + offset) : null; -} - -static startAutoBoneSettings(builder:flatbuffers.Builder) { - builder.startObject(24); -} - -static addCursorIncrement(builder:flatbuffers.Builder, cursorIncrement:number) { - builder.addFieldInt32(0, cursorIncrement, 0); -} - -static addMinDataDistance(builder:flatbuffers.Builder, minDataDistance:number) { - builder.addFieldInt32(1, minDataDistance, 0); -} - -static addMaxDataDistance(builder:flatbuffers.Builder, maxDataDistance:number) { - builder.addFieldInt32(2, maxDataDistance, 0); -} - -static addNumEpochs(builder:flatbuffers.Builder, numEpochs:number) { - builder.addFieldInt32(3, numEpochs, 0); -} - -static addPrintEveryNumEpochs(builder:flatbuffers.Builder, printEveryNumEpochs:number) { - builder.addFieldInt32(4, printEveryNumEpochs, 0); -} - -static addInitialAdjustRate(builder:flatbuffers.Builder, initialAdjustRate:number) { - builder.addFieldFloat32(5, initialAdjustRate, 0); -} - -static addAdjustRateDecay(builder:flatbuffers.Builder, adjustRateDecay:number) { - builder.addFieldFloat32(6, adjustRateDecay, 0); -} - -static addSlideErrorFactor(builder:flatbuffers.Builder, slideErrorFactor:number) { - builder.addFieldFloat32(7, slideErrorFactor, 0); -} - -static addOffsetSlideErrorFactor(builder:flatbuffers.Builder, offsetSlideErrorFactor:number) { - builder.addFieldFloat32(8, offsetSlideErrorFactor, 0); -} - -static addFootHeightOffsetErrorFactor(builder:flatbuffers.Builder, footHeightOffsetErrorFactor:number) { - builder.addFieldFloat32(9, footHeightOffsetErrorFactor, 0); -} - -static addBodyProportionErrorFactor(builder:flatbuffers.Builder, bodyProportionErrorFactor:number) { - builder.addFieldFloat32(10, bodyProportionErrorFactor, 0); -} - -static addHeightErrorFactor(builder:flatbuffers.Builder, heightErrorFactor:number) { - builder.addFieldFloat32(11, heightErrorFactor, 0); -} - -static addPositionErrorFactor(builder:flatbuffers.Builder, positionErrorFactor:number) { - builder.addFieldFloat32(12, positionErrorFactor, 0); -} - -static addPositionOffsetErrorFactor(builder:flatbuffers.Builder, positionOffsetErrorFactor:number) { - builder.addFieldFloat32(13, positionOffsetErrorFactor, 0); -} - -static addCalcInitError(builder:flatbuffers.Builder, calcInitError:boolean) { - builder.addFieldInt8(14, +calcInitError, 0); -} - -static addTargetHmdHeight(builder:flatbuffers.Builder, targetHmdHeight:number) { - builder.addFieldFloat32(15, targetHmdHeight, 0); -} - -static addTargetFullHeight(builder:flatbuffers.Builder, targetFullHeight:number) { - builder.addFieldFloat32(16, targetFullHeight, 0); -} - -static addRandomizeFrameOrder(builder:flatbuffers.Builder, randomizeFrameOrder:boolean) { - builder.addFieldInt8(17, +randomizeFrameOrder, 0); -} - -static addScaleEachStep(builder:flatbuffers.Builder, scaleEachStep:boolean) { - builder.addFieldInt8(18, +scaleEachStep, 0); -} - -static addSampleCount(builder:flatbuffers.Builder, sampleCount:number) { - builder.addFieldInt32(19, sampleCount, 0); -} - -static addSampleRateMs(builder:flatbuffers.Builder, sampleRateMs:bigint) { - builder.addFieldInt64(20, sampleRateMs, BigInt(0)); -} - -static addSaveRecordings(builder:flatbuffers.Builder, saveRecordings:boolean) { - builder.addFieldInt8(21, +saveRecordings, 0); -} - -static addUseSkeletonHeight(builder:flatbuffers.Builder, useSkeletonHeight:boolean) { - builder.addFieldInt8(22, +useSkeletonHeight, 0); -} - -static addRandSeed(builder:flatbuffers.Builder, randSeed:bigint) { - builder.addFieldInt64(23, randSeed, BigInt(0)); -} - -static endAutoBoneSettings(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createAutoBoneSettings(builder:flatbuffers.Builder, cursorIncrement:number|null, minDataDistance:number|null, maxDataDistance:number|null, numEpochs:number|null, printEveryNumEpochs:number|null, initialAdjustRate:number|null, adjustRateDecay:number|null, slideErrorFactor:number|null, offsetSlideErrorFactor:number|null, footHeightOffsetErrorFactor:number|null, bodyProportionErrorFactor:number|null, heightErrorFactor:number|null, positionErrorFactor:number|null, positionOffsetErrorFactor:number|null, calcInitError:boolean|null, targetHmdHeight:number|null, targetFullHeight:number|null, randomizeFrameOrder:boolean|null, scaleEachStep:boolean|null, sampleCount:number|null, sampleRateMs:bigint|null, saveRecordings:boolean|null, useSkeletonHeight:boolean|null, randSeed:bigint|null):flatbuffers.Offset { - AutoBoneSettings.startAutoBoneSettings(builder); - if (cursorIncrement !== null) - AutoBoneSettings.addCursorIncrement(builder, cursorIncrement); - if (minDataDistance !== null) - AutoBoneSettings.addMinDataDistance(builder, minDataDistance); - if (maxDataDistance !== null) - AutoBoneSettings.addMaxDataDistance(builder, maxDataDistance); - if (numEpochs !== null) - AutoBoneSettings.addNumEpochs(builder, numEpochs); - if (printEveryNumEpochs !== null) - AutoBoneSettings.addPrintEveryNumEpochs(builder, printEveryNumEpochs); - if (initialAdjustRate !== null) - AutoBoneSettings.addInitialAdjustRate(builder, initialAdjustRate); - if (adjustRateDecay !== null) - AutoBoneSettings.addAdjustRateDecay(builder, adjustRateDecay); - if (slideErrorFactor !== null) - AutoBoneSettings.addSlideErrorFactor(builder, slideErrorFactor); - if (offsetSlideErrorFactor !== null) - AutoBoneSettings.addOffsetSlideErrorFactor(builder, offsetSlideErrorFactor); - if (footHeightOffsetErrorFactor !== null) - AutoBoneSettings.addFootHeightOffsetErrorFactor(builder, footHeightOffsetErrorFactor); - if (bodyProportionErrorFactor !== null) - AutoBoneSettings.addBodyProportionErrorFactor(builder, bodyProportionErrorFactor); - if (heightErrorFactor !== null) - AutoBoneSettings.addHeightErrorFactor(builder, heightErrorFactor); - if (positionErrorFactor !== null) - AutoBoneSettings.addPositionErrorFactor(builder, positionErrorFactor); - if (positionOffsetErrorFactor !== null) - AutoBoneSettings.addPositionOffsetErrorFactor(builder, positionOffsetErrorFactor); - if (calcInitError !== null) - AutoBoneSettings.addCalcInitError(builder, calcInitError); - if (targetHmdHeight !== null) - AutoBoneSettings.addTargetHmdHeight(builder, targetHmdHeight); - if (targetFullHeight !== null) - AutoBoneSettings.addTargetFullHeight(builder, targetFullHeight); - if (randomizeFrameOrder !== null) - AutoBoneSettings.addRandomizeFrameOrder(builder, randomizeFrameOrder); - if (scaleEachStep !== null) - AutoBoneSettings.addScaleEachStep(builder, scaleEachStep); - if (sampleCount !== null) - AutoBoneSettings.addSampleCount(builder, sampleCount); - if (sampleRateMs !== null) - AutoBoneSettings.addSampleRateMs(builder, sampleRateMs); - if (saveRecordings !== null) - AutoBoneSettings.addSaveRecordings(builder, saveRecordings); - if (useSkeletonHeight !== null) - AutoBoneSettings.addUseSkeletonHeight(builder, useSkeletonHeight); - if (randSeed !== null) - AutoBoneSettings.addRandSeed(builder, randSeed); - return AutoBoneSettings.endAutoBoneSettings(builder); -} - -unpack(): AutoBoneSettingsT { - return new AutoBoneSettingsT( - this.cursorIncrement(), - this.minDataDistance(), - this.maxDataDistance(), - this.numEpochs(), - this.printEveryNumEpochs(), - this.initialAdjustRate(), - this.adjustRateDecay(), - this.slideErrorFactor(), - this.offsetSlideErrorFactor(), - this.footHeightOffsetErrorFactor(), - this.bodyProportionErrorFactor(), - this.heightErrorFactor(), - this.positionErrorFactor(), - this.positionOffsetErrorFactor(), - this.calcInitError(), - this.targetHmdHeight(), - this.targetFullHeight(), - this.randomizeFrameOrder(), - this.scaleEachStep(), - this.sampleCount(), - this.sampleRateMs(), - this.saveRecordings(), - this.useSkeletonHeight(), - this.randSeed() - ); -} - - -unpackTo(_o: AutoBoneSettingsT): void { - _o.cursorIncrement = this.cursorIncrement(); - _o.minDataDistance = this.minDataDistance(); - _o.maxDataDistance = this.maxDataDistance(); - _o.numEpochs = this.numEpochs(); - _o.printEveryNumEpochs = this.printEveryNumEpochs(); - _o.initialAdjustRate = this.initialAdjustRate(); - _o.adjustRateDecay = this.adjustRateDecay(); - _o.slideErrorFactor = this.slideErrorFactor(); - _o.offsetSlideErrorFactor = this.offsetSlideErrorFactor(); - _o.footHeightOffsetErrorFactor = this.footHeightOffsetErrorFactor(); - _o.bodyProportionErrorFactor = this.bodyProportionErrorFactor(); - _o.heightErrorFactor = this.heightErrorFactor(); - _o.positionErrorFactor = this.positionErrorFactor(); - _o.positionOffsetErrorFactor = this.positionOffsetErrorFactor(); - _o.calcInitError = this.calcInitError(); - _o.targetHmdHeight = this.targetHmdHeight(); - _o.targetFullHeight = this.targetFullHeight(); - _o.randomizeFrameOrder = this.randomizeFrameOrder(); - _o.scaleEachStep = this.scaleEachStep(); - _o.sampleCount = this.sampleCount(); - _o.sampleRateMs = this.sampleRateMs(); - _o.saveRecordings = this.saveRecordings(); - _o.useSkeletonHeight = this.useSkeletonHeight(); - _o.randSeed = this.randSeed(); -} -} - -export class AutoBoneSettingsT implements flatbuffers.IGeneratedObject { -constructor( - public cursorIncrement: number|null = null, - public minDataDistance: number|null = null, - public maxDataDistance: number|null = null, - public numEpochs: number|null = null, - public printEveryNumEpochs: number|null = null, - public initialAdjustRate: number|null = null, - public adjustRateDecay: number|null = null, - public slideErrorFactor: number|null = null, - public offsetSlideErrorFactor: number|null = null, - public footHeightOffsetErrorFactor: number|null = null, - public bodyProportionErrorFactor: number|null = null, - public heightErrorFactor: number|null = null, - public positionErrorFactor: number|null = null, - public positionOffsetErrorFactor: number|null = null, - public calcInitError: boolean|null = null, - public targetHmdHeight: number|null = null, - public targetFullHeight: number|null = null, - public randomizeFrameOrder: boolean|null = null, - public scaleEachStep: boolean|null = null, - public sampleCount: number|null = null, - public sampleRateMs: bigint|null = null, - public saveRecordings: boolean|null = null, - public useSkeletonHeight: boolean|null = null, - public randSeed: bigint|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return AutoBoneSettings.createAutoBoneSettings(builder, - this.cursorIncrement, - this.minDataDistance, - this.maxDataDistance, - this.numEpochs, - this.printEveryNumEpochs, - this.initialAdjustRate, - this.adjustRateDecay, - this.slideErrorFactor, - this.offsetSlideErrorFactor, - this.footHeightOffsetErrorFactor, - this.bodyProportionErrorFactor, - this.heightErrorFactor, - this.positionErrorFactor, - this.positionOffsetErrorFactor, - this.calcInitError, - this.targetHmdHeight, - this.targetFullHeight, - this.randomizeFrameOrder, - this.scaleEachStep, - this.sampleCount, - this.sampleRateMs, - this.saveRecordings, - this.useSkeletonHeight, - this.randSeed - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * https://github.com/SlimeVR/SlimeVR-Server/blob/v0.8.3/server/src/main/java/dev/slimevr/config/AutoBoneConfig.kt + */ +export class AutoBoneSettings implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):AutoBoneSettings { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsAutoBoneSettings(bb:flatbuffers.ByteBuffer, obj?:AutoBoneSettings):AutoBoneSettings { + return (obj || new AutoBoneSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsAutoBoneSettings(bb:flatbuffers.ByteBuffer, obj?:AutoBoneSettings):AutoBoneSettings { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new AutoBoneSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +cursorIncrement():number|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readInt32(this.bb_pos + offset) : null; +} + +minDataDistance():number|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.readInt32(this.bb_pos + offset) : null; +} + +maxDataDistance():number|null { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.readInt32(this.bb_pos + offset) : null; +} + +numEpochs():number|null { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? this.bb!.readInt32(this.bb_pos + offset) : null; +} + +printEveryNumEpochs():number|null { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? this.bb!.readInt32(this.bb_pos + offset) : null; +} + +initialAdjustRate():number|null { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +adjustRateDecay():number|null { + const offset = this.bb!.__offset(this.bb_pos, 16); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +slideErrorFactor():number|null { + const offset = this.bb!.__offset(this.bb_pos, 18); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +offsetSlideErrorFactor():number|null { + const offset = this.bb!.__offset(this.bb_pos, 20); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +footHeightOffsetErrorFactor():number|null { + const offset = this.bb!.__offset(this.bb_pos, 22); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +bodyProportionErrorFactor():number|null { + const offset = this.bb!.__offset(this.bb_pos, 24); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +heightErrorFactor():number|null { + const offset = this.bb!.__offset(this.bb_pos, 26); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +positionErrorFactor():number|null { + const offset = this.bb!.__offset(this.bb_pos, 28); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +positionOffsetErrorFactor():number|null { + const offset = this.bb!.__offset(this.bb_pos, 30); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +calcInitError():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 32); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +targetHmdHeight():number|null { + const offset = this.bb!.__offset(this.bb_pos, 34); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +targetFullHeight():number|null { + const offset = this.bb!.__offset(this.bb_pos, 36); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +randomizeFrameOrder():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 38); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +scaleEachStep():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 40); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +sampleCount():number|null { + const offset = this.bb!.__offset(this.bb_pos, 42); + return offset ? this.bb!.readInt32(this.bb_pos + offset) : null; +} + +sampleRateMs():bigint|null { + const offset = this.bb!.__offset(this.bb_pos, 44); + return offset ? this.bb!.readInt64(this.bb_pos + offset) : null; +} + +saveRecordings():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 46); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +useSkeletonHeight():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 48); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +randSeed():bigint|null { + const offset = this.bb!.__offset(this.bb_pos, 50); + return offset ? this.bb!.readInt64(this.bb_pos + offset) : null; +} + +static startAutoBoneSettings(builder:flatbuffers.Builder) { + builder.startObject(24); +} + +static addCursorIncrement(builder:flatbuffers.Builder, cursorIncrement:number) { + builder.addFieldInt32(0, cursorIncrement, 0); +} + +static addMinDataDistance(builder:flatbuffers.Builder, minDataDistance:number) { + builder.addFieldInt32(1, minDataDistance, 0); +} + +static addMaxDataDistance(builder:flatbuffers.Builder, maxDataDistance:number) { + builder.addFieldInt32(2, maxDataDistance, 0); +} + +static addNumEpochs(builder:flatbuffers.Builder, numEpochs:number) { + builder.addFieldInt32(3, numEpochs, 0); +} + +static addPrintEveryNumEpochs(builder:flatbuffers.Builder, printEveryNumEpochs:number) { + builder.addFieldInt32(4, printEveryNumEpochs, 0); +} + +static addInitialAdjustRate(builder:flatbuffers.Builder, initialAdjustRate:number) { + builder.addFieldFloat32(5, initialAdjustRate, 0); +} + +static addAdjustRateDecay(builder:flatbuffers.Builder, adjustRateDecay:number) { + builder.addFieldFloat32(6, adjustRateDecay, 0); +} + +static addSlideErrorFactor(builder:flatbuffers.Builder, slideErrorFactor:number) { + builder.addFieldFloat32(7, slideErrorFactor, 0); +} + +static addOffsetSlideErrorFactor(builder:flatbuffers.Builder, offsetSlideErrorFactor:number) { + builder.addFieldFloat32(8, offsetSlideErrorFactor, 0); +} + +static addFootHeightOffsetErrorFactor(builder:flatbuffers.Builder, footHeightOffsetErrorFactor:number) { + builder.addFieldFloat32(9, footHeightOffsetErrorFactor, 0); +} + +static addBodyProportionErrorFactor(builder:flatbuffers.Builder, bodyProportionErrorFactor:number) { + builder.addFieldFloat32(10, bodyProportionErrorFactor, 0); +} + +static addHeightErrorFactor(builder:flatbuffers.Builder, heightErrorFactor:number) { + builder.addFieldFloat32(11, heightErrorFactor, 0); +} + +static addPositionErrorFactor(builder:flatbuffers.Builder, positionErrorFactor:number) { + builder.addFieldFloat32(12, positionErrorFactor, 0); +} + +static addPositionOffsetErrorFactor(builder:flatbuffers.Builder, positionOffsetErrorFactor:number) { + builder.addFieldFloat32(13, positionOffsetErrorFactor, 0); +} + +static addCalcInitError(builder:flatbuffers.Builder, calcInitError:boolean) { + builder.addFieldInt8(14, +calcInitError, 0); +} + +static addTargetHmdHeight(builder:flatbuffers.Builder, targetHmdHeight:number) { + builder.addFieldFloat32(15, targetHmdHeight, 0); +} + +static addTargetFullHeight(builder:flatbuffers.Builder, targetFullHeight:number) { + builder.addFieldFloat32(16, targetFullHeight, 0); +} + +static addRandomizeFrameOrder(builder:flatbuffers.Builder, randomizeFrameOrder:boolean) { + builder.addFieldInt8(17, +randomizeFrameOrder, 0); +} + +static addScaleEachStep(builder:flatbuffers.Builder, scaleEachStep:boolean) { + builder.addFieldInt8(18, +scaleEachStep, 0); +} + +static addSampleCount(builder:flatbuffers.Builder, sampleCount:number) { + builder.addFieldInt32(19, sampleCount, 0); +} + +static addSampleRateMs(builder:flatbuffers.Builder, sampleRateMs:bigint) { + builder.addFieldInt64(20, sampleRateMs, BigInt(0)); +} + +static addSaveRecordings(builder:flatbuffers.Builder, saveRecordings:boolean) { + builder.addFieldInt8(21, +saveRecordings, 0); +} + +static addUseSkeletonHeight(builder:flatbuffers.Builder, useSkeletonHeight:boolean) { + builder.addFieldInt8(22, +useSkeletonHeight, 0); +} + +static addRandSeed(builder:flatbuffers.Builder, randSeed:bigint) { + builder.addFieldInt64(23, randSeed, BigInt(0)); +} + +static endAutoBoneSettings(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createAutoBoneSettings(builder:flatbuffers.Builder, cursorIncrement:number|null, minDataDistance:number|null, maxDataDistance:number|null, numEpochs:number|null, printEveryNumEpochs:number|null, initialAdjustRate:number|null, adjustRateDecay:number|null, slideErrorFactor:number|null, offsetSlideErrorFactor:number|null, footHeightOffsetErrorFactor:number|null, bodyProportionErrorFactor:number|null, heightErrorFactor:number|null, positionErrorFactor:number|null, positionOffsetErrorFactor:number|null, calcInitError:boolean|null, targetHmdHeight:number|null, targetFullHeight:number|null, randomizeFrameOrder:boolean|null, scaleEachStep:boolean|null, sampleCount:number|null, sampleRateMs:bigint|null, saveRecordings:boolean|null, useSkeletonHeight:boolean|null, randSeed:bigint|null):flatbuffers.Offset { + AutoBoneSettings.startAutoBoneSettings(builder); + if (cursorIncrement !== null) + AutoBoneSettings.addCursorIncrement(builder, cursorIncrement); + if (minDataDistance !== null) + AutoBoneSettings.addMinDataDistance(builder, minDataDistance); + if (maxDataDistance !== null) + AutoBoneSettings.addMaxDataDistance(builder, maxDataDistance); + if (numEpochs !== null) + AutoBoneSettings.addNumEpochs(builder, numEpochs); + if (printEveryNumEpochs !== null) + AutoBoneSettings.addPrintEveryNumEpochs(builder, printEveryNumEpochs); + if (initialAdjustRate !== null) + AutoBoneSettings.addInitialAdjustRate(builder, initialAdjustRate); + if (adjustRateDecay !== null) + AutoBoneSettings.addAdjustRateDecay(builder, adjustRateDecay); + if (slideErrorFactor !== null) + AutoBoneSettings.addSlideErrorFactor(builder, slideErrorFactor); + if (offsetSlideErrorFactor !== null) + AutoBoneSettings.addOffsetSlideErrorFactor(builder, offsetSlideErrorFactor); + if (footHeightOffsetErrorFactor !== null) + AutoBoneSettings.addFootHeightOffsetErrorFactor(builder, footHeightOffsetErrorFactor); + if (bodyProportionErrorFactor !== null) + AutoBoneSettings.addBodyProportionErrorFactor(builder, bodyProportionErrorFactor); + if (heightErrorFactor !== null) + AutoBoneSettings.addHeightErrorFactor(builder, heightErrorFactor); + if (positionErrorFactor !== null) + AutoBoneSettings.addPositionErrorFactor(builder, positionErrorFactor); + if (positionOffsetErrorFactor !== null) + AutoBoneSettings.addPositionOffsetErrorFactor(builder, positionOffsetErrorFactor); + if (calcInitError !== null) + AutoBoneSettings.addCalcInitError(builder, calcInitError); + if (targetHmdHeight !== null) + AutoBoneSettings.addTargetHmdHeight(builder, targetHmdHeight); + if (targetFullHeight !== null) + AutoBoneSettings.addTargetFullHeight(builder, targetFullHeight); + if (randomizeFrameOrder !== null) + AutoBoneSettings.addRandomizeFrameOrder(builder, randomizeFrameOrder); + if (scaleEachStep !== null) + AutoBoneSettings.addScaleEachStep(builder, scaleEachStep); + if (sampleCount !== null) + AutoBoneSettings.addSampleCount(builder, sampleCount); + if (sampleRateMs !== null) + AutoBoneSettings.addSampleRateMs(builder, sampleRateMs); + if (saveRecordings !== null) + AutoBoneSettings.addSaveRecordings(builder, saveRecordings); + if (useSkeletonHeight !== null) + AutoBoneSettings.addUseSkeletonHeight(builder, useSkeletonHeight); + if (randSeed !== null) + AutoBoneSettings.addRandSeed(builder, randSeed); + return AutoBoneSettings.endAutoBoneSettings(builder); +} + +unpack(): AutoBoneSettingsT { + return new AutoBoneSettingsT( + this.cursorIncrement(), + this.minDataDistance(), + this.maxDataDistance(), + this.numEpochs(), + this.printEveryNumEpochs(), + this.initialAdjustRate(), + this.adjustRateDecay(), + this.slideErrorFactor(), + this.offsetSlideErrorFactor(), + this.footHeightOffsetErrorFactor(), + this.bodyProportionErrorFactor(), + this.heightErrorFactor(), + this.positionErrorFactor(), + this.positionOffsetErrorFactor(), + this.calcInitError(), + this.targetHmdHeight(), + this.targetFullHeight(), + this.randomizeFrameOrder(), + this.scaleEachStep(), + this.sampleCount(), + this.sampleRateMs(), + this.saveRecordings(), + this.useSkeletonHeight(), + this.randSeed() + ); +} + + +unpackTo(_o: AutoBoneSettingsT): void { + _o.cursorIncrement = this.cursorIncrement(); + _o.minDataDistance = this.minDataDistance(); + _o.maxDataDistance = this.maxDataDistance(); + _o.numEpochs = this.numEpochs(); + _o.printEveryNumEpochs = this.printEveryNumEpochs(); + _o.initialAdjustRate = this.initialAdjustRate(); + _o.adjustRateDecay = this.adjustRateDecay(); + _o.slideErrorFactor = this.slideErrorFactor(); + _o.offsetSlideErrorFactor = this.offsetSlideErrorFactor(); + _o.footHeightOffsetErrorFactor = this.footHeightOffsetErrorFactor(); + _o.bodyProportionErrorFactor = this.bodyProportionErrorFactor(); + _o.heightErrorFactor = this.heightErrorFactor(); + _o.positionErrorFactor = this.positionErrorFactor(); + _o.positionOffsetErrorFactor = this.positionOffsetErrorFactor(); + _o.calcInitError = this.calcInitError(); + _o.targetHmdHeight = this.targetHmdHeight(); + _o.targetFullHeight = this.targetFullHeight(); + _o.randomizeFrameOrder = this.randomizeFrameOrder(); + _o.scaleEachStep = this.scaleEachStep(); + _o.sampleCount = this.sampleCount(); + _o.sampleRateMs = this.sampleRateMs(); + _o.saveRecordings = this.saveRecordings(); + _o.useSkeletonHeight = this.useSkeletonHeight(); + _o.randSeed = this.randSeed(); +} +} + +export class AutoBoneSettingsT implements flatbuffers.IGeneratedObject { +constructor( + public cursorIncrement: number|null = null, + public minDataDistance: number|null = null, + public maxDataDistance: number|null = null, + public numEpochs: number|null = null, + public printEveryNumEpochs: number|null = null, + public initialAdjustRate: number|null = null, + public adjustRateDecay: number|null = null, + public slideErrorFactor: number|null = null, + public offsetSlideErrorFactor: number|null = null, + public footHeightOffsetErrorFactor: number|null = null, + public bodyProportionErrorFactor: number|null = null, + public heightErrorFactor: number|null = null, + public positionErrorFactor: number|null = null, + public positionOffsetErrorFactor: number|null = null, + public calcInitError: boolean|null = null, + public targetHmdHeight: number|null = null, + public targetFullHeight: number|null = null, + public randomizeFrameOrder: boolean|null = null, + public scaleEachStep: boolean|null = null, + public sampleCount: number|null = null, + public sampleRateMs: bigint|null = null, + public saveRecordings: boolean|null = null, + public useSkeletonHeight: boolean|null = null, + public randSeed: bigint|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return AutoBoneSettings.createAutoBoneSettings(builder, + this.cursorIncrement, + this.minDataDistance, + this.maxDataDistance, + this.numEpochs, + this.printEveryNumEpochs, + this.initialAdjustRate, + this.adjustRateDecay, + this.slideErrorFactor, + this.offsetSlideErrorFactor, + this.footHeightOffsetErrorFactor, + this.bodyProportionErrorFactor, + this.heightErrorFactor, + this.positionErrorFactor, + this.positionOffsetErrorFactor, + this.calcInitError, + this.targetHmdHeight, + this.targetFullHeight, + this.randomizeFrameOrder, + this.scaleEachStep, + this.sampleCount, + this.sampleRateMs, + this.saveRecordings, + this.useSkeletonHeight, + this.randSeed + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-stop-recording-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-stop-recording-request.ts index 86105b52..7e45f3ba 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-stop-recording-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-stop-recording-request.ts @@ -1,57 +1,57 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * Stops the current recording, using it as far as it has been recorded - */ -export class AutoBoneStopRecordingRequest implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):AutoBoneStopRecordingRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsAutoBoneStopRecordingRequest(bb:flatbuffers.ByteBuffer, obj?:AutoBoneStopRecordingRequest):AutoBoneStopRecordingRequest { - return (obj || new AutoBoneStopRecordingRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsAutoBoneStopRecordingRequest(bb:flatbuffers.ByteBuffer, obj?:AutoBoneStopRecordingRequest):AutoBoneStopRecordingRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new AutoBoneStopRecordingRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startAutoBoneStopRecordingRequest(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endAutoBoneStopRecordingRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createAutoBoneStopRecordingRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - AutoBoneStopRecordingRequest.startAutoBoneStopRecordingRequest(builder); - return AutoBoneStopRecordingRequest.endAutoBoneStopRecordingRequest(builder); -} - -unpack(): AutoBoneStopRecordingRequestT { - return new AutoBoneStopRecordingRequestT(); -} - - -unpackTo(_o: AutoBoneStopRecordingRequestT): void {} -} - -export class AutoBoneStopRecordingRequestT implements flatbuffers.IGeneratedObject { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return AutoBoneStopRecordingRequest.createAutoBoneStopRecordingRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Stops the current recording, using it as far as it has been recorded + */ +export class AutoBoneStopRecordingRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):AutoBoneStopRecordingRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsAutoBoneStopRecordingRequest(bb:flatbuffers.ByteBuffer, obj?:AutoBoneStopRecordingRequest):AutoBoneStopRecordingRequest { + return (obj || new AutoBoneStopRecordingRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsAutoBoneStopRecordingRequest(bb:flatbuffers.ByteBuffer, obj?:AutoBoneStopRecordingRequest):AutoBoneStopRecordingRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new AutoBoneStopRecordingRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startAutoBoneStopRecordingRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endAutoBoneStopRecordingRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createAutoBoneStopRecordingRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + AutoBoneStopRecordingRequest.startAutoBoneStopRecordingRequest(builder); + return AutoBoneStopRecordingRequest.endAutoBoneStopRecordingRequest(builder); +} + +unpack(): AutoBoneStopRecordingRequestT { + return new AutoBoneStopRecordingRequestT(); +} + + +unpackTo(_o: AutoBoneStopRecordingRequestT): void {} +} + +export class AutoBoneStopRecordingRequestT implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return AutoBoneStopRecordingRequest.createAutoBoneStopRecordingRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts index aff5e52b..24ec57d4 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts @@ -1,206 +1,206 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { AutoBoneSettings, AutoBoneSettingsT } from '../../solarxr-protocol/rpc/auto-bone-settings.js'; -import { DriftCompensationSettings, DriftCompensationSettingsT } from '../../solarxr-protocol/rpc/drift-compensation-settings.js'; -import { FilteringSettings, FilteringSettingsT } from '../../solarxr-protocol/rpc/filtering-settings.js'; -import { OSCRouterSettings, OSCRouterSettingsT } from '../../solarxr-protocol/rpc/oscrouter-settings.js'; -import { ResetsSettings, ResetsSettingsT } from '../../solarxr-protocol/rpc/resets-settings.js'; -import { SteamVRTrackersSetting, SteamVRTrackersSettingT } from '../../solarxr-protocol/rpc/steam-vrtrackers-setting.js'; -import { TapDetectionSettings, TapDetectionSettingsT } from '../../solarxr-protocol/rpc/tap-detection-settings.js'; -import { VMCOSCSettings, VMCOSCSettingsT } from '../../solarxr-protocol/rpc/vmcoscsettings.js'; -import { VRCOSCSettings, VRCOSCSettingsT } from '../../solarxr-protocol/rpc/vrcoscsettings.js'; -import { ModelSettings, ModelSettingsT } from '../../solarxr-protocol/rpc/settings/model-settings.js'; - - -export class ChangeSettingsRequest implements flatbuffers.IUnpackableObject { - 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; -} - -driftCompensation(obj?:DriftCompensationSettings):DriftCompensationSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? (obj || new DriftCompensationSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -oscRouter(obj?:OSCRouterSettings):OSCRouterSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? (obj || new OSCRouterSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -vrcOsc(obj?:VRCOSCSettings):VRCOSCSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? (obj || new VRCOSCSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -vmcOsc(obj?:VMCOSCSettings):VMCOSCSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 14); - return offset ? (obj || new VMCOSCSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -modelSettings(obj?:ModelSettings):ModelSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 16); - return offset ? (obj || new ModelSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -tapDetectionSettings(obj?:TapDetectionSettings):TapDetectionSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 18); - return offset ? (obj || new TapDetectionSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -autoBoneSettings(obj?:AutoBoneSettings):AutoBoneSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 20); - return offset ? (obj || new AutoBoneSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -resetsSettings(obj?:ResetsSettings):ResetsSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 22); - return offset ? (obj || new ResetsSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -static startChangeSettingsRequest(builder:flatbuffers.Builder) { - builder.startObject(10); -} - -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 addDriftCompensation(builder:flatbuffers.Builder, driftCompensationOffset:flatbuffers.Offset) { - builder.addFieldOffset(2, driftCompensationOffset, 0); -} - -static addOscRouter(builder:flatbuffers.Builder, oscRouterOffset:flatbuffers.Offset) { - builder.addFieldOffset(3, oscRouterOffset, 0); -} - -static addVrcOsc(builder:flatbuffers.Builder, vrcOscOffset:flatbuffers.Offset) { - builder.addFieldOffset(4, vrcOscOffset, 0); -} - -static addVmcOsc(builder:flatbuffers.Builder, vmcOscOffset:flatbuffers.Offset) { - builder.addFieldOffset(5, vmcOscOffset, 0); -} - -static addModelSettings(builder:flatbuffers.Builder, modelSettingsOffset:flatbuffers.Offset) { - builder.addFieldOffset(6, modelSettingsOffset, 0); -} - -static addTapDetectionSettings(builder:flatbuffers.Builder, tapDetectionSettingsOffset:flatbuffers.Offset) { - builder.addFieldOffset(7, tapDetectionSettingsOffset, 0); -} - -static addAutoBoneSettings(builder:flatbuffers.Builder, autoBoneSettingsOffset:flatbuffers.Offset) { - builder.addFieldOffset(8, autoBoneSettingsOffset, 0); -} - -static addResetsSettings(builder:flatbuffers.Builder, resetsSettingsOffset:flatbuffers.Offset) { - builder.addFieldOffset(9, resetsSettingsOffset, 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.driftCompensation() !== null ? this.driftCompensation()!.unpack() : null), - (this.oscRouter() !== null ? this.oscRouter()!.unpack() : null), - (this.vrcOsc() !== null ? this.vrcOsc()!.unpack() : null), - (this.vmcOsc() !== null ? this.vmcOsc()!.unpack() : null), - (this.modelSettings() !== null ? this.modelSettings()!.unpack() : null), - (this.tapDetectionSettings() !== null ? this.tapDetectionSettings()!.unpack() : null), - (this.autoBoneSettings() !== null ? this.autoBoneSettings()!.unpack() : null), - (this.resetsSettings() !== null ? this.resetsSettings()!.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.driftCompensation = (this.driftCompensation() !== null ? this.driftCompensation()!.unpack() : null); - _o.oscRouter = (this.oscRouter() !== null ? this.oscRouter()!.unpack() : null); - _o.vrcOsc = (this.vrcOsc() !== null ? this.vrcOsc()!.unpack() : null); - _o.vmcOsc = (this.vmcOsc() !== null ? this.vmcOsc()!.unpack() : null); - _o.modelSettings = (this.modelSettings() !== null ? this.modelSettings()!.unpack() : null); - _o.tapDetectionSettings = (this.tapDetectionSettings() !== null ? this.tapDetectionSettings()!.unpack() : null); - _o.autoBoneSettings = (this.autoBoneSettings() !== null ? this.autoBoneSettings()!.unpack() : null); - _o.resetsSettings = (this.resetsSettings() !== null ? this.resetsSettings()!.unpack() : null); -} -} - -export class ChangeSettingsRequestT implements flatbuffers.IGeneratedObject { -constructor( - public steamVrTrackers: SteamVRTrackersSettingT|null = null, - public filtering: FilteringSettingsT|null = null, - public driftCompensation: DriftCompensationSettingsT|null = null, - public oscRouter: OSCRouterSettingsT|null = null, - public vrcOsc: VRCOSCSettingsT|null = null, - public vmcOsc: VMCOSCSettingsT|null = null, - public modelSettings: ModelSettingsT|null = null, - public tapDetectionSettings: TapDetectionSettingsT|null = null, - public autoBoneSettings: AutoBoneSettingsT|null = null, - public resetsSettings: ResetsSettingsT|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 driftCompensation = (this.driftCompensation !== null ? this.driftCompensation!.pack(builder) : 0); - const oscRouter = (this.oscRouter !== null ? this.oscRouter!.pack(builder) : 0); - const vrcOsc = (this.vrcOsc !== null ? this.vrcOsc!.pack(builder) : 0); - const vmcOsc = (this.vmcOsc !== null ? this.vmcOsc!.pack(builder) : 0); - const modelSettings = (this.modelSettings !== null ? this.modelSettings!.pack(builder) : 0); - const tapDetectionSettings = (this.tapDetectionSettings !== null ? this.tapDetectionSettings!.pack(builder) : 0); - const autoBoneSettings = (this.autoBoneSettings !== null ? this.autoBoneSettings!.pack(builder) : 0); - const resetsSettings = (this.resetsSettings !== null ? this.resetsSettings!.pack(builder) : 0); - - ChangeSettingsRequest.startChangeSettingsRequest(builder); - ChangeSettingsRequest.addSteamVrTrackers(builder, steamVrTrackers); - ChangeSettingsRequest.addFiltering(builder, filtering); - ChangeSettingsRequest.addDriftCompensation(builder, driftCompensation); - ChangeSettingsRequest.addOscRouter(builder, oscRouter); - ChangeSettingsRequest.addVrcOsc(builder, vrcOsc); - ChangeSettingsRequest.addVmcOsc(builder, vmcOsc); - ChangeSettingsRequest.addModelSettings(builder, modelSettings); - ChangeSettingsRequest.addTapDetectionSettings(builder, tapDetectionSettings); - ChangeSettingsRequest.addAutoBoneSettings(builder, autoBoneSettings); - ChangeSettingsRequest.addResetsSettings(builder, resetsSettings); - - return ChangeSettingsRequest.endChangeSettingsRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { AutoBoneSettings, AutoBoneSettingsT } from '../../solarxr-protocol/rpc/auto-bone-settings.js'; +import { DriftCompensationSettings, DriftCompensationSettingsT } from '../../solarxr-protocol/rpc/drift-compensation-settings.js'; +import { FilteringSettings, FilteringSettingsT } from '../../solarxr-protocol/rpc/filtering-settings.js'; +import { OSCRouterSettings, OSCRouterSettingsT } from '../../solarxr-protocol/rpc/oscrouter-settings.js'; +import { ResetsSettings, ResetsSettingsT } from '../../solarxr-protocol/rpc/resets-settings.js'; +import { SteamVRTrackersSetting, SteamVRTrackersSettingT } from '../../solarxr-protocol/rpc/steam-vrtrackers-setting.js'; +import { TapDetectionSettings, TapDetectionSettingsT } from '../../solarxr-protocol/rpc/tap-detection-settings.js'; +import { VMCOSCSettings, VMCOSCSettingsT } from '../../solarxr-protocol/rpc/vmcoscsettings.js'; +import { VRCOSCSettings, VRCOSCSettingsT } from '../../solarxr-protocol/rpc/vrcoscsettings.js'; +import { ModelSettings, ModelSettingsT } from '../../solarxr-protocol/rpc/settings/model-settings.js'; + + +export class ChangeSettingsRequest implements flatbuffers.IUnpackableObject { + 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; +} + +driftCompensation(obj?:DriftCompensationSettings):DriftCompensationSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? (obj || new DriftCompensationSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +oscRouter(obj?:OSCRouterSettings):OSCRouterSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? (obj || new OSCRouterSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +vrcOsc(obj?:VRCOSCSettings):VRCOSCSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? (obj || new VRCOSCSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +vmcOsc(obj?:VMCOSCSettings):VMCOSCSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? (obj || new VMCOSCSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +modelSettings(obj?:ModelSettings):ModelSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 16); + return offset ? (obj || new ModelSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +tapDetectionSettings(obj?:TapDetectionSettings):TapDetectionSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 18); + return offset ? (obj || new TapDetectionSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +autoBoneSettings(obj?:AutoBoneSettings):AutoBoneSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 20); + return offset ? (obj || new AutoBoneSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +resetsSettings(obj?:ResetsSettings):ResetsSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 22); + return offset ? (obj || new ResetsSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +static startChangeSettingsRequest(builder:flatbuffers.Builder) { + builder.startObject(10); +} + +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 addDriftCompensation(builder:flatbuffers.Builder, driftCompensationOffset:flatbuffers.Offset) { + builder.addFieldOffset(2, driftCompensationOffset, 0); +} + +static addOscRouter(builder:flatbuffers.Builder, oscRouterOffset:flatbuffers.Offset) { + builder.addFieldOffset(3, oscRouterOffset, 0); +} + +static addVrcOsc(builder:flatbuffers.Builder, vrcOscOffset:flatbuffers.Offset) { + builder.addFieldOffset(4, vrcOscOffset, 0); +} + +static addVmcOsc(builder:flatbuffers.Builder, vmcOscOffset:flatbuffers.Offset) { + builder.addFieldOffset(5, vmcOscOffset, 0); +} + +static addModelSettings(builder:flatbuffers.Builder, modelSettingsOffset:flatbuffers.Offset) { + builder.addFieldOffset(6, modelSettingsOffset, 0); +} + +static addTapDetectionSettings(builder:flatbuffers.Builder, tapDetectionSettingsOffset:flatbuffers.Offset) { + builder.addFieldOffset(7, tapDetectionSettingsOffset, 0); +} + +static addAutoBoneSettings(builder:flatbuffers.Builder, autoBoneSettingsOffset:flatbuffers.Offset) { + builder.addFieldOffset(8, autoBoneSettingsOffset, 0); +} + +static addResetsSettings(builder:flatbuffers.Builder, resetsSettingsOffset:flatbuffers.Offset) { + builder.addFieldOffset(9, resetsSettingsOffset, 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.driftCompensation() !== null ? this.driftCompensation()!.unpack() : null), + (this.oscRouter() !== null ? this.oscRouter()!.unpack() : null), + (this.vrcOsc() !== null ? this.vrcOsc()!.unpack() : null), + (this.vmcOsc() !== null ? this.vmcOsc()!.unpack() : null), + (this.modelSettings() !== null ? this.modelSettings()!.unpack() : null), + (this.tapDetectionSettings() !== null ? this.tapDetectionSettings()!.unpack() : null), + (this.autoBoneSettings() !== null ? this.autoBoneSettings()!.unpack() : null), + (this.resetsSettings() !== null ? this.resetsSettings()!.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.driftCompensation = (this.driftCompensation() !== null ? this.driftCompensation()!.unpack() : null); + _o.oscRouter = (this.oscRouter() !== null ? this.oscRouter()!.unpack() : null); + _o.vrcOsc = (this.vrcOsc() !== null ? this.vrcOsc()!.unpack() : null); + _o.vmcOsc = (this.vmcOsc() !== null ? this.vmcOsc()!.unpack() : null); + _o.modelSettings = (this.modelSettings() !== null ? this.modelSettings()!.unpack() : null); + _o.tapDetectionSettings = (this.tapDetectionSettings() !== null ? this.tapDetectionSettings()!.unpack() : null); + _o.autoBoneSettings = (this.autoBoneSettings() !== null ? this.autoBoneSettings()!.unpack() : null); + _o.resetsSettings = (this.resetsSettings() !== null ? this.resetsSettings()!.unpack() : null); +} +} + +export class ChangeSettingsRequestT implements flatbuffers.IGeneratedObject { +constructor( + public steamVrTrackers: SteamVRTrackersSettingT|null = null, + public filtering: FilteringSettingsT|null = null, + public driftCompensation: DriftCompensationSettingsT|null = null, + public oscRouter: OSCRouterSettingsT|null = null, + public vrcOsc: VRCOSCSettingsT|null = null, + public vmcOsc: VMCOSCSettingsT|null = null, + public modelSettings: ModelSettingsT|null = null, + public tapDetectionSettings: TapDetectionSettingsT|null = null, + public autoBoneSettings: AutoBoneSettingsT|null = null, + public resetsSettings: ResetsSettingsT|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 driftCompensation = (this.driftCompensation !== null ? this.driftCompensation!.pack(builder) : 0); + const oscRouter = (this.oscRouter !== null ? this.oscRouter!.pack(builder) : 0); + const vrcOsc = (this.vrcOsc !== null ? this.vrcOsc!.pack(builder) : 0); + const vmcOsc = (this.vmcOsc !== null ? this.vmcOsc!.pack(builder) : 0); + const modelSettings = (this.modelSettings !== null ? this.modelSettings!.pack(builder) : 0); + const tapDetectionSettings = (this.tapDetectionSettings !== null ? this.tapDetectionSettings!.pack(builder) : 0); + const autoBoneSettings = (this.autoBoneSettings !== null ? this.autoBoneSettings!.pack(builder) : 0); + const resetsSettings = (this.resetsSettings !== null ? this.resetsSettings!.pack(builder) : 0); + + ChangeSettingsRequest.startChangeSettingsRequest(builder); + ChangeSettingsRequest.addSteamVrTrackers(builder, steamVrTrackers); + ChangeSettingsRequest.addFiltering(builder, filtering); + ChangeSettingsRequest.addDriftCompensation(builder, driftCompensation); + ChangeSettingsRequest.addOscRouter(builder, oscRouter); + ChangeSettingsRequest.addVrcOsc(builder, vrcOsc); + ChangeSettingsRequest.addVmcOsc(builder, vmcOsc); + ChangeSettingsRequest.addModelSettings(builder, modelSettings); + ChangeSettingsRequest.addTapDetectionSettings(builder, tapDetectionSettings); + ChangeSettingsRequest.addAutoBoneSettings(builder, autoBoneSettings); + ChangeSettingsRequest.addResetsSettings(builder, resetsSettings); + + 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 index d46a8d5b..2fb28c37 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.js'; - - -export class ChangeSkeletonConfigRequest implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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.js'; + + +export class ChangeSkeletonConfigRequest implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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/clear-drift-compensation-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/clear-drift-compensation-request.ts index dd4f7a1c..06511c35 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/clear-drift-compensation-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/clear-drift-compensation-request.ts @@ -1,54 +1,54 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class ClearDriftCompensationRequest implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):ClearDriftCompensationRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsClearDriftCompensationRequest(bb:flatbuffers.ByteBuffer, obj?:ClearDriftCompensationRequest):ClearDriftCompensationRequest { - return (obj || new ClearDriftCompensationRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsClearDriftCompensationRequest(bb:flatbuffers.ByteBuffer, obj?:ClearDriftCompensationRequest):ClearDriftCompensationRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new ClearDriftCompensationRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startClearDriftCompensationRequest(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endClearDriftCompensationRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createClearDriftCompensationRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - ClearDriftCompensationRequest.startClearDriftCompensationRequest(builder); - return ClearDriftCompensationRequest.endClearDriftCompensationRequest(builder); -} - -unpack(): ClearDriftCompensationRequestT { - return new ClearDriftCompensationRequestT(); -} - - -unpackTo(_o: ClearDriftCompensationRequestT): void {} -} - -export class ClearDriftCompensationRequestT implements flatbuffers.IGeneratedObject { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return ClearDriftCompensationRequest.createClearDriftCompensationRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class ClearDriftCompensationRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):ClearDriftCompensationRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsClearDriftCompensationRequest(bb:flatbuffers.ByteBuffer, obj?:ClearDriftCompensationRequest):ClearDriftCompensationRequest { + return (obj || new ClearDriftCompensationRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsClearDriftCompensationRequest(bb:flatbuffers.ByteBuffer, obj?:ClearDriftCompensationRequest):ClearDriftCompensationRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new ClearDriftCompensationRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startClearDriftCompensationRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endClearDriftCompensationRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createClearDriftCompensationRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + ClearDriftCompensationRequest.startClearDriftCompensationRequest(builder); + return ClearDriftCompensationRequest.endClearDriftCompensationRequest(builder); +} + +unpack(): ClearDriftCompensationRequestT { + return new ClearDriftCompensationRequestT(); +} + + +unpackTo(_o: ClearDriftCompensationRequestT): void {} +} + +export class ClearDriftCompensationRequestT implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return ClearDriftCompensationRequest.createClearDriftCompensationRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/clear-mounting-reset-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/clear-mounting-reset-request.ts index a05f3c91..1dd9d1ae 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/clear-mounting-reset-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/clear-mounting-reset-request.ts @@ -1,57 +1,57 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * Clears mounting reset data, defaulting to the manually set mounting orientations - */ -export class ClearMountingResetRequest implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):ClearMountingResetRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsClearMountingResetRequest(bb:flatbuffers.ByteBuffer, obj?:ClearMountingResetRequest):ClearMountingResetRequest { - return (obj || new ClearMountingResetRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsClearMountingResetRequest(bb:flatbuffers.ByteBuffer, obj?:ClearMountingResetRequest):ClearMountingResetRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new ClearMountingResetRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startClearMountingResetRequest(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endClearMountingResetRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createClearMountingResetRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - ClearMountingResetRequest.startClearMountingResetRequest(builder); - return ClearMountingResetRequest.endClearMountingResetRequest(builder); -} - -unpack(): ClearMountingResetRequestT { - return new ClearMountingResetRequestT(); -} - - -unpackTo(_o: ClearMountingResetRequestT): void {} -} - -export class ClearMountingResetRequestT implements flatbuffers.IGeneratedObject { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return ClearMountingResetRequest.createClearMountingResetRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Clears mounting reset data, defaulting to the manually set mounting orientations + */ +export class ClearMountingResetRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):ClearMountingResetRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsClearMountingResetRequest(bb:flatbuffers.ByteBuffer, obj?:ClearMountingResetRequest):ClearMountingResetRequest { + return (obj || new ClearMountingResetRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsClearMountingResetRequest(bb:flatbuffers.ByteBuffer, obj?:ClearMountingResetRequest):ClearMountingResetRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new ClearMountingResetRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startClearMountingResetRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endClearMountingResetRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createClearMountingResetRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + ClearMountingResetRequest.startClearMountingResetRequest(builder); + return ClearMountingResetRequest.endClearMountingResetRequest(builder); +} + +unpack(): ClearMountingResetRequestT { + return new ClearMountingResetRequestT(); +} + + +unpackTo(_o: ClearMountingResetRequestT): void {} +} + +export class ClearMountingResetRequestT implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return ClearMountingResetRequest.createClearMountingResetRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/close-serial-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/close-serial-request.ts index 9a9843d8..b5eafbe3 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return CloseSerialRequest.createCloseSerialRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/computer-directory.ts b/protocol/typescript/src/solarxr-protocol/rpc/computer-directory.ts index bdd6295a..c3f69e6f 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/computer-directory.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/computer-directory.ts @@ -1,8 +1,8 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -/** - * Common folders often used in computers for storing files - */ -export enum ComputerDirectory { - Documents = 0 -} +// automatically generated by the FlatBuffers compiler, do not modify + +/** + * Common folders often used in computers for storing files + */ +export enum ComputerDirectory { + Documents = 0 +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/drift-compensation-settings.ts b/protocol/typescript/src/solarxr-protocol/rpc/drift-compensation-settings.ts index 85f9a167..266665f5 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/drift-compensation-settings.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/drift-compensation-settings.ts @@ -1,109 +1,109 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * Settings related to IMU yaw drift compensation - */ -export class DriftCompensationSettings implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):DriftCompensationSettings { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsDriftCompensationSettings(bb:flatbuffers.ByteBuffer, obj?:DriftCompensationSettings):DriftCompensationSettings { - return (obj || new DriftCompensationSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsDriftCompensationSettings(bb:flatbuffers.ByteBuffer, obj?:DriftCompensationSettings):DriftCompensationSettings { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new DriftCompensationSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -enabled():boolean { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -/** - * 0 to 1. A higher value results in more yaw drift compensation - */ -amount():number { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; -} - -/** - * Number of previous resets to take into account when calculating yaw drift - */ -maxResets():number { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0; -} - -static startDriftCompensationSettings(builder:flatbuffers.Builder) { - builder.startObject(3); -} - -static addEnabled(builder:flatbuffers.Builder, enabled:boolean) { - builder.addFieldInt8(0, +enabled, +false); -} - -static addAmount(builder:flatbuffers.Builder, amount:number) { - builder.addFieldFloat32(1, amount, 0.0); -} - -static addMaxResets(builder:flatbuffers.Builder, maxResets:number) { - builder.addFieldInt16(2, maxResets, 0); -} - -static endDriftCompensationSettings(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createDriftCompensationSettings(builder:flatbuffers.Builder, enabled:boolean, amount:number, maxResets:number):flatbuffers.Offset { - DriftCompensationSettings.startDriftCompensationSettings(builder); - DriftCompensationSettings.addEnabled(builder, enabled); - DriftCompensationSettings.addAmount(builder, amount); - DriftCompensationSettings.addMaxResets(builder, maxResets); - return DriftCompensationSettings.endDriftCompensationSettings(builder); -} - -unpack(): DriftCompensationSettingsT { - return new DriftCompensationSettingsT( - this.enabled(), - this.amount(), - this.maxResets() - ); -} - - -unpackTo(_o: DriftCompensationSettingsT): void { - _o.enabled = this.enabled(); - _o.amount = this.amount(); - _o.maxResets = this.maxResets(); -} -} - -export class DriftCompensationSettingsT implements flatbuffers.IGeneratedObject { -constructor( - public enabled: boolean = false, - public amount: number = 0.0, - public maxResets: number = 0 -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return DriftCompensationSettings.createDriftCompensationSettings(builder, - this.enabled, - this.amount, - this.maxResets - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Settings related to IMU yaw drift compensation + */ +export class DriftCompensationSettings implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):DriftCompensationSettings { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsDriftCompensationSettings(bb:flatbuffers.ByteBuffer, obj?:DriftCompensationSettings):DriftCompensationSettings { + return (obj || new DriftCompensationSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsDriftCompensationSettings(bb:flatbuffers.ByteBuffer, obj?:DriftCompensationSettings):DriftCompensationSettings { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new DriftCompensationSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +enabled():boolean { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +/** + * 0 to 1. A higher value results in more yaw drift compensation + */ +amount():number { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +/** + * Number of previous resets to take into account when calculating yaw drift + */ +maxResets():number { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0; +} + +static startDriftCompensationSettings(builder:flatbuffers.Builder) { + builder.startObject(3); +} + +static addEnabled(builder:flatbuffers.Builder, enabled:boolean) { + builder.addFieldInt8(0, +enabled, +false); +} + +static addAmount(builder:flatbuffers.Builder, amount:number) { + builder.addFieldFloat32(1, amount, 0.0); +} + +static addMaxResets(builder:flatbuffers.Builder, maxResets:number) { + builder.addFieldInt16(2, maxResets, 0); +} + +static endDriftCompensationSettings(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createDriftCompensationSettings(builder:flatbuffers.Builder, enabled:boolean, amount:number, maxResets:number):flatbuffers.Offset { + DriftCompensationSettings.startDriftCompensationSettings(builder); + DriftCompensationSettings.addEnabled(builder, enabled); + DriftCompensationSettings.addAmount(builder, amount); + DriftCompensationSettings.addMaxResets(builder, maxResets); + return DriftCompensationSettings.endDriftCompensationSettings(builder); +} + +unpack(): DriftCompensationSettingsT { + return new DriftCompensationSettingsT( + this.enabled(), + this.amount(), + this.maxResets() + ); +} + + +unpackTo(_o: DriftCompensationSettingsT): void { + _o.enabled = this.enabled(); + _o.amount = this.amount(); + _o.maxResets = this.maxResets(); +} +} + +export class DriftCompensationSettingsT implements flatbuffers.IGeneratedObject { +constructor( + public enabled: boolean = false, + public amount: number = 0.0, + public maxResets: number = 0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return DriftCompensationSettings.createDriftCompensationSettings(builder, + this.enabled, + this.amount, + this.maxResets + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/filtering-settings.ts b/protocol/typescript/src/solarxr-protocol/rpc/filtering-settings.ts index e7705646..3c0d6574 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.js'; - - -export class FilteringSettings implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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.js'; + + +export class FilteringSettings implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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/firmware-part.ts b/protocol/typescript/src/solarxr-protocol/rpc/firmware-part.ts new file mode 100644 index 00000000..cea9d37b --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/firmware-part.ts @@ -0,0 +1,97 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class FirmwarePart implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):FirmwarePart { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsFirmwarePart(bb:flatbuffers.ByteBuffer, obj?:FirmwarePart):FirmwarePart { + return (obj || new FirmwarePart()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsFirmwarePart(bb:flatbuffers.ByteBuffer, obj?:FirmwarePart):FirmwarePart { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new FirmwarePart()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +/** + * Url of the firmware bin to download + */ +url():string|null +url(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +url(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; +} + +/** + * Offset of the firmware, used when flashing to the mcu, it indicates where to write this file in memory + * Will be ignored in the case of OTA flashing + */ +offset():number { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; +} + +static startFirmwarePart(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addUrl(builder:flatbuffers.Builder, urlOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, urlOffset, 0); +} + +static addOffset(builder:flatbuffers.Builder, offset:number) { + builder.addFieldInt32(1, offset, 0); +} + +static endFirmwarePart(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createFirmwarePart(builder:flatbuffers.Builder, urlOffset:flatbuffers.Offset, offset:number):flatbuffers.Offset { + FirmwarePart.startFirmwarePart(builder); + FirmwarePart.addUrl(builder, urlOffset); + FirmwarePart.addOffset(builder, offset); + return FirmwarePart.endFirmwarePart(builder); +} + +unpack(): FirmwarePartT { + return new FirmwarePartT( + this.url(), + this.offset() + ); +} + + +unpackTo(_o: FirmwarePartT): void { + _o.url = this.url(); + _o.offset = this.offset(); +} +} + +export class FirmwarePartT implements flatbuffers.IGeneratedObject { +constructor( + public url: string|Uint8Array|null = null, + public offset: number = 0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const url = (this.url !== null ? builder.createString(this.url!) : 0); + + return FirmwarePart.createFirmwarePart(builder, + url, + this.offset + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/firmware-update-device-id.ts b/protocol/typescript/src/solarxr-protocol/rpc/firmware-update-device-id.ts new file mode 100644 index 00000000..0dce70a4 --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/firmware-update-device-id.ts @@ -0,0 +1,36 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import { DeviceIdTable, DeviceIdTableT } from '../../solarxr-protocol/datatypes/device-id-table.js'; +import { SerialDevicePort, SerialDevicePortT } from '../../solarxr-protocol/rpc/serial-device-port.js'; + + +export enum FirmwareUpdateDeviceId { + NONE = 0, + solarxr_protocol_datatypes_DeviceIdTable = 1, + SerialDevicePort = 2 +} + +export function unionToFirmwareUpdateDeviceId( + type: FirmwareUpdateDeviceId, + accessor: (obj:DeviceIdTable|SerialDevicePort) => DeviceIdTable|SerialDevicePort|null +): DeviceIdTable|SerialDevicePort|null { + switch(FirmwareUpdateDeviceId[type]) { + case 'NONE': return null; + case 'solarxr_protocol_datatypes_DeviceIdTable': return accessor(new DeviceIdTable())! as DeviceIdTable; + case 'SerialDevicePort': return accessor(new SerialDevicePort())! as SerialDevicePort; + default: return null; + } +} + +export function unionListToFirmwareUpdateDeviceId( + type: FirmwareUpdateDeviceId, + accessor: (index: number, obj:DeviceIdTable|SerialDevicePort) => DeviceIdTable|SerialDevicePort|null, + index: number +): DeviceIdTable|SerialDevicePort|null { + switch(FirmwareUpdateDeviceId[type]) { + case 'NONE': return null; + case 'solarxr_protocol_datatypes_DeviceIdTable': return accessor(index, new DeviceIdTable())! as DeviceIdTable; + case 'SerialDevicePort': return accessor(index, new SerialDevicePort())! as SerialDevicePort; + default: return null; + } +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/firmware-update-method.ts b/protocol/typescript/src/solarxr-protocol/rpc/firmware-update-method.ts new file mode 100644 index 00000000..a1ad2f5a --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/firmware-update-method.ts @@ -0,0 +1,36 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import { OTAFirmwareUpdate, OTAFirmwareUpdateT } from '../../solarxr-protocol/rpc/otafirmware-update.js'; +import { SerialFirmwareUpdate, SerialFirmwareUpdateT } from '../../solarxr-protocol/rpc/serial-firmware-update.js'; + + +export enum FirmwareUpdateMethod { + NONE = 0, + OTAFirmwareUpdate = 1, + SerialFirmwareUpdate = 2 +} + +export function unionToFirmwareUpdateMethod( + type: FirmwareUpdateMethod, + accessor: (obj:OTAFirmwareUpdate|SerialFirmwareUpdate) => OTAFirmwareUpdate|SerialFirmwareUpdate|null +): OTAFirmwareUpdate|SerialFirmwareUpdate|null { + switch(FirmwareUpdateMethod[type]) { + case 'NONE': return null; + case 'OTAFirmwareUpdate': return accessor(new OTAFirmwareUpdate())! as OTAFirmwareUpdate; + case 'SerialFirmwareUpdate': return accessor(new SerialFirmwareUpdate())! as SerialFirmwareUpdate; + default: return null; + } +} + +export function unionListToFirmwareUpdateMethod( + type: FirmwareUpdateMethod, + accessor: (index: number, obj:OTAFirmwareUpdate|SerialFirmwareUpdate) => OTAFirmwareUpdate|SerialFirmwareUpdate|null, + index: number +): OTAFirmwareUpdate|SerialFirmwareUpdate|null { + switch(FirmwareUpdateMethod[type]) { + case 'NONE': return null; + case 'OTAFirmwareUpdate': return accessor(index, new OTAFirmwareUpdate())! as OTAFirmwareUpdate; + case 'SerialFirmwareUpdate': return accessor(index, new SerialFirmwareUpdate())! as SerialFirmwareUpdate; + default: return null; + } +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/firmware-update-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/firmware-update-request.ts new file mode 100644 index 00000000..0ed69498 --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/firmware-update-request.ts @@ -0,0 +1,99 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { FirmwareUpdateMethod, unionToFirmwareUpdateMethod, unionListToFirmwareUpdateMethod } from '../../solarxr-protocol/rpc/firmware-update-method.js'; +import { OTAFirmwareUpdate, OTAFirmwareUpdateT } from '../../solarxr-protocol/rpc/otafirmware-update.js'; +import { SerialFirmwareUpdate, SerialFirmwareUpdateT } from '../../solarxr-protocol/rpc/serial-firmware-update.js'; + + +export class FirmwareUpdateRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):FirmwareUpdateRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsFirmwareUpdateRequest(bb:flatbuffers.ByteBuffer, obj?:FirmwareUpdateRequest):FirmwareUpdateRequest { + return (obj || new FirmwareUpdateRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsFirmwareUpdateRequest(bb:flatbuffers.ByteBuffer, obj?:FirmwareUpdateRequest):FirmwareUpdateRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new FirmwareUpdateRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +methodType():FirmwareUpdateMethod { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : FirmwareUpdateMethod.NONE; +} + +method(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 startFirmwareUpdateRequest(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addMethodType(builder:flatbuffers.Builder, methodType:FirmwareUpdateMethod) { + builder.addFieldInt8(0, methodType, FirmwareUpdateMethod.NONE); +} + +static addMethod(builder:flatbuffers.Builder, methodOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, methodOffset, 0); +} + +static endFirmwareUpdateRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createFirmwareUpdateRequest(builder:flatbuffers.Builder, methodType:FirmwareUpdateMethod, methodOffset:flatbuffers.Offset):flatbuffers.Offset { + FirmwareUpdateRequest.startFirmwareUpdateRequest(builder); + FirmwareUpdateRequest.addMethodType(builder, methodType); + FirmwareUpdateRequest.addMethod(builder, methodOffset); + return FirmwareUpdateRequest.endFirmwareUpdateRequest(builder); +} + +unpack(): FirmwareUpdateRequestT { + return new FirmwareUpdateRequestT( + this.methodType(), + (() => { + const temp = unionToFirmwareUpdateMethod(this.methodType(), this.method.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })() + ); +} + + +unpackTo(_o: FirmwareUpdateRequestT): void { + _o.methodType = this.methodType(); + _o.method = (() => { + const temp = unionToFirmwareUpdateMethod(this.methodType(), this.method.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })(); +} +} + +export class FirmwareUpdateRequestT implements flatbuffers.IGeneratedObject { +constructor( + public methodType: FirmwareUpdateMethod = FirmwareUpdateMethod.NONE, + public method: OTAFirmwareUpdateT|SerialFirmwareUpdateT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const method = builder.createObjectOffset(this.method); + + return FirmwareUpdateRequest.createFirmwareUpdateRequest(builder, + this.methodType, + method + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/firmware-update-status-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/firmware-update-status-response.ts new file mode 100644 index 00000000..94463260 --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/firmware-update-status-response.ts @@ -0,0 +1,131 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { DeviceIdTable, DeviceIdTableT } from '../../solarxr-protocol/datatypes/device-id-table.js'; +import { FirmwareUpdateDeviceId, unionToFirmwareUpdateDeviceId, unionListToFirmwareUpdateDeviceId } from '../../solarxr-protocol/rpc/firmware-update-device-id.js'; +import { FirmwareUpdateStatus } from '../../solarxr-protocol/rpc/firmware-update-status.js'; +import { SerialDevicePort, SerialDevicePortT } from '../../solarxr-protocol/rpc/serial-device-port.js'; + + +export class FirmwareUpdateStatusResponse implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):FirmwareUpdateStatusResponse { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsFirmwareUpdateStatusResponse(bb:flatbuffers.ByteBuffer, obj?:FirmwareUpdateStatusResponse):FirmwareUpdateStatusResponse { + return (obj || new FirmwareUpdateStatusResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsFirmwareUpdateStatusResponse(bb:flatbuffers.ByteBuffer, obj?:FirmwareUpdateStatusResponse):FirmwareUpdateStatusResponse { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new FirmwareUpdateStatusResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +deviceIdType():FirmwareUpdateDeviceId { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : FirmwareUpdateDeviceId.NONE; +} + +deviceId(obj:any):any|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.__union(obj, this.bb_pos + offset) : null; +} + +status():FirmwareUpdateStatus { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : FirmwareUpdateStatus.DOWNLOADING; +} + +/** + * from 0 to 100 + */ +progress():number { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? this.bb!.readInt8(this.bb_pos + offset) : 0; +} + +static startFirmwareUpdateStatusResponse(builder:flatbuffers.Builder) { + builder.startObject(4); +} + +static addDeviceIdType(builder:flatbuffers.Builder, deviceIdType:FirmwareUpdateDeviceId) { + builder.addFieldInt8(0, deviceIdType, FirmwareUpdateDeviceId.NONE); +} + +static addDeviceId(builder:flatbuffers.Builder, deviceIdOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, deviceIdOffset, 0); +} + +static addStatus(builder:flatbuffers.Builder, status:FirmwareUpdateStatus) { + builder.addFieldInt8(2, status, FirmwareUpdateStatus.DOWNLOADING); +} + +static addProgress(builder:flatbuffers.Builder, progress:number) { + builder.addFieldInt8(3, progress, 0); +} + +static endFirmwareUpdateStatusResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createFirmwareUpdateStatusResponse(builder:flatbuffers.Builder, deviceIdType:FirmwareUpdateDeviceId, deviceIdOffset:flatbuffers.Offset, status:FirmwareUpdateStatus, progress:number):flatbuffers.Offset { + FirmwareUpdateStatusResponse.startFirmwareUpdateStatusResponse(builder); + FirmwareUpdateStatusResponse.addDeviceIdType(builder, deviceIdType); + FirmwareUpdateStatusResponse.addDeviceId(builder, deviceIdOffset); + FirmwareUpdateStatusResponse.addStatus(builder, status); + FirmwareUpdateStatusResponse.addProgress(builder, progress); + return FirmwareUpdateStatusResponse.endFirmwareUpdateStatusResponse(builder); +} + +unpack(): FirmwareUpdateStatusResponseT { + return new FirmwareUpdateStatusResponseT( + this.deviceIdType(), + (() => { + const temp = unionToFirmwareUpdateDeviceId(this.deviceIdType(), this.deviceId.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })(), + this.status(), + this.progress() + ); +} + + +unpackTo(_o: FirmwareUpdateStatusResponseT): void { + _o.deviceIdType = this.deviceIdType(); + _o.deviceId = (() => { + const temp = unionToFirmwareUpdateDeviceId(this.deviceIdType(), this.deviceId.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })(); + _o.status = this.status(); + _o.progress = this.progress(); +} +} + +export class FirmwareUpdateStatusResponseT implements flatbuffers.IGeneratedObject { +constructor( + public deviceIdType: FirmwareUpdateDeviceId = FirmwareUpdateDeviceId.NONE, + public deviceId: DeviceIdTableT|SerialDevicePortT|null = null, + public status: FirmwareUpdateStatus = FirmwareUpdateStatus.DOWNLOADING, + public progress: number = 0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const deviceId = builder.createObjectOffset(this.deviceId); + + return FirmwareUpdateStatusResponse.createFirmwareUpdateStatusResponse(builder, + this.deviceIdType, + deviceId, + this.status, + this.progress + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/firmware-update-status.ts b/protocol/typescript/src/solarxr-protocol/rpc/firmware-update-status.ts new file mode 100644 index 00000000..75ea0a1c --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/firmware-update-status.ts @@ -0,0 +1,77 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +export enum FirmwareUpdateStatus { + /** + * The server is downloading the firmware + */ + DOWNLOADING = 0, + + /** + * The server is waiting for the tracker to be rebooted by the user + * Note that is is not the same as REBOOTING + */ + NEED_MANUAL_REBOOT = 1, + + /** + * The server tries to authenticate with the MCU + */ + AUTHENTICATING = 2, + + /** + * The server is uploading the firmware to the Device + */ + UPLOADING = 3, + + /** + * The serial flasher tries to sync with the MCU + * You can use this event to prompt the user to press the boot btn + */ + SYNCING_WITH_MCU = 4, + + /** + * The MCU is rebooting + */ + REBOOTING = 5, + + /** + * The server is provisioning the tracker + */ + PROVISIONING = 6, + DONE = 7, + + /** + * Could not find the device + */ + ERROR_DEVICE_NOT_FOUND = 8, + + /** + * The operation timed out, > 1min + */ + ERROR_TIMEOUT = 9, + + /** + * The firmware download failed + */ + ERROR_DOWNLOAD_FAILED = 10, + + /** + * The server could not authenticate with the MCU + */ + ERROR_AUTHENTICATION_FAILED = 11, + + /** + * Could not upload the firmware to the MUC + */ + ERROR_UPLOAD_FAILED = 12, + + /** + * The provision of the tracker failed, usually wifi credentials + */ + ERROR_PROVISIONING_FAILED = 13, + + /** + * An unsupported Flashing method was used + */ + ERROR_UNSUPPORTED_METHOD = 14, + ERROR_UNKNOWN = 15 +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/firmware-update-stop-queues-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/firmware-update-stop-queues-request.ts new file mode 100644 index 00000000..9f39ff65 --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/firmware-update-stop-queues-request.ts @@ -0,0 +1,54 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class FirmwareUpdateStopQueuesRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):FirmwareUpdateStopQueuesRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsFirmwareUpdateStopQueuesRequest(bb:flatbuffers.ByteBuffer, obj?:FirmwareUpdateStopQueuesRequest):FirmwareUpdateStopQueuesRequest { + return (obj || new FirmwareUpdateStopQueuesRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsFirmwareUpdateStopQueuesRequest(bb:flatbuffers.ByteBuffer, obj?:FirmwareUpdateStopQueuesRequest):FirmwareUpdateStopQueuesRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new FirmwareUpdateStopQueuesRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startFirmwareUpdateStopQueuesRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endFirmwareUpdateStopQueuesRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createFirmwareUpdateStopQueuesRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + FirmwareUpdateStopQueuesRequest.startFirmwareUpdateStopQueuesRequest(builder); + return FirmwareUpdateStopQueuesRequest.endFirmwareUpdateStopQueuesRequest(builder); +} + +unpack(): FirmwareUpdateStopQueuesRequestT { + return new FirmwareUpdateStopQueuesRequestT(); +} + + +unpackTo(_o: FirmwareUpdateStopQueuesRequestT): void {} +} + +export class FirmwareUpdateStopQueuesRequestT implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return FirmwareUpdateStopQueuesRequest.createFirmwareUpdateStopQueuesRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/forget-device-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/forget-device-request.ts index ff33163a..cfdea4df 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/forget-device-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/forget-device-request.ts @@ -1,76 +1,76 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class ForgetDeviceRequest implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):ForgetDeviceRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsForgetDeviceRequest(bb:flatbuffers.ByteBuffer, obj?:ForgetDeviceRequest):ForgetDeviceRequest { - return (obj || new ForgetDeviceRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsForgetDeviceRequest(bb:flatbuffers.ByteBuffer, obj?:ForgetDeviceRequest):ForgetDeviceRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new ForgetDeviceRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -macAddress():string|null -macAddress(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -macAddress(optionalEncoding?:any):string|Uint8Array|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; -} - -static startForgetDeviceRequest(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addMacAddress(builder:flatbuffers.Builder, macAddressOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, macAddressOffset, 0); -} - -static endForgetDeviceRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createForgetDeviceRequest(builder:flatbuffers.Builder, macAddressOffset:flatbuffers.Offset):flatbuffers.Offset { - ForgetDeviceRequest.startForgetDeviceRequest(builder); - ForgetDeviceRequest.addMacAddress(builder, macAddressOffset); - return ForgetDeviceRequest.endForgetDeviceRequest(builder); -} - -unpack(): ForgetDeviceRequestT { - return new ForgetDeviceRequestT( - this.macAddress() - ); -} - - -unpackTo(_o: ForgetDeviceRequestT): void { - _o.macAddress = this.macAddress(); -} -} - -export class ForgetDeviceRequestT implements flatbuffers.IGeneratedObject { -constructor( - public macAddress: string|Uint8Array|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const macAddress = (this.macAddress !== null ? builder.createString(this.macAddress!) : 0); - - return ForgetDeviceRequest.createForgetDeviceRequest(builder, - macAddress - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class ForgetDeviceRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):ForgetDeviceRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsForgetDeviceRequest(bb:flatbuffers.ByteBuffer, obj?:ForgetDeviceRequest):ForgetDeviceRequest { + return (obj || new ForgetDeviceRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsForgetDeviceRequest(bb:flatbuffers.ByteBuffer, obj?:ForgetDeviceRequest):ForgetDeviceRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new ForgetDeviceRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +macAddress():string|null +macAddress(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +macAddress(optionalEncoding?:any):string|Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; +} + +static startForgetDeviceRequest(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addMacAddress(builder:flatbuffers.Builder, macAddressOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, macAddressOffset, 0); +} + +static endForgetDeviceRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createForgetDeviceRequest(builder:flatbuffers.Builder, macAddressOffset:flatbuffers.Offset):flatbuffers.Offset { + ForgetDeviceRequest.startForgetDeviceRequest(builder); + ForgetDeviceRequest.addMacAddress(builder, macAddressOffset); + return ForgetDeviceRequest.endForgetDeviceRequest(builder); +} + +unpack(): ForgetDeviceRequestT { + return new ForgetDeviceRequestT( + this.macAddress() + ); +} + + +unpackTo(_o: ForgetDeviceRequestT): void { + _o.macAddress = this.macAddress(); +} +} + +export class ForgetDeviceRequestT implements flatbuffers.IGeneratedObject { +constructor( + public macAddress: string|Uint8Array|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const macAddress = (this.macAddress !== null ? builder.createString(this.macAddress!) : 0); + + return ForgetDeviceRequest.createForgetDeviceRequest(builder, + macAddress + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/heartbeat-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/heartbeat-request.ts index b0b5678a..f2836d75 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 0e49be79..0f036e2c 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return HeartbeatResponse.createHeartbeatResponse(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/height-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/height-request.ts index b38fef46..6cc480cb 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/height-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/height-request.ts @@ -1,54 +1,54 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class HeightRequest implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):HeightRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsHeightRequest(bb:flatbuffers.ByteBuffer, obj?:HeightRequest):HeightRequest { - return (obj || new HeightRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsHeightRequest(bb:flatbuffers.ByteBuffer, obj?:HeightRequest):HeightRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new HeightRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startHeightRequest(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endHeightRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createHeightRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - HeightRequest.startHeightRequest(builder); - return HeightRequest.endHeightRequest(builder); -} - -unpack(): HeightRequestT { - return new HeightRequestT(); -} - - -unpackTo(_o: HeightRequestT): void {} -} - -export class HeightRequestT implements flatbuffers.IGeneratedObject { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return HeightRequest.createHeightRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class HeightRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):HeightRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsHeightRequest(bb:flatbuffers.ByteBuffer, obj?:HeightRequest):HeightRequest { + return (obj || new HeightRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsHeightRequest(bb:flatbuffers.ByteBuffer, obj?:HeightRequest):HeightRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new HeightRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startHeightRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endHeightRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createHeightRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + HeightRequest.startHeightRequest(builder); + return HeightRequest.endHeightRequest(builder); +} + +unpack(): HeightRequestT { + return new HeightRequestT(); +} + + +unpackTo(_o: HeightRequestT): void {} +} + +export class HeightRequestT implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return HeightRequest.createHeightRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/height-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/height-response.ts index 16da6031..4f83276d 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/height-response.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/height-response.ts @@ -1,89 +1,89 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * Returns the current HMD height and returns an estimated full height (user height) - */ -export class HeightResponse implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):HeightResponse { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsHeightResponse(bb:flatbuffers.ByteBuffer, obj?:HeightResponse):HeightResponse { - return (obj || new HeightResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsHeightResponse(bb:flatbuffers.ByteBuffer, obj?:HeightResponse):HeightResponse { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new HeightResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -hmdHeight():number { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; -} - -estimatedFullHeight():number { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; -} - -static startHeightResponse(builder:flatbuffers.Builder) { - builder.startObject(2); -} - -static addHmdHeight(builder:flatbuffers.Builder, hmdHeight:number) { - builder.addFieldFloat32(0, hmdHeight, 0.0); -} - -static addEstimatedFullHeight(builder:flatbuffers.Builder, estimatedFullHeight:number) { - builder.addFieldFloat32(1, estimatedFullHeight, 0.0); -} - -static endHeightResponse(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createHeightResponse(builder:flatbuffers.Builder, hmdHeight:number, estimatedFullHeight:number):flatbuffers.Offset { - HeightResponse.startHeightResponse(builder); - HeightResponse.addHmdHeight(builder, hmdHeight); - HeightResponse.addEstimatedFullHeight(builder, estimatedFullHeight); - return HeightResponse.endHeightResponse(builder); -} - -unpack(): HeightResponseT { - return new HeightResponseT( - this.hmdHeight(), - this.estimatedFullHeight() - ); -} - - -unpackTo(_o: HeightResponseT): void { - _o.hmdHeight = this.hmdHeight(); - _o.estimatedFullHeight = this.estimatedFullHeight(); -} -} - -export class HeightResponseT implements flatbuffers.IGeneratedObject { -constructor( - public hmdHeight: number = 0.0, - public estimatedFullHeight: number = 0.0 -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return HeightResponse.createHeightResponse(builder, - this.hmdHeight, - this.estimatedFullHeight - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Returns the current HMD height and returns an estimated full height (user height) + */ +export class HeightResponse implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):HeightResponse { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsHeightResponse(bb:flatbuffers.ByteBuffer, obj?:HeightResponse):HeightResponse { + return (obj || new HeightResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsHeightResponse(bb:flatbuffers.ByteBuffer, obj?:HeightResponse):HeightResponse { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new HeightResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +hmdHeight():number { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +estimatedFullHeight():number { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +static startHeightResponse(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addHmdHeight(builder:flatbuffers.Builder, hmdHeight:number) { + builder.addFieldFloat32(0, hmdHeight, 0.0); +} + +static addEstimatedFullHeight(builder:flatbuffers.Builder, estimatedFullHeight:number) { + builder.addFieldFloat32(1, estimatedFullHeight, 0.0); +} + +static endHeightResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createHeightResponse(builder:flatbuffers.Builder, hmdHeight:number, estimatedFullHeight:number):flatbuffers.Offset { + HeightResponse.startHeightResponse(builder); + HeightResponse.addHmdHeight(builder, hmdHeight); + HeightResponse.addEstimatedFullHeight(builder, estimatedFullHeight); + return HeightResponse.endHeightResponse(builder); +} + +unpack(): HeightResponseT { + return new HeightResponseT( + this.hmdHeight(), + this.estimatedFullHeight() + ); +} + + +unpackTo(_o: HeightResponseT): void { + _o.hmdHeight = this.hmdHeight(); + _o.estimatedFullHeight = this.estimatedFullHeight(); +} +} + +export class HeightResponseT implements flatbuffers.IGeneratedObject { +constructor( + public hmdHeight: number = 0.0, + public estimatedFullHeight: number = 0.0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return HeightResponse.createHeightResponse(builder, + this.hmdHeight, + this.estimatedFullHeight + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/leg-tweaks-tmp-change.ts b/protocol/typescript/src/solarxr-protocol/rpc/leg-tweaks-tmp-change.ts index 67415c90..3fcce9f3 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/leg-tweaks-tmp-change.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/leg-tweaks-tmp-change.ts @@ -1,122 +1,122 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * Makes a temporary change to legtweaks. This is not saved to disk, and can be - * cleared with `LegTweaksTmpClear` - */ -export class LegTweaksTmpChange implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):LegTweaksTmpChange { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsLegTweaksTmpChange(bb:flatbuffers.ByteBuffer, obj?:LegTweaksTmpChange):LegTweaksTmpChange { - return (obj || new LegTweaksTmpChange()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsLegTweaksTmpChange(bb:flatbuffers.ByteBuffer, obj?:LegTweaksTmpChange):LegTweaksTmpChange { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new LegTweaksTmpChange()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -floorClip():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -skatingCorrection():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -toeSnap():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -footPlant():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -static startLegTweaksTmpChange(builder:flatbuffers.Builder) { - builder.startObject(4); -} - -static addFloorClip(builder:flatbuffers.Builder, floorClip:boolean) { - builder.addFieldInt8(0, +floorClip, 0); -} - -static addSkatingCorrection(builder:flatbuffers.Builder, skatingCorrection:boolean) { - builder.addFieldInt8(1, +skatingCorrection, 0); -} - -static addToeSnap(builder:flatbuffers.Builder, toeSnap:boolean) { - builder.addFieldInt8(2, +toeSnap, 0); -} - -static addFootPlant(builder:flatbuffers.Builder, footPlant:boolean) { - builder.addFieldInt8(3, +footPlant, 0); -} - -static endLegTweaksTmpChange(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createLegTweaksTmpChange(builder:flatbuffers.Builder, floorClip:boolean|null, skatingCorrection:boolean|null, toeSnap:boolean|null, footPlant:boolean|null):flatbuffers.Offset { - LegTweaksTmpChange.startLegTweaksTmpChange(builder); - if (floorClip !== null) - LegTweaksTmpChange.addFloorClip(builder, floorClip); - if (skatingCorrection !== null) - LegTweaksTmpChange.addSkatingCorrection(builder, skatingCorrection); - if (toeSnap !== null) - LegTweaksTmpChange.addToeSnap(builder, toeSnap); - if (footPlant !== null) - LegTweaksTmpChange.addFootPlant(builder, footPlant); - return LegTweaksTmpChange.endLegTweaksTmpChange(builder); -} - -unpack(): LegTweaksTmpChangeT { - return new LegTweaksTmpChangeT( - this.floorClip(), - this.skatingCorrection(), - this.toeSnap(), - this.footPlant() - ); -} - - -unpackTo(_o: LegTweaksTmpChangeT): void { - _o.floorClip = this.floorClip(); - _o.skatingCorrection = this.skatingCorrection(); - _o.toeSnap = this.toeSnap(); - _o.footPlant = this.footPlant(); -} -} - -export class LegTweaksTmpChangeT implements flatbuffers.IGeneratedObject { -constructor( - public floorClip: boolean|null = null, - public skatingCorrection: boolean|null = null, - public toeSnap: boolean|null = null, - public footPlant: boolean|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return LegTweaksTmpChange.createLegTweaksTmpChange(builder, - this.floorClip, - this.skatingCorrection, - this.toeSnap, - this.footPlant - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Makes a temporary change to legtweaks. This is not saved to disk, and can be + * cleared with `LegTweaksTmpClear` + */ +export class LegTweaksTmpChange implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):LegTweaksTmpChange { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsLegTweaksTmpChange(bb:flatbuffers.ByteBuffer, obj?:LegTweaksTmpChange):LegTweaksTmpChange { + return (obj || new LegTweaksTmpChange()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsLegTweaksTmpChange(bb:flatbuffers.ByteBuffer, obj?:LegTweaksTmpChange):LegTweaksTmpChange { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new LegTweaksTmpChange()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +floorClip():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +skatingCorrection():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +toeSnap():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +footPlant():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +static startLegTweaksTmpChange(builder:flatbuffers.Builder) { + builder.startObject(4); +} + +static addFloorClip(builder:flatbuffers.Builder, floorClip:boolean) { + builder.addFieldInt8(0, +floorClip, 0); +} + +static addSkatingCorrection(builder:flatbuffers.Builder, skatingCorrection:boolean) { + builder.addFieldInt8(1, +skatingCorrection, 0); +} + +static addToeSnap(builder:flatbuffers.Builder, toeSnap:boolean) { + builder.addFieldInt8(2, +toeSnap, 0); +} + +static addFootPlant(builder:flatbuffers.Builder, footPlant:boolean) { + builder.addFieldInt8(3, +footPlant, 0); +} + +static endLegTweaksTmpChange(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createLegTweaksTmpChange(builder:flatbuffers.Builder, floorClip:boolean|null, skatingCorrection:boolean|null, toeSnap:boolean|null, footPlant:boolean|null):flatbuffers.Offset { + LegTweaksTmpChange.startLegTweaksTmpChange(builder); + if (floorClip !== null) + LegTweaksTmpChange.addFloorClip(builder, floorClip); + if (skatingCorrection !== null) + LegTweaksTmpChange.addSkatingCorrection(builder, skatingCorrection); + if (toeSnap !== null) + LegTweaksTmpChange.addToeSnap(builder, toeSnap); + if (footPlant !== null) + LegTweaksTmpChange.addFootPlant(builder, footPlant); + return LegTweaksTmpChange.endLegTweaksTmpChange(builder); +} + +unpack(): LegTweaksTmpChangeT { + return new LegTweaksTmpChangeT( + this.floorClip(), + this.skatingCorrection(), + this.toeSnap(), + this.footPlant() + ); +} + + +unpackTo(_o: LegTweaksTmpChangeT): void { + _o.floorClip = this.floorClip(); + _o.skatingCorrection = this.skatingCorrection(); + _o.toeSnap = this.toeSnap(); + _o.footPlant = this.footPlant(); +} +} + +export class LegTweaksTmpChangeT implements flatbuffers.IGeneratedObject { +constructor( + public floorClip: boolean|null = null, + public skatingCorrection: boolean|null = null, + public toeSnap: boolean|null = null, + public footPlant: boolean|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return LegTweaksTmpChange.createLegTweaksTmpChange(builder, + this.floorClip, + this.skatingCorrection, + this.toeSnap, + this.footPlant + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/leg-tweaks-tmp-clear.ts b/protocol/typescript/src/solarxr-protocol/rpc/leg-tweaks-tmp-clear.ts index cc7ceb22..1bce50f7 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/leg-tweaks-tmp-clear.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/leg-tweaks-tmp-clear.ts @@ -1,118 +1,118 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * Clears the legtweaks temprorary state back to what the config has. - * Setting a field to `true` will reset that field. - */ -export class LegTweaksTmpClear implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):LegTweaksTmpClear { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsLegTweaksTmpClear(bb:flatbuffers.ByteBuffer, obj?:LegTweaksTmpClear):LegTweaksTmpClear { - return (obj || new LegTweaksTmpClear()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsLegTweaksTmpClear(bb:flatbuffers.ByteBuffer, obj?:LegTweaksTmpClear):LegTweaksTmpClear { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new LegTweaksTmpClear()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -floorClip():boolean { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -skatingCorrection():boolean { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -toeSnap():boolean { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -footPlant():boolean { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startLegTweaksTmpClear(builder:flatbuffers.Builder) { - builder.startObject(4); -} - -static addFloorClip(builder:flatbuffers.Builder, floorClip:boolean) { - builder.addFieldInt8(0, +floorClip, +false); -} - -static addSkatingCorrection(builder:flatbuffers.Builder, skatingCorrection:boolean) { - builder.addFieldInt8(1, +skatingCorrection, +false); -} - -static addToeSnap(builder:flatbuffers.Builder, toeSnap:boolean) { - builder.addFieldInt8(2, +toeSnap, +false); -} - -static addFootPlant(builder:flatbuffers.Builder, footPlant:boolean) { - builder.addFieldInt8(3, +footPlant, +false); -} - -static endLegTweaksTmpClear(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createLegTweaksTmpClear(builder:flatbuffers.Builder, floorClip:boolean, skatingCorrection:boolean, toeSnap:boolean, footPlant:boolean):flatbuffers.Offset { - LegTweaksTmpClear.startLegTweaksTmpClear(builder); - LegTweaksTmpClear.addFloorClip(builder, floorClip); - LegTweaksTmpClear.addSkatingCorrection(builder, skatingCorrection); - LegTweaksTmpClear.addToeSnap(builder, toeSnap); - LegTweaksTmpClear.addFootPlant(builder, footPlant); - return LegTweaksTmpClear.endLegTweaksTmpClear(builder); -} - -unpack(): LegTweaksTmpClearT { - return new LegTweaksTmpClearT( - this.floorClip(), - this.skatingCorrection(), - this.toeSnap(), - this.footPlant() - ); -} - - -unpackTo(_o: LegTweaksTmpClearT): void { - _o.floorClip = this.floorClip(); - _o.skatingCorrection = this.skatingCorrection(); - _o.toeSnap = this.toeSnap(); - _o.footPlant = this.footPlant(); -} -} - -export class LegTweaksTmpClearT implements flatbuffers.IGeneratedObject { -constructor( - public floorClip: boolean = false, - public skatingCorrection: boolean = false, - public toeSnap: boolean = false, - public footPlant: boolean = false -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return LegTweaksTmpClear.createLegTweaksTmpClear(builder, - this.floorClip, - this.skatingCorrection, - this.toeSnap, - this.footPlant - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Clears the legtweaks temprorary state back to what the config has. + * Setting a field to `true` will reset that field. + */ +export class LegTweaksTmpClear implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):LegTweaksTmpClear { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsLegTweaksTmpClear(bb:flatbuffers.ByteBuffer, obj?:LegTweaksTmpClear):LegTweaksTmpClear { + return (obj || new LegTweaksTmpClear()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsLegTweaksTmpClear(bb:flatbuffers.ByteBuffer, obj?:LegTweaksTmpClear):LegTweaksTmpClear { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new LegTweaksTmpClear()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +floorClip():boolean { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +skatingCorrection():boolean { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +toeSnap():boolean { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +footPlant():boolean { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startLegTweaksTmpClear(builder:flatbuffers.Builder) { + builder.startObject(4); +} + +static addFloorClip(builder:flatbuffers.Builder, floorClip:boolean) { + builder.addFieldInt8(0, +floorClip, +false); +} + +static addSkatingCorrection(builder:flatbuffers.Builder, skatingCorrection:boolean) { + builder.addFieldInt8(1, +skatingCorrection, +false); +} + +static addToeSnap(builder:flatbuffers.Builder, toeSnap:boolean) { + builder.addFieldInt8(2, +toeSnap, +false); +} + +static addFootPlant(builder:flatbuffers.Builder, footPlant:boolean) { + builder.addFieldInt8(3, +footPlant, +false); +} + +static endLegTweaksTmpClear(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createLegTweaksTmpClear(builder:flatbuffers.Builder, floorClip:boolean, skatingCorrection:boolean, toeSnap:boolean, footPlant:boolean):flatbuffers.Offset { + LegTweaksTmpClear.startLegTweaksTmpClear(builder); + LegTweaksTmpClear.addFloorClip(builder, floorClip); + LegTweaksTmpClear.addSkatingCorrection(builder, skatingCorrection); + LegTweaksTmpClear.addToeSnap(builder, toeSnap); + LegTweaksTmpClear.addFootPlant(builder, footPlant); + return LegTweaksTmpClear.endLegTweaksTmpClear(builder); +} + +unpack(): LegTweaksTmpClearT { + return new LegTweaksTmpClearT( + this.floorClip(), + this.skatingCorrection(), + this.toeSnap(), + this.footPlant() + ); +} + + +unpackTo(_o: LegTweaksTmpClearT): void { + _o.floorClip = this.floorClip(); + _o.skatingCorrection = this.skatingCorrection(); + _o.toeSnap = this.toeSnap(); + _o.footPlant = this.footPlant(); +} +} + +export class LegTweaksTmpClearT implements flatbuffers.IGeneratedObject { +constructor( + public floorClip: boolean = false, + public skatingCorrection: boolean = false, + public toeSnap: boolean = false, + public footPlant: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return LegTweaksTmpClear.createLegTweaksTmpClear(builder, + this.floorClip, + this.skatingCorrection, + this.toeSnap, + this.footPlant + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/new-serial-device-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/new-serial-device-response.ts index c3c7381e..e6129390 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/new-serial-device-response.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/new-serial-device-response.ts @@ -1,75 +1,75 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { SerialDevice, SerialDeviceT } from '../../solarxr-protocol/rpc/serial-device.js'; - - -export class NewSerialDeviceResponse implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):NewSerialDeviceResponse { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsNewSerialDeviceResponse(bb:flatbuffers.ByteBuffer, obj?:NewSerialDeviceResponse):NewSerialDeviceResponse { - return (obj || new NewSerialDeviceResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsNewSerialDeviceResponse(bb:flatbuffers.ByteBuffer, obj?:NewSerialDeviceResponse):NewSerialDeviceResponse { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new NewSerialDeviceResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -device(obj?:SerialDevice):SerialDevice|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new SerialDevice()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -static startNewSerialDeviceResponse(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addDevice(builder:flatbuffers.Builder, deviceOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, deviceOffset, 0); -} - -static endNewSerialDeviceResponse(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createNewSerialDeviceResponse(builder:flatbuffers.Builder, deviceOffset:flatbuffers.Offset):flatbuffers.Offset { - NewSerialDeviceResponse.startNewSerialDeviceResponse(builder); - NewSerialDeviceResponse.addDevice(builder, deviceOffset); - return NewSerialDeviceResponse.endNewSerialDeviceResponse(builder); -} - -unpack(): NewSerialDeviceResponseT { - return new NewSerialDeviceResponseT( - (this.device() !== null ? this.device()!.unpack() : null) - ); -} - - -unpackTo(_o: NewSerialDeviceResponseT): void { - _o.device = (this.device() !== null ? this.device()!.unpack() : null); -} -} - -export class NewSerialDeviceResponseT implements flatbuffers.IGeneratedObject { -constructor( - public device: SerialDeviceT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const device = (this.device !== null ? this.device!.pack(builder) : 0); - - return NewSerialDeviceResponse.createNewSerialDeviceResponse(builder, - device - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { SerialDevice, SerialDeviceT } from '../../solarxr-protocol/rpc/serial-device.js'; + + +export class NewSerialDeviceResponse implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):NewSerialDeviceResponse { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsNewSerialDeviceResponse(bb:flatbuffers.ByteBuffer, obj?:NewSerialDeviceResponse):NewSerialDeviceResponse { + return (obj || new NewSerialDeviceResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsNewSerialDeviceResponse(bb:flatbuffers.ByteBuffer, obj?:NewSerialDeviceResponse):NewSerialDeviceResponse { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new NewSerialDeviceResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +device(obj?:SerialDevice):SerialDevice|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new SerialDevice()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +static startNewSerialDeviceResponse(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addDevice(builder:flatbuffers.Builder, deviceOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, deviceOffset, 0); +} + +static endNewSerialDeviceResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createNewSerialDeviceResponse(builder:flatbuffers.Builder, deviceOffset:flatbuffers.Offset):flatbuffers.Offset { + NewSerialDeviceResponse.startNewSerialDeviceResponse(builder); + NewSerialDeviceResponse.addDevice(builder, deviceOffset); + return NewSerialDeviceResponse.endNewSerialDeviceResponse(builder); +} + +unpack(): NewSerialDeviceResponseT { + return new NewSerialDeviceResponseT( + (this.device() !== null ? this.device()!.unpack() : null) + ); +} + + +unpackTo(_o: NewSerialDeviceResponseT): void { + _o.device = (this.device() !== null ? this.device()!.unpack() : null); +} +} + +export class NewSerialDeviceResponseT implements flatbuffers.IGeneratedObject { +constructor( + public device: SerialDeviceT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const device = (this.device !== null ? this.device!.pack(builder) : 0); + + return NewSerialDeviceResponse.createNewSerialDeviceResponse(builder, + device + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/open-serial-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/open-serial-request.ts index dcfa9425..80432293 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/open-serial-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/open-serial-request.ts @@ -1,93 +1,93 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class OpenSerialRequest implements flatbuffers.IUnpackableObject { - 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); -} - -/** - * Automaticaly pick the first serial device available - */ -auto():boolean { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -port():string|null -port(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -port(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 startOpenSerialRequest(builder:flatbuffers.Builder) { - builder.startObject(2); -} - -static addAuto(builder:flatbuffers.Builder, auto:boolean) { - builder.addFieldInt8(0, +auto, +false); -} - -static addPort(builder:flatbuffers.Builder, portOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, portOffset, 0); -} - -static endOpenSerialRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createOpenSerialRequest(builder:flatbuffers.Builder, auto:boolean, portOffset:flatbuffers.Offset):flatbuffers.Offset { - OpenSerialRequest.startOpenSerialRequest(builder); - OpenSerialRequest.addAuto(builder, auto); - OpenSerialRequest.addPort(builder, portOffset); - return OpenSerialRequest.endOpenSerialRequest(builder); -} - -unpack(): OpenSerialRequestT { - return new OpenSerialRequestT( - this.auto(), - this.port() - ); -} - - -unpackTo(_o: OpenSerialRequestT): void { - _o.auto = this.auto(); - _o.port = this.port(); -} -} - -export class OpenSerialRequestT implements flatbuffers.IGeneratedObject { -constructor( - public auto: boolean = false, - public port: string|Uint8Array|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const port = (this.port !== null ? builder.createString(this.port!) : 0); - - return OpenSerialRequest.createOpenSerialRequest(builder, - this.auto, - port - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class OpenSerialRequest implements flatbuffers.IUnpackableObject { + 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); +} + +/** + * Automaticaly pick the first serial device available + */ +auto():boolean { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +port():string|null +port(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +port(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 startOpenSerialRequest(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addAuto(builder:flatbuffers.Builder, auto:boolean) { + builder.addFieldInt8(0, +auto, +false); +} + +static addPort(builder:flatbuffers.Builder, portOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, portOffset, 0); +} + +static endOpenSerialRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createOpenSerialRequest(builder:flatbuffers.Builder, auto:boolean, portOffset:flatbuffers.Offset):flatbuffers.Offset { + OpenSerialRequest.startOpenSerialRequest(builder); + OpenSerialRequest.addAuto(builder, auto); + OpenSerialRequest.addPort(builder, portOffset); + return OpenSerialRequest.endOpenSerialRequest(builder); +} + +unpack(): OpenSerialRequestT { + return new OpenSerialRequestT( + this.auto(), + this.port() + ); +} + + +unpackTo(_o: OpenSerialRequestT): void { + _o.auto = this.auto(); + _o.port = this.port(); +} +} + +export class OpenSerialRequestT implements flatbuffers.IGeneratedObject { +constructor( + public auto: boolean = false, + public port: string|Uint8Array|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const port = (this.port !== null ? builder.createString(this.port!) : 0); + + return OpenSerialRequest.createOpenSerialRequest(builder, + this.auto, + port + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/oscrouter-settings.ts b/protocol/typescript/src/solarxr-protocol/rpc/oscrouter-settings.ts index e6da3aa2..f7e2f618 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/oscrouter-settings.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/oscrouter-settings.ts @@ -1,78 +1,78 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { OSCSettings, OSCSettingsT } from '../../solarxr-protocol/rpc/oscsettings.js'; - - -/** - * OSC router forwards messages it receives, to allow the usage of multiple OSC programs for the same app. - */ -export class OSCRouterSettings implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):OSCRouterSettings { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsOSCRouterSettings(bb:flatbuffers.ByteBuffer, obj?:OSCRouterSettings):OSCRouterSettings { - return (obj || new OSCRouterSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsOSCRouterSettings(bb:flatbuffers.ByteBuffer, obj?:OSCRouterSettings):OSCRouterSettings { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new OSCRouterSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -oscSettings(obj?:OSCSettings):OSCSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new OSCSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -static startOSCRouterSettings(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addOscSettings(builder:flatbuffers.Builder, oscSettingsOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, oscSettingsOffset, 0); -} - -static endOSCRouterSettings(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createOSCRouterSettings(builder:flatbuffers.Builder, oscSettingsOffset:flatbuffers.Offset):flatbuffers.Offset { - OSCRouterSettings.startOSCRouterSettings(builder); - OSCRouterSettings.addOscSettings(builder, oscSettingsOffset); - return OSCRouterSettings.endOSCRouterSettings(builder); -} - -unpack(): OSCRouterSettingsT { - return new OSCRouterSettingsT( - (this.oscSettings() !== null ? this.oscSettings()!.unpack() : null) - ); -} - - -unpackTo(_o: OSCRouterSettingsT): void { - _o.oscSettings = (this.oscSettings() !== null ? this.oscSettings()!.unpack() : null); -} -} - -export class OSCRouterSettingsT implements flatbuffers.IGeneratedObject { -constructor( - public oscSettings: OSCSettingsT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const oscSettings = (this.oscSettings !== null ? this.oscSettings!.pack(builder) : 0); - - return OSCRouterSettings.createOSCRouterSettings(builder, - oscSettings - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { OSCSettings, OSCSettingsT } from '../../solarxr-protocol/rpc/oscsettings.js'; + + +/** + * OSC router forwards messages it receives, to allow the usage of multiple OSC programs for the same app. + */ +export class OSCRouterSettings implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):OSCRouterSettings { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsOSCRouterSettings(bb:flatbuffers.ByteBuffer, obj?:OSCRouterSettings):OSCRouterSettings { + return (obj || new OSCRouterSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsOSCRouterSettings(bb:flatbuffers.ByteBuffer, obj?:OSCRouterSettings):OSCRouterSettings { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new OSCRouterSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +oscSettings(obj?:OSCSettings):OSCSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new OSCSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +static startOSCRouterSettings(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addOscSettings(builder:flatbuffers.Builder, oscSettingsOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, oscSettingsOffset, 0); +} + +static endOSCRouterSettings(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createOSCRouterSettings(builder:flatbuffers.Builder, oscSettingsOffset:flatbuffers.Offset):flatbuffers.Offset { + OSCRouterSettings.startOSCRouterSettings(builder); + OSCRouterSettings.addOscSettings(builder, oscSettingsOffset); + return OSCRouterSettings.endOSCRouterSettings(builder); +} + +unpack(): OSCRouterSettingsT { + return new OSCRouterSettingsT( + (this.oscSettings() !== null ? this.oscSettings()!.unpack() : null) + ); +} + + +unpackTo(_o: OSCRouterSettingsT): void { + _o.oscSettings = (this.oscSettings() !== null ? this.oscSettings()!.unpack() : null); +} +} + +export class OSCRouterSettingsT implements flatbuffers.IGeneratedObject { +constructor( + public oscSettings: OSCSettingsT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const oscSettings = (this.oscSettings !== null ? this.oscSettings!.pack(builder) : 0); + + return OSCRouterSettings.createOSCRouterSettings(builder, + oscSettings + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/oscsettings.ts b/protocol/typescript/src/solarxr-protocol/rpc/oscsettings.ts index 019e6ec8..70377399 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/oscsettings.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/oscsettings.ts @@ -1,121 +1,121 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * OSC Settings that are used in *any* osc application. - */ -export class OSCSettings implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):OSCSettings { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsOSCSettings(bb:flatbuffers.ByteBuffer, obj?:OSCSettings):OSCSettings { - return (obj || new OSCSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsOSCSettings(bb:flatbuffers.ByteBuffer, obj?:OSCSettings):OSCSettings { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new OSCSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -enabled():boolean { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -portIn():number { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0; -} - -portOut():number { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0; -} - -address():string|null -address(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -address(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 startOSCSettings(builder:flatbuffers.Builder) { - builder.startObject(4); -} - -static addEnabled(builder:flatbuffers.Builder, enabled:boolean) { - builder.addFieldInt8(0, +enabled, +false); -} - -static addPortIn(builder:flatbuffers.Builder, portIn:number) { - builder.addFieldInt16(1, portIn, 0); -} - -static addPortOut(builder:flatbuffers.Builder, portOut:number) { - builder.addFieldInt16(2, portOut, 0); -} - -static addAddress(builder:flatbuffers.Builder, addressOffset:flatbuffers.Offset) { - builder.addFieldOffset(3, addressOffset, 0); -} - -static endOSCSettings(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createOSCSettings(builder:flatbuffers.Builder, enabled:boolean, portIn:number, portOut:number, addressOffset:flatbuffers.Offset):flatbuffers.Offset { - OSCSettings.startOSCSettings(builder); - OSCSettings.addEnabled(builder, enabled); - OSCSettings.addPortIn(builder, portIn); - OSCSettings.addPortOut(builder, portOut); - OSCSettings.addAddress(builder, addressOffset); - return OSCSettings.endOSCSettings(builder); -} - -unpack(): OSCSettingsT { - return new OSCSettingsT( - this.enabled(), - this.portIn(), - this.portOut(), - this.address() - ); -} - - -unpackTo(_o: OSCSettingsT): void { - _o.enabled = this.enabled(); - _o.portIn = this.portIn(); - _o.portOut = this.portOut(); - _o.address = this.address(); -} -} - -export class OSCSettingsT implements flatbuffers.IGeneratedObject { -constructor( - public enabled: boolean = false, - public portIn: number = 0, - public portOut: number = 0, - public address: string|Uint8Array|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const address = (this.address !== null ? builder.createString(this.address!) : 0); - - return OSCSettings.createOSCSettings(builder, - this.enabled, - this.portIn, - this.portOut, - address - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * OSC Settings that are used in *any* osc application. + */ +export class OSCSettings implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):OSCSettings { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsOSCSettings(bb:flatbuffers.ByteBuffer, obj?:OSCSettings):OSCSettings { + return (obj || new OSCSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsOSCSettings(bb:flatbuffers.ByteBuffer, obj?:OSCSettings):OSCSettings { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new OSCSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +enabled():boolean { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +portIn():number { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0; +} + +portOut():number { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0; +} + +address():string|null +address(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +address(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 startOSCSettings(builder:flatbuffers.Builder) { + builder.startObject(4); +} + +static addEnabled(builder:flatbuffers.Builder, enabled:boolean) { + builder.addFieldInt8(0, +enabled, +false); +} + +static addPortIn(builder:flatbuffers.Builder, portIn:number) { + builder.addFieldInt16(1, portIn, 0); +} + +static addPortOut(builder:flatbuffers.Builder, portOut:number) { + builder.addFieldInt16(2, portOut, 0); +} + +static addAddress(builder:flatbuffers.Builder, addressOffset:flatbuffers.Offset) { + builder.addFieldOffset(3, addressOffset, 0); +} + +static endOSCSettings(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createOSCSettings(builder:flatbuffers.Builder, enabled:boolean, portIn:number, portOut:number, addressOffset:flatbuffers.Offset):flatbuffers.Offset { + OSCSettings.startOSCSettings(builder); + OSCSettings.addEnabled(builder, enabled); + OSCSettings.addPortIn(builder, portIn); + OSCSettings.addPortOut(builder, portOut); + OSCSettings.addAddress(builder, addressOffset); + return OSCSettings.endOSCSettings(builder); +} + +unpack(): OSCSettingsT { + return new OSCSettingsT( + this.enabled(), + this.portIn(), + this.portOut(), + this.address() + ); +} + + +unpackTo(_o: OSCSettingsT): void { + _o.enabled = this.enabled(); + _o.portIn = this.portIn(); + _o.portOut = this.portOut(); + _o.address = this.address(); +} +} + +export class OSCSettingsT implements flatbuffers.IGeneratedObject { +constructor( + public enabled: boolean = false, + public portIn: number = 0, + public portOut: number = 0, + public address: string|Uint8Array|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const address = (this.address !== null ? builder.createString(this.address!) : 0); + + return OSCSettings.createOSCSettings(builder, + this.enabled, + this.portIn, + this.portOut, + address + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/osctrackers-setting.ts b/protocol/typescript/src/solarxr-protocol/rpc/osctrackers-setting.ts index 3519d494..aa5a86ad 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/osctrackers-setting.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/osctrackers-setting.ts @@ -1,156 +1,156 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class OSCTrackersSetting implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):OSCTrackersSetting { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsOSCTrackersSetting(bb:flatbuffers.ByteBuffer, obj?:OSCTrackersSetting):OSCTrackersSetting { - return (obj || new OSCTrackersSetting()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsOSCTrackersSetting(bb:flatbuffers.ByteBuffer, obj?:OSCTrackersSetting):OSCTrackersSetting { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new OSCTrackersSetting()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -head():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; -} - -waist():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; -} - -feet():boolean { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -elbows():boolean { - const offset = this.bb!.__offset(this.bb_pos, 14); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -hands():boolean { - const offset = this.bb!.__offset(this.bb_pos, 16); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startOSCTrackersSetting(builder:flatbuffers.Builder) { - builder.startObject(7); -} - -static addHead(builder:flatbuffers.Builder, head:boolean) { - builder.addFieldInt8(0, +head, +false); -} - -static addChest(builder:flatbuffers.Builder, chest:boolean) { - builder.addFieldInt8(1, +chest, +false); -} - -static addWaist(builder:flatbuffers.Builder, waist:boolean) { - builder.addFieldInt8(2, +waist, +false); -} - -static addKnees(builder:flatbuffers.Builder, knees:boolean) { - builder.addFieldInt8(3, +knees, +false); -} - -static addFeet(builder:flatbuffers.Builder, feet:boolean) { - builder.addFieldInt8(4, +feet, +false); -} - -static addElbows(builder:flatbuffers.Builder, elbows:boolean) { - builder.addFieldInt8(5, +elbows, +false); -} - -static addHands(builder:flatbuffers.Builder, hands:boolean) { - builder.addFieldInt8(6, +hands, +false); -} - -static endOSCTrackersSetting(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createOSCTrackersSetting(builder:flatbuffers.Builder, head:boolean, chest:boolean, waist:boolean, knees:boolean, feet:boolean, elbows:boolean, hands:boolean):flatbuffers.Offset { - OSCTrackersSetting.startOSCTrackersSetting(builder); - OSCTrackersSetting.addHead(builder, head); - OSCTrackersSetting.addChest(builder, chest); - OSCTrackersSetting.addWaist(builder, waist); - OSCTrackersSetting.addKnees(builder, knees); - OSCTrackersSetting.addFeet(builder, feet); - OSCTrackersSetting.addElbows(builder, elbows); - OSCTrackersSetting.addHands(builder, hands); - return OSCTrackersSetting.endOSCTrackersSetting(builder); -} - -unpack(): OSCTrackersSettingT { - return new OSCTrackersSettingT( - this.head(), - this.chest(), - this.waist(), - this.knees(), - this.feet(), - this.elbows(), - this.hands() - ); -} - - -unpackTo(_o: OSCTrackersSettingT): void { - _o.head = this.head(); - _o.chest = this.chest(); - _o.waist = this.waist(); - _o.knees = this.knees(); - _o.feet = this.feet(); - _o.elbows = this.elbows(); - _o.hands = this.hands(); -} -} - -export class OSCTrackersSettingT implements flatbuffers.IGeneratedObject { -constructor( - public head: boolean = false, - public chest: boolean = false, - public waist: boolean = false, - public knees: boolean = false, - public feet: boolean = false, - public elbows: boolean = false, - public hands: boolean = false -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return OSCTrackersSetting.createOSCTrackersSetting(builder, - this.head, - this.chest, - this.waist, - this.knees, - this.feet, - this.elbows, - this.hands - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class OSCTrackersSetting implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):OSCTrackersSetting { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsOSCTrackersSetting(bb:flatbuffers.ByteBuffer, obj?:OSCTrackersSetting):OSCTrackersSetting { + return (obj || new OSCTrackersSetting()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsOSCTrackersSetting(bb:flatbuffers.ByteBuffer, obj?:OSCTrackersSetting):OSCTrackersSetting { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new OSCTrackersSetting()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +head():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; +} + +waist():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; +} + +feet():boolean { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +elbows():boolean { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +hands():boolean { + const offset = this.bb!.__offset(this.bb_pos, 16); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startOSCTrackersSetting(builder:flatbuffers.Builder) { + builder.startObject(7); +} + +static addHead(builder:flatbuffers.Builder, head:boolean) { + builder.addFieldInt8(0, +head, +false); +} + +static addChest(builder:flatbuffers.Builder, chest:boolean) { + builder.addFieldInt8(1, +chest, +false); +} + +static addWaist(builder:flatbuffers.Builder, waist:boolean) { + builder.addFieldInt8(2, +waist, +false); +} + +static addKnees(builder:flatbuffers.Builder, knees:boolean) { + builder.addFieldInt8(3, +knees, +false); +} + +static addFeet(builder:flatbuffers.Builder, feet:boolean) { + builder.addFieldInt8(4, +feet, +false); +} + +static addElbows(builder:flatbuffers.Builder, elbows:boolean) { + builder.addFieldInt8(5, +elbows, +false); +} + +static addHands(builder:flatbuffers.Builder, hands:boolean) { + builder.addFieldInt8(6, +hands, +false); +} + +static endOSCTrackersSetting(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createOSCTrackersSetting(builder:flatbuffers.Builder, head:boolean, chest:boolean, waist:boolean, knees:boolean, feet:boolean, elbows:boolean, hands:boolean):flatbuffers.Offset { + OSCTrackersSetting.startOSCTrackersSetting(builder); + OSCTrackersSetting.addHead(builder, head); + OSCTrackersSetting.addChest(builder, chest); + OSCTrackersSetting.addWaist(builder, waist); + OSCTrackersSetting.addKnees(builder, knees); + OSCTrackersSetting.addFeet(builder, feet); + OSCTrackersSetting.addElbows(builder, elbows); + OSCTrackersSetting.addHands(builder, hands); + return OSCTrackersSetting.endOSCTrackersSetting(builder); +} + +unpack(): OSCTrackersSettingT { + return new OSCTrackersSettingT( + this.head(), + this.chest(), + this.waist(), + this.knees(), + this.feet(), + this.elbows(), + this.hands() + ); +} + + +unpackTo(_o: OSCTrackersSettingT): void { + _o.head = this.head(); + _o.chest = this.chest(); + _o.waist = this.waist(); + _o.knees = this.knees(); + _o.feet = this.feet(); + _o.elbows = this.elbows(); + _o.hands = this.hands(); +} +} + +export class OSCTrackersSettingT implements flatbuffers.IGeneratedObject { +constructor( + public head: boolean = false, + public chest: boolean = false, + public waist: boolean = false, + public knees: boolean = false, + public feet: boolean = false, + public elbows: boolean = false, + public hands: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return OSCTrackersSetting.createOSCTrackersSetting(builder, + this.head, + this.chest, + this.waist, + this.knees, + this.feet, + this.elbows, + this.hands + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/otafirmware-update.ts b/protocol/typescript/src/solarxr-protocol/rpc/otafirmware-update.ts new file mode 100644 index 00000000..1b9387fb --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/otafirmware-update.ts @@ -0,0 +1,91 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { DeviceId, DeviceIdT } from '../../solarxr-protocol/datatypes/device-id.js'; +import { FirmwarePart, FirmwarePartT } from '../../solarxr-protocol/rpc/firmware-part.js'; + + +export class OTAFirmwareUpdate implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):OTAFirmwareUpdate { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsOTAFirmwareUpdate(bb:flatbuffers.ByteBuffer, obj?:OTAFirmwareUpdate):OTAFirmwareUpdate { + return (obj || new OTAFirmwareUpdate()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsOTAFirmwareUpdate(bb:flatbuffers.ByteBuffer, obj?:OTAFirmwareUpdate):OTAFirmwareUpdate { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new OTAFirmwareUpdate()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +/** + * id of the device, this refer to the actual DeviceId from the protocol + */ +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; +} + +/** + * A table containing the url and offset of the firmware bin file + */ +firmwarePart(obj?:FirmwarePart):FirmwarePart|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? (obj || new FirmwarePart()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +static startOTAFirmwareUpdate(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addDeviceId(builder:flatbuffers.Builder, deviceIdOffset:flatbuffers.Offset) { + builder.addFieldStruct(0, deviceIdOffset, 0); +} + +static addFirmwarePart(builder:flatbuffers.Builder, firmwarePartOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, firmwarePartOffset, 0); +} + +static endOTAFirmwareUpdate(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + + +unpack(): OTAFirmwareUpdateT { + return new OTAFirmwareUpdateT( + (this.deviceId() !== null ? this.deviceId()!.unpack() : null), + (this.firmwarePart() !== null ? this.firmwarePart()!.unpack() : null) + ); +} + + +unpackTo(_o: OTAFirmwareUpdateT): void { + _o.deviceId = (this.deviceId() !== null ? this.deviceId()!.unpack() : null); + _o.firmwarePart = (this.firmwarePart() !== null ? this.firmwarePart()!.unpack() : null); +} +} + +export class OTAFirmwareUpdateT implements flatbuffers.IGeneratedObject { +constructor( + public deviceId: DeviceIdT|null = null, + public firmwarePart: FirmwarePartT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const firmwarePart = (this.firmwarePart !== null ? this.firmwarePart!.pack(builder) : 0); + + OTAFirmwareUpdate.startOTAFirmwareUpdate(builder); + OTAFirmwareUpdate.addDeviceId(builder, (this.deviceId !== null ? this.deviceId!.pack(builder) : 0)); + OTAFirmwareUpdate.addFirmwarePart(builder, firmwarePart); + + return OTAFirmwareUpdate.endOTAFirmwareUpdate(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 index cac228e1..b24f86d3 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 79e8d215..18a096d6 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 2066c1b1..4dcb09ae 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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-bvhrequest.ts index 05fbce7b..105e112c 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/record-bvhrequest.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/record-bvhrequest.ts @@ -1,72 +1,72 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class RecordBVHRequest implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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-bvhstatus.ts index 0627d1ea..e859104e 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/record-bvhstatus.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/record-bvhstatus.ts @@ -1,72 +1,72 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class RecordBVHStatus implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 6cbd8745..522ac465 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.js'; - - -export class ResetRequest implements flatbuffers.IUnpackableObject { - 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.Yaw; -} - -static startResetRequest(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addResetType(builder:flatbuffers.Builder, resetType:ResetType) { - builder.addFieldInt8(0, resetType, ResetType.Yaw); -} - -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 implements flatbuffers.IGeneratedObject { -constructor( - public resetType: ResetType = ResetType.Yaw -){} - - -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.js'; + + +export class ResetRequest implements flatbuffers.IUnpackableObject { + 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.Yaw; +} + +static startResetRequest(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addResetType(builder:flatbuffers.Builder, resetType:ResetType) { + builder.addFieldInt8(0, resetType, ResetType.Yaw); +} + +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 implements flatbuffers.IGeneratedObject { +constructor( + public resetType: ResetType = ResetType.Yaw +){} + + +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 index 03dbbba7..507bbdd0 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/reset-response.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/reset-response.ts @@ -1,88 +1,88 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { ResetStatus } from '../../solarxr-protocol/rpc/reset-status.js'; -import { ResetType } from '../../solarxr-protocol/rpc/reset-type.js'; - - -export class ResetResponse implements flatbuffers.IUnpackableObject { - 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); -} - -resetType():ResetType { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : ResetType.Yaw; -} - -status():ResetStatus { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : ResetStatus.STARTED; -} - -static startResetResponse(builder:flatbuffers.Builder) { - builder.startObject(2); -} - -static addResetType(builder:flatbuffers.Builder, resetType:ResetType) { - builder.addFieldInt8(0, resetType, ResetType.Yaw); -} - -static addStatus(builder:flatbuffers.Builder, status:ResetStatus) { - builder.addFieldInt8(1, status, ResetStatus.STARTED); -} - -static endResetResponse(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createResetResponse(builder:flatbuffers.Builder, resetType:ResetType, status:ResetStatus):flatbuffers.Offset { - ResetResponse.startResetResponse(builder); - ResetResponse.addResetType(builder, resetType); - ResetResponse.addStatus(builder, status); - return ResetResponse.endResetResponse(builder); -} - -unpack(): ResetResponseT { - return new ResetResponseT( - this.resetType(), - this.status() - ); -} - - -unpackTo(_o: ResetResponseT): void { - _o.resetType = this.resetType(); - _o.status = this.status(); -} -} - -export class ResetResponseT implements flatbuffers.IGeneratedObject { -constructor( - public resetType: ResetType = ResetType.Yaw, - public status: ResetStatus = ResetStatus.STARTED -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return ResetResponse.createResetResponse(builder, - this.resetType, - this.status - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { ResetStatus } from '../../solarxr-protocol/rpc/reset-status.js'; +import { ResetType } from '../../solarxr-protocol/rpc/reset-type.js'; + + +export class ResetResponse implements flatbuffers.IUnpackableObject { + 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); +} + +resetType():ResetType { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : ResetType.Yaw; +} + +status():ResetStatus { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : ResetStatus.STARTED; +} + +static startResetResponse(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addResetType(builder:flatbuffers.Builder, resetType:ResetType) { + builder.addFieldInt8(0, resetType, ResetType.Yaw); +} + +static addStatus(builder:flatbuffers.Builder, status:ResetStatus) { + builder.addFieldInt8(1, status, ResetStatus.STARTED); +} + +static endResetResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createResetResponse(builder:flatbuffers.Builder, resetType:ResetType, status:ResetStatus):flatbuffers.Offset { + ResetResponse.startResetResponse(builder); + ResetResponse.addResetType(builder, resetType); + ResetResponse.addStatus(builder, status); + return ResetResponse.endResetResponse(builder); +} + +unpack(): ResetResponseT { + return new ResetResponseT( + this.resetType(), + this.status() + ); +} + + +unpackTo(_o: ResetResponseT): void { + _o.resetType = this.resetType(); + _o.status = this.status(); +} +} + +export class ResetResponseT implements flatbuffers.IGeneratedObject { +constructor( + public resetType: ResetType = ResetType.Yaw, + public status: ResetStatus = ResetStatus.STARTED +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return ResetResponse.createResetResponse(builder, + this.resetType, + this.status + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/reset-status.ts b/protocol/typescript/src/solarxr-protocol/rpc/reset-status.ts index 405fed9c..cef1d2d3 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/reset-status.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/reset-status.ts @@ -1,6 +1,6 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -export enum ResetStatus { - STARTED = 0, - FINISHED = 1 -} +// automatically generated by the FlatBuffers compiler, do not modify + +export enum ResetStatus { + STARTED = 0, + FINISHED = 1 +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/reset-type.ts b/protocol/typescript/src/solarxr-protocol/rpc/reset-type.ts index 61c35e2d..b933ada4 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/reset-type.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/reset-type.ts @@ -1,11 +1,11 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -export enum ResetType { - Yaw = 0, - Full = 1, - - /** - * Second pose for calibrating mounting rotation - */ - Mounting = 2 -} +// automatically generated by the FlatBuffers compiler, do not modify + +export enum ResetType { + Yaw = 0, + Full = 1, + + /** + * Second pose for calibrating mounting rotation + */ + Mounting = 2 +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/resets-settings.ts b/protocol/typescript/src/solarxr-protocol/rpc/resets-settings.ts index 804f7930..60516ec5 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/resets-settings.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/resets-settings.ts @@ -1,129 +1,129 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { ArmsMountingResetMode } from '../../solarxr-protocol/rpc/arms-mounting-reset-mode.js'; - - -export class ResetsSettings implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):ResetsSettings { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsResetsSettings(bb:flatbuffers.ByteBuffer, obj?:ResetsSettings):ResetsSettings { - return (obj || new ResetsSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsResetsSettings(bb:flatbuffers.ByteBuffer, obj?:ResetsSettings):ResetsSettings { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new ResetsSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -resetMountingFeet():boolean { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -armsMountingResetMode():ArmsMountingResetMode { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : ArmsMountingResetMode.BACK; -} - -yawResetSmoothTime():number { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; -} - -saveMountingReset():boolean { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -resetHmdPitch():boolean { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startResetsSettings(builder:flatbuffers.Builder) { - builder.startObject(5); -} - -static addResetMountingFeet(builder:flatbuffers.Builder, resetMountingFeet:boolean) { - builder.addFieldInt8(0, +resetMountingFeet, +false); -} - -static addArmsMountingResetMode(builder:flatbuffers.Builder, armsMountingResetMode:ArmsMountingResetMode) { - builder.addFieldInt8(1, armsMountingResetMode, ArmsMountingResetMode.BACK); -} - -static addYawResetSmoothTime(builder:flatbuffers.Builder, yawResetSmoothTime:number) { - builder.addFieldFloat32(2, yawResetSmoothTime, 0.0); -} - -static addSaveMountingReset(builder:flatbuffers.Builder, saveMountingReset:boolean) { - builder.addFieldInt8(3, +saveMountingReset, +false); -} - -static addResetHmdPitch(builder:flatbuffers.Builder, resetHmdPitch:boolean) { - builder.addFieldInt8(4, +resetHmdPitch, +false); -} - -static endResetsSettings(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createResetsSettings(builder:flatbuffers.Builder, resetMountingFeet:boolean, armsMountingResetMode:ArmsMountingResetMode, yawResetSmoothTime:number, saveMountingReset:boolean, resetHmdPitch:boolean):flatbuffers.Offset { - ResetsSettings.startResetsSettings(builder); - ResetsSettings.addResetMountingFeet(builder, resetMountingFeet); - ResetsSettings.addArmsMountingResetMode(builder, armsMountingResetMode); - ResetsSettings.addYawResetSmoothTime(builder, yawResetSmoothTime); - ResetsSettings.addSaveMountingReset(builder, saveMountingReset); - ResetsSettings.addResetHmdPitch(builder, resetHmdPitch); - return ResetsSettings.endResetsSettings(builder); -} - -unpack(): ResetsSettingsT { - return new ResetsSettingsT( - this.resetMountingFeet(), - this.armsMountingResetMode(), - this.yawResetSmoothTime(), - this.saveMountingReset(), - this.resetHmdPitch() - ); -} - - -unpackTo(_o: ResetsSettingsT): void { - _o.resetMountingFeet = this.resetMountingFeet(); - _o.armsMountingResetMode = this.armsMountingResetMode(); - _o.yawResetSmoothTime = this.yawResetSmoothTime(); - _o.saveMountingReset = this.saveMountingReset(); - _o.resetHmdPitch = this.resetHmdPitch(); -} -} - -export class ResetsSettingsT implements flatbuffers.IGeneratedObject { -constructor( - public resetMountingFeet: boolean = false, - public armsMountingResetMode: ArmsMountingResetMode = ArmsMountingResetMode.BACK, - public yawResetSmoothTime: number = 0.0, - public saveMountingReset: boolean = false, - public resetHmdPitch: boolean = false -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return ResetsSettings.createResetsSettings(builder, - this.resetMountingFeet, - this.armsMountingResetMode, - this.yawResetSmoothTime, - this.saveMountingReset, - this.resetHmdPitch - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { ArmsMountingResetMode } from '../../solarxr-protocol/rpc/arms-mounting-reset-mode.js'; + + +export class ResetsSettings implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):ResetsSettings { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsResetsSettings(bb:flatbuffers.ByteBuffer, obj?:ResetsSettings):ResetsSettings { + return (obj || new ResetsSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsResetsSettings(bb:flatbuffers.ByteBuffer, obj?:ResetsSettings):ResetsSettings { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new ResetsSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +resetMountingFeet():boolean { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +armsMountingResetMode():ArmsMountingResetMode { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : ArmsMountingResetMode.BACK; +} + +yawResetSmoothTime():number { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +saveMountingReset():boolean { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +resetHmdPitch():boolean { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startResetsSettings(builder:flatbuffers.Builder) { + builder.startObject(5); +} + +static addResetMountingFeet(builder:flatbuffers.Builder, resetMountingFeet:boolean) { + builder.addFieldInt8(0, +resetMountingFeet, +false); +} + +static addArmsMountingResetMode(builder:flatbuffers.Builder, armsMountingResetMode:ArmsMountingResetMode) { + builder.addFieldInt8(1, armsMountingResetMode, ArmsMountingResetMode.BACK); +} + +static addYawResetSmoothTime(builder:flatbuffers.Builder, yawResetSmoothTime:number) { + builder.addFieldFloat32(2, yawResetSmoothTime, 0.0); +} + +static addSaveMountingReset(builder:flatbuffers.Builder, saveMountingReset:boolean) { + builder.addFieldInt8(3, +saveMountingReset, +false); +} + +static addResetHmdPitch(builder:flatbuffers.Builder, resetHmdPitch:boolean) { + builder.addFieldInt8(4, +resetHmdPitch, +false); +} + +static endResetsSettings(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createResetsSettings(builder:flatbuffers.Builder, resetMountingFeet:boolean, armsMountingResetMode:ArmsMountingResetMode, yawResetSmoothTime:number, saveMountingReset:boolean, resetHmdPitch:boolean):flatbuffers.Offset { + ResetsSettings.startResetsSettings(builder); + ResetsSettings.addResetMountingFeet(builder, resetMountingFeet); + ResetsSettings.addArmsMountingResetMode(builder, armsMountingResetMode); + ResetsSettings.addYawResetSmoothTime(builder, yawResetSmoothTime); + ResetsSettings.addSaveMountingReset(builder, saveMountingReset); + ResetsSettings.addResetHmdPitch(builder, resetHmdPitch); + return ResetsSettings.endResetsSettings(builder); +} + +unpack(): ResetsSettingsT { + return new ResetsSettingsT( + this.resetMountingFeet(), + this.armsMountingResetMode(), + this.yawResetSmoothTime(), + this.saveMountingReset(), + this.resetHmdPitch() + ); +} + + +unpackTo(_o: ResetsSettingsT): void { + _o.resetMountingFeet = this.resetMountingFeet(); + _o.armsMountingResetMode = this.armsMountingResetMode(); + _o.yawResetSmoothTime = this.yawResetSmoothTime(); + _o.saveMountingReset = this.saveMountingReset(); + _o.resetHmdPitch = this.resetHmdPitch(); +} +} + +export class ResetsSettingsT implements flatbuffers.IGeneratedObject { +constructor( + public resetMountingFeet: boolean = false, + public armsMountingResetMode: ArmsMountingResetMode = ArmsMountingResetMode.BACK, + public yawResetSmoothTime: number = 0.0, + public saveMountingReset: boolean = false, + public resetHmdPitch: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return ResetsSettings.createResetsSettings(builder, + this.resetMountingFeet, + this.armsMountingResetMode, + this.yawResetSmoothTime, + this.saveMountingReset, + this.resetHmdPitch + ); +} +} 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 3aa47e06..94d57749 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts @@ -1,173 +1,176 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { TransactionId, TransactionIdT } from '../../solarxr-protocol/datatypes/transaction-id.js'; -import { AddUnknownDeviceRequest, AddUnknownDeviceRequestT } from '../../solarxr-protocol/rpc/add-unknown-device-request.js'; -import { AssignTrackerRequest, AssignTrackerRequestT } from '../../solarxr-protocol/rpc/assign-tracker-request.js'; -import { AutoBoneApplyRequest, AutoBoneApplyRequestT } from '../../solarxr-protocol/rpc/auto-bone-apply-request.js'; -import { AutoBoneCancelRecordingRequest, AutoBoneCancelRecordingRequestT } from '../../solarxr-protocol/rpc/auto-bone-cancel-recording-request.js'; -import { AutoBoneEpochResponse, AutoBoneEpochResponseT } from '../../solarxr-protocol/rpc/auto-bone-epoch-response.js'; -import { AutoBoneProcessRequest, AutoBoneProcessRequestT } from '../../solarxr-protocol/rpc/auto-bone-process-request.js'; -import { AutoBoneProcessStatusResponse, AutoBoneProcessStatusResponseT } from '../../solarxr-protocol/rpc/auto-bone-process-status-response.js'; -import { AutoBoneStopRecordingRequest, AutoBoneStopRecordingRequestT } from '../../solarxr-protocol/rpc/auto-bone-stop-recording-request.js'; -import { ChangeSettingsRequest, ChangeSettingsRequestT } from '../../solarxr-protocol/rpc/change-settings-request.js'; -import { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from '../../solarxr-protocol/rpc/change-skeleton-config-request.js'; -import { ClearDriftCompensationRequest, ClearDriftCompensationRequestT } from '../../solarxr-protocol/rpc/clear-drift-compensation-request.js'; -import { ClearMountingResetRequest, ClearMountingResetRequestT } from '../../solarxr-protocol/rpc/clear-mounting-reset-request.js'; -import { CloseSerialRequest, CloseSerialRequestT } from '../../solarxr-protocol/rpc/close-serial-request.js'; -import { ForgetDeviceRequest, ForgetDeviceRequestT } from '../../solarxr-protocol/rpc/forget-device-request.js'; -import { HeartbeatRequest, HeartbeatRequestT } from '../../solarxr-protocol/rpc/heartbeat-request.js'; -import { HeartbeatResponse, HeartbeatResponseT } from '../../solarxr-protocol/rpc/heartbeat-response.js'; -import { HeightRequest, HeightRequestT } from '../../solarxr-protocol/rpc/height-request.js'; -import { HeightResponse, HeightResponseT } from '../../solarxr-protocol/rpc/height-response.js'; -import { LegTweaksTmpChange, LegTweaksTmpChangeT } from '../../solarxr-protocol/rpc/leg-tweaks-tmp-change.js'; -import { LegTweaksTmpClear, LegTweaksTmpClearT } from '../../solarxr-protocol/rpc/leg-tweaks-tmp-clear.js'; -import { NewSerialDeviceResponse, NewSerialDeviceResponseT } from '../../solarxr-protocol/rpc/new-serial-device-response.js'; -import { OpenSerialRequest, OpenSerialRequestT } from '../../solarxr-protocol/rpc/open-serial-request.js'; -import { OverlayDisplayModeChangeRequest, OverlayDisplayModeChangeRequestT } from '../../solarxr-protocol/rpc/overlay-display-mode-change-request.js'; -import { OverlayDisplayModeRequest, OverlayDisplayModeRequestT } from '../../solarxr-protocol/rpc/overlay-display-mode-request.js'; -import { OverlayDisplayModeResponse, OverlayDisplayModeResponseT } from '../../solarxr-protocol/rpc/overlay-display-mode-response.js'; -import { RecordBVHRequest, RecordBVHRequestT } from '../../solarxr-protocol/rpc/record-bvhrequest.js'; -import { RecordBVHStatus, RecordBVHStatusT } from '../../solarxr-protocol/rpc/record-bvhstatus.js'; -import { ResetRequest, ResetRequestT } from '../../solarxr-protocol/rpc/reset-request.js'; -import { ResetResponse, ResetResponseT } from '../../solarxr-protocol/rpc/reset-response.js'; -import { RpcMessage, unionToRpcMessage, unionListToRpcMessage } from '../../solarxr-protocol/rpc/rpc-message.js'; -import { SaveFileNotification, SaveFileNotificationT } from '../../solarxr-protocol/rpc/save-file-notification.js'; -import { SerialDevicesRequest, SerialDevicesRequestT } from '../../solarxr-protocol/rpc/serial-devices-request.js'; -import { SerialDevicesResponse, SerialDevicesResponseT } from '../../solarxr-protocol/rpc/serial-devices-response.js'; -import { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from '../../solarxr-protocol/rpc/serial-tracker-factory-reset-request.js'; -import { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from '../../solarxr-protocol/rpc/serial-tracker-get-info-request.js'; -import { SerialTrackerGetWifiScanRequest, SerialTrackerGetWifiScanRequestT } from '../../solarxr-protocol/rpc/serial-tracker-get-wifi-scan-request.js'; -import { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from '../../solarxr-protocol/rpc/serial-tracker-reboot-request.js'; -import { SerialUpdateResponse, SerialUpdateResponseT } from '../../solarxr-protocol/rpc/serial-update-response.js'; -import { ServerInfosRequest, ServerInfosRequestT } from '../../solarxr-protocol/rpc/server-infos-request.js'; -import { ServerInfosResponse, ServerInfosResponseT } from '../../solarxr-protocol/rpc/server-infos-response.js'; -import { SetPauseTrackingRequest, SetPauseTrackingRequestT } from '../../solarxr-protocol/rpc/set-pause-tracking-request.js'; -import { SetWifiRequest, SetWifiRequestT } from '../../solarxr-protocol/rpc/set-wifi-request.js'; -import { SettingsRequest, SettingsRequestT } from '../../solarxr-protocol/rpc/settings-request.js'; -import { SettingsResponse, SettingsResponseT } from '../../solarxr-protocol/rpc/settings-response.js'; -import { SkeletonConfigRequest, SkeletonConfigRequestT } from '../../solarxr-protocol/rpc/skeleton-config-request.js'; -import { SkeletonConfigResponse, SkeletonConfigResponseT } from '../../solarxr-protocol/rpc/skeleton-config-response.js'; -import { SkeletonResetAllRequest, SkeletonResetAllRequestT } from '../../solarxr-protocol/rpc/skeleton-reset-all-request.js'; -import { StartWifiProvisioningRequest, StartWifiProvisioningRequestT } from '../../solarxr-protocol/rpc/start-wifi-provisioning-request.js'; -import { StatusSystemFixed, StatusSystemFixedT } from '../../solarxr-protocol/rpc/status-system-fixed.js'; -import { StatusSystemRequest, StatusSystemRequestT } from '../../solarxr-protocol/rpc/status-system-request.js'; -import { StatusSystemResponse, StatusSystemResponseT } from '../../solarxr-protocol/rpc/status-system-response.js'; -import { StatusSystemUpdate, StatusSystemUpdateT } from '../../solarxr-protocol/rpc/status-system-update.js'; -import { StopWifiProvisioningRequest, StopWifiProvisioningRequestT } from '../../solarxr-protocol/rpc/stop-wifi-provisioning-request.js'; -import { TapDetectionSetupNotification, TapDetectionSetupNotificationT } from '../../solarxr-protocol/rpc/tap-detection-setup-notification.js'; -import { TrackingPauseStateRequest, TrackingPauseStateRequestT } from '../../solarxr-protocol/rpc/tracking-pause-state-request.js'; -import { TrackingPauseStateResponse, TrackingPauseStateResponseT } from '../../solarxr-protocol/rpc/tracking-pause-state-response.js'; -import { UnknownDeviceHandshakeNotification, UnknownDeviceHandshakeNotificationT } from '../../solarxr-protocol/rpc/unknown-device-handshake-notification.js'; -import { WifiProvisioningStatusResponse, WifiProvisioningStatusResponseT } from '../../solarxr-protocol/rpc/wifi-provisioning-status-response.js'; - - -export class RpcMessageHeader implements flatbuffers.IUnpackableObject { - 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(), - (() => { - const 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 = (() => { - const temp = unionToRpcMessage(this.messageType(), this.message.bind(this)); - if(temp === null) { return null; } - return temp.unpack() - })(); -} -} - -export class RpcMessageHeaderT implements flatbuffers.IGeneratedObject { -constructor( - public txId: TransactionIdT|null = null, - public messageType: RpcMessage = RpcMessage.NONE, - public message: AddUnknownDeviceRequestT|AssignTrackerRequestT|AutoBoneApplyRequestT|AutoBoneCancelRecordingRequestT|AutoBoneEpochResponseT|AutoBoneProcessRequestT|AutoBoneProcessStatusResponseT|AutoBoneStopRecordingRequestT|ChangeSettingsRequestT|ChangeSkeletonConfigRequestT|ClearDriftCompensationRequestT|ClearMountingResetRequestT|CloseSerialRequestT|ForgetDeviceRequestT|HeartbeatRequestT|HeartbeatResponseT|HeightRequestT|HeightResponseT|LegTweaksTmpChangeT|LegTweaksTmpClearT|NewSerialDeviceResponseT|OpenSerialRequestT|OverlayDisplayModeChangeRequestT|OverlayDisplayModeRequestT|OverlayDisplayModeResponseT|RecordBVHRequestT|RecordBVHStatusT|ResetRequestT|ResetResponseT|SaveFileNotificationT|SerialDevicesRequestT|SerialDevicesResponseT|SerialTrackerFactoryResetRequestT|SerialTrackerGetInfoRequestT|SerialTrackerGetWifiScanRequestT|SerialTrackerRebootRequestT|SerialUpdateResponseT|ServerInfosRequestT|ServerInfosResponseT|SetPauseTrackingRequestT|SetWifiRequestT|SettingsRequestT|SettingsResponseT|SkeletonConfigRequestT|SkeletonConfigResponseT|SkeletonResetAllRequestT|StartWifiProvisioningRequestT|StatusSystemFixedT|StatusSystemRequestT|StatusSystemResponseT|StatusSystemUpdateT|StopWifiProvisioningRequestT|TapDetectionSetupNotificationT|TrackingPauseStateRequestT|TrackingPauseStateResponseT|UnknownDeviceHandshakeNotificationT|WifiProvisioningStatusResponseT|null = null -){} - - -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.js'; +import { AddUnknownDeviceRequest, AddUnknownDeviceRequestT } from '../../solarxr-protocol/rpc/add-unknown-device-request.js'; +import { AssignTrackerRequest, AssignTrackerRequestT } from '../../solarxr-protocol/rpc/assign-tracker-request.js'; +import { AutoBoneApplyRequest, AutoBoneApplyRequestT } from '../../solarxr-protocol/rpc/auto-bone-apply-request.js'; +import { AutoBoneCancelRecordingRequest, AutoBoneCancelRecordingRequestT } from '../../solarxr-protocol/rpc/auto-bone-cancel-recording-request.js'; +import { AutoBoneEpochResponse, AutoBoneEpochResponseT } from '../../solarxr-protocol/rpc/auto-bone-epoch-response.js'; +import { AutoBoneProcessRequest, AutoBoneProcessRequestT } from '../../solarxr-protocol/rpc/auto-bone-process-request.js'; +import { AutoBoneProcessStatusResponse, AutoBoneProcessStatusResponseT } from '../../solarxr-protocol/rpc/auto-bone-process-status-response.js'; +import { AutoBoneStopRecordingRequest, AutoBoneStopRecordingRequestT } from '../../solarxr-protocol/rpc/auto-bone-stop-recording-request.js'; +import { ChangeSettingsRequest, ChangeSettingsRequestT } from '../../solarxr-protocol/rpc/change-settings-request.js'; +import { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from '../../solarxr-protocol/rpc/change-skeleton-config-request.js'; +import { ClearDriftCompensationRequest, ClearDriftCompensationRequestT } from '../../solarxr-protocol/rpc/clear-drift-compensation-request.js'; +import { ClearMountingResetRequest, ClearMountingResetRequestT } from '../../solarxr-protocol/rpc/clear-mounting-reset-request.js'; +import { CloseSerialRequest, CloseSerialRequestT } from '../../solarxr-protocol/rpc/close-serial-request.js'; +import { FirmwareUpdateRequest, FirmwareUpdateRequestT } from '../../solarxr-protocol/rpc/firmware-update-request.js'; +import { FirmwareUpdateStatusResponse, FirmwareUpdateStatusResponseT } from '../../solarxr-protocol/rpc/firmware-update-status-response.js'; +import { FirmwareUpdateStopQueuesRequest, FirmwareUpdateStopQueuesRequestT } from '../../solarxr-protocol/rpc/firmware-update-stop-queues-request.js'; +import { ForgetDeviceRequest, ForgetDeviceRequestT } from '../../solarxr-protocol/rpc/forget-device-request.js'; +import { HeartbeatRequest, HeartbeatRequestT } from '../../solarxr-protocol/rpc/heartbeat-request.js'; +import { HeartbeatResponse, HeartbeatResponseT } from '../../solarxr-protocol/rpc/heartbeat-response.js'; +import { HeightRequest, HeightRequestT } from '../../solarxr-protocol/rpc/height-request.js'; +import { HeightResponse, HeightResponseT } from '../../solarxr-protocol/rpc/height-response.js'; +import { LegTweaksTmpChange, LegTweaksTmpChangeT } from '../../solarxr-protocol/rpc/leg-tweaks-tmp-change.js'; +import { LegTweaksTmpClear, LegTweaksTmpClearT } from '../../solarxr-protocol/rpc/leg-tweaks-tmp-clear.js'; +import { NewSerialDeviceResponse, NewSerialDeviceResponseT } from '../../solarxr-protocol/rpc/new-serial-device-response.js'; +import { OpenSerialRequest, OpenSerialRequestT } from '../../solarxr-protocol/rpc/open-serial-request.js'; +import { OverlayDisplayModeChangeRequest, OverlayDisplayModeChangeRequestT } from '../../solarxr-protocol/rpc/overlay-display-mode-change-request.js'; +import { OverlayDisplayModeRequest, OverlayDisplayModeRequestT } from '../../solarxr-protocol/rpc/overlay-display-mode-request.js'; +import { OverlayDisplayModeResponse, OverlayDisplayModeResponseT } from '../../solarxr-protocol/rpc/overlay-display-mode-response.js'; +import { RecordBVHRequest, RecordBVHRequestT } from '../../solarxr-protocol/rpc/record-bvhrequest.js'; +import { RecordBVHStatus, RecordBVHStatusT } from '../../solarxr-protocol/rpc/record-bvhstatus.js'; +import { ResetRequest, ResetRequestT } from '../../solarxr-protocol/rpc/reset-request.js'; +import { ResetResponse, ResetResponseT } from '../../solarxr-protocol/rpc/reset-response.js'; +import { RpcMessage, unionToRpcMessage, unionListToRpcMessage } from '../../solarxr-protocol/rpc/rpc-message.js'; +import { SaveFileNotification, SaveFileNotificationT } from '../../solarxr-protocol/rpc/save-file-notification.js'; +import { SerialDevicesRequest, SerialDevicesRequestT } from '../../solarxr-protocol/rpc/serial-devices-request.js'; +import { SerialDevicesResponse, SerialDevicesResponseT } from '../../solarxr-protocol/rpc/serial-devices-response.js'; +import { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from '../../solarxr-protocol/rpc/serial-tracker-factory-reset-request.js'; +import { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from '../../solarxr-protocol/rpc/serial-tracker-get-info-request.js'; +import { SerialTrackerGetWifiScanRequest, SerialTrackerGetWifiScanRequestT } from '../../solarxr-protocol/rpc/serial-tracker-get-wifi-scan-request.js'; +import { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from '../../solarxr-protocol/rpc/serial-tracker-reboot-request.js'; +import { SerialUpdateResponse, SerialUpdateResponseT } from '../../solarxr-protocol/rpc/serial-update-response.js'; +import { ServerInfosRequest, ServerInfosRequestT } from '../../solarxr-protocol/rpc/server-infos-request.js'; +import { ServerInfosResponse, ServerInfosResponseT } from '../../solarxr-protocol/rpc/server-infos-response.js'; +import { SetPauseTrackingRequest, SetPauseTrackingRequestT } from '../../solarxr-protocol/rpc/set-pause-tracking-request.js'; +import { SetWifiRequest, SetWifiRequestT } from '../../solarxr-protocol/rpc/set-wifi-request.js'; +import { SettingsRequest, SettingsRequestT } from '../../solarxr-protocol/rpc/settings-request.js'; +import { SettingsResponse, SettingsResponseT } from '../../solarxr-protocol/rpc/settings-response.js'; +import { SkeletonConfigRequest, SkeletonConfigRequestT } from '../../solarxr-protocol/rpc/skeleton-config-request.js'; +import { SkeletonConfigResponse, SkeletonConfigResponseT } from '../../solarxr-protocol/rpc/skeleton-config-response.js'; +import { SkeletonResetAllRequest, SkeletonResetAllRequestT } from '../../solarxr-protocol/rpc/skeleton-reset-all-request.js'; +import { StartWifiProvisioningRequest, StartWifiProvisioningRequestT } from '../../solarxr-protocol/rpc/start-wifi-provisioning-request.js'; +import { StatusSystemFixed, StatusSystemFixedT } from '../../solarxr-protocol/rpc/status-system-fixed.js'; +import { StatusSystemRequest, StatusSystemRequestT } from '../../solarxr-protocol/rpc/status-system-request.js'; +import { StatusSystemResponse, StatusSystemResponseT } from '../../solarxr-protocol/rpc/status-system-response.js'; +import { StatusSystemUpdate, StatusSystemUpdateT } from '../../solarxr-protocol/rpc/status-system-update.js'; +import { StopWifiProvisioningRequest, StopWifiProvisioningRequestT } from '../../solarxr-protocol/rpc/stop-wifi-provisioning-request.js'; +import { TapDetectionSetupNotification, TapDetectionSetupNotificationT } from '../../solarxr-protocol/rpc/tap-detection-setup-notification.js'; +import { TrackingPauseStateRequest, TrackingPauseStateRequestT } from '../../solarxr-protocol/rpc/tracking-pause-state-request.js'; +import { TrackingPauseStateResponse, TrackingPauseStateResponseT } from '../../solarxr-protocol/rpc/tracking-pause-state-response.js'; +import { UnknownDeviceHandshakeNotification, UnknownDeviceHandshakeNotificationT } from '../../solarxr-protocol/rpc/unknown-device-handshake-notification.js'; +import { WifiProvisioningStatusResponse, WifiProvisioningStatusResponseT } from '../../solarxr-protocol/rpc/wifi-provisioning-status-response.js'; + + +export class RpcMessageHeader implements flatbuffers.IUnpackableObject { + 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(), + (() => { + const 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 = (() => { + const temp = unionToRpcMessage(this.messageType(), this.message.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })(); +} +} + +export class RpcMessageHeaderT implements flatbuffers.IGeneratedObject { +constructor( + public txId: TransactionIdT|null = null, + public messageType: RpcMessage = RpcMessage.NONE, + public message: AddUnknownDeviceRequestT|AssignTrackerRequestT|AutoBoneApplyRequestT|AutoBoneCancelRecordingRequestT|AutoBoneEpochResponseT|AutoBoneProcessRequestT|AutoBoneProcessStatusResponseT|AutoBoneStopRecordingRequestT|ChangeSettingsRequestT|ChangeSkeletonConfigRequestT|ClearDriftCompensationRequestT|ClearMountingResetRequestT|CloseSerialRequestT|FirmwareUpdateRequestT|FirmwareUpdateStatusResponseT|FirmwareUpdateStopQueuesRequestT|ForgetDeviceRequestT|HeartbeatRequestT|HeartbeatResponseT|HeightRequestT|HeightResponseT|LegTweaksTmpChangeT|LegTweaksTmpClearT|NewSerialDeviceResponseT|OpenSerialRequestT|OverlayDisplayModeChangeRequestT|OverlayDisplayModeRequestT|OverlayDisplayModeResponseT|RecordBVHRequestT|RecordBVHStatusT|ResetRequestT|ResetResponseT|SaveFileNotificationT|SerialDevicesRequestT|SerialDevicesResponseT|SerialTrackerFactoryResetRequestT|SerialTrackerGetInfoRequestT|SerialTrackerGetWifiScanRequestT|SerialTrackerRebootRequestT|SerialUpdateResponseT|ServerInfosRequestT|ServerInfosResponseT|SetPauseTrackingRequestT|SetWifiRequestT|SettingsRequestT|SettingsResponseT|SkeletonConfigRequestT|SkeletonConfigResponseT|SkeletonResetAllRequestT|StartWifiProvisioningRequestT|StatusSystemFixedT|StatusSystemRequestT|StatusSystemResponseT|StatusSystemUpdateT|StopWifiProvisioningRequestT|TapDetectionSetupNotificationT|TrackingPauseStateRequestT|TrackingPauseStateResponseT|UnknownDeviceHandshakeNotificationT|WifiProvisioningStatusResponseT|null = null +){} + + +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 index 4916458a..917f6242 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts @@ -1,256 +1,268 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import { AddUnknownDeviceRequest, AddUnknownDeviceRequestT } from '../../solarxr-protocol/rpc/add-unknown-device-request.js'; -import { AssignTrackerRequest, AssignTrackerRequestT } from '../../solarxr-protocol/rpc/assign-tracker-request.js'; -import { AutoBoneApplyRequest, AutoBoneApplyRequestT } from '../../solarxr-protocol/rpc/auto-bone-apply-request.js'; -import { AutoBoneCancelRecordingRequest, AutoBoneCancelRecordingRequestT } from '../../solarxr-protocol/rpc/auto-bone-cancel-recording-request.js'; -import { AutoBoneEpochResponse, AutoBoneEpochResponseT } from '../../solarxr-protocol/rpc/auto-bone-epoch-response.js'; -import { AutoBoneProcessRequest, AutoBoneProcessRequestT } from '../../solarxr-protocol/rpc/auto-bone-process-request.js'; -import { AutoBoneProcessStatusResponse, AutoBoneProcessStatusResponseT } from '../../solarxr-protocol/rpc/auto-bone-process-status-response.js'; -import { AutoBoneStopRecordingRequest, AutoBoneStopRecordingRequestT } from '../../solarxr-protocol/rpc/auto-bone-stop-recording-request.js'; -import { ChangeSettingsRequest, ChangeSettingsRequestT } from '../../solarxr-protocol/rpc/change-settings-request.js'; -import { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from '../../solarxr-protocol/rpc/change-skeleton-config-request.js'; -import { ClearDriftCompensationRequest, ClearDriftCompensationRequestT } from '../../solarxr-protocol/rpc/clear-drift-compensation-request.js'; -import { ClearMountingResetRequest, ClearMountingResetRequestT } from '../../solarxr-protocol/rpc/clear-mounting-reset-request.js'; -import { CloseSerialRequest, CloseSerialRequestT } from '../../solarxr-protocol/rpc/close-serial-request.js'; -import { ForgetDeviceRequest, ForgetDeviceRequestT } from '../../solarxr-protocol/rpc/forget-device-request.js'; -import { HeartbeatRequest, HeartbeatRequestT } from '../../solarxr-protocol/rpc/heartbeat-request.js'; -import { HeartbeatResponse, HeartbeatResponseT } from '../../solarxr-protocol/rpc/heartbeat-response.js'; -import { HeightRequest, HeightRequestT } from '../../solarxr-protocol/rpc/height-request.js'; -import { HeightResponse, HeightResponseT } from '../../solarxr-protocol/rpc/height-response.js'; -import { LegTweaksTmpChange, LegTweaksTmpChangeT } from '../../solarxr-protocol/rpc/leg-tweaks-tmp-change.js'; -import { LegTweaksTmpClear, LegTweaksTmpClearT } from '../../solarxr-protocol/rpc/leg-tweaks-tmp-clear.js'; -import { NewSerialDeviceResponse, NewSerialDeviceResponseT } from '../../solarxr-protocol/rpc/new-serial-device-response.js'; -import { OpenSerialRequest, OpenSerialRequestT } from '../../solarxr-protocol/rpc/open-serial-request.js'; -import { OverlayDisplayModeChangeRequest, OverlayDisplayModeChangeRequestT } from '../../solarxr-protocol/rpc/overlay-display-mode-change-request.js'; -import { OverlayDisplayModeRequest, OverlayDisplayModeRequestT } from '../../solarxr-protocol/rpc/overlay-display-mode-request.js'; -import { OverlayDisplayModeResponse, OverlayDisplayModeResponseT } from '../../solarxr-protocol/rpc/overlay-display-mode-response.js'; -import { RecordBVHRequest, RecordBVHRequestT } from '../../solarxr-protocol/rpc/record-bvhrequest.js'; -import { RecordBVHStatus, RecordBVHStatusT } from '../../solarxr-protocol/rpc/record-bvhstatus.js'; -import { ResetRequest, ResetRequestT } from '../../solarxr-protocol/rpc/reset-request.js'; -import { ResetResponse, ResetResponseT } from '../../solarxr-protocol/rpc/reset-response.js'; -import { SaveFileNotification, SaveFileNotificationT } from '../../solarxr-protocol/rpc/save-file-notification.js'; -import { SerialDevicesRequest, SerialDevicesRequestT } from '../../solarxr-protocol/rpc/serial-devices-request.js'; -import { SerialDevicesResponse, SerialDevicesResponseT } from '../../solarxr-protocol/rpc/serial-devices-response.js'; -import { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from '../../solarxr-protocol/rpc/serial-tracker-factory-reset-request.js'; -import { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from '../../solarxr-protocol/rpc/serial-tracker-get-info-request.js'; -import { SerialTrackerGetWifiScanRequest, SerialTrackerGetWifiScanRequestT } from '../../solarxr-protocol/rpc/serial-tracker-get-wifi-scan-request.js'; -import { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from '../../solarxr-protocol/rpc/serial-tracker-reboot-request.js'; -import { SerialUpdateResponse, SerialUpdateResponseT } from '../../solarxr-protocol/rpc/serial-update-response.js'; -import { ServerInfosRequest, ServerInfosRequestT } from '../../solarxr-protocol/rpc/server-infos-request.js'; -import { ServerInfosResponse, ServerInfosResponseT } from '../../solarxr-protocol/rpc/server-infos-response.js'; -import { SetPauseTrackingRequest, SetPauseTrackingRequestT } from '../../solarxr-protocol/rpc/set-pause-tracking-request.js'; -import { SetWifiRequest, SetWifiRequestT } from '../../solarxr-protocol/rpc/set-wifi-request.js'; -import { SettingsRequest, SettingsRequestT } from '../../solarxr-protocol/rpc/settings-request.js'; -import { SettingsResponse, SettingsResponseT } from '../../solarxr-protocol/rpc/settings-response.js'; -import { SkeletonConfigRequest, SkeletonConfigRequestT } from '../../solarxr-protocol/rpc/skeleton-config-request.js'; -import { SkeletonConfigResponse, SkeletonConfigResponseT } from '../../solarxr-protocol/rpc/skeleton-config-response.js'; -import { SkeletonResetAllRequest, SkeletonResetAllRequestT } from '../../solarxr-protocol/rpc/skeleton-reset-all-request.js'; -import { StartWifiProvisioningRequest, StartWifiProvisioningRequestT } from '../../solarxr-protocol/rpc/start-wifi-provisioning-request.js'; -import { StatusSystemFixed, StatusSystemFixedT } from '../../solarxr-protocol/rpc/status-system-fixed.js'; -import { StatusSystemRequest, StatusSystemRequestT } from '../../solarxr-protocol/rpc/status-system-request.js'; -import { StatusSystemResponse, StatusSystemResponseT } from '../../solarxr-protocol/rpc/status-system-response.js'; -import { StatusSystemUpdate, StatusSystemUpdateT } from '../../solarxr-protocol/rpc/status-system-update.js'; -import { StopWifiProvisioningRequest, StopWifiProvisioningRequestT } from '../../solarxr-protocol/rpc/stop-wifi-provisioning-request.js'; -import { TapDetectionSetupNotification, TapDetectionSetupNotificationT } from '../../solarxr-protocol/rpc/tap-detection-setup-notification.js'; -import { TrackingPauseStateRequest, TrackingPauseStateRequestT } from '../../solarxr-protocol/rpc/tracking-pause-state-request.js'; -import { TrackingPauseStateResponse, TrackingPauseStateResponseT } from '../../solarxr-protocol/rpc/tracking-pause-state-response.js'; -import { UnknownDeviceHandshakeNotification, UnknownDeviceHandshakeNotificationT } from '../../solarxr-protocol/rpc/unknown-device-handshake-notification.js'; -import { WifiProvisioningStatusResponse, WifiProvisioningStatusResponseT } from '../../solarxr-protocol/rpc/wifi-provisioning-status-response.js'; - - -export enum RpcMessage { - NONE = 0, - HeartbeatRequest = 1, - HeartbeatResponse = 2, - ResetRequest = 3, - ResetResponse = 4, - AssignTrackerRequest = 5, - SettingsRequest = 6, - SettingsResponse = 7, - ChangeSettingsRequest = 8, - ClearDriftCompensationRequest = 9, - RecordBVHRequest = 10, - RecordBVHStatus = 11, - SkeletonConfigRequest = 12, - ChangeSkeletonConfigRequest = 13, - SkeletonResetAllRequest = 14, - SkeletonConfigResponse = 15, - OpenSerialRequest = 16, - CloseSerialRequest = 17, - SetWifiRequest = 18, - SerialUpdateResponse = 19, - AutoBoneProcessRequest = 20, - AutoBoneProcessStatusResponse = 21, - AutoBoneEpochResponse = 22, - OverlayDisplayModeRequest = 23, - OverlayDisplayModeChangeRequest = 24, - OverlayDisplayModeResponse = 25, - SerialTrackerRebootRequest = 26, - SerialTrackerGetInfoRequest = 27, - SerialTrackerFactoryResetRequest = 28, - SerialDevicesRequest = 29, - SerialDevicesResponse = 30, - NewSerialDeviceResponse = 31, - StartWifiProvisioningRequest = 32, - StopWifiProvisioningRequest = 33, - WifiProvisioningStatusResponse = 34, - ServerInfosRequest = 35, - ServerInfosResponse = 36, - LegTweaksTmpChange = 37, - LegTweaksTmpClear = 38, - TapDetectionSetupNotification = 39, - SetPauseTrackingRequest = 40, - StatusSystemRequest = 41, - StatusSystemResponse = 42, - StatusSystemUpdate = 43, - StatusSystemFixed = 44, - ClearMountingResetRequest = 45, - HeightRequest = 46, - HeightResponse = 47, - AutoBoneApplyRequest = 48, - AutoBoneStopRecordingRequest = 49, - AutoBoneCancelRecordingRequest = 50, - SaveFileNotification = 51, - TrackingPauseStateRequest = 52, - TrackingPauseStateResponse = 53, - SerialTrackerGetWifiScanRequest = 54, - UnknownDeviceHandshakeNotification = 55, - AddUnknownDeviceRequest = 56, - ForgetDeviceRequest = 57 -} - -export function unionToRpcMessage( - type: RpcMessage, - accessor: (obj:AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|WifiProvisioningStatusResponse) => AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|WifiProvisioningStatusResponse|null -): AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|WifiProvisioningStatusResponse|null { - switch(RpcMessage[type]) { - case 'NONE': return null; - case 'HeartbeatRequest': return accessor(new HeartbeatRequest())! as HeartbeatRequest; - case 'HeartbeatResponse': return accessor(new HeartbeatResponse())! as HeartbeatResponse; - case 'ResetRequest': return accessor(new ResetRequest())! as ResetRequest; - case 'ResetResponse': return accessor(new ResetResponse())! as ResetResponse; - 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 'ClearDriftCompensationRequest': return accessor(new ClearDriftCompensationRequest())! as ClearDriftCompensationRequest; - 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; - case 'SerialDevicesRequest': return accessor(new SerialDevicesRequest())! as SerialDevicesRequest; - case 'SerialDevicesResponse': return accessor(new SerialDevicesResponse())! as SerialDevicesResponse; - case 'NewSerialDeviceResponse': return accessor(new NewSerialDeviceResponse())! as NewSerialDeviceResponse; - case 'StartWifiProvisioningRequest': return accessor(new StartWifiProvisioningRequest())! as StartWifiProvisioningRequest; - case 'StopWifiProvisioningRequest': return accessor(new StopWifiProvisioningRequest())! as StopWifiProvisioningRequest; - case 'WifiProvisioningStatusResponse': return accessor(new WifiProvisioningStatusResponse())! as WifiProvisioningStatusResponse; - case 'ServerInfosRequest': return accessor(new ServerInfosRequest())! as ServerInfosRequest; - case 'ServerInfosResponse': return accessor(new ServerInfosResponse())! as ServerInfosResponse; - case 'LegTweaksTmpChange': return accessor(new LegTweaksTmpChange())! as LegTweaksTmpChange; - case 'LegTweaksTmpClear': return accessor(new LegTweaksTmpClear())! as LegTweaksTmpClear; - case 'TapDetectionSetupNotification': return accessor(new TapDetectionSetupNotification())! as TapDetectionSetupNotification; - case 'SetPauseTrackingRequest': return accessor(new SetPauseTrackingRequest())! as SetPauseTrackingRequest; - case 'StatusSystemRequest': return accessor(new StatusSystemRequest())! as StatusSystemRequest; - case 'StatusSystemResponse': return accessor(new StatusSystemResponse())! as StatusSystemResponse; - case 'StatusSystemUpdate': return accessor(new StatusSystemUpdate())! as StatusSystemUpdate; - case 'StatusSystemFixed': return accessor(new StatusSystemFixed())! as StatusSystemFixed; - case 'ClearMountingResetRequest': return accessor(new ClearMountingResetRequest())! as ClearMountingResetRequest; - case 'HeightRequest': return accessor(new HeightRequest())! as HeightRequest; - case 'HeightResponse': return accessor(new HeightResponse())! as HeightResponse; - case 'AutoBoneApplyRequest': return accessor(new AutoBoneApplyRequest())! as AutoBoneApplyRequest; - case 'AutoBoneStopRecordingRequest': return accessor(new AutoBoneStopRecordingRequest())! as AutoBoneStopRecordingRequest; - case 'AutoBoneCancelRecordingRequest': return accessor(new AutoBoneCancelRecordingRequest())! as AutoBoneCancelRecordingRequest; - case 'SaveFileNotification': return accessor(new SaveFileNotification())! as SaveFileNotification; - case 'TrackingPauseStateRequest': return accessor(new TrackingPauseStateRequest())! as TrackingPauseStateRequest; - case 'TrackingPauseStateResponse': return accessor(new TrackingPauseStateResponse())! as TrackingPauseStateResponse; - case 'SerialTrackerGetWifiScanRequest': return accessor(new SerialTrackerGetWifiScanRequest())! as SerialTrackerGetWifiScanRequest; - case 'UnknownDeviceHandshakeNotification': return accessor(new UnknownDeviceHandshakeNotification())! as UnknownDeviceHandshakeNotification; - case 'AddUnknownDeviceRequest': return accessor(new AddUnknownDeviceRequest())! as AddUnknownDeviceRequest; - case 'ForgetDeviceRequest': return accessor(new ForgetDeviceRequest())! as ForgetDeviceRequest; - default: return null; - } -} - -export function unionListToRpcMessage( - type: RpcMessage, - accessor: (index: number, obj:AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|WifiProvisioningStatusResponse) => AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|WifiProvisioningStatusResponse|null, - index: number -): AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|WifiProvisioningStatusResponse|null { - switch(RpcMessage[type]) { - case 'NONE': return null; - case 'HeartbeatRequest': return accessor(index, new HeartbeatRequest())! as HeartbeatRequest; - case 'HeartbeatResponse': return accessor(index, new HeartbeatResponse())! as HeartbeatResponse; - case 'ResetRequest': return accessor(index, new ResetRequest())! as ResetRequest; - case 'ResetResponse': return accessor(index, new ResetResponse())! as ResetResponse; - 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 'ClearDriftCompensationRequest': return accessor(index, new ClearDriftCompensationRequest())! as ClearDriftCompensationRequest; - 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; - case 'SerialDevicesRequest': return accessor(index, new SerialDevicesRequest())! as SerialDevicesRequest; - case 'SerialDevicesResponse': return accessor(index, new SerialDevicesResponse())! as SerialDevicesResponse; - case 'NewSerialDeviceResponse': return accessor(index, new NewSerialDeviceResponse())! as NewSerialDeviceResponse; - case 'StartWifiProvisioningRequest': return accessor(index, new StartWifiProvisioningRequest())! as StartWifiProvisioningRequest; - case 'StopWifiProvisioningRequest': return accessor(index, new StopWifiProvisioningRequest())! as StopWifiProvisioningRequest; - case 'WifiProvisioningStatusResponse': return accessor(index, new WifiProvisioningStatusResponse())! as WifiProvisioningStatusResponse; - case 'ServerInfosRequest': return accessor(index, new ServerInfosRequest())! as ServerInfosRequest; - case 'ServerInfosResponse': return accessor(index, new ServerInfosResponse())! as ServerInfosResponse; - case 'LegTweaksTmpChange': return accessor(index, new LegTweaksTmpChange())! as LegTweaksTmpChange; - case 'LegTweaksTmpClear': return accessor(index, new LegTweaksTmpClear())! as LegTweaksTmpClear; - case 'TapDetectionSetupNotification': return accessor(index, new TapDetectionSetupNotification())! as TapDetectionSetupNotification; - case 'SetPauseTrackingRequest': return accessor(index, new SetPauseTrackingRequest())! as SetPauseTrackingRequest; - case 'StatusSystemRequest': return accessor(index, new StatusSystemRequest())! as StatusSystemRequest; - case 'StatusSystemResponse': return accessor(index, new StatusSystemResponse())! as StatusSystemResponse; - case 'StatusSystemUpdate': return accessor(index, new StatusSystemUpdate())! as StatusSystemUpdate; - case 'StatusSystemFixed': return accessor(index, new StatusSystemFixed())! as StatusSystemFixed; - case 'ClearMountingResetRequest': return accessor(index, new ClearMountingResetRequest())! as ClearMountingResetRequest; - case 'HeightRequest': return accessor(index, new HeightRequest())! as HeightRequest; - case 'HeightResponse': return accessor(index, new HeightResponse())! as HeightResponse; - case 'AutoBoneApplyRequest': return accessor(index, new AutoBoneApplyRequest())! as AutoBoneApplyRequest; - case 'AutoBoneStopRecordingRequest': return accessor(index, new AutoBoneStopRecordingRequest())! as AutoBoneStopRecordingRequest; - case 'AutoBoneCancelRecordingRequest': return accessor(index, new AutoBoneCancelRecordingRequest())! as AutoBoneCancelRecordingRequest; - case 'SaveFileNotification': return accessor(index, new SaveFileNotification())! as SaveFileNotification; - case 'TrackingPauseStateRequest': return accessor(index, new TrackingPauseStateRequest())! as TrackingPauseStateRequest; - case 'TrackingPauseStateResponse': return accessor(index, new TrackingPauseStateResponse())! as TrackingPauseStateResponse; - case 'SerialTrackerGetWifiScanRequest': return accessor(index, new SerialTrackerGetWifiScanRequest())! as SerialTrackerGetWifiScanRequest; - case 'UnknownDeviceHandshakeNotification': return accessor(index, new UnknownDeviceHandshakeNotification())! as UnknownDeviceHandshakeNotification; - case 'AddUnknownDeviceRequest': return accessor(index, new AddUnknownDeviceRequest())! as AddUnknownDeviceRequest; - case 'ForgetDeviceRequest': return accessor(index, new ForgetDeviceRequest())! as ForgetDeviceRequest; - default: return null; - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +import { AddUnknownDeviceRequest, AddUnknownDeviceRequestT } from '../../solarxr-protocol/rpc/add-unknown-device-request.js'; +import { AssignTrackerRequest, AssignTrackerRequestT } from '../../solarxr-protocol/rpc/assign-tracker-request.js'; +import { AutoBoneApplyRequest, AutoBoneApplyRequestT } from '../../solarxr-protocol/rpc/auto-bone-apply-request.js'; +import { AutoBoneCancelRecordingRequest, AutoBoneCancelRecordingRequestT } from '../../solarxr-protocol/rpc/auto-bone-cancel-recording-request.js'; +import { AutoBoneEpochResponse, AutoBoneEpochResponseT } from '../../solarxr-protocol/rpc/auto-bone-epoch-response.js'; +import { AutoBoneProcessRequest, AutoBoneProcessRequestT } from '../../solarxr-protocol/rpc/auto-bone-process-request.js'; +import { AutoBoneProcessStatusResponse, AutoBoneProcessStatusResponseT } from '../../solarxr-protocol/rpc/auto-bone-process-status-response.js'; +import { AutoBoneStopRecordingRequest, AutoBoneStopRecordingRequestT } from '../../solarxr-protocol/rpc/auto-bone-stop-recording-request.js'; +import { ChangeSettingsRequest, ChangeSettingsRequestT } from '../../solarxr-protocol/rpc/change-settings-request.js'; +import { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from '../../solarxr-protocol/rpc/change-skeleton-config-request.js'; +import { ClearDriftCompensationRequest, ClearDriftCompensationRequestT } from '../../solarxr-protocol/rpc/clear-drift-compensation-request.js'; +import { ClearMountingResetRequest, ClearMountingResetRequestT } from '../../solarxr-protocol/rpc/clear-mounting-reset-request.js'; +import { CloseSerialRequest, CloseSerialRequestT } from '../../solarxr-protocol/rpc/close-serial-request.js'; +import { FirmwareUpdateRequest, FirmwareUpdateRequestT } from '../../solarxr-protocol/rpc/firmware-update-request.js'; +import { FirmwareUpdateStatusResponse, FirmwareUpdateStatusResponseT } from '../../solarxr-protocol/rpc/firmware-update-status-response.js'; +import { FirmwareUpdateStopQueuesRequest, FirmwareUpdateStopQueuesRequestT } from '../../solarxr-protocol/rpc/firmware-update-stop-queues-request.js'; +import { ForgetDeviceRequest, ForgetDeviceRequestT } from '../../solarxr-protocol/rpc/forget-device-request.js'; +import { HeartbeatRequest, HeartbeatRequestT } from '../../solarxr-protocol/rpc/heartbeat-request.js'; +import { HeartbeatResponse, HeartbeatResponseT } from '../../solarxr-protocol/rpc/heartbeat-response.js'; +import { HeightRequest, HeightRequestT } from '../../solarxr-protocol/rpc/height-request.js'; +import { HeightResponse, HeightResponseT } from '../../solarxr-protocol/rpc/height-response.js'; +import { LegTweaksTmpChange, LegTweaksTmpChangeT } from '../../solarxr-protocol/rpc/leg-tweaks-tmp-change.js'; +import { LegTweaksTmpClear, LegTweaksTmpClearT } from '../../solarxr-protocol/rpc/leg-tweaks-tmp-clear.js'; +import { NewSerialDeviceResponse, NewSerialDeviceResponseT } from '../../solarxr-protocol/rpc/new-serial-device-response.js'; +import { OpenSerialRequest, OpenSerialRequestT } from '../../solarxr-protocol/rpc/open-serial-request.js'; +import { OverlayDisplayModeChangeRequest, OverlayDisplayModeChangeRequestT } from '../../solarxr-protocol/rpc/overlay-display-mode-change-request.js'; +import { OverlayDisplayModeRequest, OverlayDisplayModeRequestT } from '../../solarxr-protocol/rpc/overlay-display-mode-request.js'; +import { OverlayDisplayModeResponse, OverlayDisplayModeResponseT } from '../../solarxr-protocol/rpc/overlay-display-mode-response.js'; +import { RecordBVHRequest, RecordBVHRequestT } from '../../solarxr-protocol/rpc/record-bvhrequest.js'; +import { RecordBVHStatus, RecordBVHStatusT } from '../../solarxr-protocol/rpc/record-bvhstatus.js'; +import { ResetRequest, ResetRequestT } from '../../solarxr-protocol/rpc/reset-request.js'; +import { ResetResponse, ResetResponseT } from '../../solarxr-protocol/rpc/reset-response.js'; +import { SaveFileNotification, SaveFileNotificationT } from '../../solarxr-protocol/rpc/save-file-notification.js'; +import { SerialDevicesRequest, SerialDevicesRequestT } from '../../solarxr-protocol/rpc/serial-devices-request.js'; +import { SerialDevicesResponse, SerialDevicesResponseT } from '../../solarxr-protocol/rpc/serial-devices-response.js'; +import { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from '../../solarxr-protocol/rpc/serial-tracker-factory-reset-request.js'; +import { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from '../../solarxr-protocol/rpc/serial-tracker-get-info-request.js'; +import { SerialTrackerGetWifiScanRequest, SerialTrackerGetWifiScanRequestT } from '../../solarxr-protocol/rpc/serial-tracker-get-wifi-scan-request.js'; +import { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from '../../solarxr-protocol/rpc/serial-tracker-reboot-request.js'; +import { SerialUpdateResponse, SerialUpdateResponseT } from '../../solarxr-protocol/rpc/serial-update-response.js'; +import { ServerInfosRequest, ServerInfosRequestT } from '../../solarxr-protocol/rpc/server-infos-request.js'; +import { ServerInfosResponse, ServerInfosResponseT } from '../../solarxr-protocol/rpc/server-infos-response.js'; +import { SetPauseTrackingRequest, SetPauseTrackingRequestT } from '../../solarxr-protocol/rpc/set-pause-tracking-request.js'; +import { SetWifiRequest, SetWifiRequestT } from '../../solarxr-protocol/rpc/set-wifi-request.js'; +import { SettingsRequest, SettingsRequestT } from '../../solarxr-protocol/rpc/settings-request.js'; +import { SettingsResponse, SettingsResponseT } from '../../solarxr-protocol/rpc/settings-response.js'; +import { SkeletonConfigRequest, SkeletonConfigRequestT } from '../../solarxr-protocol/rpc/skeleton-config-request.js'; +import { SkeletonConfigResponse, SkeletonConfigResponseT } from '../../solarxr-protocol/rpc/skeleton-config-response.js'; +import { SkeletonResetAllRequest, SkeletonResetAllRequestT } from '../../solarxr-protocol/rpc/skeleton-reset-all-request.js'; +import { StartWifiProvisioningRequest, StartWifiProvisioningRequestT } from '../../solarxr-protocol/rpc/start-wifi-provisioning-request.js'; +import { StatusSystemFixed, StatusSystemFixedT } from '../../solarxr-protocol/rpc/status-system-fixed.js'; +import { StatusSystemRequest, StatusSystemRequestT } from '../../solarxr-protocol/rpc/status-system-request.js'; +import { StatusSystemResponse, StatusSystemResponseT } from '../../solarxr-protocol/rpc/status-system-response.js'; +import { StatusSystemUpdate, StatusSystemUpdateT } from '../../solarxr-protocol/rpc/status-system-update.js'; +import { StopWifiProvisioningRequest, StopWifiProvisioningRequestT } from '../../solarxr-protocol/rpc/stop-wifi-provisioning-request.js'; +import { TapDetectionSetupNotification, TapDetectionSetupNotificationT } from '../../solarxr-protocol/rpc/tap-detection-setup-notification.js'; +import { TrackingPauseStateRequest, TrackingPauseStateRequestT } from '../../solarxr-protocol/rpc/tracking-pause-state-request.js'; +import { TrackingPauseStateResponse, TrackingPauseStateResponseT } from '../../solarxr-protocol/rpc/tracking-pause-state-response.js'; +import { UnknownDeviceHandshakeNotification, UnknownDeviceHandshakeNotificationT } from '../../solarxr-protocol/rpc/unknown-device-handshake-notification.js'; +import { WifiProvisioningStatusResponse, WifiProvisioningStatusResponseT } from '../../solarxr-protocol/rpc/wifi-provisioning-status-response.js'; + + +export enum RpcMessage { + NONE = 0, + HeartbeatRequest = 1, + HeartbeatResponse = 2, + ResetRequest = 3, + ResetResponse = 4, + AssignTrackerRequest = 5, + SettingsRequest = 6, + SettingsResponse = 7, + ChangeSettingsRequest = 8, + ClearDriftCompensationRequest = 9, + RecordBVHRequest = 10, + RecordBVHStatus = 11, + SkeletonConfigRequest = 12, + ChangeSkeletonConfigRequest = 13, + SkeletonResetAllRequest = 14, + SkeletonConfigResponse = 15, + OpenSerialRequest = 16, + CloseSerialRequest = 17, + SetWifiRequest = 18, + SerialUpdateResponse = 19, + AutoBoneProcessRequest = 20, + AutoBoneProcessStatusResponse = 21, + AutoBoneEpochResponse = 22, + OverlayDisplayModeRequest = 23, + OverlayDisplayModeChangeRequest = 24, + OverlayDisplayModeResponse = 25, + SerialTrackerRebootRequest = 26, + SerialTrackerGetInfoRequest = 27, + SerialTrackerFactoryResetRequest = 28, + SerialDevicesRequest = 29, + SerialDevicesResponse = 30, + NewSerialDeviceResponse = 31, + StartWifiProvisioningRequest = 32, + StopWifiProvisioningRequest = 33, + WifiProvisioningStatusResponse = 34, + ServerInfosRequest = 35, + ServerInfosResponse = 36, + LegTweaksTmpChange = 37, + LegTweaksTmpClear = 38, + TapDetectionSetupNotification = 39, + SetPauseTrackingRequest = 40, + StatusSystemRequest = 41, + StatusSystemResponse = 42, + StatusSystemUpdate = 43, + StatusSystemFixed = 44, + ClearMountingResetRequest = 45, + HeightRequest = 46, + HeightResponse = 47, + AutoBoneApplyRequest = 48, + AutoBoneStopRecordingRequest = 49, + AutoBoneCancelRecordingRequest = 50, + SaveFileNotification = 51, + TrackingPauseStateRequest = 52, + TrackingPauseStateResponse = 53, + SerialTrackerGetWifiScanRequest = 54, + UnknownDeviceHandshakeNotification = 55, + AddUnknownDeviceRequest = 56, + ForgetDeviceRequest = 57, + FirmwareUpdateRequest = 58, + FirmwareUpdateStatusResponse = 59, + FirmwareUpdateStopQueuesRequest = 60 +} + +export function unionToRpcMessage( + type: RpcMessage, + accessor: (obj:AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|WifiProvisioningStatusResponse) => AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|WifiProvisioningStatusResponse|null +): AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|WifiProvisioningStatusResponse|null { + switch(RpcMessage[type]) { + case 'NONE': return null; + case 'HeartbeatRequest': return accessor(new HeartbeatRequest())! as HeartbeatRequest; + case 'HeartbeatResponse': return accessor(new HeartbeatResponse())! as HeartbeatResponse; + case 'ResetRequest': return accessor(new ResetRequest())! as ResetRequest; + case 'ResetResponse': return accessor(new ResetResponse())! as ResetResponse; + 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 'ClearDriftCompensationRequest': return accessor(new ClearDriftCompensationRequest())! as ClearDriftCompensationRequest; + 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; + case 'SerialDevicesRequest': return accessor(new SerialDevicesRequest())! as SerialDevicesRequest; + case 'SerialDevicesResponse': return accessor(new SerialDevicesResponse())! as SerialDevicesResponse; + case 'NewSerialDeviceResponse': return accessor(new NewSerialDeviceResponse())! as NewSerialDeviceResponse; + case 'StartWifiProvisioningRequest': return accessor(new StartWifiProvisioningRequest())! as StartWifiProvisioningRequest; + case 'StopWifiProvisioningRequest': return accessor(new StopWifiProvisioningRequest())! as StopWifiProvisioningRequest; + case 'WifiProvisioningStatusResponse': return accessor(new WifiProvisioningStatusResponse())! as WifiProvisioningStatusResponse; + case 'ServerInfosRequest': return accessor(new ServerInfosRequest())! as ServerInfosRequest; + case 'ServerInfosResponse': return accessor(new ServerInfosResponse())! as ServerInfosResponse; + case 'LegTweaksTmpChange': return accessor(new LegTweaksTmpChange())! as LegTweaksTmpChange; + case 'LegTweaksTmpClear': return accessor(new LegTweaksTmpClear())! as LegTweaksTmpClear; + case 'TapDetectionSetupNotification': return accessor(new TapDetectionSetupNotification())! as TapDetectionSetupNotification; + case 'SetPauseTrackingRequest': return accessor(new SetPauseTrackingRequest())! as SetPauseTrackingRequest; + case 'StatusSystemRequest': return accessor(new StatusSystemRequest())! as StatusSystemRequest; + case 'StatusSystemResponse': return accessor(new StatusSystemResponse())! as StatusSystemResponse; + case 'StatusSystemUpdate': return accessor(new StatusSystemUpdate())! as StatusSystemUpdate; + case 'StatusSystemFixed': return accessor(new StatusSystemFixed())! as StatusSystemFixed; + case 'ClearMountingResetRequest': return accessor(new ClearMountingResetRequest())! as ClearMountingResetRequest; + case 'HeightRequest': return accessor(new HeightRequest())! as HeightRequest; + case 'HeightResponse': return accessor(new HeightResponse())! as HeightResponse; + case 'AutoBoneApplyRequest': return accessor(new AutoBoneApplyRequest())! as AutoBoneApplyRequest; + case 'AutoBoneStopRecordingRequest': return accessor(new AutoBoneStopRecordingRequest())! as AutoBoneStopRecordingRequest; + case 'AutoBoneCancelRecordingRequest': return accessor(new AutoBoneCancelRecordingRequest())! as AutoBoneCancelRecordingRequest; + case 'SaveFileNotification': return accessor(new SaveFileNotification())! as SaveFileNotification; + case 'TrackingPauseStateRequest': return accessor(new TrackingPauseStateRequest())! as TrackingPauseStateRequest; + case 'TrackingPauseStateResponse': return accessor(new TrackingPauseStateResponse())! as TrackingPauseStateResponse; + case 'SerialTrackerGetWifiScanRequest': return accessor(new SerialTrackerGetWifiScanRequest())! as SerialTrackerGetWifiScanRequest; + case 'UnknownDeviceHandshakeNotification': return accessor(new UnknownDeviceHandshakeNotification())! as UnknownDeviceHandshakeNotification; + case 'AddUnknownDeviceRequest': return accessor(new AddUnknownDeviceRequest())! as AddUnknownDeviceRequest; + case 'ForgetDeviceRequest': return accessor(new ForgetDeviceRequest())! as ForgetDeviceRequest; + case 'FirmwareUpdateRequest': return accessor(new FirmwareUpdateRequest())! as FirmwareUpdateRequest; + case 'FirmwareUpdateStatusResponse': return accessor(new FirmwareUpdateStatusResponse())! as FirmwareUpdateStatusResponse; + case 'FirmwareUpdateStopQueuesRequest': return accessor(new FirmwareUpdateStopQueuesRequest())! as FirmwareUpdateStopQueuesRequest; + default: return null; + } +} + +export function unionListToRpcMessage( + type: RpcMessage, + accessor: (index: number, obj:AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|WifiProvisioningStatusResponse) => AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|WifiProvisioningStatusResponse|null, + index: number +): AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|WifiProvisioningStatusResponse|null { + switch(RpcMessage[type]) { + case 'NONE': return null; + case 'HeartbeatRequest': return accessor(index, new HeartbeatRequest())! as HeartbeatRequest; + case 'HeartbeatResponse': return accessor(index, new HeartbeatResponse())! as HeartbeatResponse; + case 'ResetRequest': return accessor(index, new ResetRequest())! as ResetRequest; + case 'ResetResponse': return accessor(index, new ResetResponse())! as ResetResponse; + 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 'ClearDriftCompensationRequest': return accessor(index, new ClearDriftCompensationRequest())! as ClearDriftCompensationRequest; + 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; + case 'SerialDevicesRequest': return accessor(index, new SerialDevicesRequest())! as SerialDevicesRequest; + case 'SerialDevicesResponse': return accessor(index, new SerialDevicesResponse())! as SerialDevicesResponse; + case 'NewSerialDeviceResponse': return accessor(index, new NewSerialDeviceResponse())! as NewSerialDeviceResponse; + case 'StartWifiProvisioningRequest': return accessor(index, new StartWifiProvisioningRequest())! as StartWifiProvisioningRequest; + case 'StopWifiProvisioningRequest': return accessor(index, new StopWifiProvisioningRequest())! as StopWifiProvisioningRequest; + case 'WifiProvisioningStatusResponse': return accessor(index, new WifiProvisioningStatusResponse())! as WifiProvisioningStatusResponse; + case 'ServerInfosRequest': return accessor(index, new ServerInfosRequest())! as ServerInfosRequest; + case 'ServerInfosResponse': return accessor(index, new ServerInfosResponse())! as ServerInfosResponse; + case 'LegTweaksTmpChange': return accessor(index, new LegTweaksTmpChange())! as LegTweaksTmpChange; + case 'LegTweaksTmpClear': return accessor(index, new LegTweaksTmpClear())! as LegTweaksTmpClear; + case 'TapDetectionSetupNotification': return accessor(index, new TapDetectionSetupNotification())! as TapDetectionSetupNotification; + case 'SetPauseTrackingRequest': return accessor(index, new SetPauseTrackingRequest())! as SetPauseTrackingRequest; + case 'StatusSystemRequest': return accessor(index, new StatusSystemRequest())! as StatusSystemRequest; + case 'StatusSystemResponse': return accessor(index, new StatusSystemResponse())! as StatusSystemResponse; + case 'StatusSystemUpdate': return accessor(index, new StatusSystemUpdate())! as StatusSystemUpdate; + case 'StatusSystemFixed': return accessor(index, new StatusSystemFixed())! as StatusSystemFixed; + case 'ClearMountingResetRequest': return accessor(index, new ClearMountingResetRequest())! as ClearMountingResetRequest; + case 'HeightRequest': return accessor(index, new HeightRequest())! as HeightRequest; + case 'HeightResponse': return accessor(index, new HeightResponse())! as HeightResponse; + case 'AutoBoneApplyRequest': return accessor(index, new AutoBoneApplyRequest())! as AutoBoneApplyRequest; + case 'AutoBoneStopRecordingRequest': return accessor(index, new AutoBoneStopRecordingRequest())! as AutoBoneStopRecordingRequest; + case 'AutoBoneCancelRecordingRequest': return accessor(index, new AutoBoneCancelRecordingRequest())! as AutoBoneCancelRecordingRequest; + case 'SaveFileNotification': return accessor(index, new SaveFileNotification())! as SaveFileNotification; + case 'TrackingPauseStateRequest': return accessor(index, new TrackingPauseStateRequest())! as TrackingPauseStateRequest; + case 'TrackingPauseStateResponse': return accessor(index, new TrackingPauseStateResponse())! as TrackingPauseStateResponse; + case 'SerialTrackerGetWifiScanRequest': return accessor(index, new SerialTrackerGetWifiScanRequest())! as SerialTrackerGetWifiScanRequest; + case 'UnknownDeviceHandshakeNotification': return accessor(index, new UnknownDeviceHandshakeNotification())! as UnknownDeviceHandshakeNotification; + case 'AddUnknownDeviceRequest': return accessor(index, new AddUnknownDeviceRequest())! as AddUnknownDeviceRequest; + case 'ForgetDeviceRequest': return accessor(index, new ForgetDeviceRequest())! as ForgetDeviceRequest; + case 'FirmwareUpdateRequest': return accessor(index, new FirmwareUpdateRequest())! as FirmwareUpdateRequest; + case 'FirmwareUpdateStatusResponse': return accessor(index, new FirmwareUpdateStatusResponse())! as FirmwareUpdateStatusResponse; + case 'FirmwareUpdateStopQueuesRequest': return accessor(index, new FirmwareUpdateStopQueuesRequest())! as FirmwareUpdateStopQueuesRequest; + default: return null; + } +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/save-file-notification.ts b/protocol/typescript/src/solarxr-protocol/rpc/save-file-notification.ts index 619e524e..86569d82 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/save-file-notification.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/save-file-notification.ts @@ -1,181 +1,181 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { ComputerDirectory } from '../../solarxr-protocol/rpc/computer-directory.js'; - - -/** - * Used for the server to save a file and have it prompt in the user side - */ -export class SaveFileNotification implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):SaveFileNotification { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsSaveFileNotification(bb:flatbuffers.ByteBuffer, obj?:SaveFileNotification):SaveFileNotification { - return (obj || new SaveFileNotification()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsSaveFileNotification(bb:flatbuffers.ByteBuffer, obj?:SaveFileNotification):SaveFileNotification { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new SaveFileNotification()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -/** - * Binary data of the file - */ -data(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; -} - -dataLength():number { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; -} - -dataArray():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; -} - -/** - * MIME type of file if one exists, use `file_extension` otherwise - */ -mimeType():string|null -mimeType(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -mimeType(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; -} - -/** - * Use MIME type preferably if one exists - */ -fileExtension():string|null -fileExtension(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -fileExtension(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; -} - -/** - * Directory recommended to save the file on - */ -expectedDir():ComputerDirectory|null { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : null; -} - -/** - * Recommended filename - */ -expectedFilename():string|null -expectedFilename(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -expectedFilename(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; -} - -static startSaveFileNotification(builder:flatbuffers.Builder) { - builder.startObject(5); -} - -static addData(builder:flatbuffers.Builder, dataOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, 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 addMimeType(builder:flatbuffers.Builder, mimeTypeOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, mimeTypeOffset, 0); -} - -static addFileExtension(builder:flatbuffers.Builder, fileExtensionOffset:flatbuffers.Offset) { - builder.addFieldOffset(2, fileExtensionOffset, 0); -} - -static addExpectedDir(builder:flatbuffers.Builder, expectedDir:ComputerDirectory) { - builder.addFieldInt8(3, expectedDir, 0); -} - -static addExpectedFilename(builder:flatbuffers.Builder, expectedFilenameOffset:flatbuffers.Offset) { - builder.addFieldOffset(4, expectedFilenameOffset, 0); -} - -static endSaveFileNotification(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createSaveFileNotification(builder:flatbuffers.Builder, dataOffset:flatbuffers.Offset, mimeTypeOffset:flatbuffers.Offset, fileExtensionOffset:flatbuffers.Offset, expectedDir:ComputerDirectory|null, expectedFilenameOffset:flatbuffers.Offset):flatbuffers.Offset { - SaveFileNotification.startSaveFileNotification(builder); - SaveFileNotification.addData(builder, dataOffset); - SaveFileNotification.addMimeType(builder, mimeTypeOffset); - SaveFileNotification.addFileExtension(builder, fileExtensionOffset); - if (expectedDir !== null) - SaveFileNotification.addExpectedDir(builder, expectedDir); - SaveFileNotification.addExpectedFilename(builder, expectedFilenameOffset); - return SaveFileNotification.endSaveFileNotification(builder); -} - -unpack(): SaveFileNotificationT { - return new SaveFileNotificationT( - this.bb!.createScalarList(this.data.bind(this), this.dataLength()), - this.mimeType(), - this.fileExtension(), - this.expectedDir(), - this.expectedFilename() - ); -} - - -unpackTo(_o: SaveFileNotificationT): void { - _o.data = this.bb!.createScalarList(this.data.bind(this), this.dataLength()); - _o.mimeType = this.mimeType(); - _o.fileExtension = this.fileExtension(); - _o.expectedDir = this.expectedDir(); - _o.expectedFilename = this.expectedFilename(); -} -} - -export class SaveFileNotificationT implements flatbuffers.IGeneratedObject { -constructor( - public data: (number)[] = [], - public mimeType: string|Uint8Array|null = null, - public fileExtension: string|Uint8Array|null = null, - public expectedDir: ComputerDirectory|null = null, - public expectedFilename: string|Uint8Array|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const data = SaveFileNotification.createDataVector(builder, this.data); - const mimeType = (this.mimeType !== null ? builder.createString(this.mimeType!) : 0); - const fileExtension = (this.fileExtension !== null ? builder.createString(this.fileExtension!) : 0); - const expectedFilename = (this.expectedFilename !== null ? builder.createString(this.expectedFilename!) : 0); - - return SaveFileNotification.createSaveFileNotification(builder, - data, - mimeType, - fileExtension, - this.expectedDir, - expectedFilename - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { ComputerDirectory } from '../../solarxr-protocol/rpc/computer-directory.js'; + + +/** + * Used for the server to save a file and have it prompt in the user side + */ +export class SaveFileNotification implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):SaveFileNotification { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSaveFileNotification(bb:flatbuffers.ByteBuffer, obj?:SaveFileNotification):SaveFileNotification { + return (obj || new SaveFileNotification()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSaveFileNotification(bb:flatbuffers.ByteBuffer, obj?:SaveFileNotification):SaveFileNotification { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SaveFileNotification()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +/** + * Binary data of the file + */ +data(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; +} + +dataLength():number { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + +dataArray():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; +} + +/** + * MIME type of file if one exists, use `file_extension` otherwise + */ +mimeType():string|null +mimeType(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +mimeType(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; +} + +/** + * Use MIME type preferably if one exists + */ +fileExtension():string|null +fileExtension(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +fileExtension(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; +} + +/** + * Directory recommended to save the file on + */ +expectedDir():ComputerDirectory|null { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : null; +} + +/** + * Recommended filename + */ +expectedFilename():string|null +expectedFilename(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +expectedFilename(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; +} + +static startSaveFileNotification(builder:flatbuffers.Builder) { + builder.startObject(5); +} + +static addData(builder:flatbuffers.Builder, dataOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, 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 addMimeType(builder:flatbuffers.Builder, mimeTypeOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, mimeTypeOffset, 0); +} + +static addFileExtension(builder:flatbuffers.Builder, fileExtensionOffset:flatbuffers.Offset) { + builder.addFieldOffset(2, fileExtensionOffset, 0); +} + +static addExpectedDir(builder:flatbuffers.Builder, expectedDir:ComputerDirectory) { + builder.addFieldInt8(3, expectedDir, 0); +} + +static addExpectedFilename(builder:flatbuffers.Builder, expectedFilenameOffset:flatbuffers.Offset) { + builder.addFieldOffset(4, expectedFilenameOffset, 0); +} + +static endSaveFileNotification(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSaveFileNotification(builder:flatbuffers.Builder, dataOffset:flatbuffers.Offset, mimeTypeOffset:flatbuffers.Offset, fileExtensionOffset:flatbuffers.Offset, expectedDir:ComputerDirectory|null, expectedFilenameOffset:flatbuffers.Offset):flatbuffers.Offset { + SaveFileNotification.startSaveFileNotification(builder); + SaveFileNotification.addData(builder, dataOffset); + SaveFileNotification.addMimeType(builder, mimeTypeOffset); + SaveFileNotification.addFileExtension(builder, fileExtensionOffset); + if (expectedDir !== null) + SaveFileNotification.addExpectedDir(builder, expectedDir); + SaveFileNotification.addExpectedFilename(builder, expectedFilenameOffset); + return SaveFileNotification.endSaveFileNotification(builder); +} + +unpack(): SaveFileNotificationT { + return new SaveFileNotificationT( + this.bb!.createScalarList(this.data.bind(this), this.dataLength()), + this.mimeType(), + this.fileExtension(), + this.expectedDir(), + this.expectedFilename() + ); +} + + +unpackTo(_o: SaveFileNotificationT): void { + _o.data = this.bb!.createScalarList(this.data.bind(this), this.dataLength()); + _o.mimeType = this.mimeType(); + _o.fileExtension = this.fileExtension(); + _o.expectedDir = this.expectedDir(); + _o.expectedFilename = this.expectedFilename(); +} +} + +export class SaveFileNotificationT implements flatbuffers.IGeneratedObject { +constructor( + public data: (number)[] = [], + public mimeType: string|Uint8Array|null = null, + public fileExtension: string|Uint8Array|null = null, + public expectedDir: ComputerDirectory|null = null, + public expectedFilename: string|Uint8Array|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const data = SaveFileNotification.createDataVector(builder, this.data); + const mimeType = (this.mimeType !== null ? builder.createString(this.mimeType!) : 0); + const fileExtension = (this.fileExtension !== null ? builder.createString(this.fileExtension!) : 0); + const expectedFilename = (this.expectedFilename !== null ? builder.createString(this.expectedFilename!) : 0); + + return SaveFileNotification.createSaveFileNotification(builder, + data, + mimeType, + fileExtension, + this.expectedDir, + expectedFilename + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/serial-device-port.ts b/protocol/typescript/src/solarxr-protocol/rpc/serial-device-port.ts new file mode 100644 index 00000000..5313fed4 --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/serial-device-port.ts @@ -0,0 +1,76 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class SerialDevicePort implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):SerialDevicePort { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSerialDevicePort(bb:flatbuffers.ByteBuffer, obj?:SerialDevicePort):SerialDevicePort { + return (obj || new SerialDevicePort()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSerialDevicePort(bb:flatbuffers.ByteBuffer, obj?:SerialDevicePort):SerialDevicePort { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SerialDevicePort()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +port():string|null +port(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +port(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 startSerialDevicePort(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addPort(builder:flatbuffers.Builder, portOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, portOffset, 0); +} + +static endSerialDevicePort(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSerialDevicePort(builder:flatbuffers.Builder, portOffset:flatbuffers.Offset):flatbuffers.Offset { + SerialDevicePort.startSerialDevicePort(builder); + SerialDevicePort.addPort(builder, portOffset); + return SerialDevicePort.endSerialDevicePort(builder); +} + +unpack(): SerialDevicePortT { + return new SerialDevicePortT( + this.port() + ); +} + + +unpackTo(_o: SerialDevicePortT): void { + _o.port = this.port(); +} +} + +export class SerialDevicePortT implements flatbuffers.IGeneratedObject { +constructor( + public port: string|Uint8Array|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const port = (this.port !== null ? builder.createString(this.port!) : 0); + + return SerialDevicePort.createSerialDevicePort(builder, + port + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/serial-device.ts b/protocol/typescript/src/solarxr-protocol/rpc/serial-device.ts index 424dc868..7ccab45c 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/serial-device.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/serial-device.ts @@ -1,93 +1,93 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class SerialDevice implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):SerialDevice { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsSerialDevice(bb:flatbuffers.ByteBuffer, obj?:SerialDevice):SerialDevice { - return (obj || new SerialDevice()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsSerialDevice(bb:flatbuffers.ByteBuffer, obj?:SerialDevice):SerialDevice { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new SerialDevice()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -port():string|null -port(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -port(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; -} - -name():string|null -name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -name(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 startSerialDevice(builder:flatbuffers.Builder) { - builder.startObject(2); -} - -static addPort(builder:flatbuffers.Builder, portOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, portOffset, 0); -} - -static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, nameOffset, 0); -} - -static endSerialDevice(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createSerialDevice(builder:flatbuffers.Builder, portOffset:flatbuffers.Offset, nameOffset:flatbuffers.Offset):flatbuffers.Offset { - SerialDevice.startSerialDevice(builder); - SerialDevice.addPort(builder, portOffset); - SerialDevice.addName(builder, nameOffset); - return SerialDevice.endSerialDevice(builder); -} - -unpack(): SerialDeviceT { - return new SerialDeviceT( - this.port(), - this.name() - ); -} - - -unpackTo(_o: SerialDeviceT): void { - _o.port = this.port(); - _o.name = this.name(); -} -} - -export class SerialDeviceT implements flatbuffers.IGeneratedObject { -constructor( - public port: string|Uint8Array|null = null, - public name: string|Uint8Array|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const port = (this.port !== null ? builder.createString(this.port!) : 0); - const name = (this.name !== null ? builder.createString(this.name!) : 0); - - return SerialDevice.createSerialDevice(builder, - port, - name - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class SerialDevice implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):SerialDevice { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSerialDevice(bb:flatbuffers.ByteBuffer, obj?:SerialDevice):SerialDevice { + return (obj || new SerialDevice()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSerialDevice(bb:flatbuffers.ByteBuffer, obj?:SerialDevice):SerialDevice { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SerialDevice()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +port():string|null +port(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +port(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; +} + +name():string|null +name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +name(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 startSerialDevice(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addPort(builder:flatbuffers.Builder, portOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, portOffset, 0); +} + +static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, nameOffset, 0); +} + +static endSerialDevice(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSerialDevice(builder:flatbuffers.Builder, portOffset:flatbuffers.Offset, nameOffset:flatbuffers.Offset):flatbuffers.Offset { + SerialDevice.startSerialDevice(builder); + SerialDevice.addPort(builder, portOffset); + SerialDevice.addName(builder, nameOffset); + return SerialDevice.endSerialDevice(builder); +} + +unpack(): SerialDeviceT { + return new SerialDeviceT( + this.port(), + this.name() + ); +} + + +unpackTo(_o: SerialDeviceT): void { + _o.port = this.port(); + _o.name = this.name(); +} +} + +export class SerialDeviceT implements flatbuffers.IGeneratedObject { +constructor( + public port: string|Uint8Array|null = null, + public name: string|Uint8Array|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const port = (this.port !== null ? builder.createString(this.port!) : 0); + const name = (this.name !== null ? builder.createString(this.name!) : 0); + + return SerialDevice.createSerialDevice(builder, + port, + name + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/serial-devices-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/serial-devices-request.ts index 8aac40a8..bc769e81 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/serial-devices-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/serial-devices-request.ts @@ -1,54 +1,54 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class SerialDevicesRequest implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):SerialDevicesRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsSerialDevicesRequest(bb:flatbuffers.ByteBuffer, obj?:SerialDevicesRequest):SerialDevicesRequest { - return (obj || new SerialDevicesRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsSerialDevicesRequest(bb:flatbuffers.ByteBuffer, obj?:SerialDevicesRequest):SerialDevicesRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new SerialDevicesRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startSerialDevicesRequest(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endSerialDevicesRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createSerialDevicesRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - SerialDevicesRequest.startSerialDevicesRequest(builder); - return SerialDevicesRequest.endSerialDevicesRequest(builder); -} - -unpack(): SerialDevicesRequestT { - return new SerialDevicesRequestT(); -} - - -unpackTo(_o: SerialDevicesRequestT): void {} -} - -export class SerialDevicesRequestT implements flatbuffers.IGeneratedObject { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return SerialDevicesRequest.createSerialDevicesRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class SerialDevicesRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):SerialDevicesRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSerialDevicesRequest(bb:flatbuffers.ByteBuffer, obj?:SerialDevicesRequest):SerialDevicesRequest { + return (obj || new SerialDevicesRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSerialDevicesRequest(bb:flatbuffers.ByteBuffer, obj?:SerialDevicesRequest):SerialDevicesRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SerialDevicesRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startSerialDevicesRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endSerialDevicesRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSerialDevicesRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + SerialDevicesRequest.startSerialDevicesRequest(builder); + return SerialDevicesRequest.endSerialDevicesRequest(builder); +} + +unpack(): SerialDevicesRequestT { + return new SerialDevicesRequestT(); +} + + +unpackTo(_o: SerialDevicesRequestT): void {} +} + +export class SerialDevicesRequestT implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return SerialDevicesRequest.createSerialDevicesRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/serial-devices-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/serial-devices-response.ts index 97809aab..cbfd0da7 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/serial-devices-response.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/serial-devices-response.ts @@ -1,92 +1,92 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { SerialDevice, SerialDeviceT } from '../../solarxr-protocol/rpc/serial-device.js'; - - -export class SerialDevicesResponse implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):SerialDevicesResponse { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsSerialDevicesResponse(bb:flatbuffers.ByteBuffer, obj?:SerialDevicesResponse):SerialDevicesResponse { - return (obj || new SerialDevicesResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsSerialDevicesResponse(bb:flatbuffers.ByteBuffer, obj?:SerialDevicesResponse):SerialDevicesResponse { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new SerialDevicesResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -devices(index: number, obj?:SerialDevice):SerialDevice|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new SerialDevice()).__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; -} - -static startSerialDevicesResponse(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -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 endSerialDevicesResponse(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createSerialDevicesResponse(builder:flatbuffers.Builder, devicesOffset:flatbuffers.Offset):flatbuffers.Offset { - SerialDevicesResponse.startSerialDevicesResponse(builder); - SerialDevicesResponse.addDevices(builder, devicesOffset); - return SerialDevicesResponse.endSerialDevicesResponse(builder); -} - -unpack(): SerialDevicesResponseT { - return new SerialDevicesResponseT( - this.bb!.createObjList(this.devices.bind(this), this.devicesLength()) - ); -} - - -unpackTo(_o: SerialDevicesResponseT): void { - _o.devices = this.bb!.createObjList(this.devices.bind(this), this.devicesLength()); -} -} - -export class SerialDevicesResponseT implements flatbuffers.IGeneratedObject { -constructor( - public devices: (SerialDeviceT)[] = [] -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const devices = SerialDevicesResponse.createDevicesVector(builder, builder.createObjectOffsetList(this.devices)); - - return SerialDevicesResponse.createSerialDevicesResponse(builder, - devices - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { SerialDevice, SerialDeviceT } from '../../solarxr-protocol/rpc/serial-device.js'; + + +export class SerialDevicesResponse implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):SerialDevicesResponse { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSerialDevicesResponse(bb:flatbuffers.ByteBuffer, obj?:SerialDevicesResponse):SerialDevicesResponse { + return (obj || new SerialDevicesResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSerialDevicesResponse(bb:flatbuffers.ByteBuffer, obj?:SerialDevicesResponse):SerialDevicesResponse { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SerialDevicesResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +devices(index: number, obj?:SerialDevice):SerialDevice|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new SerialDevice()).__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; +} + +static startSerialDevicesResponse(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +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 endSerialDevicesResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSerialDevicesResponse(builder:flatbuffers.Builder, devicesOffset:flatbuffers.Offset):flatbuffers.Offset { + SerialDevicesResponse.startSerialDevicesResponse(builder); + SerialDevicesResponse.addDevices(builder, devicesOffset); + return SerialDevicesResponse.endSerialDevicesResponse(builder); +} + +unpack(): SerialDevicesResponseT { + return new SerialDevicesResponseT( + this.bb!.createObjList(this.devices.bind(this), this.devicesLength()) + ); +} + + +unpackTo(_o: SerialDevicesResponseT): void { + _o.devices = this.bb!.createObjList(this.devices.bind(this), this.devicesLength()); +} +} + +export class SerialDevicesResponseT implements flatbuffers.IGeneratedObject { +constructor( + public devices: (SerialDeviceT)[] = [] +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const devices = SerialDevicesResponse.createDevicesVector(builder, builder.createObjectOffsetList(this.devices)); + + return SerialDevicesResponse.createSerialDevicesResponse(builder, + devices + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/serial-firmware-update.ts b/protocol/typescript/src/solarxr-protocol/rpc/serial-firmware-update.ts new file mode 100644 index 00000000..5ad33b5f --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/serial-firmware-update.ts @@ -0,0 +1,170 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { FirmwarePart, FirmwarePartT } from '../../solarxr-protocol/rpc/firmware-part.js'; +import { SerialDevicePort, SerialDevicePortT } from '../../solarxr-protocol/rpc/serial-device-port.js'; + + +export class SerialFirmwareUpdate implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):SerialFirmwareUpdate { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSerialFirmwareUpdate(bb:flatbuffers.ByteBuffer, obj?:SerialFirmwareUpdate):SerialFirmwareUpdate { + return (obj || new SerialFirmwareUpdate()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSerialFirmwareUpdate(bb:flatbuffers.ByteBuffer, obj?:SerialFirmwareUpdate):SerialFirmwareUpdate { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SerialFirmwareUpdate()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +/** + * id of the device, this refer to a serial port id + */ +deviceId(obj?:SerialDevicePort):SerialDevicePort|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new SerialDevicePort()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +/** + * Will make the server ask for the tracker to be manually rebooted by the user + * after the tracker is done flashing + */ +needManualReboot():boolean { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +/** + * Credentials to provision after the flashing + * Only used with Serial flashing, because OTA is already connected to the wifi + */ +ssid():string|null +ssid(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +ssid(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; +} + +password():string|null +password(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +password(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; +} + +/** + * A list of urls and offsets of the different firmware files to flash + */ +firmwarePart(index: number, obj?:FirmwarePart):FirmwarePart|null { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? (obj || new FirmwarePart()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; +} + +firmwarePartLength():number { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + +static startSerialFirmwareUpdate(builder:flatbuffers.Builder) { + builder.startObject(5); +} + +static addDeviceId(builder:flatbuffers.Builder, deviceIdOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, deviceIdOffset, 0); +} + +static addNeedManualReboot(builder:flatbuffers.Builder, needManualReboot:boolean) { + builder.addFieldInt8(1, +needManualReboot, +false); +} + +static addSsid(builder:flatbuffers.Builder, ssidOffset:flatbuffers.Offset) { + builder.addFieldOffset(2, ssidOffset, 0); +} + +static addPassword(builder:flatbuffers.Builder, passwordOffset:flatbuffers.Offset) { + builder.addFieldOffset(3, passwordOffset, 0); +} + +static addFirmwarePart(builder:flatbuffers.Builder, firmwarePartOffset:flatbuffers.Offset) { + builder.addFieldOffset(4, firmwarePartOffset, 0); +} + +static createFirmwarePartVector(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 startFirmwarePartVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(4, numElems, 4); +} + +static endSerialFirmwareUpdate(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSerialFirmwareUpdate(builder:flatbuffers.Builder, deviceIdOffset:flatbuffers.Offset, needManualReboot:boolean, ssidOffset:flatbuffers.Offset, passwordOffset:flatbuffers.Offset, firmwarePartOffset:flatbuffers.Offset):flatbuffers.Offset { + SerialFirmwareUpdate.startSerialFirmwareUpdate(builder); + SerialFirmwareUpdate.addDeviceId(builder, deviceIdOffset); + SerialFirmwareUpdate.addNeedManualReboot(builder, needManualReboot); + SerialFirmwareUpdate.addSsid(builder, ssidOffset); + SerialFirmwareUpdate.addPassword(builder, passwordOffset); + SerialFirmwareUpdate.addFirmwarePart(builder, firmwarePartOffset); + return SerialFirmwareUpdate.endSerialFirmwareUpdate(builder); +} + +unpack(): SerialFirmwareUpdateT { + return new SerialFirmwareUpdateT( + (this.deviceId() !== null ? this.deviceId()!.unpack() : null), + this.needManualReboot(), + this.ssid(), + this.password(), + this.bb!.createObjList(this.firmwarePart.bind(this), this.firmwarePartLength()) + ); +} + + +unpackTo(_o: SerialFirmwareUpdateT): void { + _o.deviceId = (this.deviceId() !== null ? this.deviceId()!.unpack() : null); + _o.needManualReboot = this.needManualReboot(); + _o.ssid = this.ssid(); + _o.password = this.password(); + _o.firmwarePart = this.bb!.createObjList(this.firmwarePart.bind(this), this.firmwarePartLength()); +} +} + +export class SerialFirmwareUpdateT implements flatbuffers.IGeneratedObject { +constructor( + public deviceId: SerialDevicePortT|null = null, + public needManualReboot: boolean = false, + public ssid: string|Uint8Array|null = null, + public password: string|Uint8Array|null = null, + public firmwarePart: (FirmwarePartT)[] = [] +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const deviceId = (this.deviceId !== null ? this.deviceId!.pack(builder) : 0); + const ssid = (this.ssid !== null ? builder.createString(this.ssid!) : 0); + const password = (this.password !== null ? builder.createString(this.password!) : 0); + const firmwarePart = SerialFirmwareUpdate.createFirmwarePartVector(builder, builder.createObjectOffsetList(this.firmwarePart)); + + return SerialFirmwareUpdate.createSerialFirmwareUpdate(builder, + deviceId, + this.needManualReboot, + ssid, + password, + firmwarePart + ); +} +} 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 index e7125c35..72ebc711 100644 --- 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 @@ -1,57 +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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return SerialTrackerFactoryResetRequest.createSerialTrackerFactoryResetRequest(builder); -} -} +// 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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 420c0687..03137757 100644 --- 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 @@ -1,57 +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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return SerialTrackerGetInfoRequest.createSerialTrackerGetInfoRequest(builder); -} -} +// 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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return SerialTrackerGetInfoRequest.createSerialTrackerGetInfoRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-get-wifi-scan-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-get-wifi-scan-request.ts index f9e1775d..c473ae47 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-get-wifi-scan-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-get-wifi-scan-request.ts @@ -1,57 +1,57 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * Sends the GET WIFISCAN cmd to the current tracker on the serial monitor - */ -export class SerialTrackerGetWifiScanRequest implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):SerialTrackerGetWifiScanRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsSerialTrackerGetWifiScanRequest(bb:flatbuffers.ByteBuffer, obj?:SerialTrackerGetWifiScanRequest):SerialTrackerGetWifiScanRequest { - return (obj || new SerialTrackerGetWifiScanRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsSerialTrackerGetWifiScanRequest(bb:flatbuffers.ByteBuffer, obj?:SerialTrackerGetWifiScanRequest):SerialTrackerGetWifiScanRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new SerialTrackerGetWifiScanRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startSerialTrackerGetWifiScanRequest(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endSerialTrackerGetWifiScanRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createSerialTrackerGetWifiScanRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - SerialTrackerGetWifiScanRequest.startSerialTrackerGetWifiScanRequest(builder); - return SerialTrackerGetWifiScanRequest.endSerialTrackerGetWifiScanRequest(builder); -} - -unpack(): SerialTrackerGetWifiScanRequestT { - return new SerialTrackerGetWifiScanRequestT(); -} - - -unpackTo(_o: SerialTrackerGetWifiScanRequestT): void {} -} - -export class SerialTrackerGetWifiScanRequestT implements flatbuffers.IGeneratedObject { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return SerialTrackerGetWifiScanRequest.createSerialTrackerGetWifiScanRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Sends the GET WIFISCAN cmd to the current tracker on the serial monitor + */ +export class SerialTrackerGetWifiScanRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):SerialTrackerGetWifiScanRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSerialTrackerGetWifiScanRequest(bb:flatbuffers.ByteBuffer, obj?:SerialTrackerGetWifiScanRequest):SerialTrackerGetWifiScanRequest { + return (obj || new SerialTrackerGetWifiScanRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSerialTrackerGetWifiScanRequest(bb:flatbuffers.ByteBuffer, obj?:SerialTrackerGetWifiScanRequest):SerialTrackerGetWifiScanRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SerialTrackerGetWifiScanRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startSerialTrackerGetWifiScanRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endSerialTrackerGetWifiScanRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSerialTrackerGetWifiScanRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + SerialTrackerGetWifiScanRequest.startSerialTrackerGetWifiScanRequest(builder); + return SerialTrackerGetWifiScanRequest.endSerialTrackerGetWifiScanRequest(builder); +} + +unpack(): SerialTrackerGetWifiScanRequestT { + return new SerialTrackerGetWifiScanRequestT(); +} + + +unpackTo(_o: SerialTrackerGetWifiScanRequestT): void {} +} + +export class SerialTrackerGetWifiScanRequestT implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return SerialTrackerGetWifiScanRequest.createSerialTrackerGetWifiScanRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-reboot-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-reboot-request.ts index 5ee5bc00..3e5aba84 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-reboot-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-reboot-request.ts @@ -1,57 +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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return SerialTrackerRebootRequest.createSerialTrackerRebootRequest(builder); -} -} +// 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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return SerialTrackerRebootRequest.createSerialTrackerRebootRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/serial-update-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/serial-update-response.ts index 23b9b5ad..1834aca5 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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/server-infos-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/server-infos-request.ts index 054a8021..0f218c10 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/server-infos-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/server-infos-request.ts @@ -1,60 +1,60 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * Allows to ask generic infos about the server, - * like the local ip address, the version of the server, the java version, - * the current working dir and other informations we might want to show in the gui - * for information/debug purposes - */ -export class ServerInfosRequest implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):ServerInfosRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsServerInfosRequest(bb:flatbuffers.ByteBuffer, obj?:ServerInfosRequest):ServerInfosRequest { - return (obj || new ServerInfosRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsServerInfosRequest(bb:flatbuffers.ByteBuffer, obj?:ServerInfosRequest):ServerInfosRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new ServerInfosRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startServerInfosRequest(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endServerInfosRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createServerInfosRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - ServerInfosRequest.startServerInfosRequest(builder); - return ServerInfosRequest.endServerInfosRequest(builder); -} - -unpack(): ServerInfosRequestT { - return new ServerInfosRequestT(); -} - - -unpackTo(_o: ServerInfosRequestT): void {} -} - -export class ServerInfosRequestT implements flatbuffers.IGeneratedObject { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return ServerInfosRequest.createServerInfosRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Allows to ask generic infos about the server, + * like the local ip address, the version of the server, the java version, + * the current working dir and other informations we might want to show in the gui + * for information/debug purposes + */ +export class ServerInfosRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):ServerInfosRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsServerInfosRequest(bb:flatbuffers.ByteBuffer, obj?:ServerInfosRequest):ServerInfosRequest { + return (obj || new ServerInfosRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsServerInfosRequest(bb:flatbuffers.ByteBuffer, obj?:ServerInfosRequest):ServerInfosRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new ServerInfosRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startServerInfosRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endServerInfosRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createServerInfosRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + ServerInfosRequest.startServerInfosRequest(builder); + return ServerInfosRequest.endServerInfosRequest(builder); +} + +unpack(): ServerInfosRequestT { + return new ServerInfosRequestT(); +} + + +unpackTo(_o: ServerInfosRequestT): void {} +} + +export class ServerInfosRequestT implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return ServerInfosRequest.createServerInfosRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/server-infos-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/server-infos-response.ts index 0543c893..1fe89ddd 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/server-infos-response.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/server-infos-response.ts @@ -1,82 +1,82 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * Holds the Server informations, this is a basic table holding various informations about the currently running server - * like its local ip address (usefull for standalone users so they can specify the ip of the server more easilly) and any more - * infos we might want to add in the future. (like java version, working dir, server version ....) - * This only holds the local ip for now. But there will be other informations added as we chose to display them on the gui for instance - */ -export class ServerInfosResponse implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):ServerInfosResponse { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsServerInfosResponse(bb:flatbuffers.ByteBuffer, obj?:ServerInfosResponse):ServerInfosResponse { - return (obj || new ServerInfosResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsServerInfosResponse(bb:flatbuffers.ByteBuffer, obj?:ServerInfosResponse):ServerInfosResponse { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new ServerInfosResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -localIp():string|null -localIp(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -localIp(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 startServerInfosResponse(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addLocalIp(builder:flatbuffers.Builder, localIpOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, localIpOffset, 0); -} - -static endServerInfosResponse(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createServerInfosResponse(builder:flatbuffers.Builder, localIpOffset:flatbuffers.Offset):flatbuffers.Offset { - ServerInfosResponse.startServerInfosResponse(builder); - ServerInfosResponse.addLocalIp(builder, localIpOffset); - return ServerInfosResponse.endServerInfosResponse(builder); -} - -unpack(): ServerInfosResponseT { - return new ServerInfosResponseT( - this.localIp() - ); -} - - -unpackTo(_o: ServerInfosResponseT): void { - _o.localIp = this.localIp(); -} -} - -export class ServerInfosResponseT implements flatbuffers.IGeneratedObject { -constructor( - public localIp: string|Uint8Array|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const localIp = (this.localIp !== null ? builder.createString(this.localIp!) : 0); - - return ServerInfosResponse.createServerInfosResponse(builder, - localIp - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Holds the Server informations, this is a basic table holding various informations about the currently running server + * like its local ip address (usefull for standalone users so they can specify the ip of the server more easilly) and any more + * infos we might want to add in the future. (like java version, working dir, server version ....) + * This only holds the local ip for now. But there will be other informations added as we chose to display them on the gui for instance + */ +export class ServerInfosResponse implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):ServerInfosResponse { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsServerInfosResponse(bb:flatbuffers.ByteBuffer, obj?:ServerInfosResponse):ServerInfosResponse { + return (obj || new ServerInfosResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsServerInfosResponse(bb:flatbuffers.ByteBuffer, obj?:ServerInfosResponse):ServerInfosResponse { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new ServerInfosResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +localIp():string|null +localIp(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +localIp(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 startServerInfosResponse(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addLocalIp(builder:flatbuffers.Builder, localIpOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, localIpOffset, 0); +} + +static endServerInfosResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createServerInfosResponse(builder:flatbuffers.Builder, localIpOffset:flatbuffers.Offset):flatbuffers.Offset { + ServerInfosResponse.startServerInfosResponse(builder); + ServerInfosResponse.addLocalIp(builder, localIpOffset); + return ServerInfosResponse.endServerInfosResponse(builder); +} + +unpack(): ServerInfosResponseT { + return new ServerInfosResponseT( + this.localIp() + ); +} + + +unpackTo(_o: ServerInfosResponseT): void { + _o.localIp = this.localIp(); +} +} + +export class ServerInfosResponseT implements flatbuffers.IGeneratedObject { +constructor( + public localIp: string|Uint8Array|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const localIp = (this.localIp !== null ? builder.createString(this.localIp!) : 0); + + return ServerInfosResponse.createServerInfosResponse(builder, + localIp + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/set-pause-tracking-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/set-pause-tracking-request.ts index 7bc2cbcf..cf29fd7a 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/set-pause-tracking-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/set-pause-tracking-request.ts @@ -1,75 +1,75 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class SetPauseTrackingRequest implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):SetPauseTrackingRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsSetPauseTrackingRequest(bb:flatbuffers.ByteBuffer, obj?:SetPauseTrackingRequest):SetPauseTrackingRequest { - return (obj || new SetPauseTrackingRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsSetPauseTrackingRequest(bb:flatbuffers.ByteBuffer, obj?:SetPauseTrackingRequest):SetPauseTrackingRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new SetPauseTrackingRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -/** - * Pauses skeleton tracking if true, resumes skeleton tracking if false. - */ -pauseTracking():boolean { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startSetPauseTrackingRequest(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addPauseTracking(builder:flatbuffers.Builder, pauseTracking:boolean) { - builder.addFieldInt8(0, +pauseTracking, +false); -} - -static endSetPauseTrackingRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createSetPauseTrackingRequest(builder:flatbuffers.Builder, pauseTracking:boolean):flatbuffers.Offset { - SetPauseTrackingRequest.startSetPauseTrackingRequest(builder); - SetPauseTrackingRequest.addPauseTracking(builder, pauseTracking); - return SetPauseTrackingRequest.endSetPauseTrackingRequest(builder); -} - -unpack(): SetPauseTrackingRequestT { - return new SetPauseTrackingRequestT( - this.pauseTracking() - ); -} - - -unpackTo(_o: SetPauseTrackingRequestT): void { - _o.pauseTracking = this.pauseTracking(); -} -} - -export class SetPauseTrackingRequestT implements flatbuffers.IGeneratedObject { -constructor( - public pauseTracking: boolean = false -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return SetPauseTrackingRequest.createSetPauseTrackingRequest(builder, - this.pauseTracking - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class SetPauseTrackingRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):SetPauseTrackingRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSetPauseTrackingRequest(bb:flatbuffers.ByteBuffer, obj?:SetPauseTrackingRequest):SetPauseTrackingRequest { + return (obj || new SetPauseTrackingRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSetPauseTrackingRequest(bb:flatbuffers.ByteBuffer, obj?:SetPauseTrackingRequest):SetPauseTrackingRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SetPauseTrackingRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +/** + * Pauses skeleton tracking if true, resumes skeleton tracking if false. + */ +pauseTracking():boolean { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startSetPauseTrackingRequest(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addPauseTracking(builder:flatbuffers.Builder, pauseTracking:boolean) { + builder.addFieldInt8(0, +pauseTracking, +false); +} + +static endSetPauseTrackingRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSetPauseTrackingRequest(builder:flatbuffers.Builder, pauseTracking:boolean):flatbuffers.Offset { + SetPauseTrackingRequest.startSetPauseTrackingRequest(builder); + SetPauseTrackingRequest.addPauseTracking(builder, pauseTracking); + return SetPauseTrackingRequest.endSetPauseTrackingRequest(builder); +} + +unpack(): SetPauseTrackingRequestT { + return new SetPauseTrackingRequestT( + this.pauseTracking() + ); +} + + +unpackTo(_o: SetPauseTrackingRequestT): void { + _o.pauseTracking = this.pauseTracking(); +} +} + +export class SetPauseTrackingRequestT implements flatbuffers.IGeneratedObject { +constructor( + public pauseTracking: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return SetPauseTrackingRequest.createSetPauseTrackingRequest(builder, + this.pauseTracking + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/set-wifi-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/set-wifi-request.ts index d6ee4d93..58f86dfe 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index b7bf2a3b..14c606da 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 6d5ba5a1..783e6eb8 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/settings-response.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/settings-response.ts @@ -1,206 +1,206 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { AutoBoneSettings, AutoBoneSettingsT } from '../../solarxr-protocol/rpc/auto-bone-settings.js'; -import { DriftCompensationSettings, DriftCompensationSettingsT } from '../../solarxr-protocol/rpc/drift-compensation-settings.js'; -import { FilteringSettings, FilteringSettingsT } from '../../solarxr-protocol/rpc/filtering-settings.js'; -import { OSCRouterSettings, OSCRouterSettingsT } from '../../solarxr-protocol/rpc/oscrouter-settings.js'; -import { ResetsSettings, ResetsSettingsT } from '../../solarxr-protocol/rpc/resets-settings.js'; -import { SteamVRTrackersSetting, SteamVRTrackersSettingT } from '../../solarxr-protocol/rpc/steam-vrtrackers-setting.js'; -import { TapDetectionSettings, TapDetectionSettingsT } from '../../solarxr-protocol/rpc/tap-detection-settings.js'; -import { VMCOSCSettings, VMCOSCSettingsT } from '../../solarxr-protocol/rpc/vmcoscsettings.js'; -import { VRCOSCSettings, VRCOSCSettingsT } from '../../solarxr-protocol/rpc/vrcoscsettings.js'; -import { ModelSettings, ModelSettingsT } from '../../solarxr-protocol/rpc/settings/model-settings.js'; - - -export class SettingsResponse implements flatbuffers.IUnpackableObject { - 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; -} - -driftCompensation(obj?:DriftCompensationSettings):DriftCompensationSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? (obj || new DriftCompensationSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -oscRouter(obj?:OSCRouterSettings):OSCRouterSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? (obj || new OSCRouterSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -vrcOsc(obj?:VRCOSCSettings):VRCOSCSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? (obj || new VRCOSCSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -vmcOsc(obj?:VMCOSCSettings):VMCOSCSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 14); - return offset ? (obj || new VMCOSCSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -modelSettings(obj?:ModelSettings):ModelSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 16); - return offset ? (obj || new ModelSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -tapDetectionSettings(obj?:TapDetectionSettings):TapDetectionSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 18); - return offset ? (obj || new TapDetectionSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -autoBoneSettings(obj?:AutoBoneSettings):AutoBoneSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 20); - return offset ? (obj || new AutoBoneSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -resetsSettings(obj?:ResetsSettings):ResetsSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 22); - return offset ? (obj || new ResetsSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -static startSettingsResponse(builder:flatbuffers.Builder) { - builder.startObject(10); -} - -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 addDriftCompensation(builder:flatbuffers.Builder, driftCompensationOffset:flatbuffers.Offset) { - builder.addFieldOffset(2, driftCompensationOffset, 0); -} - -static addOscRouter(builder:flatbuffers.Builder, oscRouterOffset:flatbuffers.Offset) { - builder.addFieldOffset(3, oscRouterOffset, 0); -} - -static addVrcOsc(builder:flatbuffers.Builder, vrcOscOffset:flatbuffers.Offset) { - builder.addFieldOffset(4, vrcOscOffset, 0); -} - -static addVmcOsc(builder:flatbuffers.Builder, vmcOscOffset:flatbuffers.Offset) { - builder.addFieldOffset(5, vmcOscOffset, 0); -} - -static addModelSettings(builder:flatbuffers.Builder, modelSettingsOffset:flatbuffers.Offset) { - builder.addFieldOffset(6, modelSettingsOffset, 0); -} - -static addTapDetectionSettings(builder:flatbuffers.Builder, tapDetectionSettingsOffset:flatbuffers.Offset) { - builder.addFieldOffset(7, tapDetectionSettingsOffset, 0); -} - -static addAutoBoneSettings(builder:flatbuffers.Builder, autoBoneSettingsOffset:flatbuffers.Offset) { - builder.addFieldOffset(8, autoBoneSettingsOffset, 0); -} - -static addResetsSettings(builder:flatbuffers.Builder, resetsSettingsOffset:flatbuffers.Offset) { - builder.addFieldOffset(9, resetsSettingsOffset, 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.driftCompensation() !== null ? this.driftCompensation()!.unpack() : null), - (this.oscRouter() !== null ? this.oscRouter()!.unpack() : null), - (this.vrcOsc() !== null ? this.vrcOsc()!.unpack() : null), - (this.vmcOsc() !== null ? this.vmcOsc()!.unpack() : null), - (this.modelSettings() !== null ? this.modelSettings()!.unpack() : null), - (this.tapDetectionSettings() !== null ? this.tapDetectionSettings()!.unpack() : null), - (this.autoBoneSettings() !== null ? this.autoBoneSettings()!.unpack() : null), - (this.resetsSettings() !== null ? this.resetsSettings()!.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.driftCompensation = (this.driftCompensation() !== null ? this.driftCompensation()!.unpack() : null); - _o.oscRouter = (this.oscRouter() !== null ? this.oscRouter()!.unpack() : null); - _o.vrcOsc = (this.vrcOsc() !== null ? this.vrcOsc()!.unpack() : null); - _o.vmcOsc = (this.vmcOsc() !== null ? this.vmcOsc()!.unpack() : null); - _o.modelSettings = (this.modelSettings() !== null ? this.modelSettings()!.unpack() : null); - _o.tapDetectionSettings = (this.tapDetectionSettings() !== null ? this.tapDetectionSettings()!.unpack() : null); - _o.autoBoneSettings = (this.autoBoneSettings() !== null ? this.autoBoneSettings()!.unpack() : null); - _o.resetsSettings = (this.resetsSettings() !== null ? this.resetsSettings()!.unpack() : null); -} -} - -export class SettingsResponseT implements flatbuffers.IGeneratedObject { -constructor( - public steamVrTrackers: SteamVRTrackersSettingT|null = null, - public filtering: FilteringSettingsT|null = null, - public driftCompensation: DriftCompensationSettingsT|null = null, - public oscRouter: OSCRouterSettingsT|null = null, - public vrcOsc: VRCOSCSettingsT|null = null, - public vmcOsc: VMCOSCSettingsT|null = null, - public modelSettings: ModelSettingsT|null = null, - public tapDetectionSettings: TapDetectionSettingsT|null = null, - public autoBoneSettings: AutoBoneSettingsT|null = null, - public resetsSettings: ResetsSettingsT|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 driftCompensation = (this.driftCompensation !== null ? this.driftCompensation!.pack(builder) : 0); - const oscRouter = (this.oscRouter !== null ? this.oscRouter!.pack(builder) : 0); - const vrcOsc = (this.vrcOsc !== null ? this.vrcOsc!.pack(builder) : 0); - const vmcOsc = (this.vmcOsc !== null ? this.vmcOsc!.pack(builder) : 0); - const modelSettings = (this.modelSettings !== null ? this.modelSettings!.pack(builder) : 0); - const tapDetectionSettings = (this.tapDetectionSettings !== null ? this.tapDetectionSettings!.pack(builder) : 0); - const autoBoneSettings = (this.autoBoneSettings !== null ? this.autoBoneSettings!.pack(builder) : 0); - const resetsSettings = (this.resetsSettings !== null ? this.resetsSettings!.pack(builder) : 0); - - SettingsResponse.startSettingsResponse(builder); - SettingsResponse.addSteamVrTrackers(builder, steamVrTrackers); - SettingsResponse.addFiltering(builder, filtering); - SettingsResponse.addDriftCompensation(builder, driftCompensation); - SettingsResponse.addOscRouter(builder, oscRouter); - SettingsResponse.addVrcOsc(builder, vrcOsc); - SettingsResponse.addVmcOsc(builder, vmcOsc); - SettingsResponse.addModelSettings(builder, modelSettings); - SettingsResponse.addTapDetectionSettings(builder, tapDetectionSettings); - SettingsResponse.addAutoBoneSettings(builder, autoBoneSettings); - SettingsResponse.addResetsSettings(builder, resetsSettings); - - return SettingsResponse.endSettingsResponse(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { AutoBoneSettings, AutoBoneSettingsT } from '../../solarxr-protocol/rpc/auto-bone-settings.js'; +import { DriftCompensationSettings, DriftCompensationSettingsT } from '../../solarxr-protocol/rpc/drift-compensation-settings.js'; +import { FilteringSettings, FilteringSettingsT } from '../../solarxr-protocol/rpc/filtering-settings.js'; +import { OSCRouterSettings, OSCRouterSettingsT } from '../../solarxr-protocol/rpc/oscrouter-settings.js'; +import { ResetsSettings, ResetsSettingsT } from '../../solarxr-protocol/rpc/resets-settings.js'; +import { SteamVRTrackersSetting, SteamVRTrackersSettingT } from '../../solarxr-protocol/rpc/steam-vrtrackers-setting.js'; +import { TapDetectionSettings, TapDetectionSettingsT } from '../../solarxr-protocol/rpc/tap-detection-settings.js'; +import { VMCOSCSettings, VMCOSCSettingsT } from '../../solarxr-protocol/rpc/vmcoscsettings.js'; +import { VRCOSCSettings, VRCOSCSettingsT } from '../../solarxr-protocol/rpc/vrcoscsettings.js'; +import { ModelSettings, ModelSettingsT } from '../../solarxr-protocol/rpc/settings/model-settings.js'; + + +export class SettingsResponse implements flatbuffers.IUnpackableObject { + 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; +} + +driftCompensation(obj?:DriftCompensationSettings):DriftCompensationSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? (obj || new DriftCompensationSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +oscRouter(obj?:OSCRouterSettings):OSCRouterSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? (obj || new OSCRouterSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +vrcOsc(obj?:VRCOSCSettings):VRCOSCSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? (obj || new VRCOSCSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +vmcOsc(obj?:VMCOSCSettings):VMCOSCSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? (obj || new VMCOSCSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +modelSettings(obj?:ModelSettings):ModelSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 16); + return offset ? (obj || new ModelSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +tapDetectionSettings(obj?:TapDetectionSettings):TapDetectionSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 18); + return offset ? (obj || new TapDetectionSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +autoBoneSettings(obj?:AutoBoneSettings):AutoBoneSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 20); + return offset ? (obj || new AutoBoneSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +resetsSettings(obj?:ResetsSettings):ResetsSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 22); + return offset ? (obj || new ResetsSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +static startSettingsResponse(builder:flatbuffers.Builder) { + builder.startObject(10); +} + +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 addDriftCompensation(builder:flatbuffers.Builder, driftCompensationOffset:flatbuffers.Offset) { + builder.addFieldOffset(2, driftCompensationOffset, 0); +} + +static addOscRouter(builder:flatbuffers.Builder, oscRouterOffset:flatbuffers.Offset) { + builder.addFieldOffset(3, oscRouterOffset, 0); +} + +static addVrcOsc(builder:flatbuffers.Builder, vrcOscOffset:flatbuffers.Offset) { + builder.addFieldOffset(4, vrcOscOffset, 0); +} + +static addVmcOsc(builder:flatbuffers.Builder, vmcOscOffset:flatbuffers.Offset) { + builder.addFieldOffset(5, vmcOscOffset, 0); +} + +static addModelSettings(builder:flatbuffers.Builder, modelSettingsOffset:flatbuffers.Offset) { + builder.addFieldOffset(6, modelSettingsOffset, 0); +} + +static addTapDetectionSettings(builder:flatbuffers.Builder, tapDetectionSettingsOffset:flatbuffers.Offset) { + builder.addFieldOffset(7, tapDetectionSettingsOffset, 0); +} + +static addAutoBoneSettings(builder:flatbuffers.Builder, autoBoneSettingsOffset:flatbuffers.Offset) { + builder.addFieldOffset(8, autoBoneSettingsOffset, 0); +} + +static addResetsSettings(builder:flatbuffers.Builder, resetsSettingsOffset:flatbuffers.Offset) { + builder.addFieldOffset(9, resetsSettingsOffset, 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.driftCompensation() !== null ? this.driftCompensation()!.unpack() : null), + (this.oscRouter() !== null ? this.oscRouter()!.unpack() : null), + (this.vrcOsc() !== null ? this.vrcOsc()!.unpack() : null), + (this.vmcOsc() !== null ? this.vmcOsc()!.unpack() : null), + (this.modelSettings() !== null ? this.modelSettings()!.unpack() : null), + (this.tapDetectionSettings() !== null ? this.tapDetectionSettings()!.unpack() : null), + (this.autoBoneSettings() !== null ? this.autoBoneSettings()!.unpack() : null), + (this.resetsSettings() !== null ? this.resetsSettings()!.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.driftCompensation = (this.driftCompensation() !== null ? this.driftCompensation()!.unpack() : null); + _o.oscRouter = (this.oscRouter() !== null ? this.oscRouter()!.unpack() : null); + _o.vrcOsc = (this.vrcOsc() !== null ? this.vrcOsc()!.unpack() : null); + _o.vmcOsc = (this.vmcOsc() !== null ? this.vmcOsc()!.unpack() : null); + _o.modelSettings = (this.modelSettings() !== null ? this.modelSettings()!.unpack() : null); + _o.tapDetectionSettings = (this.tapDetectionSettings() !== null ? this.tapDetectionSettings()!.unpack() : null); + _o.autoBoneSettings = (this.autoBoneSettings() !== null ? this.autoBoneSettings()!.unpack() : null); + _o.resetsSettings = (this.resetsSettings() !== null ? this.resetsSettings()!.unpack() : null); +} +} + +export class SettingsResponseT implements flatbuffers.IGeneratedObject { +constructor( + public steamVrTrackers: SteamVRTrackersSettingT|null = null, + public filtering: FilteringSettingsT|null = null, + public driftCompensation: DriftCompensationSettingsT|null = null, + public oscRouter: OSCRouterSettingsT|null = null, + public vrcOsc: VRCOSCSettingsT|null = null, + public vmcOsc: VMCOSCSettingsT|null = null, + public modelSettings: ModelSettingsT|null = null, + public tapDetectionSettings: TapDetectionSettingsT|null = null, + public autoBoneSettings: AutoBoneSettingsT|null = null, + public resetsSettings: ResetsSettingsT|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 driftCompensation = (this.driftCompensation !== null ? this.driftCompensation!.pack(builder) : 0); + const oscRouter = (this.oscRouter !== null ? this.oscRouter!.pack(builder) : 0); + const vrcOsc = (this.vrcOsc !== null ? this.vrcOsc!.pack(builder) : 0); + const vmcOsc = (this.vmcOsc !== null ? this.vmcOsc!.pack(builder) : 0); + const modelSettings = (this.modelSettings !== null ? this.modelSettings!.pack(builder) : 0); + const tapDetectionSettings = (this.tapDetectionSettings !== null ? this.tapDetectionSettings!.pack(builder) : 0); + const autoBoneSettings = (this.autoBoneSettings !== null ? this.autoBoneSettings!.pack(builder) : 0); + const resetsSettings = (this.resetsSettings !== null ? this.resetsSettings!.pack(builder) : 0); + + SettingsResponse.startSettingsResponse(builder); + SettingsResponse.addSteamVrTrackers(builder, steamVrTrackers); + SettingsResponse.addFiltering(builder, filtering); + SettingsResponse.addDriftCompensation(builder, driftCompensation); + SettingsResponse.addOscRouter(builder, oscRouter); + SettingsResponse.addVrcOsc(builder, vrcOsc); + SettingsResponse.addVmcOsc(builder, vmcOsc); + SettingsResponse.addModelSettings(builder, modelSettings); + SettingsResponse.addTapDetectionSettings(builder, tapDetectionSettings); + SettingsResponse.addAutoBoneSettings(builder, autoBoneSettings); + SettingsResponse.addResetsSettings(builder, resetsSettings); + + return SettingsResponse.endSettingsResponse(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/settings/leg-tweaks-settings.ts b/protocol/typescript/src/solarxr-protocol/rpc/settings/leg-tweaks-settings.ts index 43a066a2..7cf6e65f 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/settings/leg-tweaks-settings.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/settings/leg-tweaks-settings.ts @@ -1,73 +1,73 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class LegTweaksSettings implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):LegTweaksSettings { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsLegTweaksSettings(bb:flatbuffers.ByteBuffer, obj?:LegTweaksSettings):LegTweaksSettings { - return (obj || new LegTweaksSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsLegTweaksSettings(bb:flatbuffers.ByteBuffer, obj?:LegTweaksSettings):LegTweaksSettings { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new LegTweaksSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -correctionStrength():number|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -static startLegTweaksSettings(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addCorrectionStrength(builder:flatbuffers.Builder, correctionStrength:number) { - builder.addFieldFloat32(0, correctionStrength, 0); -} - -static endLegTweaksSettings(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createLegTweaksSettings(builder:flatbuffers.Builder, correctionStrength:number|null):flatbuffers.Offset { - LegTweaksSettings.startLegTweaksSettings(builder); - if (correctionStrength !== null) - LegTweaksSettings.addCorrectionStrength(builder, correctionStrength); - return LegTweaksSettings.endLegTweaksSettings(builder); -} - -unpack(): LegTweaksSettingsT { - return new LegTweaksSettingsT( - this.correctionStrength() - ); -} - - -unpackTo(_o: LegTweaksSettingsT): void { - _o.correctionStrength = this.correctionStrength(); -} -} - -export class LegTweaksSettingsT implements flatbuffers.IGeneratedObject { -constructor( - public correctionStrength: number|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return LegTweaksSettings.createLegTweaksSettings(builder, - this.correctionStrength - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class LegTweaksSettings implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):LegTweaksSettings { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsLegTweaksSettings(bb:flatbuffers.ByteBuffer, obj?:LegTweaksSettings):LegTweaksSettings { + return (obj || new LegTweaksSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsLegTweaksSettings(bb:flatbuffers.ByteBuffer, obj?:LegTweaksSettings):LegTweaksSettings { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new LegTweaksSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +correctionStrength():number|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +static startLegTweaksSettings(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addCorrectionStrength(builder:flatbuffers.Builder, correctionStrength:number) { + builder.addFieldFloat32(0, correctionStrength, 0); +} + +static endLegTweaksSettings(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createLegTweaksSettings(builder:flatbuffers.Builder, correctionStrength:number|null):flatbuffers.Offset { + LegTweaksSettings.startLegTweaksSettings(builder); + if (correctionStrength !== null) + LegTweaksSettings.addCorrectionStrength(builder, correctionStrength); + return LegTweaksSettings.endLegTweaksSettings(builder); +} + +unpack(): LegTweaksSettingsT { + return new LegTweaksSettingsT( + this.correctionStrength() + ); +} + + +unpackTo(_o: LegTweaksSettingsT): void { + _o.correctionStrength = this.correctionStrength(); +} +} + +export class LegTweaksSettingsT implements flatbuffers.IGeneratedObject { +constructor( + public correctionStrength: number|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return LegTweaksSettings.createLegTweaksSettings(builder, + this.correctionStrength + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/settings/model-ratios.ts b/protocol/typescript/src/solarxr-protocol/rpc/settings/model-ratios.ts index 878e9163..0d080375 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/settings/model-ratios.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/settings/model-ratios.ts @@ -1,176 +1,176 @@ -// 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 implements flatbuffers.IUnpackableObject { - 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 lower leg'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; -} - -/** - * Upper leg's yaw and roll is set to the lower leg's when 1.0 - */ -interpKneeAnkle():number|null { - const offset = this.bb!.__offset(this.bb_pos, 16); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -static startModelRatios(builder:flatbuffers.Builder) { - builder.startObject(7); -} - -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 addInterpKneeAnkle(builder:flatbuffers.Builder, interpKneeAnkle:number) { - builder.addFieldFloat32(6, interpKneeAnkle, 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, interpKneeAnkle: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); - if (interpKneeAnkle !== null) - ModelRatios.addInterpKneeAnkle(builder, interpKneeAnkle); - return ModelRatios.endModelRatios(builder); -} - -unpack(): ModelRatiosT { - return new ModelRatiosT( - this.imputeWaistFromChestHip(), - this.imputeWaistFromChestLegs(), - this.imputeHipFromChestLegs(), - this.imputeHipFromWaistLegs(), - this.interpHipLegs(), - this.interpKneeTrackerAnkle(), - this.interpKneeAnkle() - ); -} - - -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(); - _o.interpKneeAnkle = this.interpKneeAnkle(); -} -} - -export class ModelRatiosT implements flatbuffers.IGeneratedObject { -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, - public interpKneeAnkle: 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, - this.interpKneeAnkle - ); -} -} +// 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 implements flatbuffers.IUnpackableObject { + 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 lower leg'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; +} + +/** + * Upper leg's yaw and roll is set to the lower leg's when 1.0 + */ +interpKneeAnkle():number|null { + const offset = this.bb!.__offset(this.bb_pos, 16); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +static startModelRatios(builder:flatbuffers.Builder) { + builder.startObject(7); +} + +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 addInterpKneeAnkle(builder:flatbuffers.Builder, interpKneeAnkle:number) { + builder.addFieldFloat32(6, interpKneeAnkle, 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, interpKneeAnkle: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); + if (interpKneeAnkle !== null) + ModelRatios.addInterpKneeAnkle(builder, interpKneeAnkle); + return ModelRatios.endModelRatios(builder); +} + +unpack(): ModelRatiosT { + return new ModelRatiosT( + this.imputeWaistFromChestHip(), + this.imputeWaistFromChestLegs(), + this.imputeHipFromChestLegs(), + this.imputeHipFromWaistLegs(), + this.interpHipLegs(), + this.interpKneeTrackerAnkle(), + this.interpKneeAnkle() + ); +} + + +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(); + _o.interpKneeAnkle = this.interpKneeAnkle(); +} +} + +export class ModelRatiosT implements flatbuffers.IGeneratedObject { +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, + public interpKneeAnkle: 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, + this.interpKneeAnkle + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/settings/model-settings.ts b/protocol/typescript/src/solarxr-protocol/rpc/settings/model-settings.ts index 2425b498..51f81cf3 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/settings/model-settings.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/settings/model-settings.ts @@ -1,104 +1,104 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { LegTweaksSettings, LegTweaksSettingsT } from '../../../solarxr-protocol/rpc/settings/leg-tweaks-settings.js'; -import { ModelRatios, ModelRatiosT } from '../../../solarxr-protocol/rpc/settings/model-ratios.js'; -import { ModelToggles, ModelTogglesT } from '../../../solarxr-protocol/rpc/settings/model-toggles.js'; - - -/** - * Settings for the skeletal model. - */ -export class ModelSettings implements flatbuffers.IUnpackableObject { - 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; -} - -legTweaks(obj?:LegTweaksSettings):LegTweaksSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? (obj || new LegTweaksSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -static startModelSettings(builder:flatbuffers.Builder) { - builder.startObject(3); -} - -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 addLegTweaks(builder:flatbuffers.Builder, legTweaksOffset:flatbuffers.Offset) { - builder.addFieldOffset(2, legTweaksOffset, 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), - (this.legTweaks() !== null ? this.legTweaks()!.unpack() : null) - ); -} - - -unpackTo(_o: ModelSettingsT): void { - _o.toggles = (this.toggles() !== null ? this.toggles()!.unpack() : null); - _o.ratios = (this.ratios() !== null ? this.ratios()!.unpack() : null); - _o.legTweaks = (this.legTweaks() !== null ? this.legTweaks()!.unpack() : null); -} -} - -export class ModelSettingsT implements flatbuffers.IGeneratedObject { -constructor( - public toggles: ModelTogglesT|null = null, - public ratios: ModelRatiosT|null = null, - public legTweaks: LegTweaksSettingsT|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); - const legTweaks = (this.legTweaks !== null ? this.legTweaks!.pack(builder) : 0); - - ModelSettings.startModelSettings(builder); - ModelSettings.addToggles(builder, toggles); - ModelSettings.addRatios(builder, ratios); - ModelSettings.addLegTweaks(builder, legTweaks); - - return ModelSettings.endModelSettings(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { LegTweaksSettings, LegTweaksSettingsT } from '../../../solarxr-protocol/rpc/settings/leg-tweaks-settings.js'; +import { ModelRatios, ModelRatiosT } from '../../../solarxr-protocol/rpc/settings/model-ratios.js'; +import { ModelToggles, ModelTogglesT } from '../../../solarxr-protocol/rpc/settings/model-toggles.js'; + + +/** + * Settings for the skeletal model. + */ +export class ModelSettings implements flatbuffers.IUnpackableObject { + 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; +} + +legTweaks(obj?:LegTweaksSettings):LegTweaksSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? (obj || new LegTweaksSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +static startModelSettings(builder:flatbuffers.Builder) { + builder.startObject(3); +} + +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 addLegTweaks(builder:flatbuffers.Builder, legTweaksOffset:flatbuffers.Offset) { + builder.addFieldOffset(2, legTweaksOffset, 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), + (this.legTweaks() !== null ? this.legTweaks()!.unpack() : null) + ); +} + + +unpackTo(_o: ModelSettingsT): void { + _o.toggles = (this.toggles() !== null ? this.toggles()!.unpack() : null); + _o.ratios = (this.ratios() !== null ? this.ratios()!.unpack() : null); + _o.legTweaks = (this.legTweaks() !== null ? this.legTweaks()!.unpack() : null); +} +} + +export class ModelSettingsT implements flatbuffers.IGeneratedObject { +constructor( + public toggles: ModelTogglesT|null = null, + public ratios: ModelRatiosT|null = null, + public legTweaks: LegTweaksSettingsT|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); + const legTweaks = (this.legTweaks !== null ? this.legTweaks!.pack(builder) : 0); + + ModelSettings.startModelSettings(builder); + ModelSettings.addToggles(builder, toggles); + ModelSettings.addRatios(builder, ratios); + ModelSettings.addLegTweaks(builder, legTweaks); + + 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 index 3aa37afd..b24ba1c0 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/settings/model-toggles.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/settings/model-toggles.ts @@ -1,226 +1,226 @@ -// 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 implements flatbuffers.IUnpackableObject { - 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; -} - -viveEmulation():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 16); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -toeSnap():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 18); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -footPlant():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 20); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -selfLocalization():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 22); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -usePosition():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 24); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -static startModelToggles(builder:flatbuffers.Builder) { - builder.startObject(11); -} - -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 addViveEmulation(builder:flatbuffers.Builder, viveEmulation:boolean) { - builder.addFieldInt8(6, +viveEmulation, 0); -} - -static addToeSnap(builder:flatbuffers.Builder, toeSnap:boolean) { - builder.addFieldInt8(7, +toeSnap, 0); -} - -static addFootPlant(builder:flatbuffers.Builder, footPlant:boolean) { - builder.addFieldInt8(8, +footPlant, 0); -} - -static addSelfLocalization(builder:flatbuffers.Builder, selfLocalization:boolean) { - builder.addFieldInt8(9, +selfLocalization, 0); -} - -static addUsePosition(builder:flatbuffers.Builder, usePosition:boolean) { - builder.addFieldInt8(10, +usePosition, 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, viveEmulation:boolean|null, toeSnap:boolean|null, footPlant:boolean|null, selfLocalization:boolean|null, usePosition: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); - if (viveEmulation !== null) - ModelToggles.addViveEmulation(builder, viveEmulation); - if (toeSnap !== null) - ModelToggles.addToeSnap(builder, toeSnap); - if (footPlant !== null) - ModelToggles.addFootPlant(builder, footPlant); - if (selfLocalization !== null) - ModelToggles.addSelfLocalization(builder, selfLocalization); - if (usePosition !== null) - ModelToggles.addUsePosition(builder, usePosition); - return ModelToggles.endModelToggles(builder); -} - -unpack(): ModelTogglesT { - return new ModelTogglesT( - this.extendedSpine(), - this.extendedPelvis(), - this.extendedKnee(), - this.forceArmsFromHmd(), - this.floorClip(), - this.skatingCorrection(), - this.viveEmulation(), - this.toeSnap(), - this.footPlant(), - this.selfLocalization(), - this.usePosition() - ); -} - - -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(); - _o.viveEmulation = this.viveEmulation(); - _o.toeSnap = this.toeSnap(); - _o.footPlant = this.footPlant(); - _o.selfLocalization = this.selfLocalization(); - _o.usePosition = this.usePosition(); -} -} - -export class ModelTogglesT implements flatbuffers.IGeneratedObject { -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, - public viveEmulation: boolean|null = null, - public toeSnap: boolean|null = null, - public footPlant: boolean|null = null, - public selfLocalization: boolean|null = null, - public usePosition: 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, - this.viveEmulation, - this.toeSnap, - this.footPlant, - this.selfLocalization, - this.usePosition - ); -} -} +// 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 implements flatbuffers.IUnpackableObject { + 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; +} + +viveEmulation():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 16); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +toeSnap():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 18); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +footPlant():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 20); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +selfLocalization():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 22); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +usePosition():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 24); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +static startModelToggles(builder:flatbuffers.Builder) { + builder.startObject(11); +} + +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 addViveEmulation(builder:flatbuffers.Builder, viveEmulation:boolean) { + builder.addFieldInt8(6, +viveEmulation, 0); +} + +static addToeSnap(builder:flatbuffers.Builder, toeSnap:boolean) { + builder.addFieldInt8(7, +toeSnap, 0); +} + +static addFootPlant(builder:flatbuffers.Builder, footPlant:boolean) { + builder.addFieldInt8(8, +footPlant, 0); +} + +static addSelfLocalization(builder:flatbuffers.Builder, selfLocalization:boolean) { + builder.addFieldInt8(9, +selfLocalization, 0); +} + +static addUsePosition(builder:flatbuffers.Builder, usePosition:boolean) { + builder.addFieldInt8(10, +usePosition, 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, viveEmulation:boolean|null, toeSnap:boolean|null, footPlant:boolean|null, selfLocalization:boolean|null, usePosition: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); + if (viveEmulation !== null) + ModelToggles.addViveEmulation(builder, viveEmulation); + if (toeSnap !== null) + ModelToggles.addToeSnap(builder, toeSnap); + if (footPlant !== null) + ModelToggles.addFootPlant(builder, footPlant); + if (selfLocalization !== null) + ModelToggles.addSelfLocalization(builder, selfLocalization); + if (usePosition !== null) + ModelToggles.addUsePosition(builder, usePosition); + return ModelToggles.endModelToggles(builder); +} + +unpack(): ModelTogglesT { + return new ModelTogglesT( + this.extendedSpine(), + this.extendedPelvis(), + this.extendedKnee(), + this.forceArmsFromHmd(), + this.floorClip(), + this.skatingCorrection(), + this.viveEmulation(), + this.toeSnap(), + this.footPlant(), + this.selfLocalization(), + this.usePosition() + ); +} + + +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(); + _o.viveEmulation = this.viveEmulation(); + _o.toeSnap = this.toeSnap(); + _o.footPlant = this.footPlant(); + _o.selfLocalization = this.selfLocalization(); + _o.usePosition = this.usePosition(); +} +} + +export class ModelTogglesT implements flatbuffers.IGeneratedObject { +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, + public viveEmulation: boolean|null = null, + public toeSnap: boolean|null = null, + public footPlant: boolean|null = null, + public selfLocalization: boolean|null = null, + public usePosition: 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, + this.viveEmulation, + this.toeSnap, + this.footPlant, + this.selfLocalization, + this.usePosition + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/skeleton-bone.ts b/protocol/typescript/src/solarxr-protocol/rpc/skeleton-bone.ts index 2d7474fd..9c89ae48 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/skeleton-bone.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/skeleton-bone.ts @@ -1,26 +1,26 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -export enum SkeletonBone { - NONE = 0, - HEAD = 1, - NECK = 2, - CHEST = 3, - CHEST_OFFSET = 4, - WAIST = 5, - HIP = 6, - HIP_OFFSET = 7, - HIPS_WIDTH = 8, - UPPER_LEG = 9, - LOWER_LEG = 10, - FOOT_LENGTH = 11, - FOOT_SHIFT = 12, - SKELETON_OFFSET = 13, - SHOULDERS_DISTANCE = 14, - SHOULDERS_WIDTH = 15, - UPPER_ARM = 16, - LOWER_ARM = 17, - HAND_Y = 18, - HAND_Z = 19, - ELBOW_OFFSET = 20, - UPPER_CHEST = 21 -} +// automatically generated by the FlatBuffers compiler, do not modify + +export enum SkeletonBone { + NONE = 0, + HEAD = 1, + NECK = 2, + CHEST = 3, + CHEST_OFFSET = 4, + WAIST = 5, + HIP = 6, + HIP_OFFSET = 7, + HIPS_WIDTH = 8, + UPPER_LEG = 9, + LOWER_LEG = 10, + FOOT_LENGTH = 11, + FOOT_SHIFT = 12, + SKELETON_OFFSET = 13, + SHOULDERS_DISTANCE = 14, + SHOULDERS_WIDTH = 15, + UPPER_ARM = 16, + LOWER_ARM = 17, + HAND_Y = 18, + HAND_Z = 19, + ELBOW_OFFSET = 20, + UPPER_CHEST = 21 +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/skeleton-config-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/skeleton-config-request.ts index 3ab139fc..5eb0070a 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 89dcd6a4..c1eff99f 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.js'; - - -export class SkeletonConfigResponse implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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.js'; + + +export class SkeletonConfigResponse implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 3b2d36b2..26bfd307 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.js'; - - -export class SkeletonPart implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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.js'; + + +export class SkeletonPart implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +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 index 7108758a..24cfdc26 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 implements flatbuffers.IUnpackableObject { - 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 implements flatbuffers.IGeneratedObject { -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 implements flatbuffers.IUnpackableObject { + 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 implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return SkeletonResetAllRequest.createSkeletonResetAllRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/start-wifi-provisioning-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/start-wifi-provisioning-request.ts index f44f5b91..a0d29b31 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/start-wifi-provisioning-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/start-wifi-provisioning-request.ts @@ -1,110 +1,110 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class StartWifiProvisioningRequest implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):StartWifiProvisioningRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsStartWifiProvisioningRequest(bb:flatbuffers.ByteBuffer, obj?:StartWifiProvisioningRequest):StartWifiProvisioningRequest { - return (obj || new StartWifiProvisioningRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsStartWifiProvisioningRequest(bb:flatbuffers.ByteBuffer, obj?:StartWifiProvisioningRequest):StartWifiProvisioningRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new StartWifiProvisioningRequest()).__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; -} - -port():string|null -port(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -port(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 startStartWifiProvisioningRequest(builder:flatbuffers.Builder) { - builder.startObject(3); -} - -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 addPort(builder:flatbuffers.Builder, portOffset:flatbuffers.Offset) { - builder.addFieldOffset(2, portOffset, 0); -} - -static endStartWifiProvisioningRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createStartWifiProvisioningRequest(builder:flatbuffers.Builder, ssidOffset:flatbuffers.Offset, passwordOffset:flatbuffers.Offset, portOffset:flatbuffers.Offset):flatbuffers.Offset { - StartWifiProvisioningRequest.startStartWifiProvisioningRequest(builder); - StartWifiProvisioningRequest.addSsid(builder, ssidOffset); - StartWifiProvisioningRequest.addPassword(builder, passwordOffset); - StartWifiProvisioningRequest.addPort(builder, portOffset); - return StartWifiProvisioningRequest.endStartWifiProvisioningRequest(builder); -} - -unpack(): StartWifiProvisioningRequestT { - return new StartWifiProvisioningRequestT( - this.ssid(), - this.password(), - this.port() - ); -} - - -unpackTo(_o: StartWifiProvisioningRequestT): void { - _o.ssid = this.ssid(); - _o.password = this.password(); - _o.port = this.port(); -} -} - -export class StartWifiProvisioningRequestT implements flatbuffers.IGeneratedObject { -constructor( - public ssid: string|Uint8Array|null = null, - public password: string|Uint8Array|null = null, - public port: 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); - const port = (this.port !== null ? builder.createString(this.port!) : 0); - - return StartWifiProvisioningRequest.createStartWifiProvisioningRequest(builder, - ssid, - password, - port - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class StartWifiProvisioningRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):StartWifiProvisioningRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsStartWifiProvisioningRequest(bb:flatbuffers.ByteBuffer, obj?:StartWifiProvisioningRequest):StartWifiProvisioningRequest { + return (obj || new StartWifiProvisioningRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsStartWifiProvisioningRequest(bb:flatbuffers.ByteBuffer, obj?:StartWifiProvisioningRequest):StartWifiProvisioningRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new StartWifiProvisioningRequest()).__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; +} + +port():string|null +port(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +port(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 startStartWifiProvisioningRequest(builder:flatbuffers.Builder) { + builder.startObject(3); +} + +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 addPort(builder:flatbuffers.Builder, portOffset:flatbuffers.Offset) { + builder.addFieldOffset(2, portOffset, 0); +} + +static endStartWifiProvisioningRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createStartWifiProvisioningRequest(builder:flatbuffers.Builder, ssidOffset:flatbuffers.Offset, passwordOffset:flatbuffers.Offset, portOffset:flatbuffers.Offset):flatbuffers.Offset { + StartWifiProvisioningRequest.startStartWifiProvisioningRequest(builder); + StartWifiProvisioningRequest.addSsid(builder, ssidOffset); + StartWifiProvisioningRequest.addPassword(builder, passwordOffset); + StartWifiProvisioningRequest.addPort(builder, portOffset); + return StartWifiProvisioningRequest.endStartWifiProvisioningRequest(builder); +} + +unpack(): StartWifiProvisioningRequestT { + return new StartWifiProvisioningRequestT( + this.ssid(), + this.password(), + this.port() + ); +} + + +unpackTo(_o: StartWifiProvisioningRequestT): void { + _o.ssid = this.ssid(); + _o.password = this.password(); + _o.port = this.port(); +} +} + +export class StartWifiProvisioningRequestT implements flatbuffers.IGeneratedObject { +constructor( + public ssid: string|Uint8Array|null = null, + public password: string|Uint8Array|null = null, + public port: 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); + const port = (this.port !== null ? builder.createString(this.port!) : 0); + + return StartWifiProvisioningRequest.createStartWifiProvisioningRequest(builder, + ssid, + password, + port + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/status-data.ts b/protocol/typescript/src/solarxr-protocol/rpc/status-data.ts index 3a25ffcc..7cfb3930 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/status-data.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/status-data.ts @@ -1,44 +1,44 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import { StatusSteamVRDisconnected, StatusSteamVRDisconnectedT } from '../../solarxr-protocol/rpc/status-steam-vrdisconnected.js'; -import { StatusTrackerError, StatusTrackerErrorT } from '../../solarxr-protocol/rpc/status-tracker-error.js'; -import { StatusTrackerReset, StatusTrackerResetT } from '../../solarxr-protocol/rpc/status-tracker-reset.js'; -import { StatusUnassignedHMD, StatusUnassignedHMDT } from '../../solarxr-protocol/rpc/status-unassigned-hmd.js'; - - -export enum StatusData { - NONE = 0, - StatusTrackerReset = 1, - StatusTrackerError = 2, - StatusSteamVRDisconnected = 3, - StatusUnassignedHMD = 4 -} - -export function unionToStatusData( - type: StatusData, - accessor: (obj:StatusSteamVRDisconnected|StatusTrackerError|StatusTrackerReset|StatusUnassignedHMD) => StatusSteamVRDisconnected|StatusTrackerError|StatusTrackerReset|StatusUnassignedHMD|null -): StatusSteamVRDisconnected|StatusTrackerError|StatusTrackerReset|StatusUnassignedHMD|null { - switch(StatusData[type]) { - case 'NONE': return null; - case 'StatusTrackerReset': return accessor(new StatusTrackerReset())! as StatusTrackerReset; - case 'StatusTrackerError': return accessor(new StatusTrackerError())! as StatusTrackerError; - case 'StatusSteamVRDisconnected': return accessor(new StatusSteamVRDisconnected())! as StatusSteamVRDisconnected; - case 'StatusUnassignedHMD': return accessor(new StatusUnassignedHMD())! as StatusUnassignedHMD; - default: return null; - } -} - -export function unionListToStatusData( - type: StatusData, - accessor: (index: number, obj:StatusSteamVRDisconnected|StatusTrackerError|StatusTrackerReset|StatusUnassignedHMD) => StatusSteamVRDisconnected|StatusTrackerError|StatusTrackerReset|StatusUnassignedHMD|null, - index: number -): StatusSteamVRDisconnected|StatusTrackerError|StatusTrackerReset|StatusUnassignedHMD|null { - switch(StatusData[type]) { - case 'NONE': return null; - case 'StatusTrackerReset': return accessor(index, new StatusTrackerReset())! as StatusTrackerReset; - case 'StatusTrackerError': return accessor(index, new StatusTrackerError())! as StatusTrackerError; - case 'StatusSteamVRDisconnected': return accessor(index, new StatusSteamVRDisconnected())! as StatusSteamVRDisconnected; - case 'StatusUnassignedHMD': return accessor(index, new StatusUnassignedHMD())! as StatusUnassignedHMD; - default: return null; - } -} +// automatically generated by the FlatBuffers compiler, do not modify + +import { StatusSteamVRDisconnected, StatusSteamVRDisconnectedT } from '../../solarxr-protocol/rpc/status-steam-vrdisconnected.js'; +import { StatusTrackerError, StatusTrackerErrorT } from '../../solarxr-protocol/rpc/status-tracker-error.js'; +import { StatusTrackerReset, StatusTrackerResetT } from '../../solarxr-protocol/rpc/status-tracker-reset.js'; +import { StatusUnassignedHMD, StatusUnassignedHMDT } from '../../solarxr-protocol/rpc/status-unassigned-hmd.js'; + + +export enum StatusData { + NONE = 0, + StatusTrackerReset = 1, + StatusTrackerError = 2, + StatusSteamVRDisconnected = 3, + StatusUnassignedHMD = 4 +} + +export function unionToStatusData( + type: StatusData, + accessor: (obj:StatusSteamVRDisconnected|StatusTrackerError|StatusTrackerReset|StatusUnassignedHMD) => StatusSteamVRDisconnected|StatusTrackerError|StatusTrackerReset|StatusUnassignedHMD|null +): StatusSteamVRDisconnected|StatusTrackerError|StatusTrackerReset|StatusUnassignedHMD|null { + switch(StatusData[type]) { + case 'NONE': return null; + case 'StatusTrackerReset': return accessor(new StatusTrackerReset())! as StatusTrackerReset; + case 'StatusTrackerError': return accessor(new StatusTrackerError())! as StatusTrackerError; + case 'StatusSteamVRDisconnected': return accessor(new StatusSteamVRDisconnected())! as StatusSteamVRDisconnected; + case 'StatusUnassignedHMD': return accessor(new StatusUnassignedHMD())! as StatusUnassignedHMD; + default: return null; + } +} + +export function unionListToStatusData( + type: StatusData, + accessor: (index: number, obj:StatusSteamVRDisconnected|StatusTrackerError|StatusTrackerReset|StatusUnassignedHMD) => StatusSteamVRDisconnected|StatusTrackerError|StatusTrackerReset|StatusUnassignedHMD|null, + index: number +): StatusSteamVRDisconnected|StatusTrackerError|StatusTrackerReset|StatusUnassignedHMD|null { + switch(StatusData[type]) { + case 'NONE': return null; + case 'StatusTrackerReset': return accessor(index, new StatusTrackerReset())! as StatusTrackerReset; + case 'StatusTrackerError': return accessor(index, new StatusTrackerError())! as StatusTrackerError; + case 'StatusSteamVRDisconnected': return accessor(index, new StatusSteamVRDisconnected())! as StatusSteamVRDisconnected; + case 'StatusUnassignedHMD': return accessor(index, new StatusUnassignedHMD())! as StatusUnassignedHMD; + default: return null; + } +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/status-message.ts b/protocol/typescript/src/solarxr-protocol/rpc/status-message.ts index c7a1a759..d898e4c6 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/status-message.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/status-message.ts @@ -1,139 +1,139 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { StatusData, unionToStatusData, unionListToStatusData } from '../../solarxr-protocol/rpc/status-data.js'; -import { StatusSteamVRDisconnected, StatusSteamVRDisconnectedT } from '../../solarxr-protocol/rpc/status-steam-vrdisconnected.js'; -import { StatusTrackerError, StatusTrackerErrorT } from '../../solarxr-protocol/rpc/status-tracker-error.js'; -import { StatusTrackerReset, StatusTrackerResetT } from '../../solarxr-protocol/rpc/status-tracker-reset.js'; -import { StatusUnassignedHMD, StatusUnassignedHMDT } from '../../solarxr-protocol/rpc/status-unassigned-hmd.js'; - - -/** - * An status is some kind of warning sent by the server, it's mainly made for - * showing problems with the server and need attention from the user. - */ -export class StatusMessage implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):StatusMessage { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsStatusMessage(bb:flatbuffers.ByteBuffer, obj?:StatusMessage):StatusMessage { - return (obj || new StatusMessage()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsStatusMessage(bb:flatbuffers.ByteBuffer, obj?:StatusMessage):StatusMessage { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new StatusMessage()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -/** - * The status ID - */ -id():number { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; -} - -/** - * This should be prioritized in the GUI in some way if true - */ -prioritized():boolean { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -dataType():StatusData { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : StatusData.NONE; -} - -data(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 startStatusMessage(builder:flatbuffers.Builder) { - builder.startObject(4); -} - -static addId(builder:flatbuffers.Builder, id:number) { - builder.addFieldInt32(0, id, 0); -} - -static addPrioritized(builder:flatbuffers.Builder, prioritized:boolean) { - builder.addFieldInt8(1, +prioritized, +false); -} - -static addDataType(builder:flatbuffers.Builder, dataType:StatusData) { - builder.addFieldInt8(2, dataType, StatusData.NONE); -} - -static addData(builder:flatbuffers.Builder, dataOffset:flatbuffers.Offset) { - builder.addFieldOffset(3, dataOffset, 0); -} - -static endStatusMessage(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createStatusMessage(builder:flatbuffers.Builder, id:number, prioritized:boolean, dataType:StatusData, dataOffset:flatbuffers.Offset):flatbuffers.Offset { - StatusMessage.startStatusMessage(builder); - StatusMessage.addId(builder, id); - StatusMessage.addPrioritized(builder, prioritized); - StatusMessage.addDataType(builder, dataType); - StatusMessage.addData(builder, dataOffset); - return StatusMessage.endStatusMessage(builder); -} - -unpack(): StatusMessageT { - return new StatusMessageT( - this.id(), - this.prioritized(), - this.dataType(), - (() => { - const temp = unionToStatusData(this.dataType(), this.data.bind(this)); - if(temp === null) { return null; } - return temp.unpack() - })() - ); -} - - -unpackTo(_o: StatusMessageT): void { - _o.id = this.id(); - _o.prioritized = this.prioritized(); - _o.dataType = this.dataType(); - _o.data = (() => { - const temp = unionToStatusData(this.dataType(), this.data.bind(this)); - if(temp === null) { return null; } - return temp.unpack() - })(); -} -} - -export class StatusMessageT implements flatbuffers.IGeneratedObject { -constructor( - public id: number = 0, - public prioritized: boolean = false, - public dataType: StatusData = StatusData.NONE, - public data: StatusSteamVRDisconnectedT|StatusTrackerErrorT|StatusTrackerResetT|StatusUnassignedHMDT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const data = builder.createObjectOffset(this.data); - - return StatusMessage.createStatusMessage(builder, - this.id, - this.prioritized, - this.dataType, - data - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { StatusData, unionToStatusData, unionListToStatusData } from '../../solarxr-protocol/rpc/status-data.js'; +import { StatusSteamVRDisconnected, StatusSteamVRDisconnectedT } from '../../solarxr-protocol/rpc/status-steam-vrdisconnected.js'; +import { StatusTrackerError, StatusTrackerErrorT } from '../../solarxr-protocol/rpc/status-tracker-error.js'; +import { StatusTrackerReset, StatusTrackerResetT } from '../../solarxr-protocol/rpc/status-tracker-reset.js'; +import { StatusUnassignedHMD, StatusUnassignedHMDT } from '../../solarxr-protocol/rpc/status-unassigned-hmd.js'; + + +/** + * An status is some kind of warning sent by the server, it's mainly made for + * showing problems with the server and need attention from the user. + */ +export class StatusMessage implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):StatusMessage { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsStatusMessage(bb:flatbuffers.ByteBuffer, obj?:StatusMessage):StatusMessage { + return (obj || new StatusMessage()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsStatusMessage(bb:flatbuffers.ByteBuffer, obj?:StatusMessage):StatusMessage { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new StatusMessage()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +/** + * The status ID + */ +id():number { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; +} + +/** + * This should be prioritized in the GUI in some way if true + */ +prioritized():boolean { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +dataType():StatusData { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : StatusData.NONE; +} + +data(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 startStatusMessage(builder:flatbuffers.Builder) { + builder.startObject(4); +} + +static addId(builder:flatbuffers.Builder, id:number) { + builder.addFieldInt32(0, id, 0); +} + +static addPrioritized(builder:flatbuffers.Builder, prioritized:boolean) { + builder.addFieldInt8(1, +prioritized, +false); +} + +static addDataType(builder:flatbuffers.Builder, dataType:StatusData) { + builder.addFieldInt8(2, dataType, StatusData.NONE); +} + +static addData(builder:flatbuffers.Builder, dataOffset:flatbuffers.Offset) { + builder.addFieldOffset(3, dataOffset, 0); +} + +static endStatusMessage(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createStatusMessage(builder:flatbuffers.Builder, id:number, prioritized:boolean, dataType:StatusData, dataOffset:flatbuffers.Offset):flatbuffers.Offset { + StatusMessage.startStatusMessage(builder); + StatusMessage.addId(builder, id); + StatusMessage.addPrioritized(builder, prioritized); + StatusMessage.addDataType(builder, dataType); + StatusMessage.addData(builder, dataOffset); + return StatusMessage.endStatusMessage(builder); +} + +unpack(): StatusMessageT { + return new StatusMessageT( + this.id(), + this.prioritized(), + this.dataType(), + (() => { + const temp = unionToStatusData(this.dataType(), this.data.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })() + ); +} + + +unpackTo(_o: StatusMessageT): void { + _o.id = this.id(); + _o.prioritized = this.prioritized(); + _o.dataType = this.dataType(); + _o.data = (() => { + const temp = unionToStatusData(this.dataType(), this.data.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })(); +} +} + +export class StatusMessageT implements flatbuffers.IGeneratedObject { +constructor( + public id: number = 0, + public prioritized: boolean = false, + public dataType: StatusData = StatusData.NONE, + public data: StatusSteamVRDisconnectedT|StatusTrackerErrorT|StatusTrackerResetT|StatusUnassignedHMDT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const data = builder.createObjectOffset(this.data); + + return StatusMessage.createStatusMessage(builder, + this.id, + this.prioritized, + this.dataType, + data + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/status-steam-vrdisconnected.ts b/protocol/typescript/src/solarxr-protocol/rpc/status-steam-vrdisconnected.ts index 54c7aa6f..287663c3 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/status-steam-vrdisconnected.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/status-steam-vrdisconnected.ts @@ -1,82 +1,82 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * SteamVR bridge is disconnected - */ -export class StatusSteamVRDisconnected implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):StatusSteamVRDisconnected { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsStatusSteamVRDisconnected(bb:flatbuffers.ByteBuffer, obj?:StatusSteamVRDisconnected):StatusSteamVRDisconnected { - return (obj || new StatusSteamVRDisconnected()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsStatusSteamVRDisconnected(bb:flatbuffers.ByteBuffer, obj?:StatusSteamVRDisconnected):StatusSteamVRDisconnected { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new StatusSteamVRDisconnected()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -/** - * Name of bridge in the server's config - */ -bridgeSettingsName():string|null -bridgeSettingsName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -bridgeSettingsName(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 startStatusSteamVRDisconnected(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addBridgeSettingsName(builder:flatbuffers.Builder, bridgeSettingsNameOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, bridgeSettingsNameOffset, 0); -} - -static endStatusSteamVRDisconnected(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createStatusSteamVRDisconnected(builder:flatbuffers.Builder, bridgeSettingsNameOffset:flatbuffers.Offset):flatbuffers.Offset { - StatusSteamVRDisconnected.startStatusSteamVRDisconnected(builder); - StatusSteamVRDisconnected.addBridgeSettingsName(builder, bridgeSettingsNameOffset); - return StatusSteamVRDisconnected.endStatusSteamVRDisconnected(builder); -} - -unpack(): StatusSteamVRDisconnectedT { - return new StatusSteamVRDisconnectedT( - this.bridgeSettingsName() - ); -} - - -unpackTo(_o: StatusSteamVRDisconnectedT): void { - _o.bridgeSettingsName = this.bridgeSettingsName(); -} -} - -export class StatusSteamVRDisconnectedT implements flatbuffers.IGeneratedObject { -constructor( - public bridgeSettingsName: string|Uint8Array|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const bridgeSettingsName = (this.bridgeSettingsName !== null ? builder.createString(this.bridgeSettingsName!) : 0); - - return StatusSteamVRDisconnected.createStatusSteamVRDisconnected(builder, - bridgeSettingsName - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * SteamVR bridge is disconnected + */ +export class StatusSteamVRDisconnected implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):StatusSteamVRDisconnected { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsStatusSteamVRDisconnected(bb:flatbuffers.ByteBuffer, obj?:StatusSteamVRDisconnected):StatusSteamVRDisconnected { + return (obj || new StatusSteamVRDisconnected()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsStatusSteamVRDisconnected(bb:flatbuffers.ByteBuffer, obj?:StatusSteamVRDisconnected):StatusSteamVRDisconnected { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new StatusSteamVRDisconnected()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +/** + * Name of bridge in the server's config + */ +bridgeSettingsName():string|null +bridgeSettingsName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +bridgeSettingsName(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 startStatusSteamVRDisconnected(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addBridgeSettingsName(builder:flatbuffers.Builder, bridgeSettingsNameOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, bridgeSettingsNameOffset, 0); +} + +static endStatusSteamVRDisconnected(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createStatusSteamVRDisconnected(builder:flatbuffers.Builder, bridgeSettingsNameOffset:flatbuffers.Offset):flatbuffers.Offset { + StatusSteamVRDisconnected.startStatusSteamVRDisconnected(builder); + StatusSteamVRDisconnected.addBridgeSettingsName(builder, bridgeSettingsNameOffset); + return StatusSteamVRDisconnected.endStatusSteamVRDisconnected(builder); +} + +unpack(): StatusSteamVRDisconnectedT { + return new StatusSteamVRDisconnectedT( + this.bridgeSettingsName() + ); +} + + +unpackTo(_o: StatusSteamVRDisconnectedT): void { + _o.bridgeSettingsName = this.bridgeSettingsName(); +} +} + +export class StatusSteamVRDisconnectedT implements flatbuffers.IGeneratedObject { +constructor( + public bridgeSettingsName: string|Uint8Array|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const bridgeSettingsName = (this.bridgeSettingsName !== null ? builder.createString(this.bridgeSettingsName!) : 0); + + return StatusSteamVRDisconnected.createStatusSteamVRDisconnected(builder, + bridgeSettingsName + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/status-system-fixed.ts b/protocol/typescript/src/solarxr-protocol/rpc/status-system-fixed.ts index 2945e3ee..9341b2e6 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/status-system-fixed.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/status-system-fixed.ts @@ -1,75 +1,75 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * When an status is fixed and it's removed, it's ID is sent - */ -export class StatusSystemFixed implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):StatusSystemFixed { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsStatusSystemFixed(bb:flatbuffers.ByteBuffer, obj?:StatusSystemFixed):StatusSystemFixed { - return (obj || new StatusSystemFixed()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsStatusSystemFixed(bb:flatbuffers.ByteBuffer, obj?:StatusSystemFixed):StatusSystemFixed { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new StatusSystemFixed()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -fixedStatusId():number { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; -} - -static startStatusSystemFixed(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addFixedStatusId(builder:flatbuffers.Builder, fixedStatusId:number) { - builder.addFieldInt32(0, fixedStatusId, 0); -} - -static endStatusSystemFixed(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createStatusSystemFixed(builder:flatbuffers.Builder, fixedStatusId:number):flatbuffers.Offset { - StatusSystemFixed.startStatusSystemFixed(builder); - StatusSystemFixed.addFixedStatusId(builder, fixedStatusId); - return StatusSystemFixed.endStatusSystemFixed(builder); -} - -unpack(): StatusSystemFixedT { - return new StatusSystemFixedT( - this.fixedStatusId() - ); -} - - -unpackTo(_o: StatusSystemFixedT): void { - _o.fixedStatusId = this.fixedStatusId(); -} -} - -export class StatusSystemFixedT implements flatbuffers.IGeneratedObject { -constructor( - public fixedStatusId: number = 0 -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return StatusSystemFixed.createStatusSystemFixed(builder, - this.fixedStatusId - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * When an status is fixed and it's removed, it's ID is sent + */ +export class StatusSystemFixed implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):StatusSystemFixed { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsStatusSystemFixed(bb:flatbuffers.ByteBuffer, obj?:StatusSystemFixed):StatusSystemFixed { + return (obj || new StatusSystemFixed()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsStatusSystemFixed(bb:flatbuffers.ByteBuffer, obj?:StatusSystemFixed):StatusSystemFixed { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new StatusSystemFixed()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +fixedStatusId():number { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; +} + +static startStatusSystemFixed(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addFixedStatusId(builder:flatbuffers.Builder, fixedStatusId:number) { + builder.addFieldInt32(0, fixedStatusId, 0); +} + +static endStatusSystemFixed(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createStatusSystemFixed(builder:flatbuffers.Builder, fixedStatusId:number):flatbuffers.Offset { + StatusSystemFixed.startStatusSystemFixed(builder); + StatusSystemFixed.addFixedStatusId(builder, fixedStatusId); + return StatusSystemFixed.endStatusSystemFixed(builder); +} + +unpack(): StatusSystemFixedT { + return new StatusSystemFixedT( + this.fixedStatusId() + ); +} + + +unpackTo(_o: StatusSystemFixedT): void { + _o.fixedStatusId = this.fixedStatusId(); +} +} + +export class StatusSystemFixedT implements flatbuffers.IGeneratedObject { +constructor( + public fixedStatusId: number = 0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return StatusSystemFixed.createStatusSystemFixed(builder, + this.fixedStatusId + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/status-system-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/status-system-request.ts index 1feb037b..830ab8f5 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/status-system-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/status-system-request.ts @@ -1,57 +1,57 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * Request current statuses that we have - */ -export class StatusSystemRequest implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):StatusSystemRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsStatusSystemRequest(bb:flatbuffers.ByteBuffer, obj?:StatusSystemRequest):StatusSystemRequest { - return (obj || new StatusSystemRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsStatusSystemRequest(bb:flatbuffers.ByteBuffer, obj?:StatusSystemRequest):StatusSystemRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new StatusSystemRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startStatusSystemRequest(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endStatusSystemRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createStatusSystemRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - StatusSystemRequest.startStatusSystemRequest(builder); - return StatusSystemRequest.endStatusSystemRequest(builder); -} - -unpack(): StatusSystemRequestT { - return new StatusSystemRequestT(); -} - - -unpackTo(_o: StatusSystemRequestT): void {} -} - -export class StatusSystemRequestT implements flatbuffers.IGeneratedObject { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return StatusSystemRequest.createStatusSystemRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Request current statuses that we have + */ +export class StatusSystemRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):StatusSystemRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsStatusSystemRequest(bb:flatbuffers.ByteBuffer, obj?:StatusSystemRequest):StatusSystemRequest { + return (obj || new StatusSystemRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsStatusSystemRequest(bb:flatbuffers.ByteBuffer, obj?:StatusSystemRequest):StatusSystemRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new StatusSystemRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startStatusSystemRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endStatusSystemRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createStatusSystemRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + StatusSystemRequest.startStatusSystemRequest(builder); + return StatusSystemRequest.endStatusSystemRequest(builder); +} + +unpack(): StatusSystemRequestT { + return new StatusSystemRequestT(); +} + + +unpackTo(_o: StatusSystemRequestT): void {} +} + +export class StatusSystemRequestT implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return StatusSystemRequest.createStatusSystemRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/status-system-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/status-system-response.ts index 07028843..8b9b6523 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/status-system-response.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/status-system-response.ts @@ -1,95 +1,95 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { StatusMessage, StatusMessageT } from '../../solarxr-protocol/rpc/status-message.js'; - - -/** - * Response containing all current valid statuses - */ -export class StatusSystemResponse implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):StatusSystemResponse { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsStatusSystemResponse(bb:flatbuffers.ByteBuffer, obj?:StatusSystemResponse):StatusSystemResponse { - return (obj || new StatusSystemResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsStatusSystemResponse(bb:flatbuffers.ByteBuffer, obj?:StatusSystemResponse):StatusSystemResponse { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new StatusSystemResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -currentStatuses(index: number, obj?:StatusMessage):StatusMessage|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new StatusMessage()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; -} - -currentStatusesLength():number { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; -} - -static startStatusSystemResponse(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addCurrentStatuses(builder:flatbuffers.Builder, currentStatusesOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, currentStatusesOffset, 0); -} - -static createCurrentStatusesVector(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 startCurrentStatusesVector(builder:flatbuffers.Builder, numElems:number) { - builder.startVector(4, numElems, 4); -} - -static endStatusSystemResponse(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createStatusSystemResponse(builder:flatbuffers.Builder, currentStatusesOffset:flatbuffers.Offset):flatbuffers.Offset { - StatusSystemResponse.startStatusSystemResponse(builder); - StatusSystemResponse.addCurrentStatuses(builder, currentStatusesOffset); - return StatusSystemResponse.endStatusSystemResponse(builder); -} - -unpack(): StatusSystemResponseT { - return new StatusSystemResponseT( - this.bb!.createObjList(this.currentStatuses.bind(this), this.currentStatusesLength()) - ); -} - - -unpackTo(_o: StatusSystemResponseT): void { - _o.currentStatuses = this.bb!.createObjList(this.currentStatuses.bind(this), this.currentStatusesLength()); -} -} - -export class StatusSystemResponseT implements flatbuffers.IGeneratedObject { -constructor( - public currentStatuses: (StatusMessageT)[] = [] -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const currentStatuses = StatusSystemResponse.createCurrentStatusesVector(builder, builder.createObjectOffsetList(this.currentStatuses)); - - return StatusSystemResponse.createStatusSystemResponse(builder, - currentStatuses - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { StatusMessage, StatusMessageT } from '../../solarxr-protocol/rpc/status-message.js'; + + +/** + * Response containing all current valid statuses + */ +export class StatusSystemResponse implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):StatusSystemResponse { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsStatusSystemResponse(bb:flatbuffers.ByteBuffer, obj?:StatusSystemResponse):StatusSystemResponse { + return (obj || new StatusSystemResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsStatusSystemResponse(bb:flatbuffers.ByteBuffer, obj?:StatusSystemResponse):StatusSystemResponse { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new StatusSystemResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +currentStatuses(index: number, obj?:StatusMessage):StatusMessage|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new StatusMessage()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; +} + +currentStatusesLength():number { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + +static startStatusSystemResponse(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addCurrentStatuses(builder:flatbuffers.Builder, currentStatusesOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, currentStatusesOffset, 0); +} + +static createCurrentStatusesVector(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 startCurrentStatusesVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(4, numElems, 4); +} + +static endStatusSystemResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createStatusSystemResponse(builder:flatbuffers.Builder, currentStatusesOffset:flatbuffers.Offset):flatbuffers.Offset { + StatusSystemResponse.startStatusSystemResponse(builder); + StatusSystemResponse.addCurrentStatuses(builder, currentStatusesOffset); + return StatusSystemResponse.endStatusSystemResponse(builder); +} + +unpack(): StatusSystemResponseT { + return new StatusSystemResponseT( + this.bb!.createObjList(this.currentStatuses.bind(this), this.currentStatusesLength()) + ); +} + + +unpackTo(_o: StatusSystemResponseT): void { + _o.currentStatuses = this.bb!.createObjList(this.currentStatuses.bind(this), this.currentStatusesLength()); +} +} + +export class StatusSystemResponseT implements flatbuffers.IGeneratedObject { +constructor( + public currentStatuses: (StatusMessageT)[] = [] +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const currentStatuses = StatusSystemResponse.createCurrentStatusesVector(builder, builder.createObjectOffsetList(this.currentStatuses)); + + return StatusSystemResponse.createStatusSystemResponse(builder, + currentStatuses + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/status-system-update.ts b/protocol/typescript/src/solarxr-protocol/rpc/status-system-update.ts index 063833e5..d105719b 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/status-system-update.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/status-system-update.ts @@ -1,78 +1,78 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { StatusMessage, StatusMessageT } from '../../solarxr-protocol/rpc/status-message.js'; - - -/** - * When a new status appears, it's sent alone - */ -export class StatusSystemUpdate implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):StatusSystemUpdate { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsStatusSystemUpdate(bb:flatbuffers.ByteBuffer, obj?:StatusSystemUpdate):StatusSystemUpdate { - return (obj || new StatusSystemUpdate()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsStatusSystemUpdate(bb:flatbuffers.ByteBuffer, obj?:StatusSystemUpdate):StatusSystemUpdate { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new StatusSystemUpdate()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -newStatus(obj?:StatusMessage):StatusMessage|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new StatusMessage()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -static startStatusSystemUpdate(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addNewStatus(builder:flatbuffers.Builder, newStatusOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, newStatusOffset, 0); -} - -static endStatusSystemUpdate(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createStatusSystemUpdate(builder:flatbuffers.Builder, newStatusOffset:flatbuffers.Offset):flatbuffers.Offset { - StatusSystemUpdate.startStatusSystemUpdate(builder); - StatusSystemUpdate.addNewStatus(builder, newStatusOffset); - return StatusSystemUpdate.endStatusSystemUpdate(builder); -} - -unpack(): StatusSystemUpdateT { - return new StatusSystemUpdateT( - (this.newStatus() !== null ? this.newStatus()!.unpack() : null) - ); -} - - -unpackTo(_o: StatusSystemUpdateT): void { - _o.newStatus = (this.newStatus() !== null ? this.newStatus()!.unpack() : null); -} -} - -export class StatusSystemUpdateT implements flatbuffers.IGeneratedObject { -constructor( - public newStatus: StatusMessageT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const newStatus = (this.newStatus !== null ? this.newStatus!.pack(builder) : 0); - - return StatusSystemUpdate.createStatusSystemUpdate(builder, - newStatus - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { StatusMessage, StatusMessageT } from '../../solarxr-protocol/rpc/status-message.js'; + + +/** + * When a new status appears, it's sent alone + */ +export class StatusSystemUpdate implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):StatusSystemUpdate { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsStatusSystemUpdate(bb:flatbuffers.ByteBuffer, obj?:StatusSystemUpdate):StatusSystemUpdate { + return (obj || new StatusSystemUpdate()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsStatusSystemUpdate(bb:flatbuffers.ByteBuffer, obj?:StatusSystemUpdate):StatusSystemUpdate { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new StatusSystemUpdate()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +newStatus(obj?:StatusMessage):StatusMessage|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new StatusMessage()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +static startStatusSystemUpdate(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addNewStatus(builder:flatbuffers.Builder, newStatusOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, newStatusOffset, 0); +} + +static endStatusSystemUpdate(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createStatusSystemUpdate(builder:flatbuffers.Builder, newStatusOffset:flatbuffers.Offset):flatbuffers.Offset { + StatusSystemUpdate.startStatusSystemUpdate(builder); + StatusSystemUpdate.addNewStatus(builder, newStatusOffset); + return StatusSystemUpdate.endStatusSystemUpdate(builder); +} + +unpack(): StatusSystemUpdateT { + return new StatusSystemUpdateT( + (this.newStatus() !== null ? this.newStatus()!.unpack() : null) + ); +} + + +unpackTo(_o: StatusSystemUpdateT): void { + _o.newStatus = (this.newStatus() !== null ? this.newStatus()!.unpack() : null); +} +} + +export class StatusSystemUpdateT implements flatbuffers.IGeneratedObject { +constructor( + public newStatus: StatusMessageT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const newStatus = (this.newStatus !== null ? this.newStatus!.pack(builder) : 0); + + return StatusSystemUpdate.createStatusSystemUpdate(builder, + newStatus + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/status-tracker-error.ts b/protocol/typescript/src/solarxr-protocol/rpc/status-tracker-error.ts index 30fbcd85..7d58be3a 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/status-tracker-error.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/status-tracker-error.ts @@ -1,78 +1,78 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { TrackerId, TrackerIdT } from '../../solarxr-protocol/datatypes/tracker-id.js'; - - -/** - * Tracker has error state - */ -export class StatusTrackerError implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):StatusTrackerError { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsStatusTrackerError(bb:flatbuffers.ByteBuffer, obj?:StatusTrackerError):StatusTrackerError { - return (obj || new StatusTrackerError()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsStatusTrackerError(bb:flatbuffers.ByteBuffer, obj?:StatusTrackerError):StatusTrackerError { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new StatusTrackerError()).__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; -} - -static startStatusTrackerError(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addTrackerId(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, trackerIdOffset, 0); -} - -static endStatusTrackerError(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createStatusTrackerError(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset):flatbuffers.Offset { - StatusTrackerError.startStatusTrackerError(builder); - StatusTrackerError.addTrackerId(builder, trackerIdOffset); - return StatusTrackerError.endStatusTrackerError(builder); -} - -unpack(): StatusTrackerErrorT { - return new StatusTrackerErrorT( - (this.trackerId() !== null ? this.trackerId()!.unpack() : null) - ); -} - - -unpackTo(_o: StatusTrackerErrorT): void { - _o.trackerId = (this.trackerId() !== null ? this.trackerId()!.unpack() : null); -} -} - -export class StatusTrackerErrorT implements flatbuffers.IGeneratedObject { -constructor( - public trackerId: TrackerIdT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const trackerId = (this.trackerId !== null ? this.trackerId!.pack(builder) : 0); - - return StatusTrackerError.createStatusTrackerError(builder, - trackerId - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { TrackerId, TrackerIdT } from '../../solarxr-protocol/datatypes/tracker-id.js'; + + +/** + * Tracker has error state + */ +export class StatusTrackerError implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):StatusTrackerError { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsStatusTrackerError(bb:flatbuffers.ByteBuffer, obj?:StatusTrackerError):StatusTrackerError { + return (obj || new StatusTrackerError()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsStatusTrackerError(bb:flatbuffers.ByteBuffer, obj?:StatusTrackerError):StatusTrackerError { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new StatusTrackerError()).__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; +} + +static startStatusTrackerError(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addTrackerId(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, trackerIdOffset, 0); +} + +static endStatusTrackerError(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createStatusTrackerError(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset):flatbuffers.Offset { + StatusTrackerError.startStatusTrackerError(builder); + StatusTrackerError.addTrackerId(builder, trackerIdOffset); + return StatusTrackerError.endStatusTrackerError(builder); +} + +unpack(): StatusTrackerErrorT { + return new StatusTrackerErrorT( + (this.trackerId() !== null ? this.trackerId()!.unpack() : null) + ); +} + + +unpackTo(_o: StatusTrackerErrorT): void { + _o.trackerId = (this.trackerId() !== null ? this.trackerId()!.unpack() : null); +} +} + +export class StatusTrackerErrorT implements flatbuffers.IGeneratedObject { +constructor( + public trackerId: TrackerIdT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const trackerId = (this.trackerId !== null ? this.trackerId!.pack(builder) : 0); + + return StatusTrackerError.createStatusTrackerError(builder, + trackerId + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/status-tracker-reset.ts b/protocol/typescript/src/solarxr-protocol/rpc/status-tracker-reset.ts index cbdef20e..4c4e6359 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/status-tracker-reset.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/status-tracker-reset.ts @@ -1,78 +1,78 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { TrackerId, TrackerIdT } from '../../solarxr-protocol/datatypes/tracker-id.js'; - - -/** - * Tracker requires full reset - */ -export class StatusTrackerReset implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):StatusTrackerReset { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsStatusTrackerReset(bb:flatbuffers.ByteBuffer, obj?:StatusTrackerReset):StatusTrackerReset { - return (obj || new StatusTrackerReset()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsStatusTrackerReset(bb:flatbuffers.ByteBuffer, obj?:StatusTrackerReset):StatusTrackerReset { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new StatusTrackerReset()).__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; -} - -static startStatusTrackerReset(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addTrackerId(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, trackerIdOffset, 0); -} - -static endStatusTrackerReset(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createStatusTrackerReset(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset):flatbuffers.Offset { - StatusTrackerReset.startStatusTrackerReset(builder); - StatusTrackerReset.addTrackerId(builder, trackerIdOffset); - return StatusTrackerReset.endStatusTrackerReset(builder); -} - -unpack(): StatusTrackerResetT { - return new StatusTrackerResetT( - (this.trackerId() !== null ? this.trackerId()!.unpack() : null) - ); -} - - -unpackTo(_o: StatusTrackerResetT): void { - _o.trackerId = (this.trackerId() !== null ? this.trackerId()!.unpack() : null); -} -} - -export class StatusTrackerResetT implements flatbuffers.IGeneratedObject { -constructor( - public trackerId: TrackerIdT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const trackerId = (this.trackerId !== null ? this.trackerId!.pack(builder) : 0); - - return StatusTrackerReset.createStatusTrackerReset(builder, - trackerId - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { TrackerId, TrackerIdT } from '../../solarxr-protocol/datatypes/tracker-id.js'; + + +/** + * Tracker requires full reset + */ +export class StatusTrackerReset implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):StatusTrackerReset { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsStatusTrackerReset(bb:flatbuffers.ByteBuffer, obj?:StatusTrackerReset):StatusTrackerReset { + return (obj || new StatusTrackerReset()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsStatusTrackerReset(bb:flatbuffers.ByteBuffer, obj?:StatusTrackerReset):StatusTrackerReset { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new StatusTrackerReset()).__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; +} + +static startStatusTrackerReset(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addTrackerId(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, trackerIdOffset, 0); +} + +static endStatusTrackerReset(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createStatusTrackerReset(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset):flatbuffers.Offset { + StatusTrackerReset.startStatusTrackerReset(builder); + StatusTrackerReset.addTrackerId(builder, trackerIdOffset); + return StatusTrackerReset.endStatusTrackerReset(builder); +} + +unpack(): StatusTrackerResetT { + return new StatusTrackerResetT( + (this.trackerId() !== null ? this.trackerId()!.unpack() : null) + ); +} + + +unpackTo(_o: StatusTrackerResetT): void { + _o.trackerId = (this.trackerId() !== null ? this.trackerId()!.unpack() : null); +} +} + +export class StatusTrackerResetT implements flatbuffers.IGeneratedObject { +constructor( + public trackerId: TrackerIdT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const trackerId = (this.trackerId !== null ? this.trackerId!.pack(builder) : 0); + + return StatusTrackerReset.createStatusTrackerReset(builder, + trackerId + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/status-unassigned-hmd.ts b/protocol/typescript/src/solarxr-protocol/rpc/status-unassigned-hmd.ts index 390f6aa2..9dd911c9 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/status-unassigned-hmd.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/status-unassigned-hmd.ts @@ -1,78 +1,78 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { TrackerId, TrackerIdT } from '../../solarxr-protocol/datatypes/tracker-id.js'; - - -/** - * There is an available HMD tracker and it's not assigned to head - */ -export class StatusUnassignedHMD implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):StatusUnassignedHMD { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsStatusUnassignedHMD(bb:flatbuffers.ByteBuffer, obj?:StatusUnassignedHMD):StatusUnassignedHMD { - return (obj || new StatusUnassignedHMD()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsStatusUnassignedHMD(bb:flatbuffers.ByteBuffer, obj?:StatusUnassignedHMD):StatusUnassignedHMD { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new StatusUnassignedHMD()).__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; -} - -static startStatusUnassignedHMD(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addTrackerId(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, trackerIdOffset, 0); -} - -static endStatusUnassignedHMD(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createStatusUnassignedHMD(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset):flatbuffers.Offset { - StatusUnassignedHMD.startStatusUnassignedHMD(builder); - StatusUnassignedHMD.addTrackerId(builder, trackerIdOffset); - return StatusUnassignedHMD.endStatusUnassignedHMD(builder); -} - -unpack(): StatusUnassignedHMDT { - return new StatusUnassignedHMDT( - (this.trackerId() !== null ? this.trackerId()!.unpack() : null) - ); -} - - -unpackTo(_o: StatusUnassignedHMDT): void { - _o.trackerId = (this.trackerId() !== null ? this.trackerId()!.unpack() : null); -} -} - -export class StatusUnassignedHMDT implements flatbuffers.IGeneratedObject { -constructor( - public trackerId: TrackerIdT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const trackerId = (this.trackerId !== null ? this.trackerId!.pack(builder) : 0); - - return StatusUnassignedHMD.createStatusUnassignedHMD(builder, - trackerId - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { TrackerId, TrackerIdT } from '../../solarxr-protocol/datatypes/tracker-id.js'; + + +/** + * There is an available HMD tracker and it's not assigned to head + */ +export class StatusUnassignedHMD implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):StatusUnassignedHMD { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsStatusUnassignedHMD(bb:flatbuffers.ByteBuffer, obj?:StatusUnassignedHMD):StatusUnassignedHMD { + return (obj || new StatusUnassignedHMD()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsStatusUnassignedHMD(bb:flatbuffers.ByteBuffer, obj?:StatusUnassignedHMD):StatusUnassignedHMD { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new StatusUnassignedHMD()).__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; +} + +static startStatusUnassignedHMD(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addTrackerId(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, trackerIdOffset, 0); +} + +static endStatusUnassignedHMD(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createStatusUnassignedHMD(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset):flatbuffers.Offset { + StatusUnassignedHMD.startStatusUnassignedHMD(builder); + StatusUnassignedHMD.addTrackerId(builder, trackerIdOffset); + return StatusUnassignedHMD.endStatusUnassignedHMD(builder); +} + +unpack(): StatusUnassignedHMDT { + return new StatusUnassignedHMDT( + (this.trackerId() !== null ? this.trackerId()!.unpack() : null) + ); +} + + +unpackTo(_o: StatusUnassignedHMDT): void { + _o.trackerId = (this.trackerId() !== null ? this.trackerId()!.unpack() : null); +} +} + +export class StatusUnassignedHMDT implements flatbuffers.IGeneratedObject { +constructor( + public trackerId: TrackerIdT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const trackerId = (this.trackerId !== null ? this.trackerId!.pack(builder) : 0); + + return StatusUnassignedHMD.createStatusUnassignedHMD(builder, + trackerId + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/steam-vrtrackers-setting.ts b/protocol/typescript/src/solarxr-protocol/rpc/steam-vrtrackers-setting.ts index 6824ea93..9ef1edc8 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/steam-vrtrackers-setting.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/steam-vrtrackers-setting.ts @@ -1,212 +1,212 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class SteamVRTrackersSetting implements flatbuffers.IUnpackableObject { - 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; -} - -automaticTrackerToggle():boolean { - const offset = this.bb!.__offset(this.bb_pos, 16); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -leftFoot():boolean { - const offset = this.bb!.__offset(this.bb_pos, 18); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -rightFoot():boolean { - const offset = this.bb!.__offset(this.bb_pos, 20); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -leftKnee():boolean { - const offset = this.bb!.__offset(this.bb_pos, 22); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -rightKnee():boolean { - const offset = this.bb!.__offset(this.bb_pos, 24); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -leftElbow():boolean { - const offset = this.bb!.__offset(this.bb_pos, 26); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -rightElbow():boolean { - const offset = this.bb!.__offset(this.bb_pos, 28); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -leftHand():boolean { - const offset = this.bb!.__offset(this.bb_pos, 30); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -rightHand():boolean { - const offset = this.bb!.__offset(this.bb_pos, 32); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startSteamVRTrackersSetting(builder:flatbuffers.Builder) { - builder.startObject(15); -} - -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 addAutomaticTrackerToggle(builder:flatbuffers.Builder, automaticTrackerToggle:boolean) { - builder.addFieldInt8(6, +automaticTrackerToggle, +false); -} - -static addLeftFoot(builder:flatbuffers.Builder, leftFoot:boolean) { - builder.addFieldInt8(7, +leftFoot, +false); -} - -static addRightFoot(builder:flatbuffers.Builder, rightFoot:boolean) { - builder.addFieldInt8(8, +rightFoot, +false); -} - -static addLeftKnee(builder:flatbuffers.Builder, leftKnee:boolean) { - builder.addFieldInt8(9, +leftKnee, +false); -} - -static addRightKnee(builder:flatbuffers.Builder, rightKnee:boolean) { - builder.addFieldInt8(10, +rightKnee, +false); -} - -static addLeftElbow(builder:flatbuffers.Builder, leftElbow:boolean) { - builder.addFieldInt8(11, +leftElbow, +false); -} - -static addRightElbow(builder:flatbuffers.Builder, rightElbow:boolean) { - builder.addFieldInt8(12, +rightElbow, +false); -} - -static addLeftHand(builder:flatbuffers.Builder, leftHand:boolean) { - builder.addFieldInt8(13, +leftHand, +false); -} - -static addRightHand(builder:flatbuffers.Builder, rightHand:boolean) { - builder.addFieldInt8(14, +rightHand, +false); -} - -static endSteamVRTrackersSetting(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createSteamVRTrackersSetting(builder:flatbuffers.Builder, waist:boolean, chest:boolean, automaticTrackerToggle:boolean, leftFoot:boolean, rightFoot:boolean, leftKnee:boolean, rightKnee:boolean, leftElbow:boolean, rightElbow:boolean, leftHand:boolean, rightHand:boolean):flatbuffers.Offset { - SteamVRTrackersSetting.startSteamVRTrackersSetting(builder); - SteamVRTrackersSetting.addWaist(builder, waist); - SteamVRTrackersSetting.addChest(builder, chest); - SteamVRTrackersSetting.addAutomaticTrackerToggle(builder, automaticTrackerToggle); - SteamVRTrackersSetting.addLeftFoot(builder, leftFoot); - SteamVRTrackersSetting.addRightFoot(builder, rightFoot); - SteamVRTrackersSetting.addLeftKnee(builder, leftKnee); - SteamVRTrackersSetting.addRightKnee(builder, rightKnee); - SteamVRTrackersSetting.addLeftElbow(builder, leftElbow); - SteamVRTrackersSetting.addRightElbow(builder, rightElbow); - SteamVRTrackersSetting.addLeftHand(builder, leftHand); - SteamVRTrackersSetting.addRightHand(builder, rightHand); - return SteamVRTrackersSetting.endSteamVRTrackersSetting(builder); -} - -unpack(): SteamVRTrackersSettingT { - return new SteamVRTrackersSettingT( - this.waist(), - this.chest(), - this.automaticTrackerToggle(), - this.leftFoot(), - this.rightFoot(), - this.leftKnee(), - this.rightKnee(), - this.leftElbow(), - this.rightElbow(), - this.leftHand(), - this.rightHand() - ); -} - - -unpackTo(_o: SteamVRTrackersSettingT): void { - _o.waist = this.waist(); - _o.chest = this.chest(); - _o.automaticTrackerToggle = this.automaticTrackerToggle(); - _o.leftFoot = this.leftFoot(); - _o.rightFoot = this.rightFoot(); - _o.leftKnee = this.leftKnee(); - _o.rightKnee = this.rightKnee(); - _o.leftElbow = this.leftElbow(); - _o.rightElbow = this.rightElbow(); - _o.leftHand = this.leftHand(); - _o.rightHand = this.rightHand(); -} -} - -export class SteamVRTrackersSettingT implements flatbuffers.IGeneratedObject { -constructor( - public waist: boolean = false, - public chest: boolean = false, - public automaticTrackerToggle: boolean = false, - public leftFoot: boolean = false, - public rightFoot: boolean = false, - public leftKnee: boolean = false, - public rightKnee: boolean = false, - public leftElbow: boolean = false, - public rightElbow: boolean = false, - public leftHand: boolean = false, - public rightHand: boolean = false -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return SteamVRTrackersSetting.createSteamVRTrackersSetting(builder, - this.waist, - this.chest, - this.automaticTrackerToggle, - this.leftFoot, - this.rightFoot, - this.leftKnee, - this.rightKnee, - this.leftElbow, - this.rightElbow, - this.leftHand, - this.rightHand - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class SteamVRTrackersSetting implements flatbuffers.IUnpackableObject { + 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; +} + +automaticTrackerToggle():boolean { + const offset = this.bb!.__offset(this.bb_pos, 16); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +leftFoot():boolean { + const offset = this.bb!.__offset(this.bb_pos, 18); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +rightFoot():boolean { + const offset = this.bb!.__offset(this.bb_pos, 20); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +leftKnee():boolean { + const offset = this.bb!.__offset(this.bb_pos, 22); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +rightKnee():boolean { + const offset = this.bb!.__offset(this.bb_pos, 24); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +leftElbow():boolean { + const offset = this.bb!.__offset(this.bb_pos, 26); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +rightElbow():boolean { + const offset = this.bb!.__offset(this.bb_pos, 28); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +leftHand():boolean { + const offset = this.bb!.__offset(this.bb_pos, 30); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +rightHand():boolean { + const offset = this.bb!.__offset(this.bb_pos, 32); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startSteamVRTrackersSetting(builder:flatbuffers.Builder) { + builder.startObject(15); +} + +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 addAutomaticTrackerToggle(builder:flatbuffers.Builder, automaticTrackerToggle:boolean) { + builder.addFieldInt8(6, +automaticTrackerToggle, +false); +} + +static addLeftFoot(builder:flatbuffers.Builder, leftFoot:boolean) { + builder.addFieldInt8(7, +leftFoot, +false); +} + +static addRightFoot(builder:flatbuffers.Builder, rightFoot:boolean) { + builder.addFieldInt8(8, +rightFoot, +false); +} + +static addLeftKnee(builder:flatbuffers.Builder, leftKnee:boolean) { + builder.addFieldInt8(9, +leftKnee, +false); +} + +static addRightKnee(builder:flatbuffers.Builder, rightKnee:boolean) { + builder.addFieldInt8(10, +rightKnee, +false); +} + +static addLeftElbow(builder:flatbuffers.Builder, leftElbow:boolean) { + builder.addFieldInt8(11, +leftElbow, +false); +} + +static addRightElbow(builder:flatbuffers.Builder, rightElbow:boolean) { + builder.addFieldInt8(12, +rightElbow, +false); +} + +static addLeftHand(builder:flatbuffers.Builder, leftHand:boolean) { + builder.addFieldInt8(13, +leftHand, +false); +} + +static addRightHand(builder:flatbuffers.Builder, rightHand:boolean) { + builder.addFieldInt8(14, +rightHand, +false); +} + +static endSteamVRTrackersSetting(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSteamVRTrackersSetting(builder:flatbuffers.Builder, waist:boolean, chest:boolean, automaticTrackerToggle:boolean, leftFoot:boolean, rightFoot:boolean, leftKnee:boolean, rightKnee:boolean, leftElbow:boolean, rightElbow:boolean, leftHand:boolean, rightHand:boolean):flatbuffers.Offset { + SteamVRTrackersSetting.startSteamVRTrackersSetting(builder); + SteamVRTrackersSetting.addWaist(builder, waist); + SteamVRTrackersSetting.addChest(builder, chest); + SteamVRTrackersSetting.addAutomaticTrackerToggle(builder, automaticTrackerToggle); + SteamVRTrackersSetting.addLeftFoot(builder, leftFoot); + SteamVRTrackersSetting.addRightFoot(builder, rightFoot); + SteamVRTrackersSetting.addLeftKnee(builder, leftKnee); + SteamVRTrackersSetting.addRightKnee(builder, rightKnee); + SteamVRTrackersSetting.addLeftElbow(builder, leftElbow); + SteamVRTrackersSetting.addRightElbow(builder, rightElbow); + SteamVRTrackersSetting.addLeftHand(builder, leftHand); + SteamVRTrackersSetting.addRightHand(builder, rightHand); + return SteamVRTrackersSetting.endSteamVRTrackersSetting(builder); +} + +unpack(): SteamVRTrackersSettingT { + return new SteamVRTrackersSettingT( + this.waist(), + this.chest(), + this.automaticTrackerToggle(), + this.leftFoot(), + this.rightFoot(), + this.leftKnee(), + this.rightKnee(), + this.leftElbow(), + this.rightElbow(), + this.leftHand(), + this.rightHand() + ); +} + + +unpackTo(_o: SteamVRTrackersSettingT): void { + _o.waist = this.waist(); + _o.chest = this.chest(); + _o.automaticTrackerToggle = this.automaticTrackerToggle(); + _o.leftFoot = this.leftFoot(); + _o.rightFoot = this.rightFoot(); + _o.leftKnee = this.leftKnee(); + _o.rightKnee = this.rightKnee(); + _o.leftElbow = this.leftElbow(); + _o.rightElbow = this.rightElbow(); + _o.leftHand = this.leftHand(); + _o.rightHand = this.rightHand(); +} +} + +export class SteamVRTrackersSettingT implements flatbuffers.IGeneratedObject { +constructor( + public waist: boolean = false, + public chest: boolean = false, + public automaticTrackerToggle: boolean = false, + public leftFoot: boolean = false, + public rightFoot: boolean = false, + public leftKnee: boolean = false, + public rightKnee: boolean = false, + public leftElbow: boolean = false, + public rightElbow: boolean = false, + public leftHand: boolean = false, + public rightHand: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return SteamVRTrackersSetting.createSteamVRTrackersSetting(builder, + this.waist, + this.chest, + this.automaticTrackerToggle, + this.leftFoot, + this.rightFoot, + this.leftKnee, + this.rightKnee, + this.leftElbow, + this.rightElbow, + this.leftHand, + this.rightHand + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/stop-wifi-provisioning-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/stop-wifi-provisioning-request.ts index 1db45a56..3cbbb0bd 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/stop-wifi-provisioning-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/stop-wifi-provisioning-request.ts @@ -1,54 +1,54 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class StopWifiProvisioningRequest implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):StopWifiProvisioningRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsStopWifiProvisioningRequest(bb:flatbuffers.ByteBuffer, obj?:StopWifiProvisioningRequest):StopWifiProvisioningRequest { - return (obj || new StopWifiProvisioningRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsStopWifiProvisioningRequest(bb:flatbuffers.ByteBuffer, obj?:StopWifiProvisioningRequest):StopWifiProvisioningRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new StopWifiProvisioningRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startStopWifiProvisioningRequest(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endStopWifiProvisioningRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createStopWifiProvisioningRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - StopWifiProvisioningRequest.startStopWifiProvisioningRequest(builder); - return StopWifiProvisioningRequest.endStopWifiProvisioningRequest(builder); -} - -unpack(): StopWifiProvisioningRequestT { - return new StopWifiProvisioningRequestT(); -} - - -unpackTo(_o: StopWifiProvisioningRequestT): void {} -} - -export class StopWifiProvisioningRequestT implements flatbuffers.IGeneratedObject { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return StopWifiProvisioningRequest.createStopWifiProvisioningRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class StopWifiProvisioningRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):StopWifiProvisioningRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsStopWifiProvisioningRequest(bb:flatbuffers.ByteBuffer, obj?:StopWifiProvisioningRequest):StopWifiProvisioningRequest { + return (obj || new StopWifiProvisioningRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsStopWifiProvisioningRequest(bb:flatbuffers.ByteBuffer, obj?:StopWifiProvisioningRequest):StopWifiProvisioningRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new StopWifiProvisioningRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startStopWifiProvisioningRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endStopWifiProvisioningRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createStopWifiProvisioningRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + StopWifiProvisioningRequest.startStopWifiProvisioningRequest(builder); + return StopWifiProvisioningRequest.endStopWifiProvisioningRequest(builder); +} + +unpack(): StopWifiProvisioningRequestT { + return new StopWifiProvisioningRequestT(); +} + + +unpackTo(_o: StopWifiProvisioningRequestT): void {} +} + +export class StopWifiProvisioningRequestT implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return StopWifiProvisioningRequest.createStopWifiProvisioningRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/tap-detection-settings.ts b/protocol/typescript/src/solarxr-protocol/rpc/tap-detection-settings.ts index 10cbc4b8..e971d269 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/tap-detection-settings.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/tap-detection-settings.ts @@ -1,227 +1,227 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class TapDetectionSettings implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):TapDetectionSettings { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsTapDetectionSettings(bb:flatbuffers.ByteBuffer, obj?:TapDetectionSettings):TapDetectionSettings { - return (obj || new TapDetectionSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsTapDetectionSettings(bb:flatbuffers.ByteBuffer, obj?:TapDetectionSettings):TapDetectionSettings { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new TapDetectionSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -fullResetDelay():number|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -fullResetEnabled():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -fullResetTaps():number|null { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : null; -} - -yawResetDelay():number|null { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -yawResetEnabled():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -yawResetTaps():number|null { - const offset = this.bb!.__offset(this.bb_pos, 14); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : null; -} - -mountingResetDelay():number|null { - const offset = this.bb!.__offset(this.bb_pos, 16); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -mountingResetEnabled():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 18); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -mountingResetTaps():number|null { - const offset = this.bb!.__offset(this.bb_pos, 20); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : null; -} - -/** - * If true, disables reset behavior of tap detection and sends a - * TapDetectionSetupNotification, each time 2 taps are detected on any tracker - */ -setupMode():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 22); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -numberTrackersOverThreshold():number|null { - const offset = this.bb!.__offset(this.bb_pos, 24); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : null; -} - -static startTapDetectionSettings(builder:flatbuffers.Builder) { - builder.startObject(11); -} - -static addFullResetDelay(builder:flatbuffers.Builder, fullResetDelay:number) { - builder.addFieldFloat32(0, fullResetDelay, 0); -} - -static addFullResetEnabled(builder:flatbuffers.Builder, fullResetEnabled:boolean) { - builder.addFieldInt8(1, +fullResetEnabled, 0); -} - -static addFullResetTaps(builder:flatbuffers.Builder, fullResetTaps:number) { - builder.addFieldInt8(2, fullResetTaps, 0); -} - -static addYawResetDelay(builder:flatbuffers.Builder, yawResetDelay:number) { - builder.addFieldFloat32(3, yawResetDelay, 0); -} - -static addYawResetEnabled(builder:flatbuffers.Builder, yawResetEnabled:boolean) { - builder.addFieldInt8(4, +yawResetEnabled, 0); -} - -static addYawResetTaps(builder:flatbuffers.Builder, yawResetTaps:number) { - builder.addFieldInt8(5, yawResetTaps, 0); -} - -static addMountingResetDelay(builder:flatbuffers.Builder, mountingResetDelay:number) { - builder.addFieldFloat32(6, mountingResetDelay, 0); -} - -static addMountingResetEnabled(builder:flatbuffers.Builder, mountingResetEnabled:boolean) { - builder.addFieldInt8(7, +mountingResetEnabled, 0); -} - -static addMountingResetTaps(builder:flatbuffers.Builder, mountingResetTaps:number) { - builder.addFieldInt8(8, mountingResetTaps, 0); -} - -static addSetupMode(builder:flatbuffers.Builder, setupMode:boolean) { - builder.addFieldInt8(9, +setupMode, 0); -} - -static addNumberTrackersOverThreshold(builder:flatbuffers.Builder, numberTrackersOverThreshold:number) { - builder.addFieldInt8(10, numberTrackersOverThreshold, 0); -} - -static endTapDetectionSettings(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createTapDetectionSettings(builder:flatbuffers.Builder, fullResetDelay:number|null, fullResetEnabled:boolean|null, fullResetTaps:number|null, yawResetDelay:number|null, yawResetEnabled:boolean|null, yawResetTaps:number|null, mountingResetDelay:number|null, mountingResetEnabled:boolean|null, mountingResetTaps:number|null, setupMode:boolean|null, numberTrackersOverThreshold:number|null):flatbuffers.Offset { - TapDetectionSettings.startTapDetectionSettings(builder); - if (fullResetDelay !== null) - TapDetectionSettings.addFullResetDelay(builder, fullResetDelay); - if (fullResetEnabled !== null) - TapDetectionSettings.addFullResetEnabled(builder, fullResetEnabled); - if (fullResetTaps !== null) - TapDetectionSettings.addFullResetTaps(builder, fullResetTaps); - if (yawResetDelay !== null) - TapDetectionSettings.addYawResetDelay(builder, yawResetDelay); - if (yawResetEnabled !== null) - TapDetectionSettings.addYawResetEnabled(builder, yawResetEnabled); - if (yawResetTaps !== null) - TapDetectionSettings.addYawResetTaps(builder, yawResetTaps); - if (mountingResetDelay !== null) - TapDetectionSettings.addMountingResetDelay(builder, mountingResetDelay); - if (mountingResetEnabled !== null) - TapDetectionSettings.addMountingResetEnabled(builder, mountingResetEnabled); - if (mountingResetTaps !== null) - TapDetectionSettings.addMountingResetTaps(builder, mountingResetTaps); - if (setupMode !== null) - TapDetectionSettings.addSetupMode(builder, setupMode); - if (numberTrackersOverThreshold !== null) - TapDetectionSettings.addNumberTrackersOverThreshold(builder, numberTrackersOverThreshold); - return TapDetectionSettings.endTapDetectionSettings(builder); -} - -unpack(): TapDetectionSettingsT { - return new TapDetectionSettingsT( - this.fullResetDelay(), - this.fullResetEnabled(), - this.fullResetTaps(), - this.yawResetDelay(), - this.yawResetEnabled(), - this.yawResetTaps(), - this.mountingResetDelay(), - this.mountingResetEnabled(), - this.mountingResetTaps(), - this.setupMode(), - this.numberTrackersOverThreshold() - ); -} - - -unpackTo(_o: TapDetectionSettingsT): void { - _o.fullResetDelay = this.fullResetDelay(); - _o.fullResetEnabled = this.fullResetEnabled(); - _o.fullResetTaps = this.fullResetTaps(); - _o.yawResetDelay = this.yawResetDelay(); - _o.yawResetEnabled = this.yawResetEnabled(); - _o.yawResetTaps = this.yawResetTaps(); - _o.mountingResetDelay = this.mountingResetDelay(); - _o.mountingResetEnabled = this.mountingResetEnabled(); - _o.mountingResetTaps = this.mountingResetTaps(); - _o.setupMode = this.setupMode(); - _o.numberTrackersOverThreshold = this.numberTrackersOverThreshold(); -} -} - -export class TapDetectionSettingsT implements flatbuffers.IGeneratedObject { -constructor( - public fullResetDelay: number|null = null, - public fullResetEnabled: boolean|null = null, - public fullResetTaps: number|null = null, - public yawResetDelay: number|null = null, - public yawResetEnabled: boolean|null = null, - public yawResetTaps: number|null = null, - public mountingResetDelay: number|null = null, - public mountingResetEnabled: boolean|null = null, - public mountingResetTaps: number|null = null, - public setupMode: boolean|null = null, - public numberTrackersOverThreshold: number|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return TapDetectionSettings.createTapDetectionSettings(builder, - this.fullResetDelay, - this.fullResetEnabled, - this.fullResetTaps, - this.yawResetDelay, - this.yawResetEnabled, - this.yawResetTaps, - this.mountingResetDelay, - this.mountingResetEnabled, - this.mountingResetTaps, - this.setupMode, - this.numberTrackersOverThreshold - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class TapDetectionSettings implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):TapDetectionSettings { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsTapDetectionSettings(bb:flatbuffers.ByteBuffer, obj?:TapDetectionSettings):TapDetectionSettings { + return (obj || new TapDetectionSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsTapDetectionSettings(bb:flatbuffers.ByteBuffer, obj?:TapDetectionSettings):TapDetectionSettings { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new TapDetectionSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +fullResetDelay():number|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +fullResetEnabled():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +fullResetTaps():number|null { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : null; +} + +yawResetDelay():number|null { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +yawResetEnabled():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +yawResetTaps():number|null { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : null; +} + +mountingResetDelay():number|null { + const offset = this.bb!.__offset(this.bb_pos, 16); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +mountingResetEnabled():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 18); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +mountingResetTaps():number|null { + const offset = this.bb!.__offset(this.bb_pos, 20); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : null; +} + +/** + * If true, disables reset behavior of tap detection and sends a + * TapDetectionSetupNotification, each time 2 taps are detected on any tracker + */ +setupMode():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 22); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +numberTrackersOverThreshold():number|null { + const offset = this.bb!.__offset(this.bb_pos, 24); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : null; +} + +static startTapDetectionSettings(builder:flatbuffers.Builder) { + builder.startObject(11); +} + +static addFullResetDelay(builder:flatbuffers.Builder, fullResetDelay:number) { + builder.addFieldFloat32(0, fullResetDelay, 0); +} + +static addFullResetEnabled(builder:flatbuffers.Builder, fullResetEnabled:boolean) { + builder.addFieldInt8(1, +fullResetEnabled, 0); +} + +static addFullResetTaps(builder:flatbuffers.Builder, fullResetTaps:number) { + builder.addFieldInt8(2, fullResetTaps, 0); +} + +static addYawResetDelay(builder:flatbuffers.Builder, yawResetDelay:number) { + builder.addFieldFloat32(3, yawResetDelay, 0); +} + +static addYawResetEnabled(builder:flatbuffers.Builder, yawResetEnabled:boolean) { + builder.addFieldInt8(4, +yawResetEnabled, 0); +} + +static addYawResetTaps(builder:flatbuffers.Builder, yawResetTaps:number) { + builder.addFieldInt8(5, yawResetTaps, 0); +} + +static addMountingResetDelay(builder:flatbuffers.Builder, mountingResetDelay:number) { + builder.addFieldFloat32(6, mountingResetDelay, 0); +} + +static addMountingResetEnabled(builder:flatbuffers.Builder, mountingResetEnabled:boolean) { + builder.addFieldInt8(7, +mountingResetEnabled, 0); +} + +static addMountingResetTaps(builder:flatbuffers.Builder, mountingResetTaps:number) { + builder.addFieldInt8(8, mountingResetTaps, 0); +} + +static addSetupMode(builder:flatbuffers.Builder, setupMode:boolean) { + builder.addFieldInt8(9, +setupMode, 0); +} + +static addNumberTrackersOverThreshold(builder:flatbuffers.Builder, numberTrackersOverThreshold:number) { + builder.addFieldInt8(10, numberTrackersOverThreshold, 0); +} + +static endTapDetectionSettings(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createTapDetectionSettings(builder:flatbuffers.Builder, fullResetDelay:number|null, fullResetEnabled:boolean|null, fullResetTaps:number|null, yawResetDelay:number|null, yawResetEnabled:boolean|null, yawResetTaps:number|null, mountingResetDelay:number|null, mountingResetEnabled:boolean|null, mountingResetTaps:number|null, setupMode:boolean|null, numberTrackersOverThreshold:number|null):flatbuffers.Offset { + TapDetectionSettings.startTapDetectionSettings(builder); + if (fullResetDelay !== null) + TapDetectionSettings.addFullResetDelay(builder, fullResetDelay); + if (fullResetEnabled !== null) + TapDetectionSettings.addFullResetEnabled(builder, fullResetEnabled); + if (fullResetTaps !== null) + TapDetectionSettings.addFullResetTaps(builder, fullResetTaps); + if (yawResetDelay !== null) + TapDetectionSettings.addYawResetDelay(builder, yawResetDelay); + if (yawResetEnabled !== null) + TapDetectionSettings.addYawResetEnabled(builder, yawResetEnabled); + if (yawResetTaps !== null) + TapDetectionSettings.addYawResetTaps(builder, yawResetTaps); + if (mountingResetDelay !== null) + TapDetectionSettings.addMountingResetDelay(builder, mountingResetDelay); + if (mountingResetEnabled !== null) + TapDetectionSettings.addMountingResetEnabled(builder, mountingResetEnabled); + if (mountingResetTaps !== null) + TapDetectionSettings.addMountingResetTaps(builder, mountingResetTaps); + if (setupMode !== null) + TapDetectionSettings.addSetupMode(builder, setupMode); + if (numberTrackersOverThreshold !== null) + TapDetectionSettings.addNumberTrackersOverThreshold(builder, numberTrackersOverThreshold); + return TapDetectionSettings.endTapDetectionSettings(builder); +} + +unpack(): TapDetectionSettingsT { + return new TapDetectionSettingsT( + this.fullResetDelay(), + this.fullResetEnabled(), + this.fullResetTaps(), + this.yawResetDelay(), + this.yawResetEnabled(), + this.yawResetTaps(), + this.mountingResetDelay(), + this.mountingResetEnabled(), + this.mountingResetTaps(), + this.setupMode(), + this.numberTrackersOverThreshold() + ); +} + + +unpackTo(_o: TapDetectionSettingsT): void { + _o.fullResetDelay = this.fullResetDelay(); + _o.fullResetEnabled = this.fullResetEnabled(); + _o.fullResetTaps = this.fullResetTaps(); + _o.yawResetDelay = this.yawResetDelay(); + _o.yawResetEnabled = this.yawResetEnabled(); + _o.yawResetTaps = this.yawResetTaps(); + _o.mountingResetDelay = this.mountingResetDelay(); + _o.mountingResetEnabled = this.mountingResetEnabled(); + _o.mountingResetTaps = this.mountingResetTaps(); + _o.setupMode = this.setupMode(); + _o.numberTrackersOverThreshold = this.numberTrackersOverThreshold(); +} +} + +export class TapDetectionSettingsT implements flatbuffers.IGeneratedObject { +constructor( + public fullResetDelay: number|null = null, + public fullResetEnabled: boolean|null = null, + public fullResetTaps: number|null = null, + public yawResetDelay: number|null = null, + public yawResetEnabled: boolean|null = null, + public yawResetTaps: number|null = null, + public mountingResetDelay: number|null = null, + public mountingResetEnabled: boolean|null = null, + public mountingResetTaps: number|null = null, + public setupMode: boolean|null = null, + public numberTrackersOverThreshold: number|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return TapDetectionSettings.createTapDetectionSettings(builder, + this.fullResetDelay, + this.fullResetEnabled, + this.fullResetTaps, + this.yawResetDelay, + this.yawResetEnabled, + this.yawResetTaps, + this.mountingResetDelay, + this.mountingResetEnabled, + this.mountingResetTaps, + this.setupMode, + this.numberTrackersOverThreshold + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/tap-detection-setup-notification.ts b/protocol/typescript/src/solarxr-protocol/rpc/tap-detection-setup-notification.ts index 51b9dcb5..e35c0854 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/tap-detection-setup-notification.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/tap-detection-setup-notification.ts @@ -1,78 +1,78 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { TrackerId, TrackerIdT } from '../../solarxr-protocol/datatypes/tracker-id.js'; - - -/** - * See TapDetectionSettings::setup_mode - */ -export class TapDetectionSetupNotification implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):TapDetectionSetupNotification { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsTapDetectionSetupNotification(bb:flatbuffers.ByteBuffer, obj?:TapDetectionSetupNotification):TapDetectionSetupNotification { - return (obj || new TapDetectionSetupNotification()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsTapDetectionSetupNotification(bb:flatbuffers.ByteBuffer, obj?:TapDetectionSetupNotification):TapDetectionSetupNotification { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new TapDetectionSetupNotification()).__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; -} - -static startTapDetectionSetupNotification(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addTrackerId(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, trackerIdOffset, 0); -} - -static endTapDetectionSetupNotification(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createTapDetectionSetupNotification(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset):flatbuffers.Offset { - TapDetectionSetupNotification.startTapDetectionSetupNotification(builder); - TapDetectionSetupNotification.addTrackerId(builder, trackerIdOffset); - return TapDetectionSetupNotification.endTapDetectionSetupNotification(builder); -} - -unpack(): TapDetectionSetupNotificationT { - return new TapDetectionSetupNotificationT( - (this.trackerId() !== null ? this.trackerId()!.unpack() : null) - ); -} - - -unpackTo(_o: TapDetectionSetupNotificationT): void { - _o.trackerId = (this.trackerId() !== null ? this.trackerId()!.unpack() : null); -} -} - -export class TapDetectionSetupNotificationT implements flatbuffers.IGeneratedObject { -constructor( - public trackerId: TrackerIdT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const trackerId = (this.trackerId !== null ? this.trackerId!.pack(builder) : 0); - - return TapDetectionSetupNotification.createTapDetectionSetupNotification(builder, - trackerId - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { TrackerId, TrackerIdT } from '../../solarxr-protocol/datatypes/tracker-id.js'; + + +/** + * See TapDetectionSettings::setup_mode + */ +export class TapDetectionSetupNotification implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):TapDetectionSetupNotification { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsTapDetectionSetupNotification(bb:flatbuffers.ByteBuffer, obj?:TapDetectionSetupNotification):TapDetectionSetupNotification { + return (obj || new TapDetectionSetupNotification()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsTapDetectionSetupNotification(bb:flatbuffers.ByteBuffer, obj?:TapDetectionSetupNotification):TapDetectionSetupNotification { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new TapDetectionSetupNotification()).__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; +} + +static startTapDetectionSetupNotification(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addTrackerId(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, trackerIdOffset, 0); +} + +static endTapDetectionSetupNotification(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createTapDetectionSetupNotification(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset):flatbuffers.Offset { + TapDetectionSetupNotification.startTapDetectionSetupNotification(builder); + TapDetectionSetupNotification.addTrackerId(builder, trackerIdOffset); + return TapDetectionSetupNotification.endTapDetectionSetupNotification(builder); +} + +unpack(): TapDetectionSetupNotificationT { + return new TapDetectionSetupNotificationT( + (this.trackerId() !== null ? this.trackerId()!.unpack() : null) + ); +} + + +unpackTo(_o: TapDetectionSetupNotificationT): void { + _o.trackerId = (this.trackerId() !== null ? this.trackerId()!.unpack() : null); +} +} + +export class TapDetectionSetupNotificationT implements flatbuffers.IGeneratedObject { +constructor( + public trackerId: TrackerIdT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const trackerId = (this.trackerId !== null ? this.trackerId!.pack(builder) : 0); + + return TapDetectionSetupNotification.createTapDetectionSetupNotification(builder, + trackerId + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/tracking-pause-state-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/tracking-pause-state-request.ts index 878ca53e..f36338af 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/tracking-pause-state-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/tracking-pause-state-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 tracking pause - */ -export class TrackingPauseStateRequest implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):TrackingPauseStateRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsTrackingPauseStateRequest(bb:flatbuffers.ByteBuffer, obj?:TrackingPauseStateRequest):TrackingPauseStateRequest { - return (obj || new TrackingPauseStateRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsTrackingPauseStateRequest(bb:flatbuffers.ByteBuffer, obj?:TrackingPauseStateRequest):TrackingPauseStateRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new TrackingPauseStateRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startTrackingPauseStateRequest(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endTrackingPauseStateRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createTrackingPauseStateRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - TrackingPauseStateRequest.startTrackingPauseStateRequest(builder); - return TrackingPauseStateRequest.endTrackingPauseStateRequest(builder); -} - -unpack(): TrackingPauseStateRequestT { - return new TrackingPauseStateRequestT(); -} - - -unpackTo(_o: TrackingPauseStateRequestT): void {} -} - -export class TrackingPauseStateRequestT implements flatbuffers.IGeneratedObject { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return TrackingPauseStateRequest.createTrackingPauseStateRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Requests the current state of tracking pause + */ +export class TrackingPauseStateRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):TrackingPauseStateRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsTrackingPauseStateRequest(bb:flatbuffers.ByteBuffer, obj?:TrackingPauseStateRequest):TrackingPauseStateRequest { + return (obj || new TrackingPauseStateRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsTrackingPauseStateRequest(bb:flatbuffers.ByteBuffer, obj?:TrackingPauseStateRequest):TrackingPauseStateRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new TrackingPauseStateRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startTrackingPauseStateRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endTrackingPauseStateRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createTrackingPauseStateRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + TrackingPauseStateRequest.startTrackingPauseStateRequest(builder); + return TrackingPauseStateRequest.endTrackingPauseStateRequest(builder); +} + +unpack(): TrackingPauseStateRequestT { + return new TrackingPauseStateRequestT(); +} + + +unpackTo(_o: TrackingPauseStateRequestT): void {} +} + +export class TrackingPauseStateRequestT implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return TrackingPauseStateRequest.createTrackingPauseStateRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/tracking-pause-state-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/tracking-pause-state-response.ts index 6198eaf1..576dae68 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/tracking-pause-state-response.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/tracking-pause-state-response.ts @@ -1,75 +1,75 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class TrackingPauseStateResponse implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):TrackingPauseStateResponse { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsTrackingPauseStateResponse(bb:flatbuffers.ByteBuffer, obj?:TrackingPauseStateResponse):TrackingPauseStateResponse { - return (obj || new TrackingPauseStateResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsTrackingPauseStateResponse(bb:flatbuffers.ByteBuffer, obj?:TrackingPauseStateResponse):TrackingPauseStateResponse { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new TrackingPauseStateResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -/** - * Skeleton tracking is paused if true, skeleton tracking is unpaused if false. - */ -trackingPaused():boolean { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startTrackingPauseStateResponse(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addTrackingPaused(builder:flatbuffers.Builder, trackingPaused:boolean) { - builder.addFieldInt8(0, +trackingPaused, +false); -} - -static endTrackingPauseStateResponse(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createTrackingPauseStateResponse(builder:flatbuffers.Builder, trackingPaused:boolean):flatbuffers.Offset { - TrackingPauseStateResponse.startTrackingPauseStateResponse(builder); - TrackingPauseStateResponse.addTrackingPaused(builder, trackingPaused); - return TrackingPauseStateResponse.endTrackingPauseStateResponse(builder); -} - -unpack(): TrackingPauseStateResponseT { - return new TrackingPauseStateResponseT( - this.trackingPaused() - ); -} - - -unpackTo(_o: TrackingPauseStateResponseT): void { - _o.trackingPaused = this.trackingPaused(); -} -} - -export class TrackingPauseStateResponseT implements flatbuffers.IGeneratedObject { -constructor( - public trackingPaused: boolean = false -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return TrackingPauseStateResponse.createTrackingPauseStateResponse(builder, - this.trackingPaused - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class TrackingPauseStateResponse implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):TrackingPauseStateResponse { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsTrackingPauseStateResponse(bb:flatbuffers.ByteBuffer, obj?:TrackingPauseStateResponse):TrackingPauseStateResponse { + return (obj || new TrackingPauseStateResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsTrackingPauseStateResponse(bb:flatbuffers.ByteBuffer, obj?:TrackingPauseStateResponse):TrackingPauseStateResponse { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new TrackingPauseStateResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +/** + * Skeleton tracking is paused if true, skeleton tracking is unpaused if false. + */ +trackingPaused():boolean { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startTrackingPauseStateResponse(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addTrackingPaused(builder:flatbuffers.Builder, trackingPaused:boolean) { + builder.addFieldInt8(0, +trackingPaused, +false); +} + +static endTrackingPauseStateResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createTrackingPauseStateResponse(builder:flatbuffers.Builder, trackingPaused:boolean):flatbuffers.Offset { + TrackingPauseStateResponse.startTrackingPauseStateResponse(builder); + TrackingPauseStateResponse.addTrackingPaused(builder, trackingPaused); + return TrackingPauseStateResponse.endTrackingPauseStateResponse(builder); +} + +unpack(): TrackingPauseStateResponseT { + return new TrackingPauseStateResponseT( + this.trackingPaused() + ); +} + + +unpackTo(_o: TrackingPauseStateResponseT): void { + _o.trackingPaused = this.trackingPaused(); +} +} + +export class TrackingPauseStateResponseT implements flatbuffers.IGeneratedObject { +constructor( + public trackingPaused: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return TrackingPauseStateResponse.createTrackingPauseStateResponse(builder, + this.trackingPaused + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/unknown-device-handshake-notification.ts b/protocol/typescript/src/solarxr-protocol/rpc/unknown-device-handshake-notification.ts index 23f9dbbd..d849c771 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/unknown-device-handshake-notification.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/unknown-device-handshake-notification.ts @@ -1,81 +1,81 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * Server notifies connection of an unknown device. - * If the notification is no longer sent, it means the device connected to another - * server, got connected to this server or it was turned off. - */ -export class UnknownDeviceHandshakeNotification implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):UnknownDeviceHandshakeNotification { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsUnknownDeviceHandshakeNotification(bb:flatbuffers.ByteBuffer, obj?:UnknownDeviceHandshakeNotification):UnknownDeviceHandshakeNotification { - return (obj || new UnknownDeviceHandshakeNotification()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsUnknownDeviceHandshakeNotification(bb:flatbuffers.ByteBuffer, obj?:UnknownDeviceHandshakeNotification):UnknownDeviceHandshakeNotification { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new UnknownDeviceHandshakeNotification()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -macAddress():string|null -macAddress(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -macAddress(optionalEncoding?:any):string|Uint8Array|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; -} - -static startUnknownDeviceHandshakeNotification(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addMacAddress(builder:flatbuffers.Builder, macAddressOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, macAddressOffset, 0); -} - -static endUnknownDeviceHandshakeNotification(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createUnknownDeviceHandshakeNotification(builder:flatbuffers.Builder, macAddressOffset:flatbuffers.Offset):flatbuffers.Offset { - UnknownDeviceHandshakeNotification.startUnknownDeviceHandshakeNotification(builder); - UnknownDeviceHandshakeNotification.addMacAddress(builder, macAddressOffset); - return UnknownDeviceHandshakeNotification.endUnknownDeviceHandshakeNotification(builder); -} - -unpack(): UnknownDeviceHandshakeNotificationT { - return new UnknownDeviceHandshakeNotificationT( - this.macAddress() - ); -} - - -unpackTo(_o: UnknownDeviceHandshakeNotificationT): void { - _o.macAddress = this.macAddress(); -} -} - -export class UnknownDeviceHandshakeNotificationT implements flatbuffers.IGeneratedObject { -constructor( - public macAddress: string|Uint8Array|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const macAddress = (this.macAddress !== null ? builder.createString(this.macAddress!) : 0); - - return UnknownDeviceHandshakeNotification.createUnknownDeviceHandshakeNotification(builder, - macAddress - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Server notifies connection of an unknown device. + * If the notification is no longer sent, it means the device connected to another + * server, got connected to this server or it was turned off. + */ +export class UnknownDeviceHandshakeNotification implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):UnknownDeviceHandshakeNotification { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsUnknownDeviceHandshakeNotification(bb:flatbuffers.ByteBuffer, obj?:UnknownDeviceHandshakeNotification):UnknownDeviceHandshakeNotification { + return (obj || new UnknownDeviceHandshakeNotification()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsUnknownDeviceHandshakeNotification(bb:flatbuffers.ByteBuffer, obj?:UnknownDeviceHandshakeNotification):UnknownDeviceHandshakeNotification { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new UnknownDeviceHandshakeNotification()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +macAddress():string|null +macAddress(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +macAddress(optionalEncoding?:any):string|Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; +} + +static startUnknownDeviceHandshakeNotification(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addMacAddress(builder:flatbuffers.Builder, macAddressOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, macAddressOffset, 0); +} + +static endUnknownDeviceHandshakeNotification(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createUnknownDeviceHandshakeNotification(builder:flatbuffers.Builder, macAddressOffset:flatbuffers.Offset):flatbuffers.Offset { + UnknownDeviceHandshakeNotification.startUnknownDeviceHandshakeNotification(builder); + UnknownDeviceHandshakeNotification.addMacAddress(builder, macAddressOffset); + return UnknownDeviceHandshakeNotification.endUnknownDeviceHandshakeNotification(builder); +} + +unpack(): UnknownDeviceHandshakeNotificationT { + return new UnknownDeviceHandshakeNotificationT( + this.macAddress() + ); +} + + +unpackTo(_o: UnknownDeviceHandshakeNotificationT): void { + _o.macAddress = this.macAddress(); +} +} + +export class UnknownDeviceHandshakeNotificationT implements flatbuffers.IGeneratedObject { +constructor( + public macAddress: string|Uint8Array|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const macAddress = (this.macAddress !== null ? builder.createString(this.macAddress!) : 0); + + return UnknownDeviceHandshakeNotification.createUnknownDeviceHandshakeNotification(builder, + macAddress + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/vmcoscsettings.ts b/protocol/typescript/src/solarxr-protocol/rpc/vmcoscsettings.ts index 6060a1ee..4940c27f 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/vmcoscsettings.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/vmcoscsettings.ts @@ -1,123 +1,123 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { OSCSettings, OSCSettingsT } from '../../solarxr-protocol/rpc/oscsettings.js'; - - -/** - * OSC Settings specific to VMC - */ -export class VMCOSCSettings implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):VMCOSCSettings { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsVMCOSCSettings(bb:flatbuffers.ByteBuffer, obj?:VMCOSCSettings):VMCOSCSettings { - return (obj || new VMCOSCSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsVMCOSCSettings(bb:flatbuffers.ByteBuffer, obj?:VMCOSCSettings):VMCOSCSettings { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new VMCOSCSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -oscSettings(obj?:OSCSettings):OSCSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new OSCSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -vrmJson():string|null -vrmJson(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -vrmJson(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; -} - -anchorHip():boolean { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -mirrorTracking():boolean { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startVMCOSCSettings(builder:flatbuffers.Builder) { - builder.startObject(4); -} - -static addOscSettings(builder:flatbuffers.Builder, oscSettingsOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, oscSettingsOffset, 0); -} - -static addVrmJson(builder:flatbuffers.Builder, vrmJsonOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, vrmJsonOffset, 0); -} - -static addAnchorHip(builder:flatbuffers.Builder, anchorHip:boolean) { - builder.addFieldInt8(2, +anchorHip, +false); -} - -static addMirrorTracking(builder:flatbuffers.Builder, mirrorTracking:boolean) { - builder.addFieldInt8(3, +mirrorTracking, +false); -} - -static endVMCOSCSettings(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createVMCOSCSettings(builder:flatbuffers.Builder, oscSettingsOffset:flatbuffers.Offset, vrmJsonOffset:flatbuffers.Offset, anchorHip:boolean, mirrorTracking:boolean):flatbuffers.Offset { - VMCOSCSettings.startVMCOSCSettings(builder); - VMCOSCSettings.addOscSettings(builder, oscSettingsOffset); - VMCOSCSettings.addVrmJson(builder, vrmJsonOffset); - VMCOSCSettings.addAnchorHip(builder, anchorHip); - VMCOSCSettings.addMirrorTracking(builder, mirrorTracking); - return VMCOSCSettings.endVMCOSCSettings(builder); -} - -unpack(): VMCOSCSettingsT { - return new VMCOSCSettingsT( - (this.oscSettings() !== null ? this.oscSettings()!.unpack() : null), - this.vrmJson(), - this.anchorHip(), - this.mirrorTracking() - ); -} - - -unpackTo(_o: VMCOSCSettingsT): void { - _o.oscSettings = (this.oscSettings() !== null ? this.oscSettings()!.unpack() : null); - _o.vrmJson = this.vrmJson(); - _o.anchorHip = this.anchorHip(); - _o.mirrorTracking = this.mirrorTracking(); -} -} - -export class VMCOSCSettingsT implements flatbuffers.IGeneratedObject { -constructor( - public oscSettings: OSCSettingsT|null = null, - public vrmJson: string|Uint8Array|null = null, - public anchorHip: boolean = false, - public mirrorTracking: boolean = false -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const oscSettings = (this.oscSettings !== null ? this.oscSettings!.pack(builder) : 0); - const vrmJson = (this.vrmJson !== null ? builder.createString(this.vrmJson!) : 0); - - return VMCOSCSettings.createVMCOSCSettings(builder, - oscSettings, - vrmJson, - this.anchorHip, - this.mirrorTracking - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { OSCSettings, OSCSettingsT } from '../../solarxr-protocol/rpc/oscsettings.js'; + + +/** + * OSC Settings specific to VMC + */ +export class VMCOSCSettings implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):VMCOSCSettings { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsVMCOSCSettings(bb:flatbuffers.ByteBuffer, obj?:VMCOSCSettings):VMCOSCSettings { + return (obj || new VMCOSCSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsVMCOSCSettings(bb:flatbuffers.ByteBuffer, obj?:VMCOSCSettings):VMCOSCSettings { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new VMCOSCSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +oscSettings(obj?:OSCSettings):OSCSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new OSCSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +vrmJson():string|null +vrmJson(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +vrmJson(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; +} + +anchorHip():boolean { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +mirrorTracking():boolean { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startVMCOSCSettings(builder:flatbuffers.Builder) { + builder.startObject(4); +} + +static addOscSettings(builder:flatbuffers.Builder, oscSettingsOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, oscSettingsOffset, 0); +} + +static addVrmJson(builder:flatbuffers.Builder, vrmJsonOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, vrmJsonOffset, 0); +} + +static addAnchorHip(builder:flatbuffers.Builder, anchorHip:boolean) { + builder.addFieldInt8(2, +anchorHip, +false); +} + +static addMirrorTracking(builder:flatbuffers.Builder, mirrorTracking:boolean) { + builder.addFieldInt8(3, +mirrorTracking, +false); +} + +static endVMCOSCSettings(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createVMCOSCSettings(builder:flatbuffers.Builder, oscSettingsOffset:flatbuffers.Offset, vrmJsonOffset:flatbuffers.Offset, anchorHip:boolean, mirrorTracking:boolean):flatbuffers.Offset { + VMCOSCSettings.startVMCOSCSettings(builder); + VMCOSCSettings.addOscSettings(builder, oscSettingsOffset); + VMCOSCSettings.addVrmJson(builder, vrmJsonOffset); + VMCOSCSettings.addAnchorHip(builder, anchorHip); + VMCOSCSettings.addMirrorTracking(builder, mirrorTracking); + return VMCOSCSettings.endVMCOSCSettings(builder); +} + +unpack(): VMCOSCSettingsT { + return new VMCOSCSettingsT( + (this.oscSettings() !== null ? this.oscSettings()!.unpack() : null), + this.vrmJson(), + this.anchorHip(), + this.mirrorTracking() + ); +} + + +unpackTo(_o: VMCOSCSettingsT): void { + _o.oscSettings = (this.oscSettings() !== null ? this.oscSettings()!.unpack() : null); + _o.vrmJson = this.vrmJson(); + _o.anchorHip = this.anchorHip(); + _o.mirrorTracking = this.mirrorTracking(); +} +} + +export class VMCOSCSettingsT implements flatbuffers.IGeneratedObject { +constructor( + public oscSettings: OSCSettingsT|null = null, + public vrmJson: string|Uint8Array|null = null, + public anchorHip: boolean = false, + public mirrorTracking: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const oscSettings = (this.oscSettings !== null ? this.oscSettings!.pack(builder) : 0); + const vrmJson = (this.vrmJson !== null ? builder.createString(this.vrmJson!) : 0); + + return VMCOSCSettings.createVMCOSCSettings(builder, + oscSettings, + vrmJson, + this.anchorHip, + this.mirrorTracking + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/vrcoscsettings.ts b/protocol/typescript/src/solarxr-protocol/rpc/vrcoscsettings.ts index 138f5bb7..6b987c17 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/vrcoscsettings.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/vrcoscsettings.ts @@ -1,89 +1,89 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { OSCSettings, OSCSettingsT } from '../../solarxr-protocol/rpc/oscsettings.js'; -import { OSCTrackersSetting, OSCTrackersSettingT } from '../../solarxr-protocol/rpc/osctrackers-setting.js'; - - -/** - * OSC Settings specific to VRChat - */ -export class VRCOSCSettings implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):VRCOSCSettings { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsVRCOSCSettings(bb:flatbuffers.ByteBuffer, obj?:VRCOSCSettings):VRCOSCSettings { - return (obj || new VRCOSCSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsVRCOSCSettings(bb:flatbuffers.ByteBuffer, obj?:VRCOSCSettings):VRCOSCSettings { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new VRCOSCSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -oscSettings(obj?:OSCSettings):OSCSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new OSCSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -trackers(obj?:OSCTrackersSetting):OSCTrackersSetting|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? (obj || new OSCTrackersSetting()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -static startVRCOSCSettings(builder:flatbuffers.Builder) { - builder.startObject(2); -} - -static addOscSettings(builder:flatbuffers.Builder, oscSettingsOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, oscSettingsOffset, 0); -} - -static addTrackers(builder:flatbuffers.Builder, trackersOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, trackersOffset, 0); -} - -static endVRCOSCSettings(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - - -unpack(): VRCOSCSettingsT { - return new VRCOSCSettingsT( - (this.oscSettings() !== null ? this.oscSettings()!.unpack() : null), - (this.trackers() !== null ? this.trackers()!.unpack() : null) - ); -} - - -unpackTo(_o: VRCOSCSettingsT): void { - _o.oscSettings = (this.oscSettings() !== null ? this.oscSettings()!.unpack() : null); - _o.trackers = (this.trackers() !== null ? this.trackers()!.unpack() : null); -} -} - -export class VRCOSCSettingsT implements flatbuffers.IGeneratedObject { -constructor( - public oscSettings: OSCSettingsT|null = null, - public trackers: OSCTrackersSettingT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const oscSettings = (this.oscSettings !== null ? this.oscSettings!.pack(builder) : 0); - const trackers = (this.trackers !== null ? this.trackers!.pack(builder) : 0); - - VRCOSCSettings.startVRCOSCSettings(builder); - VRCOSCSettings.addOscSettings(builder, oscSettings); - VRCOSCSettings.addTrackers(builder, trackers); - - return VRCOSCSettings.endVRCOSCSettings(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { OSCSettings, OSCSettingsT } from '../../solarxr-protocol/rpc/oscsettings.js'; +import { OSCTrackersSetting, OSCTrackersSettingT } from '../../solarxr-protocol/rpc/osctrackers-setting.js'; + + +/** + * OSC Settings specific to VRChat + */ +export class VRCOSCSettings implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):VRCOSCSettings { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsVRCOSCSettings(bb:flatbuffers.ByteBuffer, obj?:VRCOSCSettings):VRCOSCSettings { + return (obj || new VRCOSCSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsVRCOSCSettings(bb:flatbuffers.ByteBuffer, obj?:VRCOSCSettings):VRCOSCSettings { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new VRCOSCSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +oscSettings(obj?:OSCSettings):OSCSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new OSCSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +trackers(obj?:OSCTrackersSetting):OSCTrackersSetting|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? (obj || new OSCTrackersSetting()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +static startVRCOSCSettings(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addOscSettings(builder:flatbuffers.Builder, oscSettingsOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, oscSettingsOffset, 0); +} + +static addTrackers(builder:flatbuffers.Builder, trackersOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, trackersOffset, 0); +} + +static endVRCOSCSettings(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + + +unpack(): VRCOSCSettingsT { + return new VRCOSCSettingsT( + (this.oscSettings() !== null ? this.oscSettings()!.unpack() : null), + (this.trackers() !== null ? this.trackers()!.unpack() : null) + ); +} + + +unpackTo(_o: VRCOSCSettingsT): void { + _o.oscSettings = (this.oscSettings() !== null ? this.oscSettings()!.unpack() : null); + _o.trackers = (this.trackers() !== null ? this.trackers()!.unpack() : null); +} +} + +export class VRCOSCSettingsT implements flatbuffers.IGeneratedObject { +constructor( + public oscSettings: OSCSettingsT|null = null, + public trackers: OSCTrackersSettingT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const oscSettings = (this.oscSettings !== null ? this.oscSettings!.pack(builder) : 0); + const trackers = (this.trackers !== null ? this.trackers!.pack(builder) : 0); + + VRCOSCSettings.startVRCOSCSettings(builder); + VRCOSCSettings.addOscSettings(builder, oscSettings); + VRCOSCSettings.addTrackers(builder, trackers); + + return VRCOSCSettings.endVRCOSCSettings(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/wifi-provisioning-status-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/wifi-provisioning-status-response.ts index 848b482f..bffb9faa 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/wifi-provisioning-status-response.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/wifi-provisioning-status-response.ts @@ -1,73 +1,73 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { WifiProvisioningStatus } from '../../solarxr-protocol/rpc/wifi-provisioning-status.js'; - - -export class WifiProvisioningStatusResponse implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):WifiProvisioningStatusResponse { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsWifiProvisioningStatusResponse(bb:flatbuffers.ByteBuffer, obj?:WifiProvisioningStatusResponse):WifiProvisioningStatusResponse { - return (obj || new WifiProvisioningStatusResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsWifiProvisioningStatusResponse(bb:flatbuffers.ByteBuffer, obj?:WifiProvisioningStatusResponse):WifiProvisioningStatusResponse { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new WifiProvisioningStatusResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -status():WifiProvisioningStatus { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : WifiProvisioningStatus.NONE; -} - -static startWifiProvisioningStatusResponse(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addStatus(builder:flatbuffers.Builder, status:WifiProvisioningStatus) { - builder.addFieldInt8(0, status, WifiProvisioningStatus.NONE); -} - -static endWifiProvisioningStatusResponse(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createWifiProvisioningStatusResponse(builder:flatbuffers.Builder, status:WifiProvisioningStatus):flatbuffers.Offset { - WifiProvisioningStatusResponse.startWifiProvisioningStatusResponse(builder); - WifiProvisioningStatusResponse.addStatus(builder, status); - return WifiProvisioningStatusResponse.endWifiProvisioningStatusResponse(builder); -} - -unpack(): WifiProvisioningStatusResponseT { - return new WifiProvisioningStatusResponseT( - this.status() - ); -} - - -unpackTo(_o: WifiProvisioningStatusResponseT): void { - _o.status = this.status(); -} -} - -export class WifiProvisioningStatusResponseT implements flatbuffers.IGeneratedObject { -constructor( - public status: WifiProvisioningStatus = WifiProvisioningStatus.NONE -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return WifiProvisioningStatusResponse.createWifiProvisioningStatusResponse(builder, - this.status - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { WifiProvisioningStatus } from '../../solarxr-protocol/rpc/wifi-provisioning-status.js'; + + +export class WifiProvisioningStatusResponse implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):WifiProvisioningStatusResponse { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsWifiProvisioningStatusResponse(bb:flatbuffers.ByteBuffer, obj?:WifiProvisioningStatusResponse):WifiProvisioningStatusResponse { + return (obj || new WifiProvisioningStatusResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsWifiProvisioningStatusResponse(bb:flatbuffers.ByteBuffer, obj?:WifiProvisioningStatusResponse):WifiProvisioningStatusResponse { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new WifiProvisioningStatusResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +status():WifiProvisioningStatus { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : WifiProvisioningStatus.NONE; +} + +static startWifiProvisioningStatusResponse(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addStatus(builder:flatbuffers.Builder, status:WifiProvisioningStatus) { + builder.addFieldInt8(0, status, WifiProvisioningStatus.NONE); +} + +static endWifiProvisioningStatusResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createWifiProvisioningStatusResponse(builder:flatbuffers.Builder, status:WifiProvisioningStatus):flatbuffers.Offset { + WifiProvisioningStatusResponse.startWifiProvisioningStatusResponse(builder); + WifiProvisioningStatusResponse.addStatus(builder, status); + return WifiProvisioningStatusResponse.endWifiProvisioningStatusResponse(builder); +} + +unpack(): WifiProvisioningStatusResponseT { + return new WifiProvisioningStatusResponseT( + this.status() + ); +} + + +unpackTo(_o: WifiProvisioningStatusResponseT): void { + _o.status = this.status(); +} +} + +export class WifiProvisioningStatusResponseT implements flatbuffers.IGeneratedObject { +constructor( + public status: WifiProvisioningStatus = WifiProvisioningStatus.NONE +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return WifiProvisioningStatusResponse.createWifiProvisioningStatusResponse(builder, + this.status + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/wifi-provisioning-status.ts b/protocol/typescript/src/solarxr-protocol/rpc/wifi-provisioning-status.ts index 3280ece4..8808c813 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/wifi-provisioning-status.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/wifi-provisioning-status.ts @@ -1,12 +1,13 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -export enum WifiProvisioningStatus { - NONE = 0, - SERIAL_INIT = 1, - PROVISIONING = 2, - CONNECTING = 3, - CONNECTION_ERROR = 4, - LOOKING_FOR_SERVER = 5, - COULD_NOT_FIND_SERVER = 6, - DONE = 7 -} +// automatically generated by the FlatBuffers compiler, do not modify + +export enum WifiProvisioningStatus { + NONE = 0, + SERIAL_INIT = 1, + PROVISIONING = 2, + OPTAINING_MAC_ADDRESS = 3, + CONNECTING = 4, + CONNECTION_ERROR = 5, + LOOKING_FOR_SERVER = 6, + COULD_NOT_FIND_SERVER = 7, + DONE = 8 +} diff --git a/schema/datatypes/datatypes.fbs b/schema/datatypes/datatypes.fbs index 189252d9..73103fc3 100644 --- a/schema/datatypes/datatypes.fbs +++ b/schema/datatypes/datatypes.fbs @@ -24,6 +24,11 @@ struct DeviceId { id: uint8; } +/// To be used inside unions +table DeviceIdTable { + id: DeviceId; +} + // TODO: Should this be a struct? // TODO: Should we disassociate trackers from their devices and just have `tracker_num`? diff --git a/schema/datatypes/hardware_info.fbs b/schema/datatypes/hardware_info.fbs index de33ecb5..6eb780f4 100644 --- a/schema/datatypes/hardware_info.fbs +++ b/schema/datatypes/hardware_info.fbs @@ -31,6 +31,23 @@ enum ImuType: uint16 { ICM42688, } +enum BoardType: uint16 { + UNKNOWN = 0, + SLIMEVR_LEGACY = 1, + SLIMEVR_DEV = 2, + NODEMCU = 3, + CUSTOM = 4, + WROOM32 = 5, + WEMOSD1MINI = 6, + TTGO_TBASE = 7, + ESP01 = 8, + SLIMEVR = 9, + LOLIN_C3_MINI = 10, + BEETLE32C3 = 11, + ES32C3DEVKITM1 = 12, +} + + /// 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 @@ -60,8 +77,12 @@ table HardwareInfo { ip_address: solarxr_protocol.datatypes.Ipv4Address; + /// A board type string that can be used to name a board. if possible you should use official board type board_type: string; + /// An enum listing all the board types supported by the firmware + official_board_type: BoardType; + /// A unique identifier for the device. Depending on the type of device it can be the MAC address, /// the IP address, or some other unique identifier like what USB device it is. hardware_identifier: string; diff --git a/schema/rpc.fbs b/schema/rpc.fbs index 54ac2693..863e67b7 100644 --- a/schema/rpc.fbs +++ b/schema/rpc.fbs @@ -69,6 +69,9 @@ union RpcMessage { UnknownDeviceHandshakeNotification, AddUnknownDeviceRequest, ForgetDeviceRequest, + FirmwareUpdateRequest, + FirmwareUpdateStatusResponse, + FirmwareUpdateStopQueuesRequest, } table RpcMessageHeader { @@ -367,11 +370,12 @@ enum WifiProvisioningStatus: uint8 { NONE = 0, SERIAL_INIT = 1, PROVISIONING = 2, - CONNECTING = 3, - CONNECTION_ERROR = 4, - LOOKING_FOR_SERVER = 5, - COULD_NOT_FIND_SERVER = 6, - DONE = 7, + OPTAINING_MAC_ADDRESS = 3, + CONNECTING = 4, + CONNECTION_ERROR = 5, + LOOKING_FOR_SERVER = 6, + COULD_NOT_FIND_SERVER = 7, + DONE = 8, } table WifiProvisioningStatusResponse { @@ -594,6 +598,123 @@ table SaveFileNotification { expected_filename: string; } +// ------------ Firmware tool ------------- + + +enum FirmwareUpdateStatus: uint8 { + /// The server is downloading the firmware + DOWNLOADING, + + /// The server is waiting for the tracker to be rebooted by the user + /// Note that is is not the same as REBOOTING + NEED_MANUAL_REBOOT, + + /// The server tries to authenticate with the MCU + AUTHENTICATING, + + /// The server is uploading the firmware to the Device + UPLOADING, + + /// The serial flasher tries to sync with the MCU + /// You can use this event to prompt the user to press the boot btn + SYNCING_WITH_MCU, + + /// The MCU is rebooting + REBOOTING, + + /// The server is provisioning the tracker + PROVISIONING, + + // The update process completed with success + DONE, + + /// Could not find the device + ERROR_DEVICE_NOT_FOUND, + + /// The operation timed out, > 1min + ERROR_TIMEOUT, + + /// The firmware download failed + ERROR_DOWNLOAD_FAILED, + + /// The server could not authenticate with the MCU + ERROR_AUTHENTICATION_FAILED, + + /// Could not upload the firmware to the MUC + ERROR_UPLOAD_FAILED, + + /// The provision of the tracker failed, usually wifi credentials + ERROR_PROVISIONING_FAILED, + + /// An unsupported Flashing method was used + ERROR_UNSUPPORTED_METHOD, + + ERROR_UNKNOWN, +} + +table SerialDevicePort { + port: string; +} + +union FirmwareUpdateDeviceId { + solarxr_protocol.datatypes.DeviceIdTable, + SerialDevicePort, +} + +table FirmwarePart { + /// Url of the firmware bin to download + url: string; + + /// Offset of the firmware, used when flashing to the mcu, it indicates where to write this file in memory + /// Will be ignored in the case of OTA flashing + offset: uint; +} + +union FirmwareUpdateMethod { + OTAFirmwareUpdate, + SerialFirmwareUpdate +} + +table FirmwareUpdateRequest { + method: FirmwareUpdateMethod; +} + +table OTAFirmwareUpdate { + /// id of the device, this refer to the actual DeviceId from the protocol + device_id: solarxr_protocol.datatypes.DeviceId; + + /// A table containing the url and offset of the firmware bin file + firmware_part: FirmwarePart; +} + +table SerialFirmwareUpdate { + /// id of the device, this refer to a serial port id + device_id: SerialDevicePort; + + /// Will make the server ask for the tracker to be manually rebooted by the user + /// after the tracker is done flashing + needManualReboot: bool; + + /// Credentials to provision after the flashing + /// Only used with Serial flashing, because OTA is already connected to the wifi + ssid: string; + password: string; + + /// A list of urls and offsets of the different firmware files to flash + firmware_part: [FirmwarePart]; +} + +table FirmwareUpdateStatusResponse { + device_id: FirmwareUpdateDeviceId; + status: FirmwareUpdateStatus; + + /// from 0 to 100 + progress: int8; +} + +// This will cancel all pending updates +table FirmwareUpdateStopQueuesRequest {} + /// Requests the current state of tracking pause table TrackingPauseStateRequest {}