diff --git a/SmartGlassesManager/SGM_android/SmartGlassesManager/src/main/cpp/liblc3/liblc3.cpp b/SmartGlassesManager/SGM_android/SmartGlassesManager/src/main/cpp/liblc3/liblc3.cpp index aef45440ca..31d6d96aa8 100644 --- a/SmartGlassesManager/SGM_android/SmartGlassesManager/src/main/cpp/liblc3/liblc3.cpp +++ b/SmartGlassesManager/SGM_android/SmartGlassesManager/src/main/cpp/liblc3/liblc3.cpp @@ -65,7 +65,10 @@ Java_com_augmentos_smartglassesmanager_cpp_L3cCpp_encodeLC3(JNIEnv *env, jclass int srHz = 16000; uint16_t samplesPerFrame = lc3_frame_samples(dtUs, srHz); uint16_t bytesPerFrame = samplesPerFrame * 2; - uint16_t encodedFrameSize = 20; + + // Calculate encoded frame size for 32 kbps at 10ms frames + // 32 kbps = 32,000 bits/sec = 320 bits per 10ms frame = 40 bytes per frame + uint16_t encodedFrameSize = (32000 * dtUs / 1000000) / 8; // 40 bytes int frameCount = pcmLength / bytesPerFrame; int outputSize = frameCount * encodedFrameSize; @@ -121,7 +124,10 @@ Java_com_augmentos_smartglassesmanager_cpp_L3cCpp_decodeLC3(JNIEnv *env, jclass uint16_t samplesPerFrame = lc3_frame_samples(dtUs, srHz); uint16_t bytesPerFrame = samplesPerFrame * 2; - uint16_t encodedFrameSize = 20; + + // Calculate encoded frame size for 32 kbps at 10ms frames + // 32 kbps = 32,000 bits/sec = 320 bits per 10ms frame = 40 bytes per frame + uint16_t encodedFrameSize = (32000 * dtUs / 1000000) / 8; // 40 bytes int outSize = (lc3Length / encodedFrameSize) * bytesPerFrame; unsigned char* outArray = (unsigned char*)malloc(outSize); diff --git a/android_core/app/build.gradle b/android_core/app/build.gradle index 93f8fc4289..b4963991ce 100644 --- a/android_core/app/build.gradle +++ b/android_core/app/build.gradle @@ -66,8 +66,9 @@ dependencies { implementation 'com.google.api.grpc:grpc-google-cloud-speech-v1p1beta1:2.6.0' implementation 'com.google.flogger:flogger:0.7.4' implementation 'com.google.flogger:flogger-system-backend:0.7.4' - implementation 'com.google.protobuf:protobuf-java:3.21.12' - implementation 'com.google.protobuf:protobuf-java-util:3.21.12' + implementation 'com.google.protobuf:protobuf-java:4.32.0' + implementation 'com.google.protobuf:protobuf-java-util:4.32.0' + implementation 'com.google.code.gson:gson:2.10.1' implementation 'joda-time:joda-time:2.12.2' implementation 'io.grpc:grpc-okhttp:1.53.0' implementation project(':AugmentOSLib') diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/AugmentosService.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/AugmentosService.java index bd7e7ca9bb..f2592c95bf 100755 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/AugmentosService.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/AugmentosService.java @@ -50,6 +50,7 @@ import com.augmentos.augmentos_core.augmentos_backend.WebSocketLifecycleManager; import com.augmentos.augmentos_core.augmentos_backend.WebSocketManager; import com.augmentos.augmentos_core.enums.SpeechRequiredDataType; +import com.augmentos.augmentos_core.enums.SpeechRequiredDataType; import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.BatteryLevelEvent; import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.ButtonPressEvent; import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.CaseEvent; @@ -66,10 +67,13 @@ import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.KeepAliveAckEvent; import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.MicModeChangedEvent; import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.RtmpStreamStatusEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.BleCommandReceiver; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.BleCommandSender; import com.augmentos.augmentos_core.smarterglassesmanager.supportedglasses.SmartGlassesDevice; import com.augmentos.augmentos_core.smarterglassesmanager.utils.BitmapJavaUtils; import com.augmentos.augmentos_core.smarterglassesmanager.utils.SmartGlassesConnectionState; import com.augmentos.augmentos_core.smarterglassesmanager.SmartGlassesManager; +import com.augmentos.augmentos_core.smarterglassesmanager.smartglassescommunicators.MentraNexSGC; import com.augmentos.augmentoslib.ThirdPartyEdgeApp; import com.augmentos.augmentos_core.comms.AugmentOsActionsCallback; import com.augmentos.augmentos_core.comms.AugmentosBlePeripheral; @@ -115,7 +119,11 @@ import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.DownloadProgressEvent; import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.InstallationProgressEvent; import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.GlassesSerialNumberEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.DisplayTextEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.DisplayImageEvent; import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.PairFailureEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.ProtobufSchemaVersionEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.ProtocolVersionResponseEvent; public class AugmentosService extends LifecycleService implements AugmentOsActionsCallback { public static final String TAG = "AugmentOSService"; @@ -166,7 +174,7 @@ private byte[] hexStringToByteArray(String hex) { int len = hex.length(); byte[] data = new byte[len / 2]; for (int i = 0; i < len; i += 2) { - data[i / 2] = (byte) ((Character.digit(hex.charAt(i), 16) << 4) + Character.digit(hex.charAt(i+1), 16)); + data[i / 2] = (byte) ((Character.digit(hex.charAt(i), 16) << 4) + Character.digit(hex.charAt(i + 1), 16)); } return data; } @@ -312,6 +320,8 @@ public void onServiceDisconnected(ComponentName className) { private String glassesSerialNumber = null; private String glassesStyle = null; private String glassesColor = null; + private String protobufSchemaVersion = "Unknown"; + private String glassesProtobufVersion = "Unknown"; // OTA progress tracking private DownloadProgressEvent.DownloadStatus downloadStatus = null; @@ -375,7 +385,7 @@ public void onTriggerSendStatusToAugmentOsManagerEvent(TriggerSendStatusToAugmen } @Subscribe - public void onGlassesHeadUpEvent(GlassesHeadUpEvent event){ + public void onGlassesHeadUpEvent(GlassesHeadUpEvent event) { ServerComms.getInstance().sendHeadPosition("up"); // BATTERY OPTIMIZATION: Directly call method instead of posting additional event if (contextualDashboardEnabled && smartGlassesManager != null) { @@ -388,7 +398,7 @@ public void onGlassesHeadUpEvent(GlassesHeadUpEvent event){ } @Subscribe - public void onGlassesHeadDownEvent(GlassesHeadDownEvent event){ + public void onGlassesHeadDownEvent(GlassesHeadDownEvent event) { ServerComms.getInstance().sendHeadPosition("down"); if (smartGlassesManager != null) smartGlassesManager.windowManager.hideDashboard(); @@ -438,6 +448,7 @@ public void onThirdPartyAppErrorEvent(ThirdPartyEdgeAppErrorEvent event) { public ArrayList notificationList = new ArrayList(); public JSONArray latestNewsArray = new JSONArray(); private int latestNewsIndex = 0; + @Subscribe public void displayGlassesDashboardEvent() throws JSONException { if (!contextualDashboardEnabled) { @@ -445,7 +456,7 @@ public void displayGlassesDashboardEvent() throws JSONException { } if (cachedDashboardDisplayObject != null) { - if(smartGlassesManager != null) { + if (smartGlassesManager != null) { Runnable dashboardDisplayRunnable = parseDisplayEventMessage(cachedDashboardDisplayObject); smartGlassesManager.windowManager.showDashboard(dashboardDisplayRunnable, @@ -453,7 +464,7 @@ public void displayGlassesDashboardEvent() throws JSONException { ); } - if(blePeripheral != null) { + if (blePeripheral != null) { JSONObject newMsg = generateTemplatedJsonFromServer(cachedDashboardDisplayObject); blePeripheral.sendGlassesDisplayEventToManager(newMsg); } @@ -471,7 +482,7 @@ public void displayGlassesDashboardEvent() throws JSONException { // Battery, date/time, etc. String leftHeaderLine = String.format(Locale.getDefault(), "◌ %s %s, %d%%\n", currentTime, currentDate, batteryLevel); - String connString = webSocketStatus == null ? "Not connected" : webSocketStatus.name();; + String connString = webSocketStatus == null ? "Not connected" : webSocketStatus.name(); if (smartGlassesManager != null) { smartGlassesManager.windowManager.showDashboard(() -> @@ -593,7 +604,7 @@ public void onCreate() { // Automatically connect to glasses on service start String preferredWearable = SmartGlassesManager.getPreferredWearable(this); - if(!preferredWearable.isEmpty()) { + if (!preferredWearable.isEmpty()) { SmartGlassesDevice preferredDevice = SmartGlassesManager.getSmartGlassesDeviceFromModelName(preferredWearable); if (preferredDevice != null) { // Initialize SmartGlassesManager @@ -704,7 +715,7 @@ public int onStartCommand(Intent intent, int flags, int startId) { if (ContextCompat.checkSelfPermission(this, Manifest.permission.BLUETOOTH_CONNECT) == PackageManager.PERMISSION_GRANTED) { currentForegroundServiceType = ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC | - ServiceInfo.FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE; + ServiceInfo.FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE; startForeground(AUGMENTOS_NOTIFICATION_ID, buildSharedForegroundNotification(this), currentForegroundServiceType); @@ -935,8 +946,9 @@ public void onGlassesDisplayPowerEvent(GlassesDisplayPowerEvent event) { /** * Send a dedicated WiFi status change event to the AugmentOS manager + * * @param isConnected Whether the glasses are connected to WiFi - * @param ssid The SSID of the connected network (if connected) + * @param ssid The SSID of the connected network (if connected) */ private void sendWifiStatusChangeEvent(boolean isConnected, String ssid, String localIp) { try { @@ -1061,7 +1073,7 @@ public void onGlassesWifiScanResultEvent(GlassesWifiScanResultEvent event) { // Send to the manager app if (blePeripheral != null) { blePeripheral.sendDataToAugmentOsManager(wifiScanResultObj.toString()); - //blePeripheral.sendNotifyManager("Found " + event.networks.size() + " WiFi networks", "success"); + blePeripheral.sendNotifyManager("Found " + event.networks.size() + " WiFi networks", "success"); } } catch (JSONException e) { Log.e(TAG, "Error creating WiFi scan results JSON", e); @@ -1203,19 +1215,19 @@ public void onSmartRingButtonEvent(SmartRingButtonOutputEvent event) { long time = event.timestamp; boolean isDown = event.isDown; - if(!isDown || buttonId != 1) return; - Log.d(TAG,"DETECTED BUTTON PRESS W BUTTON ID: " + buttonId); + if (!isDown || buttonId != 1) return; + Log.d(TAG, "DETECTED BUTTON PRESS W BUTTON ID: " + buttonId); currTime = System.currentTimeMillis(); ServerComms.getInstance().sendButtonPress("ring", "single"); //Detect double presses - if(isDown && currTime - lastPressed < doublePressTimeConst) { - Log.d(TAG, "Double tap - CurrTime-lastPressed: "+ (currTime-lastPressed)); + if (isDown && currTime - lastPressed < doublePressTimeConst) { + Log.d(TAG, "Double tap - CurrTime-lastPressed: " + (currTime - lastPressed)); ServerComms.getInstance().sendButtonPress("ring", "double"); } - if(isDown) { + if (isDown) { lastPressed = System.currentTimeMillis(); } } @@ -1306,8 +1318,9 @@ public int compare(JSONObject a, JSONObject b) { } public Runnable parseDisplayEventMessage(JSONObject rawMsg) { - if(isInitializing) { - return () -> {}; + if (isInitializing) { + return () -> { + }; } try { @@ -1492,12 +1505,12 @@ public JSONObject extractDashboardTopLineInfo(String topLine) { } @Subscribe - public void onGlassesBluetoothSearchDiscoverEvent(GlassesBluetoothSearchDiscoverEvent event){ - blePeripheral.sendGlassesBluetoothDiscoverResultToManager(event.modelName, event.deviceName); + public void onGlassesBluetoothSearchDiscoverEvent(GlassesBluetoothSearchDiscoverEvent event) { + blePeripheral.sendGlassesBluetoothDiscoverResultToManager(event.modelName, event.deviceName, event.deviceAddress); } @Subscribe - public void onGlassesBluetoothSearchStopEvent(GlassesBluetoothSearchStopEvent event){ + public void onGlassesBluetoothSearchStopEvent(GlassesBluetoothSearchStopEvent event) { blePeripheral.sendGlassesBluetoothStopToManager(event.modelName); } @@ -1507,6 +1520,16 @@ public void onNewScreenImageEvent(NewScreenImageEvent event) { smartGlassesManager.windowManager.showAppLayer("server", () -> smartGlassesManager.sendBitmap(event.bmp), -1); } + @Subscribe + public void onBleCommandReceiver(BleCommandReceiver event) { + blePeripheral.sendBleCommandReceiverEventToManager(event); + } + + @Subscribe + public void onBleCommandSender(BleCommandSender event) { + blePeripheral.sendBleCommandSenderEventToManager(event); + } + private void startNotificationService() { Intent notificationServiceIntent = new Intent(this, MyNotificationListeners.class); startService(notificationServiceIntent); @@ -1577,6 +1600,8 @@ public JSONObject generateStatusJson() { coreInfo.put("metric_system_enabled", this.metricSystemEnabled); coreInfo.put("power_saving_mode", SmartGlassesManager.getPowerSavingMode(this)); coreInfo.put("is_searching", getIsSearchingForGlasses()); + coreInfo.put("protobuf_schema_version", this.protobufSchemaVersion); + coreInfo.put("glasses_protobuf_version", this.glassesProtobufVersion); status.put("core_info", coreInfo); //Log.d(TAG, "PREFER - Got default wearable: " + SmartGlassesManager.getPreferredWearable(this)); @@ -1590,13 +1615,13 @@ public JSONObject generateStatusJson() { connectedGlasses.put("glasses_color", glassesColor); } - if(smartGlassesManager != null && smartGlassesManager.getConnectedSmartGlasses() != null) { + if (smartGlassesManager != null && smartGlassesManager.getConnectedSmartGlasses() != null) { connectedGlasses.put("model_name", smartGlassesManager.getConnectedSmartGlasses().deviceModelName); - connectedGlasses.put("battery_level", (batteryLevel == null) ? -1: batteryLevel); //-1 if unknown - connectedGlasses.put("case_battery_level", (caseBatteryLevel == null) ? -1: caseBatteryLevel); //-1 if unknown - connectedGlasses.put("case_charging", (caseCharging == null) ? false: caseCharging); - connectedGlasses.put("case_open", (caseOpen == null) ? false: caseOpen); - connectedGlasses.put("case_removed", (caseRemoved == null) ? true: caseRemoved); + connectedGlasses.put("battery_level", (batteryLevel == null) ? -1 : batteryLevel); //-1 if unknown + connectedGlasses.put("case_battery_level", (caseBatteryLevel == null) ? -1 : caseBatteryLevel); //-1 if unknown + connectedGlasses.put("case_charging", (caseCharging == null) ? false : caseCharging); + connectedGlasses.put("case_open", (caseOpen == null) ? false : caseOpen); + connectedGlasses.put("case_removed", (caseRemoved == null) ? true : caseRemoved); // Add Bluetooth device name if available String bluetoothName = smartGlassesManager.getConnectedSmartGlassesBluetoothName(); @@ -1805,7 +1830,7 @@ public void onDashboardDisplayEvent(JSONObject dashboardDisplayData) { @Override public void onConnectionError(String errorMsg) { - if(blePeripheral != null) { + if (blePeripheral != null) { blePeripheral.sendNotifyManager("Connection error: " + errorMsg, "error"); } } @@ -2123,7 +2148,7 @@ private void upgradeForegroundServiceType() { // Check if we're already using connectedDevice type int desiredType = ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC | - ServiceInfo.FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE; + ServiceInfo.FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE; if (currentForegroundServiceType == desiredType) { Log.d(TAG, "Already using connectedDevice service type"); @@ -2222,8 +2247,8 @@ public void handleMicModeChangedEvent(MicModeChangedEvent event) { } @Override - public void connectToWearable(String modelName, String deviceName) { - Log.d("AugmentOsService", "Connecting to wearable: " + modelName + ". DeviceName: " + deviceName + "."); + public void connectToWearable(String modelName, String deviceName, String deviceAddress) { + Log.d("AugmentOsService", "Connecting to wearable: " + modelName + ". DeviceName: " + deviceName + ".deviceAddress:" + deviceAddress); SmartGlassesDevice device = SmartGlassesManager.getSmartGlassesDeviceFromModelName(modelName); if (device == null) { @@ -2235,8 +2260,7 @@ public void connectToWearable(String modelName, String deviceName) { if (!deviceName.isEmpty()) { if (modelName.contains("Even Realities")) { savePreferredG1DeviceId(this, deviceName); - } - else if (modelName.equals("Mentra Live")) { + } else if (modelName.equals("Mentra Live")) { // Save Mentra Live device name in its preferences SharedPreferences mentraPrefs = getSharedPreferences("MentraLivePrefs", Context.MODE_PRIVATE); mentraPrefs.edit().putString("LastConnectedDeviceName", deviceName).apply(); @@ -2250,6 +2274,8 @@ else if (modelName.equals("Brilliant Labs Frame")) { } } + device.setDeviceAddress(deviceAddress); + executeOnceSmartGlassesManagerReady(() -> { smartGlassesManager.connectToSmartGlasses(device); sendStatusToAugmentOsManager(); @@ -2282,6 +2308,7 @@ public void disconnectWearable(String wearableId) { public void forgetSmartGlasses() { Log.d("AugmentOsService", "Forgetting wearable"); SmartGlassesManager.savePreferredWearable(this, ""); + SmartGlassesManager.savePreferredWearableAddress(this, ""); deleteEvenSharedPreferences(this); // Clear MentraLive device name preference @@ -2418,7 +2445,7 @@ public void setMetricSystemEnabled(boolean metricSystemEnabled) { @Override public void setPowerSavingMode(boolean powerSavingMode) { SmartGlassesManager.savePowerSavingMode(this, powerSavingMode); - if(smartGlassesManager != null && smartGlassesManager.getConnectedSmartGlasses() != null) { + if (smartGlassesManager != null && smartGlassesManager.getConnectedSmartGlasses() != null) { blePeripheral.sendNotifyManager(this.getResources().getString(R.string.SETTING_WILL_APPLY_ON_NEXT_GLASSES_CONNECTION), "success"); } sendStatusToBackend(); @@ -2464,7 +2491,7 @@ public void requestAppInfo(String packageNameToGetDetails) { } @Override - public void handleNotificationData(JSONObject notificationData){ + public void handleNotificationData(JSONObject notificationData) { try { if (notificationData != null) { String appName = notificationData.optString("app_name"); @@ -2618,7 +2645,7 @@ public void setGlassesWifiCredentials(String ssid, String password) { ); // Notify manager app - //blePeripheral.sendNotifyManager("WiFi credentials sent to glasses", "success"); + blePeripheral.sendNotifyManager("WiFi credentials sent to glasses", "success"); sendStatusToAugmentOsManager(); @@ -2775,7 +2802,7 @@ public void setButtonCameraLed(boolean enabled) { @Override public void setAuthSecretKey(String uniqueUserId, String authSecretKey) { Log.d("AugmentOsService", "Setting auth secret key: " + authSecretKey); - if (authHandler.getCoreToken() == null ||!authHandler.getCoreToken().equals(authSecretKey)) { + if (authHandler.getCoreToken() == null || !authHandler.getCoreToken().equals(authSecretKey)) { authHandler.setAuthSecretKey(authSecretKey); ServerComms.getInstance().disconnectWebSocket(); ServerComms.getInstance().connectWebSocket(authHandler.getCoreToken()); @@ -2844,7 +2871,7 @@ public void updateAppSettings(String targetApp, JSONObject settings) { while (keys.hasNext()) { String key = keys.next(); Object value = settings.get(key); - if(!app.updateSetting(this, key, value)) { + if (!app.updateSetting(this, key, value)) { allSuccess = false; } } @@ -2866,7 +2893,7 @@ private void cleanupAllResources() { Log.d(TAG, "Cleaning up all resources and connections"); // Stop all running apps - if(edgeAppSystem != null) { + if (edgeAppSystem != null) { edgeAppSystem.stopAllThirdPartyApps(); } @@ -2877,12 +2904,12 @@ private void cleanupAllResources() { } // Clean up calendar system - if(calendarSystem != null) { + if (calendarSystem != null) { calendarSystem.cleanup(); } // Clean up screen capture resources - if(screenCaptureRunnable != null) { + if (screenCaptureRunnable != null) { screenCaptureHandler.removeCallbacks(screenCaptureRunnable); } if (virtualDisplay != null) { @@ -2936,7 +2963,7 @@ private void cleanupAllResources() { blePeripheral.destroy(); } - if(edgeAppSystem != null) { + if (edgeAppSystem != null) { edgeAppSystem.destroy(); } } @@ -2985,16 +3012,17 @@ public void onAppStarted(String packageName) { // Check if glasses are disconnected but there is a saved pair, initiate connection if (smartGlassesManager != null && - smartGlassesManager.getSmartGlassesConnectState() == SmartGlassesConnectionState.DISCONNECTED) { + smartGlassesManager.getSmartGlassesConnectState() == SmartGlassesConnectionState.DISCONNECTED) { String preferredWearable = SmartGlassesManager.getPreferredWearable(this); + final String preferredWearableAddress = SmartGlassesManager.getPreferredWearableAddress(this); Log.d(TAG, "Found preferred wearable: " + preferredWearable); if (preferredWearable != null && !preferredWearable.isEmpty()) { SmartGlassesDevice preferredDevice = SmartGlassesManager.getSmartGlassesDeviceFromModelName(preferredWearable); if (preferredDevice != null) { Log.d(TAG, "Auto-connecting to glasses due to app start: " + preferredWearable); - + preferredDevice.setDeviceAddress(preferredWearable); // Always run on main thread to avoid threading issues new Handler(Looper.getMainLooper()).post(() -> { // Use executeOnceSmartGlassesManagerReady to ensure proper connection flow @@ -3020,7 +3048,7 @@ public void onAppStarted(String packageName) { Log.d(TAG, "SmartGlassesManager is null, cannot check connection state for auto-reconnection"); } else { Log.d(TAG, "Glasses already connected or connecting, skipping auto-reconnection. Current state: " + - smartGlassesManager.getSmartGlassesConnectState()); + smartGlassesManager.getSmartGlassesConnectState()); } // Send notification to manager app about app start (existing functionality) @@ -3170,8 +3198,8 @@ public void onAudioStopRequest(JSONObject audioStopParams) { @org.greenrobot.eventbus.Subscribe(threadMode = org.greenrobot.eventbus.ThreadMode.MAIN) public void onDownloadProgressEvent(DownloadProgressEvent event) { Log.d(TAG, "🎯 $#$# EVENT RECEIVED! Download progress: " + event.getStatus() + - " - " + event.getProgress() + "% (" + - event.getBytesDownloaded() + "/" + event.getTotalBytes() + " bytes)"); + " - " + event.getProgress() + "% (" + + event.getBytesDownloaded() + "/" + event.getTotalBytes() + " bytes)"); // Store download progress information downloadStatus = event.getStatus(); @@ -3210,7 +3238,7 @@ public void onDownloadProgressEvent(DownloadProgressEvent event) { @org.greenrobot.eventbus.Subscribe(threadMode = org.greenrobot.eventbus.ThreadMode.MAIN) public void onInstallationProgressEvent(InstallationProgressEvent event) { Log.d(TAG, "🔧 Received installation progress: " + event.getStatus() + - " - APK: " + event.getApkPath()); + " - APK: " + event.getApkPath()); // Store installation progress information installationStatus = event.getStatus(); @@ -3244,6 +3272,38 @@ public void onInstallationProgressEvent(InstallationProgressEvent event) { } } + // Event handler for heartbeat sent + @org.greenrobot.eventbus.Subscribe(threadMode = org.greenrobot.eventbus.ThreadMode.MAIN) + public void onHeartbeatSentEvent(com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.HeartbeatSentEvent event) { + Log.d(TAG, "💓 Heartbeat sent at: " + event.timestamp); + + if (blePeripheral != null) { + try { + JSONObject data = new JSONObject(); + data.put("heartbeat_sent", new JSONObject().put("timestamp", event.timestamp)); + blePeripheral.sendDataToAugmentOsManager(data.toString()); + } catch (Exception e) { + Log.e(TAG, "Error sending heartbeat sent event to manager", e); + } + } + } + + // Event handler for heartbeat received + @org.greenrobot.eventbus.Subscribe(threadMode = org.greenrobot.eventbus.ThreadMode.MAIN) + public void onHeartbeatReceivedEvent(com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.HeartbeatReceivedEvent event) { + Log.d(TAG, "💓 Heartbeat received at: " + event.timestamp); + + if (blePeripheral != null) { + try { + JSONObject data = new JSONObject(); + data.put("heartbeat_received", new JSONObject().put("timestamp", event.timestamp)); + blePeripheral.sendDataToAugmentOsManager(data.toString()); + } catch (Exception e) { + Log.e(TAG, "Error sending heartbeat received event to manager", e); + } + } + } + /** * Clear OTA progress data to hide the progress section */ @@ -3280,6 +3340,32 @@ public void onGlassesSerialNumberEvent(GlassesSerialNumberEvent event) { sendStatusToAugmentOsManager(); } + @Subscribe(threadMode = ThreadMode.MAIN) + public void onProtobufSchemaVersionEvent(ProtobufSchemaVersionEvent event) { + Log.d(TAG, "Received protobuf schema version event: " + event.getBuildInfo()); + + // Store the protobuf version in the service state + this.protobufSchemaVersion = event.getBuildInfo(); + + // Send updated status to React Native (includes the new protobuf version) + sendStatusToAugmentOsManager(); + + Log.d(TAG, "Updated protobuf schema version in core status: " + this.protobufSchemaVersion); + } + + @Subscribe(threadMode = ThreadMode.MAIN) + public void onProtocolVersionResponseEvent(ProtocolVersionResponseEvent event) { + Log.d(TAG, "Received glasses protobuf version response event: " + event.getFormattedVersion()); + + // Store the glasses protobuf version in the service state + this.glassesProtobufVersion = event.getFormattedVersion(); + + // Send updated status to React Native (includes the new glasses protobuf version) + sendStatusToAugmentOsManager(); + + Log.d(TAG, "Updated glasses protobuf version in core status: " + this.glassesProtobufVersion); + } + @Override public void simulateHeadPosition(String position) { Log.d(TAG, "Simulating head position: " + position); @@ -3302,6 +3388,72 @@ public void simulateButtonPress(String buttonId, String pressType) { EventBus.getDefault().post(new ButtonPressEvent(deviceModel, buttonId, pressType)); } + @Override + public void onDisplayTextNotified(String text, int size, int x, int y) { + Log.d(TAG, "onDisplayTextNotified text: " + text + " size:" + size + " x:" + x + " y:" + y); + + EventBus.getDefault().post(new DisplayTextEvent(text, size, x, y)); + } + + @Override + public void onDisplayImageNotified(String imageType, String imageSize) { + Log.d(TAG, "onDisplayImageNotified imageType: " + imageType + ", imageSize: " + imageSize); + EventBus.getDefault().post(new DisplayImageEvent(imageType, imageSize)); + } + + @Override + public void clearDisplay() { + Log.d(TAG, "clearDisplay called"); + if (smartGlassesManager != null) { + smartGlassesManager.clearDisplay(); + } else { + Log.e(TAG, "SmartGlassesManager is null, cannot clear display"); + } + } + + @Override + public void setLc3AudioEnabled(boolean enabled) { + Log.d(TAG, "setLc3AudioEnabled called: " + enabled); + if (smartGlassesManager != null && + smartGlassesManager.getSmartGlassesRepresentative() != null && + smartGlassesManager.getSmartGlassesRepresentative().smartGlassesCommunicator != null && + smartGlassesManager.getSmartGlassesRepresentative().smartGlassesCommunicator instanceof MentraNexSGC) { + ((MentraNexSGC) smartGlassesManager.getSmartGlassesRepresentative().smartGlassesCommunicator).setLc3AudioEnabled(enabled); + } else { + Log.e(TAG, "SmartGlassesManager is null or not connected to MentraNexSGC, cannot control LC3 audio"); + } + } + + @Override + public void setVadEnabled(boolean enabled) { + Log.d(TAG, "setVadEnabled called: " + enabled); + if (smartGlassesManager != null) { + smartGlassesManager.setVadEnabled(enabled); + } else { + Log.e(TAG, "SmartGlassesManager is null or not connected to MentraNexSGC, cannot control VAD"); + } + } + + @Override + public void setVadSensitivity(int sensitivity) { + Log.d(TAG, "setVadSensitivity called: " + sensitivity); + if (smartGlassesManager != null) { + smartGlassesManager.setVadSensitivity(sensitivity); + } else { + Log.e(TAG, "SmartGlassesManager is null or not connected to MentraNexSGC, cannot control VAD sensitivity"); + } + } + + @Override + public void requestVadConfig() { + Log.d(TAG, "requestVadConfig called"); + if (smartGlassesManager != null) { + smartGlassesManager.requestVadConfig(); + } else { + Log.e(TAG, "SmartGlassesManager is null or not connected to MentraNexSGC, cannot control VAD"); + } + } + @Override public void startBufferRecording() { Log.d(TAG, "Starting buffer recording on smart glasses"); diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/audio/ByteUtilAudioPlayer.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/audio/ByteUtilAudioPlayer.java new file mode 100644 index 0000000000..a752f03a68 --- /dev/null +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/audio/ByteUtilAudioPlayer.java @@ -0,0 +1,655 @@ +package com.augmentos.augmentos_core.audio; + +import android.util.Log; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.UnsupportedEncodingException; +import java.util.Calendar; + +public class ByteUtilAudioPlayer { + + //"0123" -> byte{1,23} + public static byte[] digitString2DigitByte(String str) { + if(str == null) + return null; + boolean bOdd = false; + int len = str.length(); + if(len %2 == 1) + { + bOdd = true; + len ++; + } + byte [] bts = new byte[len/2]; + if(bOdd) + { + bts[0] = (byte)(str.charAt(0) - '0'); + } + int i = bOdd ? 1 : 0; + int n = 0; + + for(;i < len ;i+=2) + { + n = (str.charAt(i) - '0') *10 + (str.charAt(i+1) - '0'); + bts[(i+1)/2] = (byte)n; + } + return bts; + } + + //"01230A" -> byte{0x01,0x23,0x0A} + public static byte[] digitString2HexByte(String str2) { + if(str2 == null) + return null; + String str = str2.toUpperCase(); + //String str = str2.toLowerCase(); + boolean bOdd = false; + int len = str.length(); + if(len %2 == 1) + { + bOdd = true; + len ++; + } + byte [] bts = new byte[len/2]; + if(bOdd) + { + bts[0] = (byte)(str.charAt(0) - '0'); + } + int i = bOdd ? 1 : 0; + int n = 0,low , high; + + for(;i < len ;i+=2) + { + low = str.charAt(i+1); + high = str.charAt(i); + if(low >= 'A') + { + low = low - 'A' + 10; + } + else + { + low -= '0'; + } + + if(high >= 'A') + { + high = high - 'A' + 10; + } + else + { + high -= '0'; + } + n = high *16 + low; + bts[(i+1)/2] = (byte)n; + } + return bts; + } + + public static byte regByte(byte ss) { + return (ss < 0) ? (byte)(ss & 0xFF) :ss; + } + + public static String bytetoHexString(byte ss) { + int is = (ss < 0) ? (ss &0xFF) :ss; + return String.format("%02x", is).toUpperCase(); + } + + public static String intToHexString(int num,int bit) { + //return Integer.toHexString(num).toUpperCase(); + return String.format("%0"+bit+"x", num).toUpperCase(); + } + + public static String intToString(int num,int bit) { + //return Integer.toHexString(num).toUpperCase(); + return String.format("%0"+bit+"d", num).toUpperCase(); + } + + public static int hexStringToint(String str) { + int num = 0; + String content = str.toUpperCase(); + char [] chs = content.toCharArray(); + for(int i = 0;i< content.length();i++) + { + num *= 16; + if(chs[i] >= '0' && chs[i] <= '9') + num += chs[i] - '0'; + else + num += chs[i] -'A' + 10; + } + return num; + } + public static String outputHexString(byte [] flags, int startpos, int length) + { + return getHexString_by_Bytes_dot(flags,startpos, length); + } + public static boolean string2Bytes(String str , byte[] dest, int destoffset) + { + if(str == null || dest == null || str.length() < 1) + { + return false; + } + + if(str.length() + destoffset > dest.length) + { + Log.v("ByteUtilAudioPlayer","error string2Bytes src.length="+str.length()+",dest.length="+dest.length+",destoffset="+destoffset); + return false; + } + + for(int i = 0; i < str.length(); i++) + { + dest[destoffset + i] = (byte)(str.charAt(i)); + } + + return true; + } + + + public static byte[] String2bytes(String str,int len) + { + if(str == null || str.length() < len) + return null; + byte [] res = new byte[len]; + int n = 0; + for(int i = 0; i < len ;i++) + { + res[i] = (byte)(str.charAt(i)); + } + return res; + } + + public static byte[] String2bytes(String str) + { + if(str == null || str.length() < 1) + return null; + return str.getBytes(); + } + + public static String bytes2String(byte [] bytes) + { + if(bytes == null) + return null; + return new String(bytes); + } + + public static String bytes2String(byte [] bytes, int offset, int len) + { + if(bytes == null) + return null; + return new String(bytes,offset, len); + } + + public static String bytes2String(byte [] bytes, int offset, int len,String encode) + { + if(bytes == null) + return null; + + String body = null; + try { + body = new String(bytes,offset, len,encode); + body = body.trim(); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + return body; + } + + public static boolean copyBytes(byte []src, int offset, int len , byte[] dest, int destoffset) + { + //BLog.v(CTConst.TAG,"copyBytes src="+src+",dest="+dest+",offset="+offset+",len="+len+",destoffset="+destoffset); + if(src == null || dest == null) + { + return false; + } + + if(src.length < offset + len || dest.length < destoffset +len) + { + Log.v("ByteUtilAudioPlayer","error copyBytes src.length="+src.length+",dest.length="+dest.length); + return false; + } + for(int i = 0; i= 'A' && c1 <= 'F') + { + v1 -= 'A' +10; + } + else + { + v1 -= 0x30; + } + + if(c2 >= 'A' && c2 <= 'F') + { + v2 -= 'A' +10; + } + else + { + v2 -= 0x30; + } + bts[i] = (byte)(v1 *16 + v2); + } + } + return bts; + } + public static String getHexString_by_Bytes_dot(byte[] bts) + { + if(bts == null) + { + return null; + } + StringBuffer sb = new StringBuffer(); + for(int i = 0;i< bts.length;i++) + { + sb.append(ByteUtilAudioPlayer.bytetoHexString(bts[i])); + if(i != bts.length - 1) + sb.append(","); + } + return sb.toString(); + } + + public static String getHexString_by_Bytes_dot(byte[] bts, int offset, int length) + { + if(bts == null) + { + return null; + } + int len = length > bts.length ? bts.length : length; + StringBuffer sb = new StringBuffer(); + for(int i = 0;i< len;i++) + { + sb.append(ByteUtilAudioPlayer.bytetoHexString(bts[offset + i])); + if(i != len - 1) + sb.append(","); + } + return sb.toString(); + } + + public static void int2Bytes(int value, int toByteLen,byte[]dest,int offset) { + if(dest == null || offset + toByteLen > dest.length) + return; + int v = value; + for(int i = toByteLen - 1; i >= 0; i--) + { + dest[offset + i] = (byte)(v & 0xFF); + v = (v >> 8); + } + } + + public static int bytes2Int(byte []src, int offset, int len) + { + if(src == null || offset + len > src.length) + { + return 0; + } + int v = 0; + for(int i = offset ;i < offset + len; i++) + { + v = (v <<8); + v += (src[i] < 0) ? (256 + src[i]) : src[i]; + } + + return v; + } + + public static int byte2Int(byte ss) { + int is = (ss < 0) ? (ss &0xFF) :ss; + return is; + } + + public static int byte2Int(byte hightbyte,byte lowbyte) + { + int n1 = (lowbyte < 0) ? (256+lowbyte):lowbyte; + int n2 = (hightbyte < 0) ? (256+hightbyte):hightbyte; + //Log.v(CTConst.TAG,"lowbyte="+n1); + //Log.v(CTConst.TAG,"highbyte="+n2); + return n1 +(n2 << 8); + } + + public static byte[] long2Byte(long milltime) + { + byte [] bys = new byte[8]; + long lnvalue = milltime; + for (int i = 7; i >= 0; i--) { + bys[i] = (byte) (lnvalue & 0xFF); + lnvalue = lnvalue >> 8; + } + return bys; + } + + public static int BCD_2_Decimal(byte ss)//param ss is hex + { + int is = (ss < 0) ? (ss &0xFF) :ss; + return BCD_2_Decimal(is); + } + + public static int BCD_2_Decimal(int ss) //param ss is hex,should return decimal + { + return ss - (ss >> 4) *6; + } + + public static int Decimal_2_BCD(byte ss) + { + int is = (ss < 0) ? (ss &0xFF) :ss; + return Decimal_2_BCD(is); + } + + public static int Decimal_2_BCD(int ss)// param ss is decimal, should return hex ,ss should be less than 0xFF + { + return (ss+(ss / 10)*6); + } + + public static int DecimalBig_2_BCD(int ss)// param ss is decimal, should return hex + { + int t = ss; + int h4 = ss % 1000000; + t = h4 *1000000; + int h3 = (ss - t) % 10000; + t += h3 * 10000; + int h2 = (ss - t) % 100; + t += h2 * 100; + int h1 = ss - t; + return (Decimal_2_BCD(h4) << 24) + (Decimal_2_BCD(h3) << 16) + (Decimal_2_BCD(h2) << 8) + Decimal_2_BCD(h1); + } + + public static String BCD_2_String(byte [] data, int offset, int len) + { + if(data == null || data.length < offset + len) + { + return null; + } + StringBuffer sb = new StringBuffer(); + int v = 0; + for(int i = offset;i < offset + len;i++) + { + v = BCD_2_Decimal(data[i]); + sb.append(intToString(v,2)); + } + return sb.toString(); + } + + public static int BCD_2_Int(byte [] data, int offset, int len) + { + if(data == null || data.length < offset + len) + { + return 0; + } + StringBuffer sb = new StringBuffer(); + int v = 0; + for(int i = offset;i < offset + len;i++) + { + v = BCD_2_Decimal(data[i]); + sb.append(intToString(v,2)); + } + return Integer.parseInt(sb.toString()); + } + + public static byte[] subBytes(byte [] data, int offset, int len) + { + if(data == null || data.length < offset + len) + { + return null; + } + byte [] bs = new byte[len]; + copyBytes(data, offset, len, bs, 0); + return bs; + } + + public static String packBytes2String(byte [] flags, int startpos, int endpos) + { + if(flags == null) + return null; + StringBuffer sb = new StringBuffer(); + int n = 0; + for(int i = startpos; i < endpos; i++) + { + n = flags[i]<0?(256+flags[i]):flags[i]; + sb.append(n); + if(i != endpos-1) + { + sb.append(","); + } + } + return sb.toString(); + } + + public static byte[] decodeString2bytes(String msgflag,int bytelength) + { + byte [] res = new byte[bytelength]; + int n = 0; + boolean bValidMsgFlag = false; + if(msgflag != null && !msgflag.equals("")) + { + String [] flags = msgflag.split(","); + if(flags != null && flags.length == bytelength) + { + bValidMsgFlag = true; + for(int i=0;i { + try { + audioTrack.play(); + + // Write the PCM data + int written = audioTrack.write(pcmData, 0, pcmData.length); + + if (written < 0) { + Log.e(TAG, "Error writing audio data: " + written); + } else { + Log.d(TAG, "Successfully wrote " + written + " bytes of audio data"); + } + + // Wait for playback to complete + audioTrack.stop(); + + } catch (Exception e) { + Log.e(TAG, "Error during playback", e); + } finally { + isPlaying.set(false); + } + }); + + playbackThread.start(); + return true; + } + + /** + * Play PCM audio data with streaming (for real-time audio) + * + * @param pcmData Raw PCM audio data as byte array + * @return true if data was written successfully + */ + public boolean streamPCMData(byte[] pcmData) { + if (!isInitialized.get() || audioTrack == null) { + Log.e(TAG, "AudioTrack not initialized"); + return false; + } + + if (!isPlaying.get()) { + // Start playback if not already playing + audioTrack.play(); + isPlaying.set(true); + } + + try { + int written = audioTrack.write(pcmData, 0, pcmData.length); + + if (written < 0) { + Log.e(TAG, "Error writing audio data: " + written); + return false; + } + + return true; + } catch (Exception e) { + Log.e(TAG, "Error streaming audio data", e); + return false; + } + } + + /** + * Play PCM audio data from short array (16-bit samples) + * + * @param pcmData PCM audio data as short array + * @return true if playback started successfully + */ + public boolean playPCMData(short[] pcmData) { + if (!isInitialized.get() || audioTrack == null) { + Log.e(TAG, "AudioTrack not initialized"); + return false; + } + + if (isPlaying.get()) { + Log.w(TAG, "Already playing audio"); + return false; + } + + isPlaying.set(true); + + playbackThread = new Thread(() -> { + try { + audioTrack.play(); + + // Write the PCM data + int written = audioTrack.write(pcmData, 0, pcmData.length); + + if (written < 0) { + Log.e(TAG, "Error writing audio data: " + written); + } else { + Log.d(TAG, "Successfully wrote " + written + " samples of audio data"); + } + + // Wait for playback to complete + audioTrack.stop(); + + } catch (Exception e) { + Log.e(TAG, "Error during playback", e); + } finally { + isPlaying.set(false); + } + }); + + playbackThread.start(); + return true; + } + + /** + * Stream PCM audio data from short array (16-bit samples) + * + * @param pcmData PCM audio data as short array + * @return true if data was written successfully + */ + public boolean streamPCMData(short[] pcmData) { + if (!isInitialized.get() || audioTrack == null) { + Log.e(TAG, "AudioTrack not initialized"); + return false; + } + + if (!isPlaying.get()) { + // Start playback if not already playing + audioTrack.play(); + isPlaying.set(true); + } + + try { + int written = audioTrack.write(pcmData, 0, pcmData.length); + + if (written < 0) { + Log.e(TAG, "Error writing audio data: " + written); + return false; + } + + return true; + } catch (Exception e) { + Log.e(TAG, "Error streaming audio data", e); + return false; + } + } + + /** + * Convert byte array to short array (for 16-bit PCM) + * + * @param byteData Raw PCM byte data + * @return Short array representation + */ + public static short[] bytesToShorts(byte[] byteData) { + short[] shortData = new short[byteData.length / 2]; + ByteBuffer.wrap(byteData).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer().get(shortData); + return shortData; + } + + /** + * Convert short array to byte array (for 16-bit PCM) + * + * @param shortData PCM short data + * @return Byte array representation + */ + public static byte[] shortsToBytes(short[] shortData) { + byte[] byteData = new byte[shortData.length * 2]; + ByteBuffer.wrap(byteData).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer().put(shortData); + return byteData; + } + + /** + * Stop playback + */ + public void stop() { + if (audioTrack != null && isPlaying.get()) { + audioTrack.stop(); + isPlaying.set(false); + } + + if (playbackThread != null && playbackThread.isAlive()) { + playbackThread.interrupt(); + } + } + + /** + * Pause playback + */ + public void pause() { + if (audioTrack != null && isPlaying.get()) { + audioTrack.pause(); + } + } + + /** + * Resume playback + */ + public void resume() { + if (audioTrack != null && isInitialized.get()) { + audioTrack.play(); + isPlaying.set(true); + } + } + + /** + * Set volume (0.0f to 1.0f) + * + * @param volume Volume level + */ + public void setVolume(float volume) { + if (audioTrack != null) { + audioTrack.setVolume(volume); + } + } + + /** + * Check if currently playing + * + * @return true if playing + */ + public boolean isPlaying() { + return isPlaying.get(); + } + + /** + * Check if initialized + * + * @return true if initialized + */ + public boolean isInitialized() { + return isInitialized.get(); + } + + /** + * Get current playback position in frames + * + * @return Playback position + */ + public int getPlaybackHeadPosition() { + if (audioTrack != null) { + return audioTrack.getPlaybackHeadPosition(); + } + return 0; + } + + /** + * Get audio session ID + * + * @return Audio session ID + */ + public int getAudioSessionId() { + if (audioTrack != null) { + return audioTrack.getAudioSessionId(); + } + return AudioManager.ERROR; + } + + /** + * Release resources + */ + public void release() { + stop(); + + if (audioTrack != null) { + audioTrack.release(); + audioTrack = null; + } + + isInitialized.set(false); + isPlaying.set(false); + } +} \ No newline at end of file diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/comms/AugmentOsActionsCallback.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/comms/AugmentOsActionsCallback.java index 36a505da0e..f824b22f42 100644 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/comms/AugmentOsActionsCallback.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/comms/AugmentOsActionsCallback.java @@ -7,7 +7,9 @@ public interface AugmentOsActionsCallback { void requestPing(); void requestStatus(); void searchForCompatibleDeviceNames(String modelName); - void connectToWearable(String modelName, String deviceName); + + void connectToWearable(String modelName, String deviceName, String deviceAddress); + void disconnectWearable(String wearableId); void forgetSmartGlasses(); void startApp(String packageName); @@ -50,6 +52,19 @@ public interface AugmentOsActionsCallback { void onAudioStopRequest(JSONObject audioStopParams); void simulateHeadPosition(String position); void simulateButtonPress(String buttonId, String pressType); + + void onDisplayTextNotified(String text, int size, int x, int y); + + void onDisplayImageNotified(String imageType, String imageSize); + + void clearDisplay(); + + void setLc3AudioEnabled(boolean enabled); + + void setVadEnabled(boolean enabled); + void setVadSensitivity(int sensitivity); + void requestVadConfig(); + void handleNotificationDismissal(JSONObject dismissalData); void startBufferRecording(); void stopBufferRecording(); diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/comms/AugmentOsManagerMessageParser.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/comms/AugmentOsManagerMessageParser.java index d90503199e..ba87407b71 100644 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/comms/AugmentOsManagerMessageParser.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/comms/AugmentOsManagerMessageParser.java @@ -15,300 +15,335 @@ public AugmentOsManagerMessageParser(AugmentOsActionsCallback callback) { } public void parseMessage(String json) throws JSONException { - JSONObject commandObject = new JSONObject(json); - String command = commandObject.getString("command"); - - switch (command) { - case "ping": - callback.requestPing(); - break; - - case "request_status": - callback.requestStatus(); - break; - - case "search_for_compatible_device_names": - String modelNameToFind = commandObject.getJSONObject("params").getString("model_name"); - callback.searchForCompatibleDeviceNames(modelNameToFind); - break; - - case "connect_wearable": - Log.d(TAG,"GOT A COMMAND TO CONNECT TO WEARABLE"); - String modelName = commandObject.getJSONObject("params").getString("model_name"); - String deviceName = commandObject.getJSONObject("params").getString("device_name"); - Log.d(TAG,"Connect to model: " + modelName + ", device address: " + deviceName); - callback.connectToWearable(modelName, deviceName); - break; - - case "forget_smart_glasses": - callback.forgetSmartGlasses(); - break; - - case "disconnect_wearable": - // String disconnectId = commandObject.getJSONObject("params").getString("target"); - String disconnectId = "notImplemented"; - callback.disconnectWearable(disconnectId); - break; - - case "start_app": - String packageName = commandObject.getJSONObject("params").getString("target"); - callback.startApp(packageName); - break; - - case "stop_app": - String stopPackage = commandObject.getJSONObject("params").getString("target"); - callback.stopApp(stopPackage); - break; - - case "enable_sensing": - boolean sensingEnabled = commandObject.getJSONObject("params").getBoolean("enabled"); - callback.setSensingEnabled(sensingEnabled); - break; - - case "force_core_onboard_mic": - boolean toForceCoreOnboardMic = commandObject.getJSONObject("params").getBoolean("enabled"); - callback.setForceCoreOnboardMic(toForceCoreOnboardMic); - break; - - case "enable_contextual_dashboard": - boolean dashboardEnabled = commandObject.getJSONObject("params").getBoolean("enabled"); - callback.setContextualDashboardEnabled(dashboardEnabled); - break; - - case "set_metric_system_enabled": - // Log.d(TAG, "GOT A COMMAND TO SET METRIC SYSTEM ENABLED"); - boolean metricSystemEnabled = commandObject.getJSONObject("params").getBoolean("enabled"); - // Log.d(TAG, "Metric system enabled: " + metricSystemEnabled); - callback.setMetricSystemEnabled(metricSystemEnabled); - break; - - case "bypass_vad_for_debugging": - boolean bypassVadForDebugging = commandObject.getJSONObject("params").getBoolean("enabled"); - callback.setBypassVadForDebugging(bypassVadForDebugging); - break; - - case "bypass_audio_encoding_for_debugging": - boolean bypassAudioEncodingForDebugging = commandObject.getJSONObject("params").getBoolean("enabled"); - callback.setBypassAudioEncodingForDebugging(bypassAudioEncodingForDebugging); - break; - - case "enforce_local_transcription": - boolean enforceLocalTranscription = commandObject.getJSONObject("params").getBoolean("enabled"); - callback.setEnforceLocalTranscription(enforceLocalTranscription); - break; - - case "enable_always_on_status_bar": - boolean alwaysOnEnabled = commandObject.getJSONObject("params").getBoolean("enabled"); - callback.setAlwaysOnStatusBarEnabled(alwaysOnEnabled); - break; - - case "enable_power_saving_mode": - boolean powerSavingEnabled = commandObject.getJSONObject("params").getBoolean("enabled"); - callback.setPowerSavingMode(powerSavingEnabled); - break; - - case "install_app_from_repository": // TODO: Implement repository handling + JSONObject commandObject = new JSONObject(json); + String command = commandObject.getString("command"); + + switch (command) { + case "ping": + callback.requestPing(); + break; + + case "request_status": + callback.requestStatus(); + break; + + case "search_for_compatible_device_names": + String modelNameToFind = commandObject.getJSONObject("params").getString("model_name"); + callback.searchForCompatibleDeviceNames(modelNameToFind); + break; + + case "connect_wearable": + Log.d(TAG, "GOT A COMMAND TO CONNECT TO WEARABLE"); + JSONObject params = commandObject.getJSONObject("params"); + String modelName = params.getString("model_name"); + String deviceName = params.getString("device_name"); + String deviceAddress = null; + if (params.has("device_address")) { + deviceAddress = params.getString("device_address"); + } + Log.d(TAG, "Connect to model: " + modelName + ", device address: " + deviceName + ",address " + deviceAddress); + callback.connectToWearable(modelName, deviceName, deviceAddress); + break; + + case "forget_smart_glasses": + callback.forgetSmartGlasses(); + break; + + case "disconnect_wearable": + // String disconnectId = commandObject.getJSONObject("params").getString("target"); + String disconnectId = "notImplemented"; + callback.disconnectWearable(disconnectId); + break; + + case "start_app": + String packageName = commandObject.getJSONObject("params").getString("target"); + callback.startApp(packageName); + break; + + case "stop_app": + String stopPackage = commandObject.getJSONObject("params").getString("target"); + callback.stopApp(stopPackage); + break; + + case "enable_sensing": + boolean sensingEnabled = commandObject.getJSONObject("params").getBoolean("enabled"); + callback.setSensingEnabled(sensingEnabled); + break; + + case "force_core_onboard_mic": + boolean toForceCoreOnboardMic = commandObject.getJSONObject("params").getBoolean("enabled"); + callback.setForceCoreOnboardMic(toForceCoreOnboardMic); + break; + + case "enable_contextual_dashboard": + boolean dashboardEnabled = commandObject.getJSONObject("params").getBoolean("enabled"); + callback.setContextualDashboardEnabled(dashboardEnabled); + break; + + case "set_metric_system_enabled": + // Log.d(TAG, "GOT A COMMAND TO SET METRIC SYSTEM ENABLED"); + boolean metricSystemEnabled = commandObject.getJSONObject("params").getBoolean("enabled"); + // Log.d(TAG, "Metric system enabled: " + metricSystemEnabled); + callback.setMetricSystemEnabled(metricSystemEnabled); + break; + + case "bypass_vad_for_debugging": + boolean bypassVadForDebugging = commandObject.getJSONObject("params").getBoolean("enabled"); + callback.setBypassVadForDebugging(bypassVadForDebugging); + break; + + case "bypass_audio_encoding_for_debugging": + boolean bypassAudioEncodingForDebugging = commandObject.getJSONObject("params").getBoolean("enabled"); + callback.setBypassAudioEncodingForDebugging(bypassAudioEncodingForDebugging); + break; + + case "enforce_local_transcription": + boolean enforceLocalTranscription = commandObject.getJSONObject("params").getBoolean("enabled"); + callback.setEnforceLocalTranscription(enforceLocalTranscription); + break; + + case "enable_always_on_status_bar": + boolean alwaysOnEnabled = commandObject.getJSONObject("params").getBoolean("enabled"); + callback.setAlwaysOnStatusBarEnabled(alwaysOnEnabled); + break; + + case "enable_power_saving_mode": + boolean powerSavingEnabled = commandObject.getJSONObject("params").getBoolean("enabled"); + callback.setPowerSavingMode(powerSavingEnabled); + break; + + case "install_app_from_repository": // TODO: Implement repository handling // String repo = commandObject.getJSONObject("params").getString("repository"); - String packageNameToInstall = commandObject.getJSONObject("params").getString("target"); - callback.installAppFromRepository("repo", packageNameToInstall); - break; - - case "uninstall_app": - String uninstallPackage = commandObject.getJSONObject("params").getString("target"); - callback.uninstallApp(uninstallPackage); - break; - - case "phone_notification": - JSONObject notificationData = commandObject.getJSONObject("params"); - Log.d(TAG, notificationData.toString()); - callback.handleNotificationData(notificationData); - break; - - case "phone_notification_dismissed": - JSONObject dismissalData = commandObject.getJSONObject("params"); - Log.d(TAG, "Received notification dismissal: " + dismissalData.toString()); - callback.handleNotificationDismissal(dismissalData); - break; - - case "set_auth_secret_key": - String userId = commandObject.getJSONObject("params").getString("userId"); - String authKey = commandObject.getJSONObject("params").getString("authSecretKey"); - callback.setAuthSecretKey(userId, authKey); - break; - - case "set_server_url": - String url = commandObject.getJSONObject("params").getString("url"); - callback.setServerUrl(url); - break; - - case "verify_auth_secret_key": - callback.verifyAuthSecretKey(); - break; - - case "delete_auth_secret_key": - callback.deleteAuthSecretKey(); - break; - - case "update_app_settings": - String targetApp = commandObject.getJSONObject("params").getString("target"); - JSONObject settings = commandObject.getJSONObject("params").getJSONObject("settings"); - callback.updateAppSettings(targetApp, settings); - break; - case "request_app_info": - String packageNameToGetDetails = commandObject.getJSONObject("params").getString("target"); - callback.requestAppInfo(packageNameToGetDetails); - break; - - case "update_glasses_brightness": - int brightnessLevel = commandObject.getJSONObject("params").getInt("brightness"); - boolean isAutoBrightness = commandObject.getJSONObject("params").getBoolean("autoBrightness"); - Log.d(TAG, "Brightness level: " + brightnessLevel + ", autoBrightness: " + isAutoBrightness); - if (isAutoBrightness) { - callback.updateGlassesAutoBrightness(isAutoBrightness); - } - else { - callback.updateGlassesBrightness(brightnessLevel); - } - break; - - case "update_glasses_head_up_angle": - int headUpAngle = commandObject.getJSONObject("params").getInt("headUpAngle"); - callback.updateGlassesHeadUpAngle(headUpAngle); - break; - - case "update_glasses_height": - int height = commandObject.getJSONObject("params").getInt("height"); - callback.updateGlassesHeight(height); - break; - - case "update_glasses_depth": - int depth = commandObject.getJSONObject("params").getInt("depth"); - callback.updateGlassesDepth(depth); - break; - - case "toggle_updating_screen": - boolean updatingScreen = commandObject.getJSONObject("params").getBoolean("enabled"); - callback.setUpdatingScreen(updatingScreen); - break; - - - case "send_wifi_credentials": - String ssid = commandObject.getJSONObject("params").getString("ssid"); - String password = commandObject.getJSONObject("params").getString("password"); - // Log.d(TAG, "@#@ GOT A COMMAND TO SEND WIFI CREDENTIALS, SSID: " + ssid + ", PASSWORD: " + password); - callback.setGlassesWifiCredentials(ssid, password); - break; - - case "set_hotspot_state": - boolean hotspotEnabled = commandObject.getJSONObject("params").getBoolean("enabled"); - Log.d(TAG, "🔥 GOT A COMMAND TO SET HOTSPOT STATE, enabled: " + hotspotEnabled); - callback.setGlassesHotspotState(hotspotEnabled); - break; - - case "request_wifi_scan": - callback.requestWifiScan(); - break; - - case "query_gallery_status": - Log.d(TAG, "📸 GOT A COMMAND TO QUERY GALLERY STATUS"); - callback.queryGalleryStatus(); - break; - - case "set_preferred_mic": - String mic = commandObject.getJSONObject("params").getString("mic"); - callback.setPreferredMic(mic); - break; - - case "restart_transcriber": - callback.restartTranscriber(); - break; - - case "set_button_mode": - String mode = commandObject.getJSONObject("params").getString("mode"); - callback.setButtonMode(mode); - break; - - case "set_button_photo_size": - String photoSize = commandObject.getJSONObject("params").getString("size"); - callback.setButtonPhotoSize(photoSize); - break; - - case "set_button_video_settings": - JSONObject videoParams = commandObject.getJSONObject("params"); - int videoWidth = videoParams.getInt("width"); - int videoHeight = videoParams.getInt("height"); - int videoFps = videoParams.getInt("fps"); - callback.setButtonVideoSettings(videoWidth, videoHeight, videoFps); - break; - - case "set_button_camera_led": - boolean ledEnabled = commandObject.getJSONObject("params").getBoolean("enabled"); - callback.setButtonCameraLed(ledEnabled); - break; - - case "audio_play_response": - JSONObject audioResponse = commandObject.getJSONObject("params"); - callback.onAudioPlayResponse(audioResponse); - break; - - case "audio_stop_request": - JSONObject audioStopParams = commandObject.getJSONObject("params"); - callback.onAudioStopRequest(audioStopParams); - break; - - case "simulate_head_position": - String position = commandObject.getJSONObject("params").getString("position"); - callback.simulateHeadPosition(position); - break; - - case "simulate_button_press": - String buttonId = commandObject.getJSONObject("params").getString("buttonId"); - String pressType = commandObject.getJSONObject("params").getString("pressType"); - callback.simulateButtonPress(buttonId, pressType); - break; - - case "start_buffer_recording": - callback.startBufferRecording(); - break; - - case "stop_buffer_recording": - callback.stopBufferRecording(); - break; - - case "save_buffer_video": - String bufferRequestId = commandObject.getJSONObject("params").getString("request_id"); - int durationSeconds = commandObject.getJSONObject("params").getInt("duration_seconds"); - callback.saveBufferVideo(bufferRequestId, durationSeconds); - break; - - case "start_video_recording": - String videoRequestId = commandObject.getJSONObject("params").getString("request_id"); - boolean save = commandObject.getJSONObject("params").optBoolean("save", true); - callback.startVideoRecording(videoRequestId, save); - break; - - case "stop_video_recording": - String stopRequestId = commandObject.getJSONObject("params").getString("request_id"); - callback.stopVideoRecording(stopRequestId); - break; - - // case "update_settings": - // JSONObject settings = commandObject.getJSONObject("params"); - // callback.updateSettings(settings); - // break; - - // case "display_event": - // JSONObject displayEvent = commandObject.getJSONObject("params"); - // callback.handleDisplayEvent(displayEvent); - // break; - - // case "microphone_state_change": - // JSONObject microphoneStateChange = commandObject.getJSONObject("params"); - // callback.handleMicrophoneStateChange(microphoneStateChange); - // break; - - default: - Log.w(TAG, "Unknown command: " + command); + String packageNameToInstall = commandObject.getJSONObject("params").getString("target"); + callback.installAppFromRepository("repo", packageNameToInstall); + break; + + case "uninstall_app": + String uninstallPackage = commandObject.getJSONObject("params").getString("target"); + callback.uninstallApp(uninstallPackage); + break; + + case "phone_notification": + JSONObject notificationData = commandObject.getJSONObject("params"); + Log.d(TAG, notificationData.toString()); + callback.handleNotificationData(notificationData); + break; + + case "phone_notification_dismissed": + JSONObject dismissalData = commandObject.getJSONObject("params"); + Log.d(TAG, "Received notification dismissal: " + dismissalData.toString()); + callback.handleNotificationDismissal(dismissalData); + break; + + case "set_auth_secret_key": + String userId = commandObject.getJSONObject("params").getString("userId"); + String authKey = commandObject.getJSONObject("params").getString("authSecretKey"); + callback.setAuthSecretKey(userId, authKey); + break; + + case "set_server_url": + String url = commandObject.getJSONObject("params").getString("url"); + callback.setServerUrl(url); + break; + + case "verify_auth_secret_key": + callback.verifyAuthSecretKey(); + break; + + case "delete_auth_secret_key": + callback.deleteAuthSecretKey(); + break; + + case "update_app_settings": + String targetApp = commandObject.getJSONObject("params").getString("target"); + JSONObject settings = commandObject.getJSONObject("params").getJSONObject("settings"); + callback.updateAppSettings(targetApp, settings); + break; + case "request_app_info": + String packageNameToGetDetails = commandObject.getJSONObject("params").getString("target"); + callback.requestAppInfo(packageNameToGetDetails); + break; + + case "update_glasses_brightness": + int brightnessLevel = commandObject.getJSONObject("params").getInt("brightness"); + boolean isAutoBrightness = commandObject.getJSONObject("params").getBoolean("autoBrightness"); + Log.d(TAG, "Brightness level: " + brightnessLevel + ", autoBrightness: " + isAutoBrightness); + if (isAutoBrightness) { + callback.updateGlassesAutoBrightness(isAutoBrightness); + } else { + callback.updateGlassesBrightness(brightnessLevel); + } + break; + + case "update_glasses_head_up_angle": + int headUpAngle = commandObject.getJSONObject("params").getInt("headUpAngle"); + callback.updateGlassesHeadUpAngle(headUpAngle); + break; + + case "update_glasses_height": + int height = commandObject.getJSONObject("params").getInt("height"); + callback.updateGlassesHeight(height); + break; + + case "update_glasses_depth": + int depth = commandObject.getJSONObject("params").getInt("depth"); + callback.updateGlassesDepth(depth); + break; + + case "toggle_updating_screen": + boolean updatingScreen = commandObject.getJSONObject("params").getBoolean("enabled"); + callback.setUpdatingScreen(updatingScreen); + break; + + + case "send_wifi_credentials": + String ssid = commandObject.getJSONObject("params").getString("ssid"); + String password = commandObject.getJSONObject("params").getString("password"); + // Log.d(TAG, "@#@ GOT A COMMAND TO SEND WIFI CREDENTIALS, SSID: " + ssid + ", PASSWORD: " + password); + callback.setGlassesWifiCredentials(ssid, password); + break; + + case "set_hotspot_state": + boolean hotspotEnabled = commandObject.getJSONObject("params").getBoolean("enabled"); + Log.d(TAG, "🔥 GOT A COMMAND TO SET HOTSPOT STATE, enabled: " + hotspotEnabled); + callback.setGlassesHotspotState(hotspotEnabled); + break; + + case "request_wifi_scan": + callback.requestWifiScan(); + break; + + case "query_gallery_status": + Log.d(TAG, "📸 GOT A COMMAND TO QUERY GALLERY STATUS"); + callback.queryGalleryStatus(); + break; + + case "set_preferred_mic": + String mic = commandObject.getJSONObject("params").getString("mic"); + callback.setPreferredMic(mic); + break; + + case "restart_transcriber": + callback.restartTranscriber(); + break; + + case "set_button_mode": + String mode = commandObject.getJSONObject("params").getString("mode"); + callback.setButtonMode(mode); + break; + + case "set_button_photo_size": + String photoSize = commandObject.getJSONObject("params").getString("size"); + callback.setButtonPhotoSize(photoSize); + break; + + case "set_button_video_settings": + JSONObject videoParams = commandObject.getJSONObject("params"); + int videoWidth = videoParams.getInt("width"); + int videoHeight = videoParams.getInt("height"); + int videoFps = videoParams.getInt("fps"); + callback.setButtonVideoSettings(videoWidth, videoHeight, videoFps); + break; + + case "set_button_camera_led": + boolean ledEnabled = commandObject.getJSONObject("params").getBoolean("enabled"); + callback.setButtonCameraLed(ledEnabled); + break; + + case "audio_play_response": + JSONObject audioResponse = commandObject.getJSONObject("params"); + callback.onAudioPlayResponse(audioResponse); + break; + + case "audio_stop_request": + JSONObject audioStopParams = commandObject.getJSONObject("params"); + callback.onAudioStopRequest(audioStopParams); + break; + + case "simulate_head_position": + String position = commandObject.getJSONObject("params").getString("position"); + callback.simulateHeadPosition(position); + break; + + case "simulate_button_press": + String buttonId = commandObject.getJSONObject("params").getString("buttonId"); + String pressType = commandObject.getJSONObject("params").getString("pressType"); + callback.simulateButtonPress(buttonId, pressType); + break; + + case "start_buffer_recording": + callback.startBufferRecording(); + break; + + case "stop_buffer_recording": + callback.stopBufferRecording(); + break; + + case "save_buffer_video": + String bufferRequestId = commandObject.getJSONObject("params").getString("request_id"); + int durationSeconds = commandObject.getJSONObject("params").getInt("duration_seconds"); + callback.saveBufferVideo(bufferRequestId, durationSeconds); + break; + + case "start_video_recording": + String videoRequestId = commandObject.getJSONObject("params").getString("request_id"); + boolean save = commandObject.getJSONObject("params").optBoolean("save", true); + callback.startVideoRecording(videoRequestId, save); + break; + + case "stop_video_recording": + String stopRequestId = commandObject.getJSONObject("params").getString("request_id"); + callback.stopVideoRecording(stopRequestId); + break; + + case "display_text": { + final JSONObject paramsObject = commandObject.getJSONObject("params"); + String text = paramsObject.getString("text"); + int x = paramsObject.getInt("x"); + int y = paramsObject.getInt("y"); + int size = paramsObject.getInt("size"); + callback.onDisplayTextNotified(text, size, x, y); + } + break; + + case "display_image": { + final JSONObject paramsObject = commandObject.getJSONObject("params"); + String imageType = paramsObject.getString("imageType"); + String imageSize = paramsObject.getString("imageSize"); + callback.onDisplayImageNotified(imageType, imageSize); + } + break; + + case "clear_display": { + callback.clearDisplay(); + } + break; + + case "set_lc3_audio_enabled": { + boolean enabled = commandObject.getBoolean("enabled"); + callback.setLc3AudioEnabled(enabled); } + break; + + case "set_vad_enabled": { + boolean enabled = commandObject.getBoolean("enabled"); + callback.setVadEnabled(enabled); + } + break; + + case "set_vad_sensitivity": { + int sensitivity = commandObject.getInt("sensitivity"); + callback.setVadSensitivity(sensitivity); + } + break; + + case "request_vad_config": { + callback.requestVadConfig(); + } + break; + + default: + Log.w(TAG, "Unknown command: " + command); + } } } diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/comms/AugmentosBlePeripheral.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/comms/AugmentosBlePeripheral.java index a24850845c..4560bf4da7 100644 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/comms/AugmentosBlePeripheral.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/comms/AugmentosBlePeripheral.java @@ -24,6 +24,9 @@ import com.augmentos.augmentoslib.events.CoreToManagerOutputEvent; import com.augmentos.augmentoslib.events.ManagerToCoreRequestEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.BleCommandReceiver; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.BleCommandSender; + import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.json.JSONException; @@ -496,13 +499,14 @@ public void sendAudioStopRequest(JSONObject audioStopParams) { sendDataToAugmentOsManager(message.toString()); } - public void sendGlassesBluetoothDiscoverResultToManager(String modelName, String deviceName) { - Log.d(TAG, "sendGlassesSearchResultsToManager"); + public void sendGlassesBluetoothDiscoverResultToManager(String modelName, String deviceName, String deviceAddress) { + Log.d(TAG, "sendGlassesSearchResultsToManager modelName: " + modelName + " deviceName: " + deviceName + " deviceAddress: " + deviceAddress); JSONObject data = new JSONObject(); JSONObject messageObj = new JSONObject(); - try{ + try { messageObj.put("model_name", modelName); messageObj.put("device_name", deviceName); + messageObj.put("device_address", deviceAddress); data.put("compatible_glasses_search_result", messageObj); } catch (JSONException e) { throw new RuntimeException(e); @@ -536,6 +540,38 @@ public void sendAppIsInstalledEventToManager(String packageName) { sendDataToAugmentOsManager(data.toString()); } + public void sendBleCommandReceiverEventToManager(BleCommandReceiver event) { + Log.d(TAG, "sendBleCommandReceiverEventToManager"); + JSONObject payload = new JSONObject(); + JSONObject messageObj = new JSONObject(); + try { + messageObj.put("command", event.command); + messageObj.put("commandText", event.commandText); + payload.put("receive_command_from_ble", messageObj); + payload.put("type", "receive_command_from_ble"); + } catch (JSONException e) { + throw new RuntimeException(e); + } + sendDataToAugmentOsManager(payload.toString()); + } + + public void sendBleCommandSenderEventToManager(BleCommandSender event) { + // Commander, mission objective: pack the outgoing data with a "type" key for clear identification in the field. + JSONObject payload = new JSONObject(); + JSONObject messageObj = new JSONObject(); + try { + messageObj.put("command", event.command); + messageObj.put("commandText", event.commandText); + payload.put("send_command_to_ble", messageObj); + payload.put("type", "send_command_to_ble"); + + Log.d(TAG, "sendBleCommandSenderEventToManager: " + payload.toString()); + sendDataToAugmentOsManager(payload.toString()); + } catch (JSONException e) { + throw new RuntimeException(e); + } + } + @SuppressLint("MissingPermission") public void sendDataToAugmentOsManager(String jsonData) { if(isSimulatedPuck){ diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/SmartGlassesManager.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/SmartGlassesManager.java index 464d291581..9c27c22a6a 100644 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/SmartGlassesManager.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/SmartGlassesManager.java @@ -36,6 +36,7 @@ import com.augmentos.augmentos_core.smarterglassesmanager.supportedglasses.AudioWearable; import com.augmentos.augmentos_core.smarterglassesmanager.supportedglasses.BrilliantLabsFrame; import com.augmentos.augmentos_core.smarterglassesmanager.supportedglasses.EvenRealitiesG1; +import com.augmentos.augmentos_core.smarterglassesmanager.supportedglasses.MentraNexGlasses; import com.augmentos.augmentos_core.smarterglassesmanager.supportedglasses.InmoAirOne; import com.augmentos.augmentos_core.smarterglassesmanager.supportedglasses.MentraMach1; import com.augmentos.augmentos_core.smarterglassesmanager.supportedglasses.MentraLive; @@ -362,7 +363,7 @@ public void connectToSmartGlasses(SmartGlassesDevice device) { // Connect directly instead of using a handler Log.d(TAG, "CONNECTING TO SMART GLASSES"); - smartGlassesRepresentative.connectToSmartGlasses(); + smartGlassesRepresentative.connectToSmartGlasses(device); // BATTERY OPTIMIZATION: Explicitly register callback with the communicator // This ensures it's immediately available when audio events start coming in @@ -444,6 +445,7 @@ public void sendUiUpdate() { // Save preferred wearable if connected if (connectionState == SmartGlassesConnectionState.CONNECTED) { savePreferredWearable(this, smartGlassesRepresentative.smartGlassesDevice.deviceModelName); + savePreferredWearableAddress(this, smartGlassesRepresentative.smartGlassesDevice.deviceAddress); setFontSize(SmartGlassesFontSize.MEDIUM); } @@ -475,6 +477,18 @@ public static String getPreferredWearable(Context context) { .getString(context.getResources().getString(R.string.PREFERRED_WEARABLE), ""); } + public static void savePreferredWearableAddress(Context context, String deviceAddress) { + PreferenceManager.getDefaultSharedPreferences(context) + .edit() + .putString(context.getResources().getString(R.string.PREFERRED_WEARABLE_ADDRESS), deviceAddress) + .apply(); + } + + public static String getPreferredWearableAddress(Context context) { + return PreferenceManager.getDefaultSharedPreferences(context) + .getString(context.getResources().getString(R.string.PREFERRED_WEARABLE_ADDRESS), ""); + } + public static ASR_FRAMEWORKS getChosenAsrFramework(Context context) { String asrString = PreferenceManager.getDefaultSharedPreferences(context) .getString(context.getResources().getString(R.string.SHARED_PREF_ASR_KEY), ""); @@ -945,6 +959,39 @@ public void clearScreen() { sendHomeScreen(); } + public void clearDisplay() { + Log.d(TAG, "clearDisplay called"); + if (smartGlassesRepresentative != null && smartGlassesRepresentative.smartGlassesCommunicator != null) { + smartGlassesRepresentative.smartGlassesCommunicator.clearDisplay(); + } else { + Log.e(TAG, "Cannot clear display: smartGlassesRepresentative or communicator is null"); + } + } + + public void setVadEnabled(boolean enabled) { + if (smartGlassesRepresentative != null && smartGlassesRepresentative.smartGlassesCommunicator != null) { + smartGlassesRepresentative.smartGlassesCommunicator.setVadEnabled(enabled); + } else { + Log.e(TAG, "Cannot set VAD enabled: smartGlassesRepresentative or communicator is null"); + } + } + + public void setVadSensitivity(int sensitivity) { + if (smartGlassesRepresentative != null && smartGlassesRepresentative.smartGlassesCommunicator != null) { + smartGlassesRepresentative.smartGlassesCommunicator.setVadSensitivity(sensitivity); + } else { + Log.e(TAG, "Cannot set VAD sensitivity: smartGlassesRepresentative or communicator is null"); + } + } + + public void requestVadConfig() { + if (smartGlassesRepresentative != null && smartGlassesRepresentative.smartGlassesCommunicator != null) { + smartGlassesRepresentative.smartGlassesCommunicator.requestVadConfig(); + } else { + Log.e(TAG, "Cannot request VAD config: smartGlassesRepresentative or communicator is null"); + } + } + /** * Getter for SmartGlassesRepresentative instance * Allows external access for immediate microphone switching @@ -1081,6 +1128,7 @@ public static SmartGlassesDevice getSmartGlassesDeviceFromModelName(String model new MentraMach1(), new MentraLive(), new EvenRealitiesG1(), + new MentraNexGlasses(), new VuzixShield(), new InmoAirOne(), new TCLRayNeoXTwo(), diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/ble/BleSender.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/ble/BleSender.java new file mode 100644 index 0000000000..bc851694ed --- /dev/null +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/ble/BleSender.java @@ -0,0 +1,135 @@ +import java.util.Queue; +import java.util.concurrent.*; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; + +public abstract class BleSender { + private static final int SEND_INTERVAL_DEFAULT=15;// nomal automatic send interval + private int sendInterval=SEND_INTERVAL_DEFAULT; + private boolean automaticSending=true; + + private final BlockingQueue dataQueue = new LinkedBlockingQueue<>(); + private final ExecutorService executor; + private final AtomicBoolean isSending = new AtomicBoolean(false); + private final Lock bluetoothLock = new ReentrantLock(); + + + private BleSender(int poolSize,boolean automaticSending,int sendInterval) { + this.executor = Executors.newFixedThreadPool(poolSize); + this.automaticSending=automaticSending; + this.sendInterval= sendInterval; + } + + public BleSender(boolean automaticSending) { + this(1,automaticSending,SEND_INTERVAL_DEFAULT); + } + + public BleSender(boolean automaticSending,int sendInterval) { + this(1,automaticSending,sendInterval); + } + + // should implement this send method + public abstract void sendViaBluetooth(byte[] data) throws Exception ; + + /** + * release + */ + public void shutdown() { + try { + dataQueue.clear(); + executor.shutdown(); + if (!executor.awaitTermination(5, TimeUnit.SECONDS)) { + executor.shutdownNow(); + } + } catch (InterruptedException e) { + executor.shutdownNow(); + Thread.currentThread().interrupt(); + } + } + + public void clearQueue(){ + dataQueue.clear(); + isSending.set(false); + } + + + public void sendData(byte[] data) { + try { + dataQueue.put(data); + startSendingIfNeeded(); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + } + + public void unloadCurrentAndSendNextManual(){ + if(automaticSending){ + return; + } + if (isSending.get()){ + isSending.set(false); + } + startSendingIfNeeded(); + } + private void startSendingIfNeeded() { + if (isSending.compareAndSet(false, true)) { + if(automaticSending){ + executor.submit(this::processQueueAuto); + }else{ + executor.submit(this::processManual); + } + } + } + + /** + * handle sending auto by queue + */ + private void processQueueAuto() { + try { + while (!dataQueue.isEmpty()) { + byte[] data = dataQueue.poll(); + if (data != null) { + sendDataSafely(data); + Thread.sleep(sendInterval); + } + } + + } catch (Exception e) { + }finally { + isSending.set(false); + // 检查是否有新数据到达 + if (!dataQueue.isEmpty()) { + startSendingIfNeeded(); + } + + } + } + + /** + * handle sending manual next + */ + private void processManual() { + try { + byte[] data = dataQueue.poll(); + if (data != null) { + sendDataSafely(data); + } + } catch (Exception e) { + }finally { + } + } + + private void sendDataSafely(byte[] data) { + bluetoothLock.lock(); // 确保蓝牙资源互斥访问 + try { + // 实际蓝牙发送操作(需替换为真实实现) + sendViaBluetooth(data); + } catch (Exception e) { + } finally { + bluetoothLock.unlock(); + } + } + + +} \ No newline at end of file diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/BleCommandReceiver.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/BleCommandReceiver.java new file mode 100644 index 0000000000..2c14cddfc8 --- /dev/null +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/BleCommandReceiver.java @@ -0,0 +1,14 @@ +package com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages; + +public class BleCommandReceiver { + public final String command; + public final String commandText; + public final long timestamp; + + + public BleCommandReceiver(String command, String commandText) { + this.command = command; + this.commandText = commandText; + this.timestamp = System.currentTimeMillis(); + } +} \ No newline at end of file diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/BleCommandSender.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/BleCommandSender.java new file mode 100644 index 0000000000..0e6aa6b157 --- /dev/null +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/BleCommandSender.java @@ -0,0 +1,14 @@ +package com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages; + +public class BleCommandSender { + public final String command; + public final String commandText; + public final long timestamp; + + + public BleCommandSender(String command, String commandText) { + this.command = command; + this.commandText = commandText; + this.timestamp = System.currentTimeMillis(); + } +} \ No newline at end of file diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/DisplayImageEvent.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/DisplayImageEvent.java new file mode 100644 index 0000000000..e98b78f6b5 --- /dev/null +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/DisplayImageEvent.java @@ -0,0 +1,21 @@ +package com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages; + + +public class DisplayImageEvent { + public final String imageType; + public final String imageSize; + // Timestamp + public final long timestamp; + + public DisplayImageEvent(String imageType, String imageSize, long timestamp) { + this.imageType = imageType; + this.imageSize = imageSize; + this.timestamp = timestamp; + } + + public DisplayImageEvent(String imageType, String imageSize) { + this.imageType = imageType; + this.imageSize = imageSize; + this.timestamp = System.currentTimeMillis(); + } +} \ No newline at end of file diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/DisplayTextEvent.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/DisplayTextEvent.java new file mode 100644 index 0000000000..ef44fb4302 --- /dev/null +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/DisplayTextEvent.java @@ -0,0 +1,31 @@ +package com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages; + +public class DisplayTextEvent { + //display text content + public final String text; + //position x + public final int x; + //position y + public final int y; + //display text size + public final int size; + // Timestamp + public final long timestamp; + + + public DisplayTextEvent(String text, int size, int x, int y, long timestamp) { + this.text = text; + this.size = size; + this.x = x; + this.y = y; + this.timestamp = timestamp; + } + + public DisplayTextEvent(String text, int size, int x, int y) { + this.text = text; + this.size = size; + this.x = x; + this.y = y; + this.timestamp = System.currentTimeMillis(); + } +} \ No newline at end of file diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/GlassesBluetoothSearchDiscoverEvent.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/GlassesBluetoothSearchDiscoverEvent.java index 83276b3497..a7d2c6e486 100644 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/GlassesBluetoothSearchDiscoverEvent.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/GlassesBluetoothSearchDiscoverEvent.java @@ -3,9 +3,16 @@ public class GlassesBluetoothSearchDiscoverEvent { public String modelName; public String deviceName; + public String deviceAddress; public GlassesBluetoothSearchDiscoverEvent(String modelName, String deviceName){ this.modelName = modelName; this.deviceName = deviceName; } + + public GlassesBluetoothSearchDiscoverEvent(String modelName, String deviceName,String deviceAddress){ + this.modelName = modelName; + this.deviceName = deviceName; + this.deviceAddress = deviceAddress; + } } diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/HeartbeatReceivedEvent.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/HeartbeatReceivedEvent.java new file mode 100644 index 0000000000..5f493dd694 --- /dev/null +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/HeartbeatReceivedEvent.java @@ -0,0 +1,9 @@ +package com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages; + +public class HeartbeatReceivedEvent { + public final long timestamp; + + public HeartbeatReceivedEvent(long timestamp) { + this.timestamp = timestamp; + } +} diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/HeartbeatSentEvent.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/HeartbeatSentEvent.java new file mode 100644 index 0000000000..4d9d3bc202 --- /dev/null +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/HeartbeatSentEvent.java @@ -0,0 +1,9 @@ +package com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages; + +public class HeartbeatSentEvent { + public final long timestamp; + + public HeartbeatSentEvent(long timestamp) { + this.timestamp = timestamp; + } +} diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/ProtobufSchemaVersionEvent.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/ProtobufSchemaVersionEvent.java new file mode 100644 index 0000000000..e7c994a3e4 --- /dev/null +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/ProtobufSchemaVersionEvent.java @@ -0,0 +1,25 @@ +package com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages; + +public class ProtobufSchemaVersionEvent { + private final int schemaVersion; + private final String buildInfo; + private final String deviceModelName; + + public ProtobufSchemaVersionEvent(int schemaVersion, String buildInfo, String deviceModelName) { + this.schemaVersion = schemaVersion; + this.buildInfo = buildInfo; + this.deviceModelName = deviceModelName; + } + + public int getSchemaVersion() { + return schemaVersion; + } + + public String getBuildInfo() { + return buildInfo; + } + + public String getDeviceModelName() { + return deviceModelName; + } +} diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/ProtocolVersionResponseEvent.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/ProtocolVersionResponseEvent.java new file mode 100644 index 0000000000..4a0ba8318a --- /dev/null +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/eventbusmessages/ProtocolVersionResponseEvent.java @@ -0,0 +1,46 @@ +package com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages; + +public class ProtocolVersionResponseEvent { + private final int protocolVersion; + private final String commit; + private final String buildDate; + private final String msgId; + + public ProtocolVersionResponseEvent(int protocolVersion, String commit, String buildDate, String msgId) { + this.protocolVersion = protocolVersion; + this.commit = commit; + this.buildDate = buildDate; + this.msgId = msgId; + } + + public int getProtocolVersion() { + return protocolVersion; + } + + public String getCommit() { + return commit; + } + + public String getBuildDate() { + return buildDate; + } + + public String getMsgId() { + return msgId; + } + + public String getFormattedVersion() { + StringBuilder formatted = new StringBuilder(); + formatted.append("Protocol v").append(protocolVersion); + + if (commit != null && !commit.isEmpty()) { + formatted.append(" | ").append(commit.substring(0, Math.min(7, commit.length()))); + } + + if (buildDate != null && !buildDate.isEmpty()) { + formatted.append(" | ").append(buildDate); + } + + return formatted.toString(); + } +} diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/hci/PhoneMicrophoneManager.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/hci/PhoneMicrophoneManager.java index 9d154d3b80..dff930e854 100644 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/hci/PhoneMicrophoneManager.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/hci/PhoneMicrophoneManager.java @@ -15,6 +15,7 @@ import android.media.AudioRecord; import android.media.AudioRecordingConfiguration; import android.os.Build; +import android.os.Environment; import android.os.Handler; import android.os.Looper; import android.telephony.PhoneStateListener; @@ -25,8 +26,15 @@ import com.augmentos.augmentos_core.microphone.MicrophoneService; import com.augmentos.augmentos_core.smarterglassesmanager.speechrecognition.SpeechRecSwitchSystem; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Date; import java.util.List; +import java.util.Locale; import androidx.annotation.RequiresApi; import androidx.core.content.ContextCompat; @@ -34,11 +42,10 @@ import com.augmentos.augmentos_core.smarterglassesmanager.SmartGlassesManager; import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.MicModeChangedEvent; import com.augmentos.augmentos_core.smarterglassesmanager.smartglassesconnection.SmartGlassesRepresentative; +import com.augmentos.smartglassesmanager.cpp.L3cCpp; import org.greenrobot.eventbus.EventBus; -import java.nio.ByteBuffer; - /** * Dynamic microphone manager that prioritizes SCO mode but gracefully handles conflicts. * @@ -125,6 +132,19 @@ public interface PhoneMicListener { private long lastServiceStateChangeTime = 0; private static final long SERVICE_STATE_CHANGE_DEBOUNCE_MS = 1000; // 1 second minimum between service state changes + // 30-second audio recording system + private static final long RECORDING_INTERVAL_MS = 30000; // 30 seconds + private static final String RECORDING_DIR = "phone_mic_recordings"; + private List audioBuffer = new ArrayList<>(); + private long recordingStartTime = 0; + private Handler recordingHandler = new Handler(Looper.getMainLooper()); + private Runnable recordingRunnable; + + // LC3 encoder/decoder for testing + private long lc3EncoderPtr = 0; + private long lc3DecoderPtr = 0; + private boolean lc3Initialized = false; + /** * Creates a new PhoneMicrophoneManager that handles dynamic switching between microphone modes. * @@ -165,6 +185,9 @@ public PhoneMicrophoneManager(Context context, AudioProcessingCallback audioProc this.audioChunkCallback = new AudioChunkCallback() { @Override public void onSuccess(ByteBuffer data) { + // Buffer audio data for 30-second recording + bufferAudioData(data); + if (glassesRep != null) { // Use the existing receiveChunk method to handle PCM -> LC3 conversion and callbacks glassesRep.receiveChunk(data); @@ -187,13 +210,16 @@ public void onSuccess(ByteBuffer data) { handleMissingPermissions(); return; } - - // Initialize managers - initCallDetection(); - initAudioConflictDetection(); - - // Start with preferred mode - startPreferredMicMode(); + + // Initialize managers + initCallDetection(); + initAudioConflictDetection(); + + // Initialize LC3 encoder/decoder + initLC3Codec(); + + // Start with preferred mode + startPreferredMicMode(); } catch (SecurityException se) { Log.e(TAG, "Security exception during initialization: " + se.getMessage()); handleMissingPermissions(); @@ -529,7 +555,11 @@ public void switchToScoMode() { notifyStatusChange(); scoRetries = 0; // Reset retry counter on success - // Samsung monitoring disabled - using standard monitoring + // Start Samsung monitoring if needed + startSamsungAudioMonitoring(); + + // Reset 30-second recording system for phone mic + resetRecordingSystem(); } catch (Exception e) { Log.e(TAG, "Failed to start SCO mode", e); abandonAudioFocus(); // Release focus on failure @@ -603,7 +633,11 @@ public void switchToNormalMode() { lastModeChangeTime = System.currentTimeMillis(); // Track mode change time notifyStatusChange(); - // Samsung monitoring disabled - using standard monitoring + // Start Samsung monitoring if needed + startSamsungAudioMonitoring(); + + // Reset 30-second recording system for phone mic + resetRecordingSystem(); } catch (Exception e) { Log.e(TAG, "Failed to start normal mode", e); abandonAudioFocus(); // Release focus on failure @@ -646,6 +680,9 @@ public void switchToGlassesMic() { // Samsung monitoring disabled + // Stop 30-second recording system when switching to glasses mic + stopRecordingSystem(); + try { Log.d(TAG, "Switching to glasses onboard microphone"); @@ -756,6 +793,9 @@ private void executePause() { } } + // Stop 30-second recording system + stopRecordingSystem(); + // Update status currentStatus = MicStatus.PAUSED; lastModeChangeTime = System.currentTimeMillis(); // Track mode change time @@ -1200,7 +1240,13 @@ public void onReceive(Context context, Intent intent) { }; try { - context.registerReceiver(audioStateReceiver, filter); + // Use RECEIVER_NOT_EXPORTED since this is internal app functionality + // API 26+ requires explicit export flags for security + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) { + context.registerReceiver(audioStateReceiver, filter, Context.RECEIVER_NOT_EXPORTED); + } else { + context.registerReceiver(audioStateReceiver, filter); + } isReceiverRegistered = true; } catch (Exception e) { Log.e(TAG, "Failed to register audio state receiver", e); @@ -1284,7 +1330,40 @@ public void onRecordingConfigChanged(List configs) // The standard AudioRecordingCallback and audio focus system work better } - // Samsung-specific Gboard detection removed - not needed with standard monitoring + /** + * Register for additional audio events that might indicate Gboard on Samsung + */ + private void registerForAudioNoisyEvents() { + try { + // Register for media button events which Gboard might trigger + IntentFilter mediaFilter = new IntentFilter(); + mediaFilter.addAction(Intent.ACTION_MEDIA_BUTTON); + mediaFilter.addAction("android.speech.action.RECOGNIZE_SPEECH"); + mediaFilter.addAction("com.google.android.googlequicksearchbox.VOICE_SEARCH"); + + BroadcastReceiver gboardReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + Log.d(TAG, "🎤 Detected potential Gboard/voice activity: " + intent.getAction()); + // This might indicate Gboard is trying to use the mic + if (!isExternalAudioActive && (currentStatus == MicStatus.SCO_MODE || + currentStatus == MicStatus.NORMAL_MODE)) { + Log.d(TAG, "Potential Gboard mic request detected - checking focus"); + } + } + }; + + // Use RECEIVER_NOT_EXPORTED since this is internal app functionality + // API 26+ requires explicit export flags for security + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) { + context.registerReceiver(gboardReceiver, mediaFilter, Context.RECEIVER_NOT_EXPORTED); + } else { + context.registerReceiver(gboardReceiver, mediaFilter); + } + } catch (Exception e) { + Log.e(TAG, "Error registering for Gboard detection", e); + } + } /** * Samsung-specific audio detection fallback method @@ -1599,8 +1678,59 @@ public void destroy() { } } + // Stop 30-second recording system + stopRecordingSystem(); + // Clear tracked audio client IDs ourAudioClientIds.clear(); + + // Clean up LC3 codec + cleanupLC3Codec(); + } + + /** + * Initializes the LC3 encoder and decoder + */ + private void initLC3Codec() { + try { + Log.d(TAG, "🔧 Initializing LC3 codec for dual recording..."); + + // Initialize LC3 encoder and decoder + lc3EncoderPtr = L3cCpp.initEncoder(); + lc3DecoderPtr = L3cCpp.initDecoder(); + + if (lc3EncoderPtr != 0 && lc3DecoderPtr != 0) { + lc3Initialized = true; + Log.d(TAG, "✅ LC3 codec initialized successfully"); + } else { + lc3Initialized = false; + Log.e(TAG, "❌ Failed to initialize LC3 codec"); + } + + } catch (Exception e) { + Log.e(TAG, "Failed to initialize LC3 codec", e); + lc3Initialized = false; + } + } + + /** + * Cleans up LC3 encoder and decoder resources + */ + private void cleanupLC3Codec() { + try { + if (lc3EncoderPtr != 0) { + L3cCpp.freeEncoder(lc3EncoderPtr); + lc3EncoderPtr = 0; + } + if (lc3DecoderPtr != 0) { + L3cCpp.freeDecoder(lc3DecoderPtr); + lc3DecoderPtr = 0; + } + lc3Initialized = false; + Log.d(TAG, "🧹 LC3 codec resources cleaned up"); + } catch (Exception e) { + Log.e(TAG, "Error cleaning up LC3 codec", e); + } } /** @@ -1666,4 +1796,372 @@ public void onMicrophonePreferenceChanged() { public void setRequiredData(List requiredData) { this.requiredData = requiredData; } + + // ===== 30-SECOND AUDIO RECORDING SYSTEM ===== + + /** + * Buffers audio data for 30-second recording chunks + */ + private void bufferAudioData(ByteBuffer data) { + // Only record when using phone mic (SCO or NORMAL mode) + if (currentStatus != MicStatus.SCO_MODE && currentStatus != MicStatus.NORMAL_MODE) { + return; + } + + // Start recording timer if this is the first chunk + if (recordingStartTime == 0) { + recordingStartTime = System.currentTimeMillis(); + startRecordingTimer(); + Log.d(TAG, "🎤 Started 30-second audio recording timer"); + Log.d(TAG, "📁 Recordings will be saved to: " + getRecordingsDirectoryPath()); + } + + // Create a deep copy of the buffer to avoid position/limit issues + ByteBuffer copy = ByteBuffer.allocate(data.remaining()); + copy.put(data.duplicate()); + copy.flip(); // Reset position to 0 for reading + + // Add audio data to buffer + audioBuffer.add(copy); + + // Debug logging (only for first few chunks to avoid spam) + if (audioBuffer.size() <= 3) { + Log.d(TAG, "🔍 Buffered chunk " + audioBuffer.size() + ": " + copy.remaining() + " bytes"); + } + } + + /** + * Starts the 30-second recording timer + */ + private void startRecordingTimer() { + if (recordingRunnable != null) { + recordingHandler.removeCallbacks(recordingRunnable); + } + + recordingRunnable = new Runnable() { + @Override + public void run() { + // saveAudioRecording(); + // Reset for next 30-second cycle + recordingStartTime = System.currentTimeMillis(); + startRecordingTimer(); + } + }; + + recordingHandler.postDelayed(recordingRunnable, RECORDING_INTERVAL_MS); + } + + /** + * Saves the buffered audio data to both PCM and LC3 encoded/decoded WAV files + */ + private void saveAudioRecording() { + if (audioBuffer.isEmpty()) { + Log.w(TAG, "No audio data to save"); + return; + } + + try { + // Create recordings directory + File recordingsDir = new File(context.getExternalFilesDir(null), RECORDING_DIR); + if (!recordingsDir.exists()) { + recordingsDir.mkdirs(); + } + + // Calculate actual total data size + int totalDataSize = 0; + for (ByteBuffer buffer : audioBuffer) { + totalDataSize += buffer.remaining(); + } + + // Generate filename with timestamp + String timestamp = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.US).format(new Date()); + String filename = "phone_mic_" + timestamp + ".wav"; + String encodedFilename = "phone_mic_" + timestamp + "_encoded_decoded.wav"; + + // Save original PCM WAV file + File audioFile = new File(recordingsDir, filename); + // savePcmWavFile(audioFile, totalDataSize); + + // Save LC3 encoded/decoded WAV file + File encodedFile = new File(recordingsDir, encodedFilename); + saveLC3EncodedDecodedWavFile(encodedFile); + + // Calculate duration for logging + float durationSeconds = (float) totalDataSize / (16000 * 2); // 16kHz, 16-bit (2 bytes per sample) + int expectedChunks = (int) Math.ceil(30.0 / 0.128); // Expected chunks for 30 seconds at 128ms per chunk + + // Get full filepaths for logging + String fullPath = audioFile.getAbsolutePath(); + String encodedFullPath = encodedFile.getAbsolutePath(); + + Log.d(TAG, "💾 Saved dual audio recordings:"); + Log.d(TAG, " 📁 PCM: " + filename + " (" + audioBuffer.size() + "/" + expectedChunks + " chunks, " + + audioFile.length() + " bytes, " + String.format("%.1f", durationSeconds) + " seconds)"); + Log.d(TAG, " 📁 LC3: " + encodedFilename + " (" + encodedFile.length() + " bytes)"); + Log.d(TAG, " 📁 PCM path: " + fullPath); + Log.d(TAG, " 📁 LC3 path: " + encodedFullPath); + + // Clear buffer for next recording cycle + audioBuffer.clear(); + + } catch (IOException e) { + Log.e(TAG, "Failed to save audio recording", e); + } + } + + /** + * Saves the original PCM data as a WAV file + */ + private void savePcmWavFile(File audioFile, int totalDataSize) throws IOException { + FileOutputStream fos = new FileOutputStream(audioFile); + + // Write WAV header with correct data size + writeWavHeader(fos, totalDataSize); + + // Write audio data + for (ByteBuffer buffer : audioBuffer) { + byte[] array = new byte[buffer.remaining()]; + buffer.duplicate().get(array); // Use duplicate to preserve buffer position + fos.write(array); + } + fos.close(); + } + + /** + * Saves the LC3 encoded/decoded data as a WAV file + */ + private void saveLC3EncodedDecodedWavFile(File encodedFile) throws IOException { + if (!lc3Initialized) { + Log.w(TAG, "LC3 codec not initialized, skipping encoded file"); + return; + } + + try { + // Process audio through LC3 encoder/decoder + List processedAudio = processAudioThroughLC3(); + + if (processedAudio.isEmpty()) { + Log.w(TAG, "No processed audio data available"); + return; + } + + // Calculate total size of processed audio + int totalProcessedSize = 0; + for (byte[] audio : processedAudio) { + totalProcessedSize += audio.length; + } + + FileOutputStream fos = new FileOutputStream(encodedFile); + + // Write WAV header + writeWavHeader(fos, totalProcessedSize); + + // Write processed audio data + for (byte[] audio : processedAudio) { + fos.write(audio); + } + fos.close(); + + } catch (Exception e) { + Log.e(TAG, "Failed to save LC3 encoded/decoded file", e); + } + } + + /** + * Processes audio data through LC3 encoder and decoder + */ + private List processAudioThroughLC3() { + List processedAudio = new ArrayList<>(); + + try { + // LC3 frame parameters + final int SAMPLE_RATE_HZ = 16000; + final int FRAME_DURATION_US = 10000; // 10 ms + final int SAMPLES_PER_FRAME = SAMPLE_RATE_HZ / (1_000_000 / FRAME_DURATION_US); // 160 samples + final int BYTES_PER_FRAME = SAMPLES_PER_FRAME * 2; // 16-bit = 2 bytes/sample = 320 bytes + + Log.d(TAG, "🔧 Processing " + audioBuffer.size() + " chunks through LC3 codec..."); + + // Process each audio chunk + for (int chunkIndex = 0; chunkIndex < audioBuffer.size(); chunkIndex++) { + ByteBuffer buffer = audioBuffer.get(chunkIndex); + byte[] pcmData = new byte[buffer.remaining()]; + buffer.duplicate().get(pcmData); + + // Process in LC3 frames + int offset = 0; + int framesProcessed = 0; + while (offset + BYTES_PER_FRAME <= pcmData.length) { + byte[] frame = new byte[BYTES_PER_FRAME]; + System.arraycopy(pcmData, offset, frame, 0, BYTES_PER_FRAME); + + // Encode to LC3 + byte[] lc3Data = encodeLC3Frame(frame); + + // Decode back to PCM + byte[] decodedFrame = decodeLC3Frame(lc3Data); + + if (decodedFrame != null) { + processedAudio.add(decodedFrame); + framesProcessed++; + } + + offset += BYTES_PER_FRAME; + } + + if (chunkIndex < 3) { // Log first 3 chunks for debugging + Log.d(TAG, "🔍 Chunk " + chunkIndex + ": " + framesProcessed + " frames processed"); + } + } + + Log.d(TAG, "✅ LC3 processing complete: " + processedAudio.size() + " frames generated"); + + } catch (Exception e) { + Log.e(TAG, "Error processing audio through LC3", e); + } + + return processedAudio; + } + + /** + * Encodes a PCM frame to LC3 format + */ + private byte[] encodeLC3Frame(byte[] pcmFrame) { + try { + if (lc3EncoderPtr != 0) { + // Encode PCM frame to LC3 + byte[] lc3Data = L3cCpp.encodeLC3(lc3EncoderPtr, pcmFrame); + return lc3Data; + } + } catch (Exception e) { + Log.e(TAG, "Error encoding LC3 frame", e); + } + return pcmFrame; // Fallback to original frame + } + + /** + * Decodes an LC3 frame back to PCM format + */ + private byte[] decodeLC3Frame(byte[] lc3Frame) { + try { + if (lc3DecoderPtr != 0) { + // Decode LC3 frame back to PCM + byte[] pcmData = L3cCpp.decodeLC3(lc3DecoderPtr, lc3Frame); + return pcmData; + } + } catch (Exception e) { + Log.e(TAG, "Error decoding LC3 frame", e); + } + return lc3Frame; // Fallback to original frame + } + + /** + * Writes WAV header to the output stream + */ + private void writeWavHeader(FileOutputStream fos, int dataSize) throws IOException { + // WAV header constants + final int SAMPLE_RATE = 16000; + final int CHANNELS = 1; + final int BITS_PER_SAMPLE = 16; + final int BYTE_RATE = SAMPLE_RATE * CHANNELS * BITS_PER_SAMPLE / 8; + final int BLOCK_ALIGN = CHANNELS * BITS_PER_SAMPLE / 8; + + // Calculate total file size + int totalSize = 36 + dataSize; + + // Write WAV header + writeString(fos, "RIFF"); // ChunkID + writeInt(fos, totalSize); // ChunkSize + writeString(fos, "WAVE"); // Format + writeString(fos, "fmt "); // Subchunk1ID + writeInt(fos, 16); // Subchunk1Size (PCM = 16) + writeShort(fos, 1); // AudioFormat (PCM = 1) + writeShort(fos, CHANNELS); // NumChannels + writeInt(fos, SAMPLE_RATE); // SampleRate + writeInt(fos, BYTE_RATE); // ByteRate + writeShort(fos, BLOCK_ALIGN); // BlockAlign + writeShort(fos, BITS_PER_SAMPLE); // BitsPerSample + writeString(fos, "data"); // Subchunk2ID + writeInt(fos, dataSize); // Subchunk2Size + } + + /** + * Writes a string to the output stream + */ + private void writeString(FileOutputStream fos, String value) throws IOException { + fos.write(value.getBytes()); + } + + /** + * Writes a 32-bit integer to the output stream (little-endian) + */ + private void writeInt(FileOutputStream fos, int value) throws IOException { + fos.write(value & 0xFF); + fos.write((value >> 8) & 0xFF); + fos.write((value >> 16) & 0xFF); + fos.write((value >> 24) & 0xFF); + } + + /** + * Writes a 16-bit short to the output stream (little-endian) + */ + private void writeShort(FileOutputStream fos, int value) throws IOException { + fos.write(value & 0xFF); + fos.write((value >> 8) & 0xFF); + } + + /** + * Stops the recording system and saves any remaining audio + */ + private void stopRecordingSystem() { + if (recordingRunnable != null) { + recordingHandler.removeCallbacks(recordingRunnable); + recordingRunnable = null; + } + + // Save any remaining audio data + // if (!audioBuffer.isEmpty()) { + // saveAudioRecording(); + // } + + recordingStartTime = 0; + audioBuffer.clear(); + Log.d(TAG, "🛑 Stopped 30-second audio recording system"); + } + + /** + * Resets the recording system for phone mic usage + */ + private void resetRecordingSystem() { + // Clear any existing recording state + if (recordingRunnable != null) { + recordingHandler.removeCallbacks(recordingRunnable); + recordingRunnable = null; + } + + // Reset recording state + recordingStartTime = 0; + audioBuffer.clear(); + Log.d(TAG, "🔄 Reset 30-second audio recording system for phone mic"); + } + + /** + * Gets the recordings directory path for external access + */ + public String getRecordingsDirectoryPath() { + File recordingsDir = new File(context.getExternalFilesDir(null), RECORDING_DIR); + return recordingsDir.getAbsolutePath(); + } + + /** + * Manually triggers saving of current audio buffer (for testing/debugging) + */ + public void manualSaveRecording() { + // if (!audioBuffer.isEmpty()) { + // Log.d(TAG, "🔧 Manual recording save triggered"); + // saveAudioRecording(); + // } else { + // Log.w(TAG, "No audio data available for manual save"); + // } + } } diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/AndroidSGC.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/AndroidSGC.java index 1066e0d055..351d9a21a0 100644 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/AndroidSGC.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/AndroidSGC.java @@ -128,7 +128,7 @@ protected void setFontSizes(){ SMALL_FONT = 0; } - public void connectToSmartGlasses(){ + public void connectToSmartGlasses(SmartGlassesDevice device){ //open the UDP socket to broadcast our IP address openSocket(); @@ -808,6 +808,19 @@ public void displayCustomContent(String json) { displayReferenceCardSimple("CustomDisplayNotImplemented", json); } + @Override + public void clearDisplay() { + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + Log.d(TAG, "=== SENDING CLEAR DISPLAY COMMAND TO ANDROID GLASSES ==="); + + // For Android glasses, we can send an empty text wall to clear the display + // This is a stub implementation since Android glasses have limited display capabilities + Log.d(TAG, "[STUB] Android glasses display cleared (no actual display)"); + } + public void showNaturalLanguageCommandScreen(String prompt, String naturalLanguageArgs){ try { diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/AudioWearableSGC.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/AudioWearableSGC.java index 97a49f76a7..3890391614 100644 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/AudioWearableSGC.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/AudioWearableSGC.java @@ -33,7 +33,7 @@ public AudioWearableSGC(Context context, SmartGlassesDevice smartGlassesDevice){ public void setFontSizes(){ } - public void connectToSmartGlasses(){ + public void connectToSmartGlasses(SmartGlassesDevice device){ connectionEvent(SmartGlassesConnectionState.CONNECTED); } @@ -113,6 +113,19 @@ public void displayCustomContent(String json) { displayTextLine(json); } + @Override + public void clearDisplay() { + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + Log.d(TAG, "=== SENDING CLEAR DISPLAY COMMAND TO AUDIO WEARABLE ==="); + + // For Audio Wearable, we can send a TTS message to indicate display cleared + // This is a stub implementation since Audio Wearable has no visual display + Log.w(TAG, "Audio Wearable does not support clearDisplay"); + } + @Override public void findCompatibleDeviceNames() { EventBus.getDefault().post(new GlassesBluetoothSearchDiscoverEvent(smartGlassesDevice.deviceModelName, "NOTREQUIREDSKIP")); diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/EvenRealitiesG1SGC.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/EvenRealitiesG1SGC.java index 1c00ddff27..266b348b20 100644 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/EvenRealitiesG1SGC.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/EvenRealitiesG1SGC.java @@ -1278,7 +1278,7 @@ private boolean removeBond(BluetoothDevice device) { } @Override - public void connectToSmartGlasses() { + public void connectToSmartGlasses(SmartGlassesDevice device) { // Register bonding receiver IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_BOND_STATE_CHANGED); context.registerReceiver(bondingReceiver, filter); @@ -2906,6 +2906,18 @@ public void displayCustomContent(String content){ Log.d(TAG, "DISPLAY CUSTOM CONTENT"); } + @Override + public void clearDisplay() { + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + Log.d(TAG, "=== SENDING CLEAR DISPLAY COMMAND TO G1 GLASSES ==="); + + // For G1 glasses, we can use the existing clearG1Screen method + clearG1Screen(); + } + private void sendChunks(List chunks){ // Send each chunk with a delay between sends for (byte[] chunk : chunks) { diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/FrameSGC.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/FrameSGC.java index a6c078e4e0..9010050a9b 100644 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/FrameSGC.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/FrameSGC.java @@ -188,7 +188,10 @@ private void stopScanning() { } @Override - public void connectToSmartGlasses() { + public void connectToSmartGlasses(SmartGlassesDevice device) { + if (device != null) { + this.smartGlassesDevice = device; + } Log.d(TAG, "Connecting to Frame glasses"); // Stop scanning if we're still scanning @@ -346,7 +349,7 @@ public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState reconnectAttempts++; int delay = BASE_RECONNECT_DELAY_MS * reconnectAttempts; Log.d(TAG, "Attempting reconnect in " + delay + "ms (attempt " + reconnectAttempts + ")"); - handler.postDelayed(() -> connectToSmartGlasses(), delay); + handler.postDelayed(() -> connectToSmartGlasses(smartGlassesDevice), delay); } } } @@ -894,4 +897,10 @@ private String escapeForLua(String text) { .replace("\r", " ") // Replace carriage returns with spaces .replace("\t", " "); // Replace tabs with spaces } + + @Override + public void clearDisplay() { + // For Frame, emulate clear by drawing empty content and showing it + blankScreen(); + } } \ No newline at end of file diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/MentraLiveSGC.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/MentraLiveSGC.java index e605735454..4870d74b51 100644 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/MentraLiveSGC.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/MentraLiveSGC.java @@ -2328,7 +2328,7 @@ public void findCompatibleDeviceNames() { @Override - public void connectToSmartGlasses() { + public void connectToSmartGlasses(SmartGlassesDevice smartDevice) { Log.d(TAG, "Connecting to Mentra Live glasses"); connectionEvent(SmartGlassesConnectionState.CONNECTING); @@ -2756,6 +2756,15 @@ public void displayCustomContent(String json) { Log.d(TAG, "[STUB] Device has no display. Cannot display custom content"); } + @Override + public void clearDisplay() { + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + Log.w(TAG, "MentraLiveSGC does not support clearDisplay"); + } + @Override public void displayReferenceCardImage(String title, String body, String imgUrl) { Log.d(TAG, "[STUB] Device has no display. Reference card with image would show: " + title); diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/MentraNexSGC.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/MentraNexSGC.java new file mode 100644 index 0000000000..38058c33c2 --- /dev/null +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/MentraNexSGC.java @@ -0,0 +1,3862 @@ +package com.augmentos.augmentos_core.smarterglassesmanager.smartglassescommunicators; + +import android.os.Bundle; + +import com.augmentos.augmentos_core.BuildConfig; + +import mentraos.ble.MentraosBle; +import mentraos.ble.MentraosBle.DisplayText; +import mentraos.ble.MentraosBle.DisplayScrollingText; +import mentraos.ble.MentraosBle.PhoneToGlasses; +//import mentraos.ble.MentraosBle.PhoneToGlasses.PayloadCase; +import mentraos.ble.MentraosBle.GlassesToPhone; +import mentraos.ble.MentraosBle.GlassesToPhone.PayloadCase; +// import mentraos.ble.MentraosBle.PingRequest; // No longer used - phone receives pings instead of sending them +import mentraos.ble.MentraosBle.DisplayImage; +import mentraos.ble.MentraosBle.BatteryStatus; +import mentraos.ble.MentraosBle.ChargingState; +import mentraos.ble.MentraosBle.ChargingState.State; +import mentraos.ble.MentraosBle.DeviceInfo; +import mentraos.ble.MentraosBle.HeadPosition; +import mentraos.ble.MentraosBle.HeadUpAngleResponse; +import mentraos.ble.MentraosBle.PongResponse; +import mentraos.ble.MentraosBle.VadEvent; +import mentraos.ble.MentraosBle.ImageTransferComplete; +import mentraos.ble.MentraosBle.ImageTransferComplete.Status; +import mentraos.ble.MentraosBle.ImuData; +import mentraos.ble.MentraosBle.ButtonEvent; +import mentraos.ble.MentraosBle.HeadGesture; +import mentraos.ble.MentraosBle.BatteryStateRequest; +import mentraos.ble.MentraosBle.MicStateConfig; +import mentraos.ble.MentraosBle.BrightnessConfig; +import mentraos.ble.MentraosBle.AutoBrightnessConfig; +import mentraos.ble.MentraosBle.HeadUpAngleConfig; +import mentraos.ble.MentraosBle.DisplayHeightConfig; +import mentraos.ble.MentraosBle.VersionRequest; +import mentraos.ble.MentraosBle.VersionResponse; +import mentraos.ble.MentraosBle.VadEnabledRequest; +import mentraos.ble.MentraosBle.VadConfigRequest; + +import com.google.protobuf.InvalidProtocolBufferException; + +import android.bluetooth.BluetoothAdapter; +import android.bluetooth.BluetoothDevice; +import android.bluetooth.BluetoothGatt; +import android.bluetooth.BluetoothGattCallback; +import android.bluetooth.BluetoothGattCharacteristic; +import android.bluetooth.BluetoothGattDescriptor; +import android.bluetooth.BluetoothGattService; +import android.bluetooth.BluetoothProfile; +import android.bluetooth.le.BluetoothLeScanner; +import android.bluetooth.le.ScanCallback; +import android.bluetooth.le.ScanFilter; +import android.bluetooth.le.ScanResult; +import android.bluetooth.le.ScanSettings; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.pm.ApplicationInfo; +import android.content.Intent; +import android.content.IntentFilter; +import android.content.SharedPreferences; +import android.graphics.Bitmap; +import android.graphics.Canvas; +import android.graphics.Color; +import android.graphics.Paint; +import android.os.Handler; +import android.os.Message; +import android.os.Handler.Callback; +import android.os.Looper; +import android.util.Log; +import android.util.SparseArray; + +import androidx.preference.PreferenceManager; + +import java.util.concurrent.BlockingQueue; + +import org.json.JSONException; +import org.json.JSONObject; + +//BMP + +import java.util.Random; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.zip.CRC32; +import java.nio.ByteBuffer; + +import com.augmentos.augmentos_core.smarterglassesmanager.SmartGlassesManager; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.isMicEnabledForFrontendEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.smartglassescommunicators.SmartGlassesCommunicator; +import com.augmentos.augmentos_core.smarterglassesmanager.smartglassescommunicators.SmartGlassesFontSize; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.HeadUpAngleEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.DisplayTextEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.DisplayImageEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.utils.BitmapJavaUtils; +import com.augmentos.augmentos_core.smarterglassesmanager.utils.G1FontLoader; +import com.augmentos.augmentos_core.smarterglassesmanager.utils.SmartGlassesConnectionState; +import com.augmentos.augmentos_core.audio.Lc3Player; +import com.google.gson.Gson; +import com.augmentos.smartglassesmanager.cpp.L3cCpp; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.BatteryLevelEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.CaseEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.BrightnessLevelEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.GlassesBluetoothSearchDiscoverEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.GlassesBluetoothSearchStopEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.GlassesHeadDownEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.GlassesHeadUpEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.BleCommandReceiver; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.BleCommandSender; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.HeartbeatSentEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.HeartbeatReceivedEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.supportedglasses.SmartGlassesDevice; +import com.augmentos.augmentos_core.smarterglassesmanager.speechrecognition.augmentos.SpeechRecAugmentos; +import com.augmentos.augmentos_core.R; + +import org.greenrobot.eventbus.EventBus; +import org.json.JSONArray; + +import java.lang.reflect.Method; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.UUID; +import java.util.concurrent.Semaphore; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.Map; +import java.util.HashMap; + +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.GlassesSerialNumberEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.ProtobufSchemaVersionEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.ProtocolVersionResponseEvent; + +import java.io.IOException; +import java.io.InputStream; + +/** + * MentraNexSGC - Smart Glasses Communicator for Mentra Nex Glasses + * + * Heartbeat System: This implementation now follows the protobuf specification where: + * - Glasses send PING messages to the phone + * - Phone responds with PONG messages + * - Phone no longer sends periodic PING messages + */ +public final class MentraNexSGC extends SmartGlassesCommunicator { + private final String TAG = "WearableAi_MentraNexSGC"; + public final String SHARED_PREFS_NAME = "NexGlassesPrefs"; + private final String NEX_MAIN_DEVICE_KEY = "NEX_MAIN_DEVICE_KEY"; + private final String NEX_MAIN_DEVICE_ADDRESS = "NEX_MAIN_DEVICE_ADDRESS"; + private final String SAVED_NEX_ID_KEY = "SAVED_Nex_ID_KEY"; + + private boolean isDebugMode = true; + private boolean isLc3AudioEnabled = true; + + private boolean isVadEnabled = true; + private int vadSensitivity = 50; + + // Count of pings received from glasses (used for battery query timing) + private int heartbeatCount = 0; + private int micBeatCount = 0; + + // Heartbeat timing tracking + private long lastHeartbeatSentTime = 0; + private long lastHeartbeatReceivedTime = 0; + + private int lastReceivedLc3Sequence = -1; + + private BluetoothAdapter bluetoothAdapter; + + private boolean isKilled = false;// + + private final UUID MAIN_SERVICE_UUID = UUID.fromString("00004860-0000-1000-8000-00805f9b34fb"); + private final UUID WRITE_CHAR_UUID = UUID.fromString("000071FF-0000-1000-8000-00805f9b34fb"); + private final UUID NOTIFY_CHAR_UUID = UUID.fromString("000070FF-0000-1000-8000-00805f9b34fb"); + private final UUID CLIENT_CHARACTERISTIC_CONFIG_UUID = UUID.fromString("00002902-0000-1000-8000-00805f9b34fb"); + + private final byte PACKET_TYPE_JSON = (byte) 0x01; + private final byte PACKET_TYPE_PROTOBUF = (byte) 0x02; + private final byte PACKET_TYPE_AUDIO = (byte) 0xA0; + private final byte PACKET_TYPE_IMAGE = (byte) 0xB0; + private final Random random = new Random(); + + private Context context; + private BluetoothGatt mainGlassGatt; + private BluetoothGattCharacteristic mainWriteChar; + private BluetoothGattCharacteristic mainNotifyChar; + private final int MTU_517 = 517; // Maximum MTU we'll use + private final int MTU_DEFAULT = 23; // Default BLE MTU + private int currentMTU = 0; + private int deviceMaxMTU = 0; // Discovered maximum MTU capability + + private volatile boolean isImageSendProgressing = false; + private List currentImageChunks = new ArrayList<>(); + + private SmartGlassesConnectionState connectionState = SmartGlassesConnectionState.DISCONNECTED; + // gatt callbacks + private final int MAIN_TASK_HANDLER_CODE_GATT_STATUS_CHANGED = 110; + private final int MAIN_TASK_HANDLER_CODE_DISCOVER_SERVICES = 120; + private final int MAIN_TASK_HANDLER_CODE_CHARACTERISTIC_VALUE_NOTIFIED = 210; + // actions of device or gatt + private final int MAIN_TASK_HANDLER_CODE_CONNECT_DEVICE = 310; + private final int MAIN_TASK_HANDLER_CODE_DISCONNECT_DEVICE = 320; + private final int MAIN_TASK_HANDLER_CODE_RECONNECT_DEVICE = 350; + private final int MAIN_TASK_HANDLER_CODE_CANCEL_RECONNECT_DEVICE = 360; + private final int MAIN_TASK_HANDLER_CODE_RECONNECT_GATT = 370; + private final int MAIN_TASK_HANDLER_CODE_SCAN_START = 410; + private final int MAIN_TASK_HANDLER_CODE_SCAN_END = 420; + // actions of NEX Glasses + private final int MAIN_TASK_HANDLER_CODE_BATTERY_QUERY = 620; + private final int MAIN_TASK_HANDLER_CODE_HEART_BEAT = 630; + private final Handler mainTaskHandler = new Handler(Looper.getMainLooper(), new Callback() { + @Override + public boolean handleMessage(Message msg) { + final int msgCode = msg.what; + Log.d(TAG, "handleMessage msgCode: " + msgCode); + Log.d(TAG, "handleMessage obj: " + msg.obj); + switch (msgCode) { + case MAIN_TASK_HANDLER_CODE_GATT_STATUS_CHANGED: + break; + case MAIN_TASK_HANDLER_CODE_DISCOVER_SERVICES: + final boolean statusBool = (boolean) msg.obj; + if (statusBool) { + initNexGlasses(mainGlassGatt); + } + break; + case MAIN_TASK_HANDLER_CODE_CHARACTERISTIC_VALUE_NOTIFIED: + final BluetoothGattCharacteristic characteristic = (BluetoothGattCharacteristic) msg.obj; + onCharacteristicChangedHandler(characteristic); + break; + case MAIN_TASK_HANDLER_CODE_CONNECT_DEVICE: + break; + case MAIN_TASK_HANDLER_CODE_DISCONNECT_DEVICE: + break; + case MAIN_TASK_HANDLER_CODE_RECONNECT_DEVICE: { + attemptGattConnection(mainDevice); + } + break; + case MAIN_TASK_HANDLER_CODE_CANCEL_RECONNECT_DEVICE: + break; + case MAIN_TASK_HANDLER_CODE_RECONNECT_GATT: + break; + case MAIN_TASK_HANDLER_CODE_SCAN_START: + break; + case MAIN_TASK_HANDLER_CODE_SCAN_END: + break; + case MAIN_TASK_HANDLER_CODE_BATTERY_QUERY: { + queryBatteryStatus(); + } + break; + case MAIN_TASK_HANDLER_CODE_HEART_BEAT: + // Note: Heartbeat is now handled by receiving ping from glasses + // This case is kept for backward compatibility but no longer used + Log.d(TAG, "Heartbeat handler called - no longer sending periodic pings"); + break; + default: + break; + } + return true; + } + }); + private final Semaphore sendSemaphore = new Semaphore(1); + private boolean isMainConnected = false; + private int currentSeq = 0; + private boolean stopper = false; + private boolean debugStopper = false; + private boolean shouldUseAutoBrightness = false; + private int brightnessValue; + private boolean updatingScreen = false; + + private final int DELAY_BETWEEN_SENDS_MS = 5; // not using now + private final int DELAY_BETWEEN_CHUNKS_SEND = 5; // super small just in case + private final int DELAY_BETWEEN_ACTIONS_SEND = 250; // not using now + // Note: HEARTBEAT_INTERVAL_MS is no longer used since phone receives pings instead of sending them + // private final int HEARTBEAT_INTERVAL_MS = 15000; + private final int MICBEAT_INTERVAL_MS = (1000 * 60) * 30; // micbeat every 30 minutes + private int caseBatteryLevel = -1; + private boolean caseCharging = false; + private boolean caseOpen = false; + private boolean caseRemoved = true; + private int batteryMain = -1; + private int mainReconnectAttempts = 0; + private int reconnectAttempts = 0; // Counts the number of reconnect attempts + private final int BASE_RECONNECT_DELAY_MS = 3000; // Start with 3 seconds + private final int MAX_RECONNECT_DELAY_MS = 60000; + + // heartbeat monitoring (passive - waiting for ping from glasses) + private Handler findCompatibleDevicesHandler; + private boolean isScanningForCompatibleDevices = false; + private boolean isScanning = false; + + private ScanCallback bleScanCallback; + + // mic heartbeat turn on + private Handler micBeatHandler = new Handler(); + private Runnable micBeatRunnable; + + // white list sender + private Handler whiteListHandler = new Handler(); + private boolean whiteListedAlready = false; + + // mic enable Handler + private final Handler micEnableHandler = new Handler(); + private boolean micEnabledAlready = false; + private boolean isMicrophoneEnabled = true; // Track current microphone state + private boolean microphoneStateBeforeDisconnection = false; // Remember state for reconnection + + // notification period sender + private Handler notificationHandler = new Handler(); + private Runnable notificationRunnable; + private boolean notifysStarted = false; + private int notificationNum = 10; + + // text wall periodic sender + private Handler textWallHandler = new Handler(); + private Runnable textWallRunnable; + private boolean textWallsStarted = false; + private int textWallNum = 10; + + private BluetoothDevice mainDevice = null; + private String preferredNexId = null; + private String pendingSavedNexMainName = null; + private String savedNexMainName = null; + private String savedNexMainAddress = null; + private String preferredMainDeviceId = null; + + // Retry handler + private final int BOND_RETRY_DELAY_MS = 5000; // 5-second backoff + + // remember when we connected + private long lastConnectionTimestamp = 0; + private SmartGlassesDevice smartGlassesDevice; + + private final long CONNECTION_TIMEOUT_MS = 10000; // 10 seconds + + // Runnable tasks for handling timeouts + private boolean isBondingReceiverRegistered = false; + private boolean shouldUseGlassesMic = true;// just for test + private boolean lastThingDisplayedWasAnImage = false; + + // lock writing until the last write is successful + // fonts in NexGlasses + private G1FontLoader fontLoader; + + private final int DEBOUNCE_DELAY_MS = 270; // Minimum time between chunk sends + private volatile long lastSendTimestamp = 0; + private long lc3DecoderPtr = 0; + + private final Gson gson = new Gson(); + + private Lc3Player lc3AudioPlayer; + + // Track if protobuf version has been posted to avoid duplicates + private boolean protobufVersionPosted = false; + + public MentraNexSGC(Context context, SmartGlassesDevice smartGlassesDevice) { + super(); + this.context = context; + isDebugMode = isDebug(context); + Log.d(TAG, "Init MentraNexSGC"); + loadPairedDeviceNames(); + loadPairedDeviceAddress(); + // goHomeHandler = new Handler(); + this.smartGlassesDevice = smartGlassesDevice; + preferredMainDeviceId = getPreferredMainDeviceId(context); + brightnessValue = getSavedBrightnessValue(context); + shouldUseAutoBrightness = getSavedAutoBrightnessValue(context); + this.bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); + this.shouldUseGlassesMic = SmartGlassesManager.getSensingEnabled(context) + && !"phone".equals(SmartGlassesManager.getPreferredMic(context)); + + // setup LC3 decoder + if (lc3DecoderPtr == 0) { + lc3DecoderPtr = L3cCpp.initDecoder(); + Log.d(TAG, "initDecoder lc3DecoderPtr:" + lc3DecoderPtr); + } + // setup fonts + fontLoader = new G1FontLoader(context); + // SpeechRecAugmentos.getInstance(context); + // SpeechRecAugmentos.getInstance(context).changeBypassVadForDebuggingState(true); + + // Initialize LC3 audio player + lc3AudioPlayer = new Lc3Player(context); + lc3AudioPlayer.init(); + if (isLc3AudioEnabled) { + lc3AudioPlayer.startPlay(); + } + } + + private final BluetoothGattCallback mainGattCallback = createGattCallback(); + + private BluetoothGattCallback createGattCallback() { + return new BluetoothGattCallback() { + @Override + public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) { + Log.d(TAG, "onConnectionStateChange status State " + (status == BluetoothGatt.GATT_SUCCESS)); + Log.d(TAG, "onConnectionStateChange connected State " + (newState == BluetoothProfile.STATE_CONNECTED)); + + if (status == BluetoothGatt.GATT_SUCCESS) { + + if (newState == BluetoothProfile.STATE_CONNECTED) { + Log.d(TAG, " glass connected, discovering services..."); + gatt.requestConnectionPriority(BluetoothGatt.CONNECTION_PRIORITY_HIGH); + gatt.setPreferredPhy(BluetoothDevice.PHY_LE_2M_MASK, BluetoothDevice.PHY_LE_2M_MASK, + BluetoothDevice.PHY_OPTION_NO_PREFERRED); + + isMainConnected = true; + mainReconnectAttempts = 0; + Log.d(TAG, "Both glasses connected. Stopping BLE scan."); + stopScan(); + + if (!isWorkerRunning) { + Log.d(TAG, "Worker thread is not running. Starting it."); + startWorkerIfNeeded(); + } + + Log.d(TAG, "Discover services calling..."); + gatt.discoverServices(); + updateConnectionState(); + if (mainDevice != null) { + savedNexMainName = mainDevice.getName(); + savedNexMainAddress = mainDevice.getAddress(); + savePairedDeviceNames(); + savePairedDeviceAddress(); + } + + // just for test + // EventBus.getDefault().post(new BatteryLevelEvent(20, true)); + } else if (newState == BluetoothProfile.STATE_DISCONNECTED) { + Log.d(TAG, " glass disconnected, stopping heartbeats"); + Log.d(TAG, "Entering STATE_DISCONNECTED branch for side: "); + + // Save current microphone state before disconnection + microphoneStateBeforeDisconnection = isMicrophoneEnabled; + Log.d(TAG, "Saved microphone state before disconnection: " + microphoneStateBeforeDisconnection); + + // Reset protobuf version posted flag for next connection + protobufVersionPosted = false; + + // Mark both sides as not ready (you could also clear both if one disconnects) + MAX_CHUNK_SIZE = MAX_CHUNK_SIZE_DEFAULT; + BMP_CHUNK_SIZE = MAX_CHUNK_SIZE_DEFAULT; + mainServicesWaiter.setTrue(); + Log.d(TAG, "Set mainServicesWaiter and rightServicesWaiter to true."); + forceSideDisconnection(); + Log.d(TAG, "Called forceSideDisconnection()."); + currentMTU = 0; + // Stop any periodic transmissions + stopMicBeat(); + sendQueue.clear(); + Log.d(TAG, "Stopped heartbeat monitoring and mic beat; cleared sendQueue."); + updateConnectionState(); + Log.d(TAG, "Updated connection state after disconnection."); + if (gatt.getDevice() != null) { + // Close the current gatt connection + Log.d(TAG, "Closing GATT connection for device: " + gatt.getDevice().getAddress()); + gatt.disconnect(); + gatt.close(); + Log.d(TAG, "GATT connection closed."); + } else { + Log.d(TAG, "No GATT device available to disconnect."); + } + } + } else { + // Save current microphone state before connection failure + microphoneStateBeforeDisconnection = isMicrophoneEnabled; + Log.d(TAG, "Saved microphone state before connection failure: " + microphoneStateBeforeDisconnection); + + currentMTU = 0; + MAX_CHUNK_SIZE = MAX_CHUNK_SIZE_DEFAULT; + BMP_CHUNK_SIZE = MAX_CHUNK_SIZE_DEFAULT; + Log.d(TAG, "Unexpected connection state encountered for " + " glass: " + newState); + stopMicBeat(); + sendQueue.clear(); + + // Mark both sides as not ready (you could also clear both if one disconnects) + mainServicesWaiter.setTrue(); + + Log.d(TAG, "Stopped heartbeat monitoring and mic beat; cleared sendQueue due to connection failure."); + + Log.d(TAG, " glass connection failed with status: " + status); + isMainConnected = false; + mainReconnectAttempts++; + if (mainGlassGatt != null) { + mainGlassGatt.disconnect(); + mainGlassGatt.close(); + } + mainGlassGatt = null; + + forceSideDisconnection(); + Log.d(TAG, "Called forceSideDisconnection() after connection failure."); + + // gatt.disconnect(); + // gatt.close(); + Log.d(TAG, "GATT connection disconnected and closed due to failure."); + + mainTaskHandler.sendEmptyMessageDelayed(MAIN_TASK_HANDLER_CODE_RECONNECT_DEVICE, 0); // 1 second + // delay + } + } + + private void forceSideDisconnection() { + Log.d(TAG, "forceSideDisconnection() called for side: "); + // Force disconnection from the other side if necessary + isMainConnected = false; + mainReconnectAttempts++; + Log.d(TAG, "Main glass: Marked as disconnected and incremented mainReconnectAttempts to " + + mainReconnectAttempts); + if (mainGlassGatt != null) { + Log.d(TAG, "Main glass GATT exists. Disconnecting and closing mainGlassGatt."); + mainGlassGatt.disconnect(); + mainGlassGatt.close(); + mainGlassGatt = null; + } else { + Log.d(TAG, "Main glass GATT is already null."); + } + } + + @Override + public void onServicesDiscovered(BluetoothGatt gatt, int status) { + final boolean statusBool = (status == BluetoothGatt.GATT_SUCCESS); + final Message msg = Message.obtain(); + msg.what = MAIN_TASK_HANDLER_CODE_DISCOVER_SERVICES; + msg.obj = statusBool; // Attach any object you want + mainTaskHandler.sendMessage(msg); + } + + @Override + public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, + int status) { + Log.d(TAG, "onCharacteristicWrite callback - "); + final byte[] values = characteristic.getValue(); + if (status == BluetoothGatt.GATT_SUCCESS) { + Log.d(TAG, "onCharacteristicWrite PROC_QUEUE - " + " glass write successful"); + Log.d(TAG, "onCharacteristicWrite len - " + values.length); + final String packetHex = bytesToHex(values); + Log.d(TAG, "onCharacteristicWrite Values - " + packetHex); + final int dataLen = values.length; + if (dataLen > 0) { + final byte packetType = values[0]; + final byte[] protobufData = Arrays.copyOfRange(values, 1, dataLen); + switch (packetType) { + case PACKET_TYPE_PROTOBUF: + // just for test + decodeProtobufsByWrite(protobufData, packetHex); + break; + } + } + } else { + Log.e(TAG, " glass write failed with status: " + status); + if (status == 133) { + Log.d(TAG, "GOT THAT 133 STATUS!"); + } + } + // clear the waiter + mainWaiter.setFalse(); + } + + @Override + public void onDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) { + Log.d(TAG, "PROC - GOT DESCRIPTOR WRITE: " + status); + // clear the waiter + mainServicesWaiter.setFalse(); + } + + @Override + public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) { + final boolean statusBool = status == BluetoothGatt.GATT_SUCCESS; + Log.d(TAG, "🔄 MTU Negotiation Result: Success=" + statusBool + ", Device MTU=" + mtu + ", Status=" + status); + + if (statusBool) { + // Store device capability and calculate actual negotiated MTU + deviceMaxMTU = mtu; // Record what device actually supports + // The actual negotiated MTU is the minimum of our request and device capability + currentMTU = Math.min(MTU_517, mtu); + + Log.d(TAG, "🎯 MTU Negotiation Complete:"); + Log.d(TAG, " 📱 App Requested: " + MTU_517 + " bytes"); + Log.d(TAG, " 📡 Device Supports: " + deviceMaxMTU + " bytes"); + Log.d(TAG, " 🤝 Negotiated MTU: " + currentMTU + " bytes"); + + // Calculate optimal chunk sizes based on negotiated MTU + MAX_CHUNK_SIZE = currentMTU - 10; + BMP_CHUNK_SIZE = currentMTU - 20; // BMP has more config bytes + + Log.d(TAG, "✅ MTU Configuration Complete:"); + Log.d(TAG, " 📊 Final MTU: " + currentMTU + " bytes"); + Log.d(TAG, " 📦 Data Chunk Size: " + MAX_CHUNK_SIZE + " bytes"); + Log.d(TAG, " 🖼️ Image Chunk Size: " + BMP_CHUNK_SIZE + " bytes"); + Log.d(TAG, " 🔧 Device Maximum: " + deviceMaxMTU + " bytes"); + + } else { + Log.w(TAG, "❌ MTU Request Failed - Status: " + status + ", Requested: " + mtu); + + // Simple fallback strategy: 247 → 23 + if (mtu == MTU_517) { + Log.d(TAG, "🔄 247 bytes failed, trying default: " + MTU_DEFAULT + " bytes..."); + Log.d(TAG, "📤 Requesting MTU: " + MTU_DEFAULT + " bytes (fallback)"); + gatt.requestMtu(MTU_DEFAULT); + } else { + Log.w(TAG, "⚠️ All MTU requests failed, using defaults"); + currentMTU = MTU_DEFAULT; + deviceMaxMTU = MTU_DEFAULT; + MAX_CHUNK_SIZE = MAX_CHUNK_SIZE_DEFAULT; + BMP_CHUNK_SIZE = MAX_CHUNK_SIZE_DEFAULT; + + Log.d(TAG, "📋 Fallback Configuration:"); + Log.d(TAG, " 📊 Default MTU: " + MTU_DEFAULT + " bytes"); + Log.d(TAG, " 📦 Data Chunk Size: " + MAX_CHUNK_SIZE + " bytes"); + Log.d(TAG, " 🖼️ Image Chunk Size: " + BMP_CHUNK_SIZE + " bytes"); + } + } + } + + @Override + public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) { + final Message msg = Message.obtain(); + msg.what = MAIN_TASK_HANDLER_CODE_CHARACTERISTIC_VALUE_NOTIFIED; + msg.obj = characteristic; // Attach any object you want + mainTaskHandler.sendMessage(msg); + } + + }; + } + + private void initNexGlasses(BluetoothGatt gatt) { + // Start MTU discovery with our maximum target + Log.d(TAG, "🔍 MTU Discovery: Requesting maximum MTU size: " + MTU_517); + Log.d(TAG, "🎯 Target: Use " + MTU_517 + " bytes max, or " + MTU_DEFAULT + " bytes default"); + Log.d(TAG, "📤 Requesting MTU: " + MTU_517 + " bytes"); + gatt.requestMtu(MTU_517); // Request our maximum MTU + + BluetoothGattService uartService = gatt.getService(MAIN_SERVICE_UUID); + + if (uartService != null) { + BluetoothGattCharacteristic writeChar = uartService.getCharacteristic(WRITE_CHAR_UUID); + BluetoothGattCharacteristic notifyChar = uartService.getCharacteristic(NOTIFY_CHAR_UUID); + + if (writeChar != null) { + mainWriteChar = writeChar; + // enableNotification(gatt, txChar, side); + // txChar.setWriteType(BluetoothGattCharacteristic.WRITE_TYPE_DEFAULT); + Log.d(TAG, " glass TX characteristic found"); + } + + if (notifyChar != null) { + mainNotifyChar = notifyChar; + enableNotification(gatt, notifyChar); + // rxChar.setWriteType(BluetoothGattCharacteristic.WRITE_TYPE_DEFAULT); + Log.d(TAG, " glass RX characteristic found"); + } + + // Mark as connected but wait for setup below to update connection state + isMainConnected = true; + Log.d(TAG, "PROC_QUEUE - left side setup complete"); + + // Manufacturer data decoding moved to connection start + + // setup the NexGlasses + if (isMainConnected) { + // do first battery status query + mainTaskHandler.sendEmptyMessageDelayed(MAIN_TASK_HANDLER_CODE_BATTERY_QUERY, 10); + + // setup brightness + // sendBrightnessCommandHandler + // .postDelayed(() -> sendBrightnessCommand(brightnessValue, + // shouldUseAutoBrightness), 10); + + // Restore previous microphone state or disable if this is the first connection + boolean shouldRestoreMic = microphoneStateBeforeDisconnection; + Log.d(TAG, "Restoring microphone state to: " + shouldRestoreMic + + " (previous state: " + microphoneStateBeforeDisconnection + ")"); + if (shouldRestoreMic) { + startMicBeat((int) MICBEAT_INTERVAL_MS); + } else { + stopMicBeat(); + } + + // enable our AugmentOS notification key + sendWhiteListCommand(10); + + // start mic beat + // startMicBeat(30000); + + showHomeScreen(); // turn on the NexGlasses display + + updateConnectionState(); + + // start sending debug notifications + // startPeriodicNotifications(302); + // start sending debug notifications + //just for test + //startPeriodicTextWall(302); + + // Post protobuf schema version information (only once) + if (!protobufVersionPosted) { + postProtobufSchemaVersionInfo(); + protobufVersionPosted = true; + } + + // Query glasses protobuf version from firmware + queryGlassesProtobufVersionFromFirmware(); + } + } else { + Log.e(TAG, " glass UART service not found"); + } + } + + // working on all phones - must keep the delay + private void enableNotification(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) { + Log.d(TAG, "PROC_QUEUE - Starting notification setup for "); + + // Simply enable notifications + Log.d(TAG, "PROC_QUEUE - setting characteristic notification on side: "); + boolean result = gatt.setCharacteristicNotification(characteristic, true); + Log.d(TAG, "PROC_QUEUE - setCharacteristicNotification result for " + ": " + result); + + // Set write type for the characteristic + characteristic.setWriteType(BluetoothGattCharacteristic.WRITE_TYPE_DEFAULT); + Log.d(TAG, "PROC_QUEUE - write type set for "); + + // wait + Log.d(TAG, "PROC_QUEUE - waiting to enable it on this side: "); + + try { + Thread.sleep(100); + } catch (InterruptedException e) { + Log.e(TAG, "Error sending data: " + e.getMessage()); + } + + Log.d(TAG, "PROC_QUEUE - get descriptor on side: "); + BluetoothGattDescriptor descriptor = characteristic.getDescriptor(CLIENT_CHARACTERISTIC_CONFIG_UUID); + if (descriptor != null) { + Log.d(TAG, "PROC_QUEUE - setting descriptor on side: "); + descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE); + boolean r_result = gatt.writeDescriptor(descriptor); + Log.d(TAG, "PROC_QUEUE - set descriptor on side: " + " with result: " + r_result); + } + } + + private void updateConnectionState() { + if (isMainConnected) { + connectionState = SmartGlassesConnectionState.CONNECTED; + Log.d(TAG, "Main glasses connected"); + lastConnectionTimestamp = System.currentTimeMillis(); + // try { + // Thread.sleep(100); + // } catch (InterruptedException e) { + // e.printStackTrace(); + // } + connectionEvent(connectionState); + } else { + connectionState = SmartGlassesConnectionState.DISCONNECTED; + Log.d(TAG, "No Main glasses connected"); + connectionEvent(connectionState); + } + } + + public boolean doPendingPairingIdsMatch() { + String mainId = parsePairingIdFromDeviceName(pendingSavedNexMainName); + Log.d(TAG, "MainID: " + mainId); + + // ok, HACKY, but if one of them is null, that means that we connected to the + // other on a previous connect + // this whole function shouldn't matter anymore anyway as we properly filter for + // the device name, so it should be fine + // in the future, the way to actually check this would be to check the final ID + // string, which is the only one guaranteed to be unique + if (mainId == null) { + return true; + } + + return mainId != null; + } + + public String parsePairingIdFromDeviceName(String input) { + if (input == null || input.isEmpty()) + return null; + // Regular expression to match the number after "G1_" + Pattern pattern = Pattern.compile("G1_(\\d+)_"); + Matcher matcher = pattern.matcher(input); + + if (matcher.find()) { + return matcher.group(1); // Group 1 contains the number + } + return null; // Return null if no match is found + } + + public void savePreferredNexGlassesDeviceId(Context context, String deviceName) { + context.getSharedPreferences(SHARED_PREFS_NAME, Context.MODE_PRIVATE).edit() + .putString(SAVED_NEX_ID_KEY, deviceName).apply(); + } + + public String getPreferredMainDeviceId(Context context) { + SharedPreferences prefs = context.getSharedPreferences(SHARED_PREFS_NAME, Context.MODE_PRIVATE); + return prefs.getString(SAVED_NEX_ID_KEY, null); + } + + public int getSavedBrightnessValue(Context context) { + return Integer.parseInt(PreferenceManager.getDefaultSharedPreferences(context) + .getString(context.getResources().getString(R.string.SHARED_PREF_BRIGHTNESS), "50")); + } + + public boolean getSavedAutoBrightnessValue(Context context) { + return PreferenceManager.getDefaultSharedPreferences(context) + .getBoolean(context.getResources().getString(R.string.SHARED_PREF_AUTO_BRIGHTNESS), false); + } + + private void savePairedDeviceNames() { + if (savedNexMainName != null) { + context.getSharedPreferences(SHARED_PREFS_NAME, Context.MODE_PRIVATE).edit() + .putString(NEX_MAIN_DEVICE_KEY, savedNexMainName).apply(); + Log.d(TAG, "Saved paired device names: " + savedNexMainName); + } + } + + private void loadPairedDeviceNames() { + SharedPreferences prefs = context.getSharedPreferences(SHARED_PREFS_NAME, Context.MODE_PRIVATE); + savedNexMainName = prefs.getString(NEX_MAIN_DEVICE_KEY, null); + Log.d(TAG, "Loaded paired device names: " + savedNexMainName); + } + + private void savePairedDeviceAddress() { + if (savedNexMainAddress != null) { + context.getSharedPreferences(SHARED_PREFS_NAME, Context.MODE_PRIVATE).edit() + .putString(NEX_MAIN_DEVICE_ADDRESS, savedNexMainAddress).apply(); + Log.d(TAG, "Saved paired device address: " + savedNexMainAddress); + } + } + + private void loadPairedDeviceAddress() { + SharedPreferences prefs = context.getSharedPreferences(SHARED_PREFS_NAME, Context.MODE_PRIVATE); + savedNexMainAddress = prefs.getString(NEX_MAIN_DEVICE_ADDRESS, null); + Log.d(TAG, "Loaded paired device address: " + savedNexMainAddress); + } + + public void deleteEvenSharedPreferences(Context context) { + savePreferredNexGlassesDeviceId(context, null); + SharedPreferences prefs = context.getSharedPreferences(SHARED_PREFS_NAME, Context.MODE_PRIVATE); + prefs.edit().clear().apply(); + Log.d(TAG, "Nuked EvenRealities SharedPreferences"); + } + + private void connectToGatt(BluetoothDevice device) { + if (device == null) { + Log.e(TAG, "Cannot connect to GATT: device is null"); + return; + } + + Log.d(TAG, "connectToGatt called for device: " + device.getName() + " (" + device.getAddress() + ")"); + BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); + if (bluetoothAdapter == null || !bluetoothAdapter.isEnabled()) { + Log.e(TAG, "Bluetooth is disabled or not available. Cannot reconnect to glasses."); + return; + } + + // Reset the services waiter based on device name + Log.d(TAG, "Device identified as main side. Resetting ServicesWaiter."); + mainServicesWaiter.setTrue(); + + // Establish GATT connection based on device name and current connection state + Log.d(TAG, "Connecting GATT to main side."); + mainGlassGatt = device.connectGatt(context, false, mainGattCallback); + isMainConnected = false; // Reset connection state + Log.d(TAG, "Main GATT connection initiated. isMainConnected set to false."); + } + + private void reconnectToGatt(BluetoothDevice device) { + if (isKilled) { + return; + } + connectToGatt(device); // Reuse the connectToGatt method + } + + private final ScanCallback modernScanCallback = new ScanCallback() { + @Override + public void onScanResult(int callbackType, ScanResult result) { + BluetoothDevice device = result.getDevice(); + String name = device.getName(); + + // Now you can reference the bluetoothAdapter field if needed: + if (!bluetoothAdapter.isEnabled()) { + Log.e(TAG, "Bluetooth is disabled"); + return; + } + Log.d(TAG, " === New Device is Found ===" + name + " " + device.getAddress()); + Log.d(TAG, " === new Glasses Device Information ==="); + + // Log all available device information for debugging + Log.d(TAG, "=== Device Information ==="); + Log.d(TAG, "Device Name: " + name); + Log.d(TAG, "Device Address: " + device.getAddress()); + Log.d(TAG, "Device Type: " + device.getType()); + Log.d(TAG, "Device Class: " + device.getBluetoothClass()); + Log.d(TAG, "Bond State: " + device.getBondState()); + + // If we already have saved device names for main... + if (name != null && savedNexMainName != null) { + if (!(name.contains(savedNexMainName))) { + return; // Not a matching device + } + } + + // Identify which side (main) + stopScan(); + mainDevice = device; + mainTaskHandler.sendEmptyMessageDelayed(MAIN_TASK_HANDLER_CODE_RECONNECT_DEVICE, 0); // 1 + // second + // delay + } + + @Override + public void onScanFailed(int errorCode) { + Log.e(TAG, "Scan failed with error: " + errorCode); + } + }; + + private void resetAllBondsAndState() { + Log.d(TAG, "Resetting ALL bonds and internal state for complete fresh start"); + + // Remove both bonds if devices exist + if (mainDevice != null) { + removeBond(mainDevice); + } + + // Reset all internal state + isMainConnected = false; + + // Clear saved device names + pendingSavedNexMainName = null; + + // Close any existing GATT connections + if (mainGlassGatt != null) { + mainGlassGatt.disconnect(); + mainGlassGatt.close(); + mainGlassGatt = null; + } + + // Wait briefly for bond removal to complete + new Handler(Looper.getMainLooper()).postDelayed(() -> { + Log.d(TAG, "Restarting scan after complete bond/state reset"); + connectionState = SmartGlassesConnectionState.SCANNING; + connectionEvent(connectionState); + startScan(); + }, 2000); + } + + /** + * Handles a device with a valid bond + */ + private void handleValidBond(BluetoothDevice device, boolean isLeft) { + Log.d(TAG, "Handling valid bond for " + (isLeft ? "left" : "right") + " glass"); + + // Update state + + // If both glasses are bonded, connect to GATT + if (mainDevice != null) { + Log.d(TAG, "Both glasses have valid bonds - ready to connect to GATT"); + + mainTaskHandler.sendEmptyMessageDelayed(MAIN_TASK_HANDLER_CODE_RECONNECT_DEVICE, 0); // 1 second delay + } else { + // Continue scanning for the other glass + Log.d(TAG, "Still need to find " + (isLeft ? "right" : "left") + " glass - resuming scan"); + startScan(); + } + } + + /** + * Removes an existing bond with a Bluetooth device to force fresh pairing + */ + private boolean removeBond(BluetoothDevice device) { + try { + if (device == null) { + Log.e(TAG, "Cannot remove bond: device is null"); + return false; + } + + Method method = device.getClass().getMethod("removeBond"); + boolean result = (Boolean) method.invoke(device); + Log.d(TAG, "Removing bond for device " + device.getName() + ", result: " + result); + return result; + } catch (Exception e) { + Log.e(TAG, "Error removing bond: " + e.getMessage(), e); + return false; + } + } + + @Override + public void connectToSmartGlasses(SmartGlassesDevice device) { + // Register bonding receiver + Log.d(TAG, "connectToSmartGlasses start"); + Log.d(TAG, "try to ConnectToSmartGlassesing deviceModelName:" + device.deviceModelName + " deviceAddress:" + + device.deviceAddress); + + preferredMainDeviceId = getPreferredMainDeviceId(context); + + if (!bluetoothAdapter.isEnabled()) { + return; + } + + if (device.deviceModelName != null && device.deviceAddress != null) { + stopScan(); + mainDevice = bluetoothAdapter.getRemoteDevice(device.deviceAddress); + mainTaskHandler.sendEmptyMessageDelayed(MAIN_TASK_HANDLER_CODE_RECONNECT_DEVICE, 0); + return; + } + if (savedNexMainAddress != null) { + mainDevice = bluetoothAdapter.getRemoteDevice(savedNexMainAddress); + mainTaskHandler.sendEmptyMessageDelayed(MAIN_TASK_HANDLER_CODE_RECONNECT_DEVICE, 0); + return; + } + + // Start scanning for devices + stopScan(); + connectionState = SmartGlassesConnectionState.SCANNING; + connectionEvent(connectionState); + startScan(); + } + + private void startScan() { + BluetoothLeScanner scanner = bluetoothAdapter.getBluetoothLeScanner(); + if (scanner == null) { + Log.e(TAG, "BluetoothLeScanner not available."); + return; + } + + // Optionally, define filters if needed + List filters = new ArrayList<>(); + // For example, to filter by device name: + // filters.add(new ScanFilter.Builder().setDeviceName("Even G1_").build()); + + // Set desired scan settings + ScanSettings settings = new ScanSettings.Builder().setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY).build(); + + // Start scanning + isScanning = true; + scanner.startScan(filters, settings, modernScanCallback); + scanner.flushPendingScanResults(modernScanCallback); + Log.d(TAG, "CALL START SCAN - Started scanning for devices..."); + + // Ensure scanning state is immediately communicated to UI + connectionState = SmartGlassesConnectionState.SCANNING; + connectionEvent(connectionState); + + // Stop the scan after some time (e.g., 10-15s instead of 60 to avoid + // throttling) + // handler.postDelayed(() -> stopScan(), 10000); + } + + private void stopScan() { + BluetoothLeScanner scanner = bluetoothAdapter.getBluetoothLeScanner(); + if (scanner != null) { + scanner.stopScan(modernScanCallback); + } + isScanning = false; + Log.d(TAG, "Stopped scanning for devices"); + if (bleScanCallback != null && isScanningForCompatibleDevices) { + scanner.stopScan(bleScanCallback); + isScanningForCompatibleDevices = false; + } + + } + + private void bondDevice(BluetoothDevice device) { + try { + Log.d(TAG, "Attempting to bond with device: " + device.getName()); + Method method = device.getClass().getMethod("createBond"); + method.invoke(device); + } catch (Exception e) { + Log.e(TAG, "Bonding failed: " + e.getMessage()); + } + } + + private void attemptGattConnection(BluetoothDevice device) { + // if (!isKilled) + + if (device == null) { + Log.d(TAG, "Cannot connect to GATT: Device is null"); + return; + } + + String deviceName = device.getName(); + if (deviceName == null) { + Log.d(TAG, "Skipping null device name: " + device.getAddress() + + "... this means something horriffic has occured. Look into this."); + return; + } + + Log.d(TAG, "attemptGattConnection called for device: " + deviceName + " (" + device.getAddress() + ")"); + + connectionState = SmartGlassesConnectionState.CONNECTING; + Log.d(TAG, "Setting connectionState to CONNECTING. Notifying connectionEvent."); + connectionEvent(connectionState); + + connectLeftDevice(device); + } + + private void connectLeftDevice(BluetoothDevice device) { + if (mainGlassGatt == null) { + Log.d(TAG, "Attempting GATT connection for Main Glass..."); + mainGlassGatt = device.connectGatt(context, false, mainGattCallback); + isMainConnected = false; + Log.d(TAG, "Main GATT connection initiated. isMainConnected set to false."); + } else { + Log.d(TAG, "Main Glass GATT already exists"); + } + } + + private byte[] createTextPackage(String text, int currentPage, int totalPages, int screenStatus) { + byte[] textBytes = text.getBytes(); + ByteBuffer buffer = ByteBuffer.allocate(9 + textBytes.length); + buffer.put((byte) 0x4E); + buffer.put((byte) (currentSeq++ & 0xFF)); + buffer.put((byte) 1); + buffer.put((byte) 0); + buffer.put((byte) screenStatus); + buffer.put((byte) 0); + buffer.put((byte) 0); + buffer.put((byte) currentPage); + buffer.put((byte) totalPages); + buffer.put(textBytes); + + return buffer.array(); + } + + // Data class to represent a send request + private class SendRequest { + final byte[] data; + public int waitTime = -1; + + SendRequest(byte[] data) { + this.data = data; + } + + SendRequest(byte[] data, int waitTime) { + this.data = data; + this.waitTime = waitTime; + } + } + + // Queue to hold pending requests + private final BlockingQueue sendQueue = new LinkedBlockingQueue<>(); + + private volatile boolean isWorkerRunning = false; + + // Non-blocking function to add new send request + private void sendDataSequentially(byte[] data) { + SendRequest[] chunks = {new SendRequest(data)}; + sendQueue.offer(chunks); + startWorkerIfNeeded(); + } + + // Non-blocking function to add new send request + private void sendDataSequentially(byte[] data, int waitTime) { + SendRequest[] chunks = {new SendRequest(data, waitTime)}; + sendQueue.offer(chunks); + startWorkerIfNeeded(); + } + + private void sendDataSequentially(List data) { + SendRequest[] chunks = new SendRequest[data.size()]; + for (int i = 0; i < data.size(); i++) { + chunks[i] = new SendRequest(data.get(i)); + } + sendQueue.offer(chunks); + startWorkerIfNeeded(); + } + + // Start the worker thread if it's not already running + private synchronized void startWorkerIfNeeded() { + if (!isWorkerRunning) { + isWorkerRunning = true; + new Thread(this::processQueue, "MentraNexSGCProcessQueue").start(); + } + } + + public class BooleanWaiter { + private boolean flag = true; // initially true + + public synchronized void waitWhileTrue() throws InterruptedException { + while (flag) { + wait(); + } + } + + public synchronized void setTrue() { + flag = true; + } + + public synchronized void setFalse() { + flag = false; + notifyAll(); + } + } + + private final BooleanWaiter mainWaiter = new BooleanWaiter(); + private final BooleanWaiter mainServicesWaiter = new BooleanWaiter(); + private final long INITIAL_CONNECTION_DELAY_MS = 350; // Adjust this value as needed + + private void processQueue() { + // First wait until the services are setup and ready to receive data + Log.d(TAG, "PROC_QUEUE - waiting on services waiters"); + try { + mainServicesWaiter.waitWhileTrue(); + } catch (InterruptedException e) { + Log.e(TAG, "Interrupted waiting for descriptor writes: " + e); + } + Log.d(TAG, "PROC_QUEUE - DONE waiting on services waiters"); + + while (!isKilled) { + try { + // Make sure services are ready before processing requests + mainServicesWaiter.waitWhileTrue(); + + // This will block until data is available - no CPU spinning! + SendRequest[] requests = sendQueue.take(); + + for (SendRequest request : requests) { + if (request == null) { + isWorkerRunning = false; + break; + } + + try { + // Force an initial delay so BLE gets all setup + long timeSinceConnection = System.currentTimeMillis() - lastConnectionTimestamp; + if (timeSinceConnection < INITIAL_CONNECTION_DELAY_MS) { + Thread.sleep(INITIAL_CONNECTION_DELAY_MS - timeSinceConnection); + } + + // Send to main glass + if (mainGlassGatt != null && mainWriteChar != null && isMainConnected) { + mainWaiter.setTrue(); + mainWriteChar.setValue(request.data); + mainGlassGatt.writeCharacteristic(mainWriteChar); + lastSendTimestamp = System.currentTimeMillis(); + } + + mainWaiter.waitWhileTrue(); + + Thread.sleep(DELAY_BETWEEN_CHUNKS_SEND); + + // If the packet asked us to do a delay, then do it + if (request.waitTime != -1) { + Thread.sleep(request.waitTime); + } + } catch (InterruptedException e) { + Log.e(TAG, "Error sending data: " + e.getMessage()); + if (isKilled) + break; + } + } + } catch (InterruptedException e) { + if (isKilled) { + Log.d(TAG, "Process queue thread interrupted - shutting down"); + break; + } + Log.e(TAG, "Error in queue processing: " + e.getMessage()); + } + } + + Log.d(TAG, "Process queue thread exiting"); + } + + private final int NOTIFICATION = 0x4B; // Notification command + + private String createNotificationJson(String appIdentifier, String title, String subtitle, String message) { + long currentTime = System.currentTimeMillis() / 1000L; // Unix timestamp in seconds + String currentDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new java.util.Date()); // Date + // format + // for + // 'date' + // field + + NCSNotification ncsNotification = new NCSNotification(notificationNum++, // Increment sequence ID for uniqueness + 1, // type (e.g., 1 = notification type) + appIdentifier, title, subtitle, message, (int) currentTime, // Cast long to int to match Python + currentDate, // Add the current date to the notification + "AugmentOS" // display_name + ); + + Notification notification = new Notification(ncsNotification, "Add"); + + return gson.toJson(notification); + } + + class Notification { + NCSNotification ncs_notification; + String type; + + public Notification() { + // Default constructor + } + + public Notification(NCSNotification ncs_notification, String type) { + this.ncs_notification = ncs_notification; + this.type = type; + } + } + + class NCSNotification { + int msg_id; + int type; + String app_identifier; + String title; + String subtitle; + String message; + int time_s; // Changed from long to int for consistency + String date; // Added to match Python's date field + String display_name; + + public NCSNotification(int msg_id, int type, String app_identifier, String title, String subtitle, + String message, int time_s, String date, String display_name) { + this.msg_id = msg_id; + this.type = type; + this.app_identifier = app_identifier; + this.title = title; + this.subtitle = subtitle; + this.message = message; + this.time_s = time_s; + this.date = date; // Initialize the date field + this.display_name = display_name; + } + } + + private List createNotificationChunks(String json) { + final int MAX_CHUNK_SIZE = 176; // 180 - 4 header bytes + byte[] jsonBytes = json.getBytes(StandardCharsets.UTF_8); + int totalChunks = (int) Math.ceil((double) jsonBytes.length / MAX_CHUNK_SIZE); + + List chunks = new ArrayList<>(); + for (int i = 0; i < totalChunks; i++) { + int start = i * MAX_CHUNK_SIZE; + int end = Math.min(start + MAX_CHUNK_SIZE, jsonBytes.length); + byte[] payloadChunk = Arrays.copyOfRange(jsonBytes, start, end); + + // Create the header + byte[] header = new byte[]{(byte) NOTIFICATION, 0x00, // notify_id (can be updated as needed) + (byte) totalChunks, (byte) i}; + + // Combine header and payload + ByteBuffer chunk = ByteBuffer.allocate(header.length + payloadChunk.length); + chunk.put(header); + chunk.put(payloadChunk); + + chunks.add(chunk.array()); + } + + return chunks; + } + + @Override + public void displayReferenceCardSimple(String title, String body) { + Log.d(TAG, "displayReferenceCardSimple title: " + title + " body:" + body); + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + byte[] textChunks = createTextWallChunksForNex(title + "\n\n" + body); + sendDataSequentially(textChunks); +// List chunks = createTextWallChunks(title + "\n\n" + body); +// for (int i = 0; i < chunks.size(); i++) { +// byte[] chunk = chunks.get(i); +// boolean isLastChunk = (i == chunks.size() - 1); +// +// if (isLastChunk) { +// sendDataSequentially(chunk); +// } else { +// sendDataSequentially(chunk, 300); +// } +// } + Log.d(TAG, "Send simple reference card"); + } + + @Override + public void destroy() { + Log.d(TAG, "MentraNexSGC ONDESTROY"); + + // SpeechRecAugmentos.getInstance(context).destroy(); + + showHomeScreen(); + isKilled = true; + + // stop BLE scanning + stopScan(); + + // Save current microphone state before destroying (for potential future reconnection) + microphoneStateBeforeDisconnection = isMicrophoneEnabled; + Log.d(TAG, "Saved microphone state during destroy: " + microphoneStateBeforeDisconnection); + + // disable the microphone and stop sending micbeat + stopMicBeat(); + + // Stop periodic notifications + stopPeriodicNotifications(); + + // Stop periodic text wall + // stopPeriodicNotifications(); + + if (mainGlassGatt != null) { + mainGlassGatt.disconnect(); + mainGlassGatt.close(); + mainGlassGatt = null; + } + + if (lc3AudioPlayer != null) { + try { + lc3AudioPlayer.stopPlay(); + Log.d(TAG, "LC3 audio player stopped and cleaned up"); + } catch (Exception e) { + Log.e(TAG, "Error stopping LC3 audio player during destroy", e); + } finally { + lc3AudioPlayer = null; + } + } + + if (mainTaskHandler != null) { + mainTaskHandler.removeCallbacksAndMessages(null); + } + if (whiteListHandler != null) { + whiteListHandler.removeCallbacksAndMessages(null); + } + if (micEnableHandler != null) { + micEnableHandler.removeCallbacksAndMessages(null); + } + if (notificationHandler != null) { + notificationHandler.removeCallbacks(notificationRunnable); + } + if (textWallHandler != null) { + textWallHandler.removeCallbacks(textWallRunnable); + } + // if (goHomeHandler != null) + // goHomeHandler.removeCallbacks(goHomeRunnable); + if (findCompatibleDevicesHandler != null) { + findCompatibleDevicesHandler.removeCallbacksAndMessages(null); + } + // free LC3 decoder + if (lc3DecoderPtr != 0) { + L3cCpp.freeDecoder(lc3DecoderPtr); + lc3DecoderPtr = 0; + } + + currentImageChunks.clear(); + isImageSendProgressing = false; + + sendQueue.clear(); + + // Add a dummy element to unblock the take() call if needed + sendQueue.offer(new SendRequest[0]); // is this needed? + + isWorkerRunning = false; + + isMainConnected = false; + + Log.d(TAG, "MentraNexSGC cleanup complete"); + } + + @Override + public boolean isConnected() { + return connectionState == SmartGlassesConnectionState.CONNECTED; + } + + // Remaining methods + @Override + public void showNaturalLanguageCommandScreen(String prompt, String naturalLanguageInput) { + Log.d(TAG, + "showNaturalLanguageCommandScreen prompt: " + prompt + " naturalLanguageInput:" + naturalLanguageInput); + + } + + @Override + public void updateNaturalLanguageCommandScreen(String naturalLanguageArgs) { + Log.d(TAG, "updateNaturalLanguageCommandScreen naturalLanguageArgs: " + naturalLanguageArgs); + + } + + @Override + public void scrollingTextViewIntermediateText(String text) { + Log.d(TAG, "scrollingTextViewIntermediateText text: " + text); + + } + + @Override + public void scrollingTextViewFinalText(String text) { + Log.d(TAG, "scrollingTextViewFinalText text: " + text); + } + + @Override + public void stopScrollingTextViewMode() { + Log.d(TAG, "stopScrollingTextViewMode "); + } + + @Override + public void displayPromptView(String title, String[] options) { + Log.d(TAG, "displayPromptView text:" + title); + } + + @Override + public void displayTextLine(String text) { + Log.d(TAG, "displayTextLine text:" + text); + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + if (updatingScreen) { + return; + } + byte[] textChunks = createTextWallChunksForNex(text); + sendDataSequentially(textChunks); + } + + @Override + public void displayBitmap(Bitmap bmp) { + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + Log.d(TAG, "displayBitmap "); + try { + byte[] bmpBytes = BitmapJavaUtils.convertBitmapTo1BitBmpBytes(bmp, false); + displayBitmapImageForNexGlasses(bmpBytes, bmp.getWidth(), bmp.getHeight()); + } catch (Exception e) { + Log.e(TAG, e.getMessage()); + } + } + + @Override + public void blankScreen() { + Log.d(TAG, "blankScreen "); + } + + @Override + public void displayDoubleTextWall(String textTop, String textBottom) { + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + Log.d(TAG, "displayDoubleTextWall textTop:" + textTop + " textBottom:" + textBottom); + if (updatingScreen) { + return; + } + // List chunks = createDoubleTextWallChunks(textTop, textBottom); + // sendChunks(chunks); + StringBuilder textBuilder = new StringBuilder(); + if (textTop != null) { + textBuilder.append(textTop).append("\n"); + } + if (textBottom != null) { + textBuilder.append(textBottom); + } + final String finalText = textBuilder.toString(); + byte[] textChunks = createTextWallChunksForNex(finalText); + sendDataSequentially(textChunks); + } + + @Override + public void showHomeScreen() { + Log.d(TAG, "showHomeScreen "); + // dis for test + // displayTextWall(" "); + + if (lastThingDisplayedWasAnImage) { + // clearNexScreen(); + lastThingDisplayedWasAnImage = false; + } + } + + public void clearNexGlassesScreen() { + Log.d(TAG, "Clearing NexGlasses screen"); + // byte[] exitCommand = new byte[] { (byte) 0x18 }; + // sendDataSequentially(exitCommand, false); + byte[] theClearBitmapOrSomething = loadEmptyBmpFromAssets(); + Bitmap bmp = BitmapJavaUtils.bytesToBitmap(theClearBitmapOrSomething); + try { + byte[] bmpBytes = BitmapJavaUtils.convertBitmapTo1BitBmpBytes(bmp, false); + displayBitmapImage(bmpBytes); + } catch (Exception e) { + Log.e(TAG, "Error displaying clear bitmap: " + e.getMessage()); + } + } + + @Override + public void setFontSize(SmartGlassesFontSize fontSize) { + Log.d(TAG, "setFontSize "); + } + + @Override + public void displayRowsCard(String[] rowStrings) { + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + Log.d(TAG, "displayRowsCard rowStrings:" + rowStrings.toString()); + if (updatingScreen) { + return; + } + if (rowStrings == null || rowStrings.length == 0) { + return; + } + StringBuilder textBuilder = new StringBuilder(); + for (String bullet : rowStrings) { + textBuilder.append(bullet).append("\n"); + } + final String finalText = textBuilder.toString(); + byte[] textChunks = createTextWallChunksForNex(finalText); + sendDataSequentially(textChunks); + } + + @Override + public void displayBulletList(String title, String[] bullets) { + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + Log.d(TAG, "displayBulletList title:" + title + " bullets:" + bullets.toString()); + if (updatingScreen) { + return; + } + StringBuilder textBuilder = new StringBuilder(); + if (title != null) { + textBuilder.append(title).append("\n"); + } + for (String bullet : bullets) { + textBuilder.append(bullet).append("\n"); + } + final String finalText = textBuilder.toString(); + byte[] textChunks = createTextWallChunksForNex(finalText); + sendDataSequentially(textChunks); + } + + @Override + public void displayReferenceCardImage(String title, String body, String imgUrl) { + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + Log.d(TAG, "displayReferenceCardImage title:" + title + " body:" + body); + } + + @Override + public void displayTextWall(String text) { + Log.d(TAG, "displayTextWall updatingScreen: " + updatingScreen + " text:" + text); + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + if (updatingScreen) { + return; + } + byte[] textChunks = createTextWallChunksForNex(text); + sendDataSequentially(textChunks); + } + + @Override + public void setUpdatingScreen(boolean updatingScreen) { + Log.d(TAG, "setUpdatingScreen updatingScreen:" + updatingScreen); + this.updatingScreen = updatingScreen; + } + + @Override + public void setFontSizes() { + Log.d(TAG, "setFontSizes "); + } + + // get the final full binary packet + private byte[] generateProtobufCommandBytes(PhoneToGlasses phoneToGlasses) { + final byte[] contentBytes = phoneToGlasses.toByteArray(); + final ByteBuffer chunk = ByteBuffer.allocate(contentBytes.length + 1); + + chunk.put(PACKET_TYPE_PROTOBUF); + chunk.put(contentBytes); + + // Enhanced logging for protobuf messages + byte[] result = chunk.array(); + logProtobufMessage(phoneToGlasses, result); + + return result; + } + + // Enhanced logging method for protobuf messages + private void logProtobufMessage(PhoneToGlasses phoneToGlasses, byte[] fullMessage) { + StringBuilder logMessage = new StringBuilder(); + logMessage.append("=== PROTOBUF MESSAGE TO GLASSES ===\n"); + logMessage.append("Message Type: ").append(phoneToGlasses.getPayloadCase()).append("\n"); + + // Extract and log text content if present + if (phoneToGlasses.hasDisplayText()) { + String text = phoneToGlasses.getDisplayText().getText(); + logMessage.append("Text Content: \"").append(text).append("\"\n"); + logMessage.append("Text Length: ").append(text.length()).append(" characters\n"); + } else if (phoneToGlasses.hasDisplayScrollingText()) { + String text = phoneToGlasses.getDisplayScrollingText().getText(); + logMessage.append("Scrolling Text Content: \"").append(text).append("\"\n"); + logMessage.append("Text Length: ").append(text.length()).append(" characters\n"); + } + + // Log message size information + logMessage.append("Protobuf Payload Size: ").append(phoneToGlasses.toByteArray().length).append(" bytes\n"); + logMessage.append("Total Message Size: ").append(fullMessage.length).append(" bytes\n"); + logMessage.append("Packet Type: 0x").append(String.format("%02X", PACKET_TYPE_PROTOBUF)).append("\n"); + logMessage.append("====================================="); + + Log.d(TAG, logMessage.toString()); + } + + // Heartbeat methods for Nex Glasses + // Note: Glasses send ping, phone responds with pong + private byte[] constructPongResponse() { + Log.d(TAG, "Constructing pong response to glasses ping"); + + // Create the PongResponse message + PongResponse pongResponse = PongResponse.newBuilder().build(); + + // Create the PhoneToGlasses message with the pong response + PhoneToGlasses phoneToGlasses = PhoneToGlasses.newBuilder().setPong(pongResponse).build(); + + return generateProtobufCommandBytes(phoneToGlasses); + } + + private byte[] constructBatteryLevelQuery() { + BatteryStateRequest batteryStateRequest = BatteryStateRequest.newBuilder().build(); + + // Create the PhoneToGlasses using its builder and set the batteryStateRequest + PhoneToGlasses phoneToGlasses = PhoneToGlasses.newBuilder().setBatteryState(batteryStateRequest).build(); + + return generateProtobufCommandBytes(phoneToGlasses); + + } + + /** + * Queries the protobuf schema version from the glasses firmware + */ + private void queryGlassesProtobufVersionFromFirmware() { + Log.d(TAG, "=== SENDING GLASSES PROTOBUF VERSION REQUEST ==="); + + // Generate unique message ID for this request + String msgId = "ver_req_" + System.currentTimeMillis(); + + VersionRequest versionRequest = VersionRequest.newBuilder() + .setMsgId(msgId) + .build(); + + PhoneToGlasses phoneToGlasses = PhoneToGlasses.newBuilder() + .setMsgId(msgId) + .setVersionRequest(versionRequest) + .build(); + + byte[] versionQueryPacket = generateProtobufCommandBytes(phoneToGlasses); + sendDataSequentially(versionQueryPacket, 100); + + Log.d(TAG, "Sent glasses protobuf version request with msg_id: " + msgId); + } + + // periodically send a mic ON request so it never turns off + private void startMicBeat(int delay) { + Log.d(TAG, "Starting micbeat"); + if (micBeatCount > 0) { + stopMicBeat(); + } + setMicEnabled(true, 10); + + micBeatRunnable = new Runnable() { + @Override + public void run() { + Log.d(TAG, "SENDING MIC BEAT"); + setMicEnabled(shouldUseGlassesMic, 1); + micBeatHandler.postDelayed(this, MICBEAT_INTERVAL_MS); + } + }; + + micBeatHandler.postDelayed(micBeatRunnable, delay); + } + + @Override + public void findCompatibleDeviceNames() { + Log.d(TAG, "findCompatibleDeviceNames action"); + findCompatibleDeviceNamesHandler(); + + } + + private void findCompatibleDeviceNamesHandler() { + if (isScanningForCompatibleDevices) { + Log.d(TAG, "Scan already in progress, skipping..."); + return; + } + isScanningForCompatibleDevices = true; + BluetoothLeScanner scanner = bluetoothAdapter.getBluetoothLeScanner(); + if (scanner == null) { + Log.e(TAG, "BluetoothLeScanner not available"); + isScanningForCompatibleDevices = false; + return; + } + + List foundDeviceNames = new ArrayList<>(); + if (findCompatibleDevicesHandler == null) { + findCompatibleDevicesHandler = new Handler(Looper.getMainLooper()); + } + + // Optional: add filters if you want to narrow the scan + List filters = new ArrayList<>(); + ScanSettings settings = new ScanSettings.Builder().setScanMode(ScanSettings.SCAN_MODE_BALANCED).build(); + + // Create a modern ScanCallback instead of the deprecated LeScanCallback + bleScanCallback = new ScanCallback() { + @Override + public void onScanResult(int callbackType, ScanResult result) { + BluetoothDevice device = result.getDevice(); + String name = device.getName(); + String address = device.getAddress(); + // if (name != null && name.contains("Even G1_") && name.contains("_L_")) { + // if (name != null && name.toUpperCase().startsWith("E2:D5")) { + if (name != null) { + Log.d(TAG, "bleScanCallback onScanResult: " + name + " address " + device.getAddress()); + synchronized (foundDeviceNames) { + if (!foundDeviceNames.contains(name)) { + foundDeviceNames.add(name); + Log.d(TAG, "Found smart glasses: " + name); + // String adjustedName = parsePairingIdFromDeviceName(name); + String adjustedName = smartGlassesDevice.deviceModelName;// parsePairingIdFromDeviceName(name); + EventBus.getDefault().post(new GlassesBluetoothSearchDiscoverEvent( + smartGlassesDevice.deviceModelName, name, address)); + } + } + } + } + + @Override + public void onBatchScanResults(List results) { + // If needed, handle batch results here + } + + @Override + public void onScanFailed(int errorCode) { + Log.e(TAG, "BLE scan failed with code: " + errorCode); + } + }; + + // Start scanning + scanner.startScan(filters, settings, bleScanCallback); + Log.d(TAG, "Started scanning for smart glasses with BluetoothLeScanner..."); + scanner.flushPendingScanResults(bleScanCallback); + // Stop scanning after 10 seconds (adjust as needed) + findCompatibleDevicesHandler.postDelayed(() -> { + if (bleScanCallback != null) { + scanner.stopScan(bleScanCallback); + } + isScanningForCompatibleDevices = false; + bleScanCallback = null; + Log.d(TAG, "Stopped scanning for smart glasses."); + EventBus.getDefault().post(new GlassesBluetoothSearchStopEvent(smartGlassesDevice.deviceModelName)); + }, 10000); + } + + private void sendWhiteListCommand(int delay) { + if (whiteListedAlready) { + return; + } + whiteListedAlready = true; + + Log.d(TAG, "Sending whitelist command"); + whiteListHandler.postDelayed(new Runnable() { + @Override + public void run() { + List chunks = getWhitelistChunks(); + sendDataSequentially(chunks); + // for (byte[] chunk : chunks) { + // Log.d(TAG, "Sending this chunk for white list:" + bytesToUtf8(chunk)); + // sendDataSequentially(chunk, false); + // + //// // Sleep for 100 milliseconds between sending each chunk + //// try { + //// Thread.sleep(150); + //// } catch (InterruptedException e) { + //// e.printStackTrace(); + //// } + // } + } + }, delay); + } + + private void stopMicBeat() { + setMicEnabled(false, 10); + if (micBeatHandler != null) { + micBeatHandler.removeCallbacksAndMessages(null); + micBeatHandler.removeCallbacksAndMessages(micBeatRunnable); + micBeatRunnable = null; + micBeatCount = 0; + } + } + + private void sendPongResponse() { + // Respond to ping from glasses with pong + lastHeartbeatReceivedTime = System.currentTimeMillis(); + Log.d(TAG, "=== SENDING PONG RESPONSE TO GLASSES === (Time: " + lastHeartbeatReceivedTime + ")"); + + byte[] pongPacket = constructPongResponse(); + + // Send the pong response + if (pongPacket != null) { + sendDataSequentially(pongPacket, 100); + Log.d(TAG, "Pong response sent successfully"); + + // Notify mobile app about pong sent + notifyHeartbeatSent(System.currentTimeMillis()); + } else { + Log.e(TAG, "Failed to construct pong response packet"); + } + + // Still query battery periodically (every 10 pings received) + if (batteryMain == -1 || heartbeatCount % 10 == 0) { + mainTaskHandler.sendEmptyMessageDelayed(MAIN_TASK_HANDLER_CODE_BATTERY_QUERY, 500); + } + + heartbeatCount++; + + // Notify mobile app about heartbeat received + notifyHeartbeatReceived(lastHeartbeatReceivedTime); + } + + private void queryBatteryStatus() { + Log.d(TAG, "=== SENDING BATTERY STATUS QUERY TO GLASSES ==="); + byte[] batteryQueryPacket = constructBatteryLevelQuery(); + // Log.d(TAG, "Sending battery status query: " + + // bytesToHex(batteryQueryPacket)); + + sendDataSequentially(batteryQueryPacket, 250); + } + + public void sendBrightnessCommand(int brightness) { + // Validate brightness range + int validBrightness; + if (brightness != -1) { + validBrightness = (brightness * 63) / 100; + } else { + validBrightness = (30 * 63) / 100; + } + + Log.d(TAG, "=== SENDING BRIGHTNESS COMMAND TO GLASSES ==="); + Log.d(TAG, "Brightness Value: " + brightness + " (validated: " + validBrightness + ")"); + + BrightnessConfig brightnessConfig = BrightnessConfig.newBuilder().setValue(brightness).build(); + + // Create the PhoneToGlasses using its builder and set the brightnessConfig + PhoneToGlasses phoneToGlasses = PhoneToGlasses.newBuilder().setBrightness(brightnessConfig).build(); + + byte[] cmdBytes = generateProtobufCommandBytes(phoneToGlasses); + + sendDataSequentially(cmdBytes, 10); + + Log.d(TAG, "Sent auto light brightness command => Brightness: " + brightness); + EventBus.getDefault().post(new BrightnessLevelEvent(brightness)); + } + + public void sendAutoBrightnessCommand(boolean autoLight) { + Log.d(TAG, "=== SENDING AUTO BRIGHTNESS COMMAND TO GLASSES ==="); + Log.d(TAG, "Auto Brightness Enabled: " + autoLight); + + AutoBrightnessConfig autoBrightnessConfig = AutoBrightnessConfig.newBuilder().setEnabled(autoLight).build(); + PhoneToGlasses phoneToGlasses = PhoneToGlasses.newBuilder().setAutoBrightness(autoBrightnessConfig).build(); + + final byte[] cmdBytes = generateProtobufCommandBytes(phoneToGlasses); + + sendDataSequentially(cmdBytes, 10); + + Log.d(TAG, "Sent auto light sendAutoBrightnessCommand=> " + autoLight); + + EventBus.getDefault().post(new BrightnessLevelEvent(autoLight)); + } + + public void sendHeadUpAngleCommand(int headUpAngle) { + // Validate headUpAngle range (0 ~ 60) + if (headUpAngle < 0) { + headUpAngle = 0; + } else if (headUpAngle > 60) { + headUpAngle = 60; + } + + Log.d(TAG, "=== SENDING HEAD UP ANGLE COMMAND TO GLASSES ==="); + Log.d(TAG, "Head Up Angle: " + headUpAngle + " degrees (validated range: 0-60)"); + + HeadUpAngleConfig headUpAngleConfig = HeadUpAngleConfig.newBuilder().setAngle(headUpAngle).build(); + PhoneToGlasses phoneToGlasses = PhoneToGlasses.newBuilder().setHeadUpAngle(headUpAngleConfig).build(); + + final byte[] cmdBytes = generateProtobufCommandBytes(phoneToGlasses); + + sendDataSequentially(cmdBytes, 10); + + Log.d(TAG, "Sent headUp angle command => Angle: " + headUpAngle); + EventBus.getDefault().post(new HeadUpAngleEvent(headUpAngle)); + } + + private void sendDashboardPositionCommand(int height, int depth) { + // clamp height and depth to 0-8 and 1-9 respectively: + height = Math.max(0, Math.min(height, 8)); + depth = Math.max(1, Math.min(depth, 9)); + + Log.d(TAG, "=== SENDING DASHBOARD POSITION COMMAND TO GLASSES ==="); + Log.d(TAG, "Dashboard Position - Height: " + height + " (0-8), Depth: " + depth + " (1-9)"); + + DisplayHeightConfig displayHeightConfig = DisplayHeightConfig.newBuilder().setHeight(height) + .build(); + PhoneToGlasses phoneToGlasses = PhoneToGlasses.newBuilder().setDisplayHeight(displayHeightConfig).build(); + + final byte[] cmdBytes = generateProtobufCommandBytes(phoneToGlasses); + + sendDataSequentially(cmdBytes, 10); + + Log.d(TAG, "Sent dashboard height/depth command => Height: " + height + ", Depth: " + depth); + // EventBus.getDefault().post(new DashboardPositionEvent(height, depth)); + } + + @Override + public void updateGlassesBrightness(int brightness) { + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + Log.d(TAG, "Updating glasses brightness: " + brightness); + sendBrightnessCommand(brightness); + } + + @Override + public void updateGlassesAutoBrightness(boolean autoBrightness) { + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + Log.d(TAG, "Updating glasses auto brightness: " + autoBrightness); + // sendBrightnessCommand(-1, autoBrightness); + // sendAutoBrightnessCommand(autoBrightness); + // sendPeriodicTextWall(); + + // startSendingDisplayImageTest(); + sendAutoBrightnessCommand(autoBrightness); + } + + @Override + public void updateGlassesHeadUpAngle(int headUpAngle) { + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + Log.d(TAG, "updateGlassesHeadUpAngle headUpAngle: " + headUpAngle); + + sendHeadUpAngleCommand(headUpAngle); + } + + @Override + public void updateGlassesDepthHeight(int depth, int height) { + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + Log.d(TAG, "updateGlassesDepthHeight depth: " + depth + " height:" + height); + + sendDashboardPositionCommand(height, depth); + } + + @Override + public void sendExitCommand() { + Log.d(TAG, "sendExitCommand "); + sendDataSequentially(new byte[]{(byte) 0x18}, 100); + } + + private String bytesToHex(byte[] bytes) { + StringBuilder sb = new StringBuilder(); + for (byte b : bytes) { + sb.append(String.format("%02X ", b)); + } + return sb.toString().trim(); + } + + // microphone stuff + public void setMicEnabled(boolean enable, int delay) { + Log.d(TAG, "setMicEnabled called with enable: " + enable + " and delay: " + delay); + Log.d(TAG, "Running set mic enabled: " + enable); + isMicrophoneEnabled = enable; // Update the state tracker + EventBus.getDefault().post(new isMicEnabledForFrontendEvent(enable)); + micEnableHandler.postDelayed(new Runnable() { + @Override + public void run() { + if (!isConnected()) { + Log.d(TAG, "Tryna start mic: Not connected to glasses"); + return; + } + + Log.d(TAG, "=== SENDING MICROPHONE STATE COMMAND TO GLASSES ==="); + Log.d(TAG, "Microphone Enabled: " + enable); + + MicStateConfig micStateConfig = MicStateConfig.newBuilder().setEnabled(enable).build(); + // micStateConfig.setEnabled(enable); + + // Create the PhoneToGlasses using its builder and set the DisplayText + PhoneToGlasses phoneToGlasses = PhoneToGlasses.newBuilder().setMicState(micStateConfig).build(); + + byte[] micConfigBytes = generateProtobufCommandBytes(phoneToGlasses); + + sendDataSequentially(micConfigBytes, 10); // wait some time to setup the mic + Log.d(TAG, "Sent MIC command: " + bytesToHex(micConfigBytes)); + } + }, delay); + } + + // notifications + private void startPeriodicNotifications(int delay) { + if (notifysStarted) { + return; + } + notifysStarted = true; + + notificationRunnable = new Runnable() { + @Override + public void run() { + // Send notification + sendPeriodicNotification(); + + // Schedule the next notification + notificationHandler.postDelayed(this, 12000); + } + }; + + // Start the first notification after 5 seconds + notificationHandler.postDelayed(notificationRunnable, delay); + } + + private void sendPeriodicNotification() { + if (!isConnected()) { + Log.d(TAG, "Cannot send notification: Not connected to glasses"); + return; + } + + // Example notification data (replace with your actual data) + // String json = createNotificationJson("com.augment.os", "QuestionAnswerer", + // "How much caffeine in dark chocolate?", "25 to 50 grams per piece"); + String json = createNotificationJson("com.augment.os", "QuestionAnswerer", + "How much caffeine in dark chocolate?", "25 to 50 grams per piece"); + Log.d(TAG, "the JSON to send: " + json); + List chunks = createNotificationChunks(json); + // Log.d(TAG, "THE CHUNKS:"); + // Log.d(TAG, chunks.get(0).toString()); + // Log.d(TAG, chunks.get(1).toString()); + for (byte[] chunk : chunks) { + Log.d(TAG, "Sent chunk to glasses: " + bytesToUtf8(chunk)); + } + + // Send each chunk with a short sleep between each send + sendDataSequentially(chunks); + + Log.d(TAG, "Sent periodic notification"); + } + + // text wall debug + private void startPeriodicTextWall(int delay) { + if (textWallsStarted) { + return; + } + textWallsStarted = true; + + textWallRunnable = new Runnable() { + @Override + public void run() { + // Send notification + sendPeriodicTextWall(); + + // Schedule the next notification + textWallHandler.postDelayed(this, 12000); + } + }; + + // Start the first text wall send after 5 seconds + textWallHandler.postDelayed(textWallRunnable, delay); + } + + // Constants for text wall display + private final int TEXT_COMMAND = 0x4E; // Text command + private final int DISPLAY_WIDTH = 488; + private final int DISPLAY_USE_WIDTH = 488; // How much of the display to use + private final float FONT_MULTIPLIER = 1 / 50.0f; + private final int OLD_FONT_SIZE = 21; // Font size + private final float FONT_DIVIDER = 2.0f; + private final int LINES_PER_SCREEN = 5; // Lines per screen + private final int MAX_CHUNK_SIZE_DEFAULT = 176; // Maximum chunk size for BLE packets + private int MAX_CHUNK_SIZE = MAX_CHUNK_SIZE_DEFAULT; // Maximum chunk size for BLE packets + private int BMP_CHUNK_SIZE = 194; + + // private final int INDENT_SPACES = 32; // Number of spaces to indent + // text + + private int textSeqNum = 0; // Sequence number for text packets + + // currently only a single page - 1PAGE CHANGE + private List createTextWallChunks(String text) { + int margin = 5; + + // Get width of single space character + int spaceWidth = calculateTextWidth(" "); + + // Calculate effective display width after accounting for Main margins + // in spaces + int marginWidth = margin * spaceWidth; // Width of left margin in pixels + int effectiveWidth = DISPLAY_WIDTH - (2 * marginWidth); // Subtract left and right margins + + // Split text into lines based on effective display width + List lines = splitIntoLines(text, effectiveWidth); + + // Calculate total pages + int totalPages = 1; // hard set to 1 since we only do 1 page - 1PAGECHANGE + + List allChunks = new ArrayList<>(); + + // Process each page + for (int page = 0; page < totalPages; page++) { + // Get lines for current page + int startLine = page * LINES_PER_SCREEN; + int endLine = Math.min(startLine + LINES_PER_SCREEN, lines.size()); + List pageLines = lines.subList(startLine, endLine); + + // Combine lines for this page with proper indentation + StringBuilder pageText = new StringBuilder(); + + for (String line : pageLines) { + // Add the exact number of spaces for indentation + String indentation = " ".repeat(margin); + pageText.append(indentation).append(line).append("\n"); + } + + byte[] textBytes = pageText.toString().getBytes(StandardCharsets.UTF_8); + int totalChunks = (int) Math.ceil((double) textBytes.length / MAX_CHUNK_SIZE); + + // Create chunks for this page + for (int i = 0; i < totalChunks; i++) { + int start = i * MAX_CHUNK_SIZE; + int end = Math.min(start + MAX_CHUNK_SIZE, textBytes.length); + byte[] payloadChunk = Arrays.copyOfRange(textBytes, start, end); + + // Create header with protocol specifications + byte screenStatus = 0x71; // New content (0x01) + Text Show (0x70) + byte[] header = new byte[]{(byte) TEXT_COMMAND, // Command type + (byte) textSeqNum, // Sequence number + (byte) totalChunks, // Total packages + (byte) i, // Current package number + screenStatus, // Screen status + (byte) 0x00, // new_char_pos0 (high) + (byte) 0x00, // new_char_pos1 (low) + (byte) page, // Current page number + (byte) totalPages // Max page number + }; + + // Combine header and payload + ByteBuffer chunk = ByteBuffer.allocate(header.length + payloadChunk.length); + chunk.put(header); + chunk.put(payloadChunk); + + allChunks.add(chunk.array()); + } + + // Increment sequence number for next page + textSeqNum = (textSeqNum + 1) % 256; + break; // hard set to 1 - 1PAGECHANGE + } + + return allChunks; + } + + // currently only a single page - 1PAGE CHANGE ,for Nex glasses + private byte[] createTextWallChunksForNex(String text) { + DisplayText textNewBuilder = DisplayText + .newBuilder() + .setColor(10000) + .setText(text) + .setSize(48) + .setX(20) + .setY(260) + .build(); + + Log.d(TAG, "=== SENDING TEXT TO GLASSES ==="); + Log.d(TAG, "Text: \"" + text + "\""); + Log.d(TAG, "Text Length: " + text.length() + " characters"); + Log.d(TAG, "DisplayText Builder: " + textNewBuilder.toString()); + + // Create the PhoneToGlasses using its builder and set the DisplayText + PhoneToGlasses phoneToGlasses = PhoneToGlasses + .newBuilder() + .setDisplayText(textNewBuilder) + .build(); + + return generateProtobufCommandBytes(phoneToGlasses); + } + + private byte[] createTextWallChunksForNex(DisplayTextEvent displayTextEvent) { + DisplayText textNewBuilder = DisplayText + .newBuilder() + .setColor(10000) + .setText(displayTextEvent.text) + .setSize(displayTextEvent.size) + .setX(displayTextEvent.x) + .setY(displayTextEvent.y).build(); + + Log.d(TAG, "createTextWallChunksForNex textNewBuilder:" + textNewBuilder.toString()); + // Create the PhoneToGlasses using its builder and set the DisplayText + PhoneToGlasses phoneToGlasses = PhoneToGlasses + .newBuilder() + .setDisplayText(textNewBuilder) + .build(); + + return generateProtobufCommandBytes(phoneToGlasses); + } + + // TextWallChunks for text + private byte[] createTextWallChunksForNexForJson(String text) { + + DisplayTextJson displayText = new DisplayTextJson(); + displayText.setText(text); + displayText.setSize(20); + final String jsonData = gson.toJson(displayText); + + Log.d(TAG, "createTextWallChunksForNext json " + jsonData); + + byte[] contentBytes = jsonData.getBytes(StandardCharsets.UTF_8); + + ByteBuffer chunk = ByteBuffer.allocate(contentBytes.length + 1); + // Create the PhoneToGlasses using its builder and set the DisplayText + + chunk.put(PACKET_TYPE_JSON); + chunk.put(contentBytes); + + byte[] result = new byte[chunk.position()]; + chunk.flip(); + chunk.get(result); + return result; + } + + // create a VerticalScrollingfor Nex glasses + private byte[] createVerticalScrollingTextWallChunksForNex(String text) { + + DisplayScrollingText textNewBuilder = DisplayScrollingText.newBuilder().setText(text).setSize(48) + .setHeight(100).setWidth(200).setAlign(DisplayScrollingText.Alignment.CENTER).setLineSpacing(2) + .setLoop(true).setPauseMs(10).setSpeed(50).setX(20).setY(50).build(); + + Log.d(TAG, "=== SENDING SCROLLING TEXT TO GLASSES ==="); + Log.d(TAG, "Scrolling Text: \"" + text + "\""); + Log.d(TAG, "Text Length: " + text.length() + " characters"); + Log.d(TAG, "DisplayScrollingText Builder: " + textNewBuilder.toString()); + + // Create the PhoneToGlasses using its builder and set the DisplayScrollingText + PhoneToGlasses phoneToGlasses = PhoneToGlasses.newBuilder().setDisplayScrollingText(textNewBuilder).build(); + + return generateProtobufCommandBytes(phoneToGlasses); + } + + private byte[] createStartSendingImageChunksCommand(String streamId, int totalChunks, int width, int height) { + Log.d(TAG, "=== SENDING IMAGE DISPLAY COMMAND TO GLASSES ==="); + Log.d(TAG, "Image Stream ID: " + streamId); + Log.d(TAG, "Total Chunks: " + totalChunks); + Log.d(TAG, "Image Position: X=" + 0 + ", Y=" + 0); + Log.d(TAG, "Image Dimensions: " + width + "x" + height); + Log.d(TAG, "Image Encoding: raw"); + + DisplayImage displayImage = DisplayImage.newBuilder() + .setStreamId(streamId) + .setTotalChunks(totalChunks) + .setX(0) + .setY(0) + .setWidth(width) + .setHeight(height) + .setEncoding("raw") + .build(); + + // Create the PhoneToGlasses using its builder and set the DisplayImage with msg_id + PhoneToGlasses phoneToGlasses = PhoneToGlasses.newBuilder() + .setMsgId("img_start_1") + .setDisplayImage(displayImage) + .build(); + + return generateProtobufCommandBytes(phoneToGlasses); + } + + private int calculateTextWidth(String text) { + int width = 0; + for (char c : text.toCharArray()) { + G1FontLoader.FontGlyph glyph = fontLoader.getGlyph(c); + width += glyph.width + 1; // Add 1 pixel per character for spacing + } + return width * 2; + } + + private List createDoubleTextWallChunks(String text1, String text2) { + // Define column widths and positions + final int LEFT_COLUMN_WIDTH = (int) (DISPLAY_WIDTH * 0.5); // 40% of display for left column + final int RIGHT_COLUMN_START = (int) (DISPLAY_WIDTH * 0.55); // Right column starts at 60% + + // Split texts into lines with specific width constraints + List lines1 = splitIntoLines(text1, LEFT_COLUMN_WIDTH); + List lines2 = splitIntoLines(text2, DISPLAY_WIDTH - RIGHT_COLUMN_START); + + // Ensure we have exactly LINES_PER_SCREEN lines (typically 5) + while (lines1.size() < LINES_PER_SCREEN) { + lines1.add(""); + } + while (lines2.size() < LINES_PER_SCREEN) { + lines2.add(""); + } + + lines1 = lines1.subList(0, LINES_PER_SCREEN); + lines2 = lines2.subList(0, LINES_PER_SCREEN); + + // Get precise space width + int spaceWidth = calculateTextWidth(" "); + + // Construct the text output by merging the lines with precise positioning + StringBuilder pageText = new StringBuilder(); + for (int i = 0; i < LINES_PER_SCREEN; i++) { + String leftText = lines1.get(i).replace("\u2002", ""); // Drop enspaces + String rightText = lines2.get(i).replace("\u2002", ""); + + // Calculate width of left text in pixels + int leftTextWidth = calculateTextWidth(leftText); + + // Calculate exactly how many spaces are needed to position the right column + // correctly + int spacesNeeded = calculateSpacesForAlignment(leftTextWidth, RIGHT_COLUMN_START, spaceWidth); + + // Log detailed alignment info for debugging + Log.d(TAG, String.format("Line %d: Left='%s' (width=%dpx) | Spaces=%d | Right='%s'", i, leftText, + leftTextWidth, spacesNeeded, rightText)); + + // Construct the full line with precise alignment + pageText.append(leftText).append(" ".repeat(spacesNeeded)).append(rightText).append("\n"); + } + + // Convert to bytes and chunk for transmission + return chunkTextForTransmission(pageText.toString()); + } + + private int calculateSpacesForAlignment(int currentWidth, int targetPosition, int spaceWidth) { + // Calculate space needed in pixels + int pixelsNeeded = targetPosition - currentWidth; + + // Calculate spaces needed (with minimum of 1 space for separation) + if (pixelsNeeded <= 0) { + return 1; // Ensure at least one space between columns + } + + // Calculate the exact number of spaces needed + int spaces = (int) Math.ceil((double) pixelsNeeded / spaceWidth); + + // Cap at a reasonable maximum + return Math.min(spaces, 100); + } + + private List chunkTextForTransmission(String text) { + byte[] textBytes = text.getBytes(StandardCharsets.UTF_8); + int totalChunks = (int) Math.ceil((double) textBytes.length / MAX_CHUNK_SIZE); + + List allChunks = new ArrayList<>(); + for (int i = 0; i < totalChunks; i++) { + int start = i * MAX_CHUNK_SIZE; + int end = Math.min(start + MAX_CHUNK_SIZE, textBytes.length); + byte[] payloadChunk = Arrays.copyOfRange(textBytes, start, end); + + // Create header with protocol specifications + byte screenStatus = 0x71; // New content (0x01) + Text Show (0x70) + byte[] header = new byte[]{(byte) TEXT_COMMAND, // Command type + (byte) textSeqNum, // Sequence number + (byte) totalChunks, // Total packages + (byte) i, // Current package number + screenStatus, // Screen status + (byte) 0x00, // new_char_pos0 (high) + (byte) 0x00, // new_char_pos1 (low) + (byte) 0x00, // Current page number (always 0 for now) + (byte) 0x01 // Max page number (always 1) + }; + + // Combine header and payload + ByteBuffer chunk = ByteBuffer.allocate(header.length + payloadChunk.length); + chunk.put(header); + chunk.put(payloadChunk); + + allChunks.add(chunk.array()); + } + + // Increment sequence number for next page + textSeqNum = (textSeqNum + 1) % 256; + + return allChunks; + } + + private int calculateSubstringWidth(String text, int start, int end) { + return calculateTextWidth(text.substring(start, end)); + } + + private List splitIntoLines(String text, int maxDisplayWidth) { + // Replace specific symbols + text = text.replace("⬆", "^").replace("⟶", "-"); + + List lines = new ArrayList<>(); + + // Handle empty or single space case + if (text.isEmpty() || " ".equals(text)) { + lines.add(text); + return lines; + } + + // Split by newlines first + String[] rawLines = text.split("\n"); + + Log.d(TAG, "Splitting text into lines..." + Arrays.toString(rawLines)); + + for (String rawLine : rawLines) { + // Add empty lines for newlines + if (rawLine.isEmpty()) { + lines.add(""); + continue; + } + + int lineLength = rawLine.length(); + int startIndex = 0; + + while (startIndex < lineLength) { + // Get maximum possible end index + int endIndex = lineLength; + + // Calculate width of the entire remaining text + int lineWidth = calculateSubstringWidth(rawLine, startIndex, endIndex); + + Log.d(TAG, "Line length: " + rawLine); + Log.d(TAG, "Calculating line width: " + lineWidth); + + // If entire line fits, add it and move to next line + if (lineWidth <= maxDisplayWidth) { + lines.add(rawLine.substring(startIndex)); + break; + } + + // Binary search to find the maximum number of characters that fit + int left = startIndex + 1; + int right = lineLength; + int bestSplitIndex = startIndex + 1; + + while (left <= right) { + int mid = left + (right - left) / 2; + int width = calculateSubstringWidth(rawLine, startIndex, mid); + + if (width <= maxDisplayWidth) { + bestSplitIndex = mid; + left = mid + 1; + } else { + right = mid - 1; + } + } + + // Now find a good place to break (preferably at a space) + int splitIndex = bestSplitIndex; + + // Look for a space to break at + boolean foundSpace = false; + for (int i = bestSplitIndex; i > startIndex; i--) { + if (rawLine.charAt(i - 1) == ' ') { + splitIndex = i; + foundSpace = true; + break; + } + } + + // If we couldn't find a space in a reasonable range, use the calculated split + // point + if (!foundSpace && bestSplitIndex - startIndex > 2) { + splitIndex = bestSplitIndex; + } + + // Add the line + String line = rawLine.substring(startIndex, splitIndex).trim(); + lines.add(line); + + // Skip any spaces at the beginning of the next line + while (splitIndex < lineLength && rawLine.charAt(splitIndex) == ' ') { + splitIndex++; + } + + startIndex = splitIndex; + } + } + + return lines; + } + + private void sendPeriodicTextWall() { + if (!isConnected()) { + Log.d(TAG, "Cannot send text wall: Not connected to glasses"); + return; + } + + Log.d(TAG, "^^^^^^^^^^^^^ SENDING DEBUG TEXT WALL"); + + // Example text wall content - replace with your actual text content + String sampleText = "This is an example of a text wall that will be displayed on the glasses. " + + "It demonstrates how text can be split into multiple pages and displayed sequentially. "; +// + "Each page contains multiple lines, and each line is carefully formatted to fit the display width. " +// + "The text continues across multiple pages, showing how longer content can be handled effectively."; + final boolean isForG1Glasses = false; + // for g1 + if (isForG1Glasses) { + List chunks = createTextWallChunks(sampleText); + // for NEXglasses + // Send each chunk with a delay between sends + for (byte[] chunk : chunks) { + sendDataSequentially(chunk); + + // try { + // Thread.sleep(150); // 150ms delay between chunks + // } catch (InterruptedException e) { + // e.printStackTrace(); + // } + } + + // Log.d(TAG, "Sent text wall"); + } else { + final boolean isDisplayVerticalScrollingText = false; + if (isDisplayVerticalScrollingText) { + Log.d(TAG, "Sent scrolling text wall " + sampleText + " to NexGlasses "); + + byte[] singleChunks = createVerticalScrollingTextWallChunksForNex(sampleText); + sendDataSequentially(singleChunks); + } else { + // sampleText = "Hello world " + random.nextInt(); + sampleText = sampleText + " " + random.nextInt(); + Log.d(TAG, "Sent text wall " + sampleText + " to NexGlasses "); + + byte[] singleChunks = createTextWallChunksForNex(sampleText); + // byte[] singleChunks = createTextWallChunksForNexForJson(sampleText); + sendDataSequentially(singleChunks); + } + } + } + + private String bytesToUtf8(byte[] bytes) { + return new String(bytes, StandardCharsets.UTF_8); + } + + private void stopPeriodicNotifications() { + if (notificationHandler != null && notificationRunnable != null) { + notificationHandler.removeCallbacks(notificationRunnable); + Log.d(TAG, "Stopped periodic notifications"); + } + } + + // handle white list stuff + private final int WHITELIST_CMD = 0x04; // Command ID for whitelist + + public List getWhitelistChunks() { + // Define the hardcoded whitelist JSON + List apps = new ArrayList<>(); + apps.add(new AppInfo("com.augment.os", "AugmentOS")); + String whitelistJson = createWhitelistJson(apps); + + Log.d(TAG, "Creating chunks for hardcoded whitelist: " + whitelistJson); + + // Convert JSON to bytes and split into chunks + return createWhitelistChunks(whitelistJson); + } + + private String createWhitelistJson(List apps) { + JSONArray appList = new JSONArray(); + try { + // Add each app to the list + for (AppInfo app : apps) { + JSONObject appJson = new JSONObject(); + appJson.put("id", app.getId()); + appJson.put("name", app.getName()); + appList.put(appJson); + } + + JSONObject whitelistJson = new JSONObject(); + whitelistJson.put("calendar_enable", false); + whitelistJson.put("call_enable", false); + whitelistJson.put("msg_enable", false); + whitelistJson.put("ios_mail_enable", false); + + JSONObject appObject = new JSONObject(); + appObject.put("list", appList); + appObject.put("enable", true); + + whitelistJson.put("app", appObject); + + return whitelistJson.toString(); + } catch (JSONException e) { + Log.e(TAG, "Error creating whitelist JSON: " + e.getMessage()); + return "{}"; + } + } + + // Simple class to hold app info + class AppInfo { + private String id; + private String name; + + public AppInfo(String id, String name) { + this.id = id; + this.name = name; + } + + public String getId() { + return id; + } + + public String getName() { + return name; + } + } + + // Helper function to split JSON into chunks + private List createWhitelistChunks(String json) { + // final int MAX_CHUNK_SIZE = 180 - 4; // Reserve space for the header + byte[] jsonBytes = json.getBytes(StandardCharsets.UTF_8); + int totalChunks = (int) Math.ceil((double) jsonBytes.length / MAX_CHUNK_SIZE); + + List chunks = new ArrayList<>(); + for (int i = 0; i < totalChunks; i++) { + int start = i * MAX_CHUNK_SIZE; + int end = Math.min(start + MAX_CHUNK_SIZE, jsonBytes.length); + byte[] payloadChunk = Arrays.copyOfRange(jsonBytes, start, end); + + // Create the header: [WHITELIST_CMD, total_chunks, chunk_index] + byte[] header = new byte[]{(byte) WHITELIST_CMD, // Command ID + (byte) totalChunks, // Total number of chunks + (byte) i // Current chunk index + }; + + // Combine header and payload + ByteBuffer buffer = ByteBuffer.allocate(header.length + payloadChunk.length); + buffer.put(header); + buffer.put(payloadChunk); + + chunks.add(buffer.array()); + } + + return chunks; + } + + @Override + public void onDisplayTextNotified(DisplayTextEvent displayTextEvent) { + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + byte[] textChunks = createTextWallChunksForNex(displayTextEvent); + sendDataSequentially(textChunks); + } + + @Override + public void onDisplayImageNotified(String imageType, String imageSize) { + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + startSendingDisplayImageTest(imageType, imageSize); + } + + @Override + public void displayCustomContent(String content) { + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + Log.d(TAG, "displayCustomContent content: " + content); + } + + @Override + public void clearDisplay() { + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + Log.d(TAG, "=== SENDING CLEAR DISPLAY COMMAND TO GLASSES ==="); + + // Create the clear display protobuf message + mentraos.ble.MentraosBle.ClearDisplay clearDisplay = mentraos.ble.MentraosBle.ClearDisplay.newBuilder() + .build(); + + PhoneToGlasses phoneToGlasses = PhoneToGlasses.newBuilder() + .setMsgId("clear_disp_001") + .setClearDisplay(clearDisplay) + .build(); + + byte[] cmdBytes = generateProtobufCommandBytes(phoneToGlasses); + sendDataSequentially(cmdBytes, 10); + + Log.d(TAG, "Sent clear display command"); + lastThingDisplayedWasAnImage = false; + } + + private void sendChunks(List chunks) { + // Send each chunk with a delay between sends + for (byte[] chunk : chunks) { + sendDataSequentially(chunk); + + // try { + // Thread.sleep(DELAY_BETWEEN_CHUNKS_SEND); // delay between chunks + // } catch (InterruptedException e) { + // e.printStackTrace(); + // } + } + } + + // Add these class variables + private final byte[] GLASSES_ADDRESS = new byte[]{0x00, 0x1c, 0x00, 0x00}; + private final byte[] END_COMMAND = new byte[]{0x20, 0x0d, 0x0e}; + + // for g1 glasses + public void displayBitmapImage(byte[] bmpData) { + Log.d(TAG, "Starting BMP display process"); + + try { + if (bmpData == null || bmpData.length == 0) { + Log.e(TAG, "Invalid BMP data provided"); + return; + } + Log.d(TAG, "Processing BMP data, size: " + bmpData.length + " bytes"); + + // Split into chunks and send + List chunks = createBmpChunks(bmpData); + Log.d(TAG, "Created " + chunks.size() + " chunks"); + + // Send all chunks + sendBmpChunks(chunks); + + // Send end command + sendBmpEndCommand(); + + // Calculate and send CRC + sendBmpCRC(bmpData); + + lastThingDisplayedWasAnImage = true; + + } catch (Exception e) { + Log.e(TAG, "Error in displayBitmapImage: " + e.getMessage()); + } + } + + // for NexGlasses + public void displayBitmapImageForNexGlasses(byte[] bmpData, int width, int height) { + Log.d(TAG, "Starting BMP display process for " + width + "x" + height + " image"); + + try { + if (bmpData == null || bmpData.length == 0) { + Log.e(TAG, "Invalid BMP data provided"); + return; + } + + Log.d(TAG, "Processing BMP data, size: " + bmpData.length + " bytes"); + + // Generate proper 2-byte hex stream ID (e.g., "002A") as per protobuf specification + final int totalChunks = (int) Math.ceil((double) bmpData.length / BMP_CHUNK_SIZE); + final String streamId = String.format("%04X", random.nextInt(0x10000)); // Fixed: 4-digit hex format + byte[] startImageSendingBytes = createStartSendingImageChunksCommand(streamId, totalChunks, width, height); + sendDataSequentially(startImageSendingBytes); + + // Send all chunks with proper stream ID parsing + List chunks = createBmpChunksForNexGlasses(streamId, bmpData, totalChunks); + + // sendBmpChunks(chunks); + currentImageChunks = chunks; + sendDataSequentially(chunks); + + // Send end command + // sendBmpEndCommand(); + + // Calculate and send CRC + // sendBmpCRC(bmpData); + + // lastThingDisplayedWasAnImage = true; + + } catch (Exception e) { + Log.e(TAG, "Error in displayBitmapImage: " + e.getMessage()); + } + } + + // re send the image chunks that are missing + private void reSendImageMissingChunks(List missingChunksIndexList) { + if (!isImageSendProgressing) { + return; + } + if (currentImageChunks.isEmpty()) { + return; + } + if (missingChunksIndexList.isEmpty()) { + return; + } + List missingChunks = new ArrayList<>(); + for (int i = 0; i < missingChunksIndexList.size(); i++) { + missingChunks.add(currentImageChunks.get(i)); + } + + sendDataSequentially(missingChunks); + } + + // for g1 + private List createBmpChunks(byte[] bmpData) { + List chunks = new ArrayList<>(); + int totalChunks = (int) Math.ceil((double) bmpData.length / BMP_CHUNK_SIZE); + Log.d(TAG, "Creating " + totalChunks + " chunks from " + bmpData.length + " bytes"); + + for (int i = 0; i < totalChunks; i++) { + int start = i * BMP_CHUNK_SIZE; + int end = Math.min(start + BMP_CHUNK_SIZE, bmpData.length); + byte[] chunk = Arrays.copyOfRange(bmpData, start, end); + + // First chunk needs address bytes + if (i == 0) { + byte[] headerWithAddress = new byte[2 + GLASSES_ADDRESS.length + chunk.length]; + headerWithAddress[0] = 0x15; // Command + headerWithAddress[1] = (byte) (i & 0xFF); // Sequence + System.arraycopy(GLASSES_ADDRESS, 0, headerWithAddress, 2, GLASSES_ADDRESS.length); + System.arraycopy(chunk, 0, headerWithAddress, 6, chunk.length); + chunks.add(headerWithAddress); + } else { + byte[] header = new byte[2 + chunk.length]; + header[0] = 0x15; // Command + header[1] = (byte) (i & 0xFF); // Sequence + System.arraycopy(chunk, 0, header, 2, chunk.length); + chunks.add(header); + } + } + return chunks; + } + + // for NexGlasses + private List createBmpChunksForNexGlasses(String streamId, byte[] bmpData, int totalChunks) { + List chunks = new ArrayList<>(); + Log.d(TAG, "Creating " + totalChunks + " chunks from " + bmpData.length + " bytes"); + + // Parse hex stream ID to bytes (e.g., "002A" -> 0x00, 0x2A) + int streamIdInt = Integer.parseInt(streamId, 16); + + for (int i = 0; i < totalChunks; i++) { + int start = i * BMP_CHUNK_SIZE; + int end = Math.min(start + BMP_CHUNK_SIZE, bmpData.length); + byte[] chunk = Arrays.copyOfRange(bmpData, start, end); + + byte[] header = new byte[4 + chunk.length]; + header[0] = PACKET_TYPE_IMAGE; // 0xB0 + header[1] = (byte) ((streamIdInt >> 8) & 0xFF); // Stream ID high byte + header[2] = (byte) (streamIdInt & 0xFF); // Stream ID low byte + header[3] = (byte) (i & 0xFF); // Chunk index + System.arraycopy(chunk, 0, header, 4, chunk.length); + chunks.add(header); + } + return chunks; + } + + private void sendBmpChunks(List chunks) { + if (updatingScreen) + return; + for (int i = 0; i < chunks.size(); i++) { + byte[] chunk = chunks.get(i); + Log.d(TAG, "Sending chunk " + i + " of " + chunks.size() + ", size: " + chunk.length); + sendDataSequentially(chunk); + + // try { + // Thread.sleep(25); // Small delay between chunks + // } catch (InterruptedException e) { + // Log.e(TAG, "Sleep interrupted: " + e.getMessage()); + // } + } + } + + private void sendBmpEndCommand() { + if (updatingScreen) { + return; + } + Log.d(TAG, "Sending BMP end command"); + sendDataSequentially(END_COMMAND); + + // try { + // Thread.sleep(100); // Give it time to process + // } catch (InterruptedException e) { + // Log.e(TAG, "Sleep interrupted: " + e.getMessage()); + // } + } + + private void sendBmpCRC(byte[] bmpData) { + // Create data with address for CRC calculation + byte[] dataWithAddress = new byte[GLASSES_ADDRESS.length + bmpData.length]; + System.arraycopy(GLASSES_ADDRESS, 0, dataWithAddress, 0, GLASSES_ADDRESS.length); + System.arraycopy(bmpData, 0, dataWithAddress, GLASSES_ADDRESS.length, bmpData.length); + + // Calculate CRC32 + CRC32 crc = new CRC32(); + crc.update(dataWithAddress); + long crcValue = crc.getValue(); + + // Create CRC command packet + byte[] crcCommand = new byte[5]; + crcCommand[0] = 0x16; // CRC command + crcCommand[1] = (byte) ((crcValue >> 24) & 0xFF); + crcCommand[2] = (byte) ((crcValue >> 16) & 0xFF); + crcCommand[3] = (byte) ((crcValue >> 8) & 0xFF); + crcCommand[4] = (byte) (crcValue & 0xFF); + + Log.d(TAG, "Sending CRC command, CRC value: " + Long.toHexString(crcValue)); + sendDataSequentially(crcCommand); + } + + private byte[] loadEmptyBmpFromAssets() { + try { + // test_bmp.bmp + // empty_bmp.bmp all black + try (InputStream is = context.getAssets().open("test_bmp.bmp")) { + return is.readAllBytes(); + } + } catch (IOException e) { + Log.e(TAG, "Failed to load BMP from assets: " + e.getMessage()); + return null; + } + } + + public void clearBmpDisplay() { + if (updatingScreen) { + return; + } + Log.d(TAG, "Clearing BMP display with EXIT command"); + byte[] exitCommand = new byte[]{0x18}; + sendDataSequentially(exitCommand); + } + + private void sendLoremIpsum() { + if (updatingScreen) { + return; + } + String text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. "; + sendDataSequentially(createTextWallChunks(text)); + } + + private void quickRestartNexGlasses() { + Log.d(TAG, "Sending restart 0x23 0x72 Command"); + sendDataSequentially(new byte[]{(byte) 0x23, (byte) 0x72}); // quick restart comand + } + + @Override + public void changeSmartGlassesMicrophoneState(boolean isMicrophoneEnabled) { + Log.d(TAG, "Microphone state changed: " + isMicrophoneEnabled); + + // Update the shouldUseGlassesMic flag to reflect the current state + this.shouldUseGlassesMic = isMicrophoneEnabled && SmartGlassesManager.getSensingEnabled(context);// && + // !SmartGlassesManager.getForceCoreOnboardMic(context); + Log.d(TAG, "Updated shouldUseGlassesMic to: " + shouldUseGlassesMic); + + if (isMicrophoneEnabled) { + Log.d(TAG, "Microphone enabled, starting audio input handling"); + startMicBeat((int) MICBEAT_INTERVAL_MS); + } else { + Log.d(TAG, "Microphone disabled, stopping audio input handling"); + stopMicBeat(); + } + } + + /** + * Returns whether the microphone is currently enabled + * + * @return true if microphone is enabled, false otherwise + */ + public boolean isMicrophoneEnabled() { + return isMicrophoneEnabled; + } + + private void onCharacteristicChangedHandler(BluetoothGattCharacteristic characteristic) { + if (characteristic.getUuid().equals(NOTIFY_CHAR_UUID)) { + byte[] data = characteristic.getValue(); + String deviceName = mainGlassGatt.getDevice().getName(); + if (deviceName == null) { + return; + } + final String packetHex = bytesToHex(data); + Log.d(TAG, "onCharacteristicChangedHandler len: " + data.length); + Log.d(TAG, "onCharacteristicChangedHandler: " + packetHex); + final int dataLen = data.length; + if (dataLen == 0) { + return; + } + byte packetType = data[0]; + Log.d(TAG, "onCharacteristicChangedHandler packetType: " + String.format("%02X ", packetType)); + switch (packetType) { + case PACKET_TYPE_JSON: { + byte[] jsonData = Arrays.copyOfRange(data, 1, dataLen); + decodeJsons(jsonData); + } + break; + case PACKET_TYPE_PROTOBUF: { + byte[] protobufData = Arrays.copyOfRange(data, 1, dataLen); + decodeProtobufs(protobufData, packetHex); + } + break; + case PACKET_TYPE_AUDIO: { + // Check for audio packet header + if (data[0] == (byte) 0xA0) { + byte sequenceNumber = data[1]; + long receiveTime = System.currentTimeMillis(); + + // Basic sequence validation + if (lastReceivedLc3Sequence != -1 && (byte)(lastReceivedLc3Sequence + 1) != sequenceNumber) { + Log.w(TAG, "LC3 packet sequence mismatch. Expected: " + (lastReceivedLc3Sequence + 1) + ", Got: " + sequenceNumber); + } + lastReceivedLc3Sequence = sequenceNumber; + + final byte[] lc3Data = Arrays.copyOfRange(data, 2, dataLen); + + Log.d(TAG, "Received LC3 audio packet seq=" + sequenceNumber + ", size=" + lc3Data.length); + + // Play LC3 audio directly through LC3 player + if (lc3AudioPlayer != null && isLc3AudioEnabled) { + // Use the original packet format that LC3 player expects + // The original 'data' packet already has the right structure + lc3AudioPlayer.write(data, 0, dataLen); + Log.d(TAG, "Playing LC3 audio directly through LC3 player: " + dataLen + " bytes"); + } else if (!isLc3AudioEnabled) { + Log.d(TAG, "LC3 audio disabled - skipping LC3 audio output"); + } else { + Log.d(TAG, "LC3 player not available - skipping LC3 audio output"); + } + + // Still decode for callback compatibility + if (lc3DecoderPtr != 0) { + final byte[] pcmData = L3cCpp.decodeLC3(lc3DecoderPtr, lc3Data); + Log.d(TAG, "pcmData size:" + pcmData.length); + if (audioProcessingCallback != null) { + if (pcmData != null && pcmData.length > 0) { + // Log.d(TAG, "set onAudioDataAvailable pcmData"); + audioProcessingCallback.onAudioDataAvailable(pcmData); + } + } else { + // If we get here, it means the callback wasn't properly registered + Log.e(TAG, "Audio processing callback is null - callback registration failed!"); + } + } + } + } + break; + case PACKET_TYPE_IMAGE: + break; + default: + Log.d(TAG, "unknown packetType: " + String.format("%02X ", packetType)); + break; + } + } + } + + private void decodeJsons(byte[] jsonBytes) { + final String jsoString = new String(jsonBytes, Charset.defaultCharset()); + try { + JSONObject commandObject = new JSONObject(jsoString); + String type = commandObject.getString("type"); + switch (type) { + case "image_transfer_complete": + break; + case "disconnect": + break; + case "request_battery_state": + break; + case "charging_state": + break; + case "device_info": + // final DeviceInfo deviceInfo = gson.fromJson(jsoString, DeviceInfo.class); + break; + case "enter_pairing_mode": + break; + case "request_head_position": + break; + case "set_head_up_angle": + break; + case "ping": + break; + case "vad_event": + break; + case "imu_data": + break; + case "button_event": + break; + case "head_gesture": + break; + default: + break; + } + } catch (Exception e) { + } + } + + private void decodeProtobufsByWrite(byte[] protobufBytes, String packetHex) { + try { + final PhoneToGlasses phoneToGlasses = PhoneToGlasses.parseFrom(protobufBytes); + Log.d(TAG, "decodeProtobufsByWrite phoneToGlasses: " + phoneToGlasses.toString()); + Log.d(TAG, "decodeProtobufsByWrite phoneToGlasses payloadCase: " + phoneToGlasses.getPayloadCase()); + final String payloadCase = phoneToGlasses.getPayloadCase().toString(); + + if (isDebugMode) { + EventBus.getDefault() + .post(new BleCommandSender(payloadCase, packetHex)); + } + } catch (Exception e) { + } + } + + // decodeProtobufs from binary bytes + private void decodeProtobufs(byte[] protobufBytes, String packetHex) { + try { + final GlassesToPhone glassesToPhone = GlassesToPhone.parseFrom(protobufBytes); + final String payloadCase = glassesToPhone.getPayloadCase().toString(); + Log.d(TAG, "decodeProtobufs glassesToPhone: " + glassesToPhone.toString()); + Log.d(TAG, "decodeProtobufs glassesToPhone payloadCase: " + payloadCase); + if (isDebugMode) { + EventBus.getDefault() + .post(new BleCommandReceiver(payloadCase, packetHex)); + } + switch (glassesToPhone.getPayloadCase()) { + case BATTERY_STATUS: { + final BatteryStatus batteryStatus = glassesToPhone.getBatteryStatus(); + batteryMain = batteryStatus.getLevel(); + EventBus.getDefault() + .post(new BatteryLevelEvent(batteryStatus.getLevel(), batteryStatus.getCharging())); + // EventBus.getDefault().post(new CaseEvent(caseBatteryLevel, caseCharging, + // caseOpen, caseRemoved)); + Log.d(TAG, "batteryStatus: " + batteryStatus.toString()); + } + break; + case CHARGING_STATE: { + final ChargingState chargingState = glassesToPhone.getChargingState(); + + EventBus.getDefault() + .post(new BatteryLevelEvent(batteryMain, chargingState.getState() == State.CHARGING)); + Log.d(TAG, "chargingState: " + chargingState.toString()); + + } + break; + case DEVICE_INFO: { + final DeviceInfo deviceInfo = glassesToPhone.getDeviceInfo(); + Log.d(TAG, "deviceInfo: " + deviceInfo.toString()); + } + break; + case HEAD_POSITION: { + final HeadPosition headPosition = glassesToPhone.getHeadPosition(); + EventBus.getDefault().post(new HeadUpAngleEvent(headPosition.getAngle())); + Log.d(TAG, "headPosition: " + headPosition.toString()); + } + break; + case HEAD_UP_ANGLE_SET: { + final HeadUpAngleResponse headUpAngleResponse = glassesToPhone.getHeadUpAngleSet(); + final boolean setResult = headUpAngleResponse.getSuccess(); + // EventBus.getDefault().post(new + // HeadUpAngleEvent(headUpAngleResponse.getHeadUpAngle())); + // EventBus.getDefault().post(new HeadUpAngleEvent(headUpAngle)); + Log.d(TAG, "headUpAngleResponse: " + headUpAngleResponse.toString()); + } + break; + case PING: { + lastHeartbeatReceivedTime = System.currentTimeMillis(); + Log.d(TAG, "=== RECEIVED PING FROM GLASSES === (Time: " + lastHeartbeatReceivedTime + ")"); + // Respond to ping with pong + sendPongResponse(); + } + break; + case VAD_EVENT: { + // final VadEvent vadEvent = glassesToPhone.getVadEvent(); + // EventBus.getDefault().post(new VadEvent(vadEvent.getVad())); + } + break; + case IMAGE_TRANSFER_COMPLETE: { + final ImageTransferComplete transferComplete = glassesToPhone.getImageTransferComplete(); + Log.d(TAG, "transferComplete: " + transferComplete.toString()); + // EventBus.getDefault().post(new + // ImageTransferCompleteEvent(transferComplete.getImageTransferComplete())); + final ImageTransferComplete.Status status = transferComplete.getStatus(); + switch (status) { + case OK: + currentImageChunks.clear(); + isImageSendProgressing = false; + break; + case INCOMPLETE: + List missingChunksList = transferComplete.getMissingChunksList(); + reSendImageMissingChunks(missingChunksList); + break; + } + } + break; + case IMU_DATA: { + final ImuData imuData = glassesToPhone.getImuData(); + Log.d(TAG, "imuData: " + imuData.toString()); + } + break; + case BUTTON_EVENT: { + final ButtonEvent buttonEvent = glassesToPhone.getButtonEvent(); + Log.d(TAG, "buttonEvent: " + buttonEvent.toString()); + // buttonEvent.getButton().getNumber() + // EventBus.getDefault().post(new ButtonPressEvent( + // smartGlassesDevice.deviceModelName, + // buttonId, + // pressType, + // timestamp)); + } + break; + case HEAD_GESTURE: { + final HeadGesture headGesture = glassesToPhone.getHeadGesture(); + Log.d(TAG, "headGesture: " + headGesture.toString()); + // EventBus.getDefault().post(new GlassesHeadUpEvent()); + // EventBus.getDefault().post(new GlassesHeadDownEvent()); + // EventBus.getDefault().post(new GlassesTapOutputEvent(2, isRight, + // System.currentTimeMillis())); + } + break; + case VERSION_RESPONSE: { + final VersionResponse versionResponse = glassesToPhone.getVersionResponse(); + Log.d(TAG, "=== RECEIVED GLASSES PROTOBUF VERSION RESPONSE ==="); + Log.d(TAG, "Glasses Protobuf Version: " + versionResponse.getVersion()); + Log.d(TAG, "Message ID: " + versionResponse.getMsgId()); + if (!versionResponse.getCommit().isEmpty()) { + Log.d(TAG, "Commit: " + versionResponse.getCommit()); + } + if (!versionResponse.getBuildDate().isEmpty()) { + Log.d(TAG, "Build Date: " + versionResponse.getBuildDate()); + } + + // Post glasses protobuf version event to update UI + EventBus.getDefault().post(new ProtocolVersionResponseEvent( + versionResponse.getVersion(), + versionResponse.getCommit(), + versionResponse.getBuildDate(), + versionResponse.getMsgId() + )); + } + break; + case PAYLOAD_NOT_SET: { + } + break; + default: + Log.d(TAG, "unknown payloadCase: " + payloadCase); + break; + } + + } catch (InvalidProtocolBufferException e) { + e.printStackTrace(); // Handle parsing error + } + + } + + /** + * Decodes serial number from manufacturer data bytes + * + * @param manufacturerData The manufacturer data bytes + * @return Decoded serial number string or null if not found + */ + private String decodeSerialFromManufacturerData(byte[] manufacturerData) { + if (manufacturerData == null || manufacturerData.length < 10) { + return null; + } + + try { + // Convert hex bytes to ASCII string + StringBuilder serialBuilder = new StringBuilder(); + for (int i = 0; i < manufacturerData.length; i++) { + byte b = manufacturerData[i]; + if (b == 0x00) { + // Stop at null terminator + break; + } + if (b >= 0x20 && b <= 0x7E) { + // Only include printable ASCII characters + serialBuilder.append((char) b); + } + } + + String decodedString = serialBuilder.toString().trim(); + + // Check if it looks like a valid Even NexGlasses serial number + if (decodedString.length() >= 12 && (decodedString.startsWith("S1") || decodedString.startsWith("100") + || decodedString.startsWith("110"))) { + return decodedString; + } + + return null; + } catch (Exception e) { + Log.e(TAG, "Error decoding manufacturer data: " + e.getMessage()); + return null; + } + } + + private Boolean isDebug(Context context) { + return BuildConfig.DEBUG; + } + + public void setLc3AudioEnabled(boolean enabled) { + Log.d(TAG, "setLc3AudioEnabled: " + enabled); + this.isLc3AudioEnabled = enabled; + + if (lc3AudioPlayer != null) { + if (enabled) { + // Start LC3 audio player + try { + lc3AudioPlayer.startPlay(); + Log.d(TAG, "LC3 audio player started"); + } catch (Exception e) { + Log.e(TAG, "Failed to start LC3 audio player", e); + } + } else { + // Stop LC3 audio player + try { + lc3AudioPlayer.stopPlay(); + Log.d(TAG, "LC3 audio player stopped"); + // Re-initialize for next use + lc3AudioPlayer.init(); + } catch (Exception e) { + Log.e(TAG, "Failed to stop LC3 audio player", e); + } + } + } + } + + public void setVadEnabled(boolean enabled) { + Log.d(TAG, "setVadEnabled: " + enabled); + this.isVadEnabled = enabled; + + VadEnabledRequest vadEnabledRequest = VadEnabledRequest.newBuilder().setEnabled(enabled).build(); + + PhoneToGlasses phoneToGlasses = PhoneToGlasses.newBuilder() + .setSetVadEnabled(vadEnabledRequest) + .build(); + + byte[] versionQueryPacket = generateProtobufCommandBytes(phoneToGlasses); + sendDataSequentially(versionQueryPacket, 100); + } + + public void setVadSensitivity(int sensitivity) { + Log.d(TAG, "setVadSensitivity: " + sensitivity); + this.vadSensitivity = sensitivity; + + VadConfigRequest vadConfigRequest = VadConfigRequest.newBuilder().setSensitivity(sensitivity).build(); + + PhoneToGlasses phoneToGlasses = PhoneToGlasses.newBuilder() + .setSetVadConfig(vadConfigRequest) + .build(); + + byte[] versionQueryPacket = generateProtobufCommandBytes(phoneToGlasses); + sendDataSequentially(versionQueryPacket, 100); + } + + public void requestVadConfig() { + Log.d(TAG, "requestVadConfig"); + + MentraosBle.VadStatusRequest request = MentraosBle.VadStatusRequest.newBuilder().build(); + + PhoneToGlasses phoneToGlasses = PhoneToGlasses.newBuilder() + .setRequestVadStatus(request) + .build(); + + byte[] versionQueryPacket = generateProtobufCommandBytes(phoneToGlasses); + sendDataSequentially(versionQueryPacket, 100); + } + + public boolean isLc3AudioEnabled() { + return isLc3AudioEnabled; + } + + private class DisplayTextJson { + private String type; + private String msg_id; + private String text; + private String color; + private String font_code; + private int x; + private int y; + private int size; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getMsg_id() { + return msg_id; + } + + public void setMsg_id(String msg_id) { + this.msg_id = msg_id; + } + + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color; + } + + public String getFont_code() { + return font_code; + } + + public void setFont_code(String font_code) { + this.font_code = font_code; + } + + public int getX() { + return x; + } + + public void setX(int x) { + this.x = x; + } + + public int getY() { + return y; + } + + public void setY(int y) { + this.y = y; + } + + public int getSize() { + return size; + } + + public void setSize(int size) { + this.size = size; + } + + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } + } + + // send a test image and display + private void startSendingDisplayImageTest(String imageType, String imageSize) { + if (isImageSendProgressing) { + return; + } + isImageSendProgressing = true; + Log.d(TAG, "startSendingDisplayImageTest - Type: " + imageType + ", Size: " + imageSize); + + try { + // Parse the size dimensions + String[] dimensions = imageSize.split("x"); + int width = Integer.parseInt(dimensions[0]); + int height = Integer.parseInt(dimensions[1]); + + // Generate the test image based on type and size + byte[] bmpData = generateTestImage(imageType, width, height); + if (bmpData != null) { + displayBitmapImageForNexGlasses(bmpData, width, height); + } else { + Log.e(TAG, "Failed to generate test image"); + } + } catch (Exception e) { + Log.e(TAG, "Error generating test image: " + e.getMessage()); + } finally { + isImageSendProgressing = false; + } + } + + /** + * Generates a test bitmap image based on the specified type and size + */ + private byte[] generateTestImage(String imageType, int width, int height) { + try { + // Create a 1-bit bitmap (black and white) + Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); + + // Fill with white background + bitmap.eraseColor(Color.WHITE); + + // Create canvas for drawing + Canvas canvas = new Canvas(bitmap); + Paint paint = new Paint(); + paint.setColor(Color.BLACK); + paint.setStyle(Paint.Style.FILL); + + switch (imageType) { + case "pattern": + // Create continuous horizontal lines pattern + for (int y = 0; y < height; y += 4) { + canvas.drawLine(0, y, width, y, paint); + canvas.drawLine(0, y + 1, width, y + 1, paint); + } + break; + + case "gradient": + // Create a gradient from top to bottom + for (int y = 0; y < height; y++) { + int alpha = (int) (255 * (1.0 - (double) y / height)); + paint.setAlpha(alpha); + canvas.drawLine(0, y, width, y, paint); + } + break; + + case "checkerboard": + // Create a checkerboard pattern + int squareSize = Math.max(1, Math.min(width, height) / 8); + for (int y = 0; y < height; y += squareSize) { + for (int x = 0; x < width; x += squareSize) { + if (((x / squareSize) + (y / squareSize)) % 2 == 0) { + canvas.drawRect(x, y, x + squareSize, y + squareSize, paint); + } + } + } + break; + + case "solid": + // Create a solid black image + canvas.drawRect(0, 0, width, height, paint); + break; + + default: + // Default to pattern + for (int i = 0; i < Math.max(width, height); i += 4) { + canvas.drawLine(i, 0, i + 2, height, paint); + } + break; + } + + // Convert to 1-bit BMP format + return BitmapJavaUtils.convertBitmapTo1BitBmpBytes(bitmap, false); + + } catch (Exception e) { + Log.e(TAG, "Error generating test image: " + e.getMessage()); + return null; + } + } + + /** + * Notify mobile app about heartbeat sent (now used when sending pong responses) + */ + private void notifyHeartbeatSent(long timestamp) { + lastHeartbeatSentTime = timestamp; + // Send heartbeat event to mobile app via EventBus + EventBus.getDefault().post(new HeartbeatSentEvent(timestamp)); + } + + /** + * Notify mobile app about heartbeat received + */ + private void notifyHeartbeatReceived(long timestamp) { + // Send heartbeat event to mobile app via EventBus + EventBus.getDefault().post(new HeartbeatReceivedEvent(timestamp)); + } + + /** + * Get last heartbeat sent timestamp (pong response time) + */ + public long getLastHeartbeatSentTime() { + return lastHeartbeatSentTime; + } + + /** + * Get last heartbeat received timestamp + */ + public long getLastHeartbeatReceivedTime() { + return lastHeartbeatReceivedTime; + } + + /** + * Gets the current protobuf schema version from the compiled protobuf descriptor + */ + public int getProtobufSchemaVersion() { + try { + // Get the protobuf descriptor and extract the schema version + com.google.protobuf.Descriptors.FileDescriptor fileDescriptor = + mentraos.ble.MentraosBle.getDescriptor().getFile(); + + Log.d(TAG, "Proto file descriptor: " + fileDescriptor.getName()); + + // Method 1: Try to access the custom mentra_schema_version option + try { + // Get the file options from the descriptor + com.google.protobuf.DescriptorProtos.FileOptions options = fileDescriptor.getOptions(); + Log.d(TAG, "Got file options: " + options.toString()); + + // Try to access the custom option using the extension registry + // First, check if the extension is available in the generated code + try { + // Look for the generated extension in the MentraosBle class + java.lang.reflect.Field[] fields = mentraos.ble.MentraosBle.class.getDeclaredFields(); + for (java.lang.reflect.Field field : fields) { + if (field.getName().toLowerCase().contains("schema") || + field.getName().toLowerCase().contains("version")) { + Log.d(TAG, "Found potential version field: " + field.getName()); + field.setAccessible(true); + try { + Object value = field.get(null); + if (value instanceof com.google.protobuf.Extension) { + com.google.protobuf.Extension ext = + (com.google.protobuf.Extension) value; + if (options.hasExtension(ext)) { + int version = options.getExtension(ext); + Log.d(TAG, "Found schema version via extension: " + version); + return version; + } + } + } catch (Exception fieldException) { + Log.d(TAG, "Field access failed for " + field.getName() + ": " + fieldException.getMessage()); + } + } + } + } catch (Exception extensionException) { + Log.d(TAG, "Extension search failed: " + extensionException.getMessage()); + } + + } catch (Exception optionsException) { + Log.d(TAG, "Options access failed: " + optionsException.getMessage()); + } + + // Method 2: Try to read from the actual proto file content + try { + String protoVersion = readProtoVersionFromProject(); + if (protoVersion != null) { + Log.d(TAG, "Read proto version from project: " + protoVersion); + return Integer.parseInt(protoVersion); + } + } catch (Exception projectException) { + Log.d(TAG, "Project file reading failed: " + projectException.getMessage()); + } + + + + Log.w(TAG, "Could not extract protobuf schema version dynamically, using fallback"); + return 1; // Fallback to version 1 + + } catch (Exception e) { + Log.e(TAG, "Error getting protobuf schema version: " + e.getMessage(), e); + return 1; // Fallback to version 1 + } + } + + /** + * Gets detailed protobuf build information + */ + public String getProtobufBuildInfo() { + try { + int schemaVersion = getProtobufSchemaVersion(); + String fileDescriptorName = mentraos.ble.MentraosBle.getDescriptor().getFile().getName(); + + return String.format("Schema v%d | %s", schemaVersion, fileDescriptorName); + } catch (Exception e) { + Log.e(TAG, "Error getting protobuf build info: " + e.getMessage(), e); + return "Schema v1 | Unknown"; + } + } + + @Override + public String getProtobufSchemaVersionInfo() { + return getProtobufBuildInfo(); + } + + /** + * Posts protobuf schema version information to EventBus for React Native consumption + */ + public void postProtobufSchemaVersionInfo() { + try { + // Call the version method only once + int schemaVersion = getProtobufSchemaVersion(); + + // Build the info string directly instead of calling getProtobufBuildInfo() + String fileDescriptorName = mentraos.ble.MentraosBle.getDescriptor().getFile().getName(); + String buildInfo = String.format("Schema v%d | %s", schemaVersion, fileDescriptorName); + + ProtobufSchemaVersionEvent event = new ProtobufSchemaVersionEvent( + schemaVersion, + buildInfo, + smartGlassesDevice != null ? smartGlassesDevice.deviceModelName : "Unknown" + ); + + EventBus.getDefault().post(event); + Log.d(TAG, "Posted protobuf schema version event: " + buildInfo); + } catch (Exception e) { + Log.e(TAG, "Error posting protobuf schema version event: " + e.getMessage(), e); + } + } + + /** + * Attempts to read the protobuf schema version from the proto file in the project + */ + private String readProtoVersionFromProject() { + try { + // Try to read from assets first + try (InputStream is = context.getAssets().open("mentraos_ble.proto")) { + String content = new String(is.readAllBytes(), StandardCharsets.UTF_8); + return extractVersionFromProtoContent(content); + } + } catch (Exception assetsException) { + Log.d(TAG, "Could not read from assets: " + assetsException.getMessage()); + } + + try { + // Try to read from resources + try (InputStream is = context.getResources().openRawResource( + context.getResources().getIdentifier("mentraos_ble", "raw", context.getPackageName()))) { + String content = new String(is.readAllBytes(), StandardCharsets.UTF_8); + return extractVersionFromProtoContent(content); + } + } catch (Exception resourcesException) { + Log.d(TAG, "Could not read from resources: " + resourcesException.getMessage()); + } + + // Try to read from the project directory structure + try { + // Look for the proto file in common project locations relative to Android app + String[] projectPaths = { + // Relative to Android project root + "../../mcu_client/mentraos_ble.proto", + "../../../mcu_client/mentraos_ble.proto", + "../../../../mcu_client/mentraos_ble.proto", + // Absolute paths from common Android locations + "/data/data/" + context.getPackageName() + "/../../mcu_client/mentraos_ble.proto", + // Try external storage + android.os.Environment.getExternalStorageDirectory() + "/MentraOS/mcu_client/mentraos_ble.proto" + }; + + for (String path : projectPaths) { + try { + java.io.File protoFile = new java.io.File(path); + Log.d(TAG, "Checking path: " + protoFile.getAbsolutePath()); + if (protoFile.exists() && protoFile.canRead()) { + Log.d(TAG, "Found proto file at: " + protoFile.getAbsolutePath()); + String content = new String(java.nio.file.Files.readAllBytes(protoFile.toPath()), StandardCharsets.UTF_8); + return extractVersionFromProtoContent(content); + } + } catch (Exception pathException) { + Log.d(TAG, "Path check failed for " + path + ": " + pathException.getMessage()); + } + } + } catch (Exception projectException) { + Log.d(TAG, "Project file reading failed: " + projectException.getMessage()); + } + + return null; + } + + /** + * Extracts version number from proto file content + */ + private String extractVersionFromProtoContent(String content) { + try { + // Look for the mentra_schema_version option + java.util.regex.Pattern pattern = java.util.regex.Pattern.compile( + "option\\s*\\(\\s*mentra_schema_version\\s*\\)\\s*=\\s*(\\d+)\\s*;"); + java.util.regex.Matcher matcher = pattern.matcher(content); + + if (matcher.find()) { + String version = matcher.group(1); + Log.d(TAG, "Extracted version from proto content: " + version); + return version; + } + + Log.d(TAG, "No mentra_schema_version found in proto content"); + return null; + } catch (Exception e) { + Log.e(TAG, "Error extracting version from proto content: " + e.getMessage()); + return null; + } + } +} diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/SmartGlassesCommunicator.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/SmartGlassesCommunicator.java index 57f9bcba5e..9128a92e08 100644 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/SmartGlassesCommunicator.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/SmartGlassesCommunicator.java @@ -5,8 +5,11 @@ import android.os.Looper; import android.util.Log; +import com.augmentos.augmentos_core.smarterglassesmanager.supportedglasses.SmartGlassesDevice; import com.augmentos.augmentoslib.events.GlassesTapOutputEvent; import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.SmartGlassesConnectionEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.DisplayTextEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.DisplayImageEvent; import com.augmentos.augmentos_core.smarterglassesmanager.hci.AudioProcessingCallback; import com.augmentos.augmentos_core.smarterglassesmanager.utils.SmartGlassesConnectionState; @@ -21,41 +24,52 @@ public abstract class SmartGlassesCommunicator { // Audio callback for direct processing (replacing EventBus) public AudioProcessingCallback audioProcessingCallback; - public abstract void connectToSmartGlasses(); + public abstract void connectToSmartGlasses(SmartGlassesDevice device); + public abstract void findCompatibleDeviceNames(); + public abstract void blankScreen(); + public abstract void destroy(); + public final String commandNaturalLanguageString = "Command: "; public final String finishNaturalLanguageString = "'finish command' when done"; - public void setUpdatingScreen(boolean updatingScreen) {} + public void setUpdatingScreen(boolean updatingScreen) { + } //reference card public abstract void displayReferenceCardSimple(String title, String body); //display text wall public abstract void displayTextWall(String text); + public abstract void displayDoubleTextWall(String textTop, String textBottom); public abstract void displayReferenceCardImage(String title, String body, String imgUrl); - public abstract void displayBulletList(String title, String [] bullets); + + public abstract void displayBulletList(String title, String[] bullets); + public abstract void displayRowsCard(String[] rowStrings); //voice command UI public abstract void showNaturalLanguageCommandScreen(String prompt, String naturalLanguageArgs); + public abstract void updateNaturalLanguageCommandScreen(String naturalLanguageArgs); //scrolling text view - public void startScrollingTextViewMode(String title){ + public void startScrollingTextViewMode(String title) { setMode(SmartGlassesModes.SCROLLING_TEXT_VIEW); } public abstract void scrollingTextViewIntermediateText(String text); + public abstract void scrollingTextViewFinalText(String text); + public abstract void stopScrollingTextViewMode(); //prompt view card - public abstract void displayPromptView(String title, String [] options); + public abstract void displayPromptView(String title, String[] options); //display text line public abstract void displayTextLine(String text); @@ -64,6 +78,8 @@ public void startScrollingTextViewMode(String title){ public abstract void displayCustomContent(String json); + public abstract void clearDisplay(); + //home screen public abstract void showHomeScreen(); @@ -81,23 +97,31 @@ public void sendButtonCameraLedSetting(boolean enabled) { Log.d("SmartGlassesCommunicator", "Default implementation - button camera LED: " + enabled); } + public void onDisplayTextNotified(DisplayTextEvent displayTextEvent) { + + } + + public void onDisplayImageNotified(String imageType, String imageSize) { + + } + //fonts public int LARGE_FONT; public int MEDIUM_FONT; public int SMALL_FONT; - public SmartGlassesCommunicator(){ + public SmartGlassesCommunicator() { setFontSizes(); } //must be run and set font sizes protected abstract void setFontSizes(); - public SmartGlassesConnectionState getConnectionState(){ + public SmartGlassesConnectionState getConnectionState() { return mConnectState; } - protected boolean isConnected(){ + protected boolean isConnected() { return (mConnectState == SmartGlassesConnectionState.CONNECTED); } @@ -132,21 +156,32 @@ public void connectionEvent(SmartGlassesConnectionState connectState) { isPending = false; }, DEBOUNCE_DELAY_MS); } - public void tapEvent(int num){ + + public void tapEvent(int num) { EventBus.getDefault().post(new GlassesTapOutputEvent(num, false, System.currentTimeMillis())); } - public void setMode(SmartGlassesModes mode){ + public void setMode(SmartGlassesModes mode) { currentMode = mode; } - public void updateGlassesBrightness(int brightness) {} - public void updateGlassesAutoBrightness(boolean autoBrightness) {} - public void updateGlassesHeadUpAngle(int headUpAngle) {} - public void updateGlassesDepthHeight(int depth, int height) {} - public void sendExitCommand() {} + public void updateGlassesBrightness(int brightness) { + } + + public void updateGlassesAutoBrightness(boolean autoBrightness) { + } + + public void updateGlassesHeadUpAngle(int headUpAngle) { + } - public void changeSmartGlassesMicrophoneState(boolean isMicrophoneEnabled) {} + public void updateGlassesDepthHeight(int depth, int height) { + } + + public void sendExitCommand() { + } + + public void changeSmartGlassesMicrophoneState(boolean isMicrophoneEnabled) { + } /** * Registers an audio processing callback to receive audio data directly @@ -157,7 +192,7 @@ public void changeSmartGlassesMicrophoneState(boolean isMicrophoneEnabled) {} public void registerAudioProcessingCallback(AudioProcessingCallback callback) { this.audioProcessingCallback = callback; Log.e("SmartGlassesCommunicator", "⭐⭐⭐ REGISTERED AUDIO CALLBACK: " + - (callback != null ? "NOT NULL" : "NULL") + " in " + this.getClass().getSimpleName()); + (callback != null ? "NOT NULL" : "NULL") + " in " + this.getClass().getSimpleName()); } /** @@ -175,8 +210,8 @@ public void sendCustomCommand(String commandJson) { /** * Requests the smart glasses to take a photo * - * @param requestId The unique ID for this photo request - * @param appId The ID of the app requesting the photo + * @param requestId The unique ID for this photo request + * @param appId The ID of the app requesting the photo * @param webhookUrl The webhook URL where the photo should be uploaded directly */ public void requestPhoto(String requestId, String appId, String webhookUrl, String size) { @@ -189,7 +224,7 @@ public void requestPhoto(String requestId, String appId, String webhookUrl, Stri * Default implementation does nothing - specific communicators should override * * @param requestId The unique ID for this photo request - * @param appId The ID of the app requesting the photo + * @param appId The ID of the app requesting the photo */ public void requestPhoto(String requestId, String appId) { // Default implementation does nothing @@ -240,7 +275,7 @@ public void requestWifiScan() { * Sends WiFi credentials to the smart glasses * Default implementation does nothing - specific communicators should override * - * @param ssid The WiFi network name + * @param ssid The WiFi network name * @param password The WiFi password */ public void sendWifiCredentials(String ssid, String password) { @@ -333,4 +368,47 @@ public void stopVideoRecording(String requestId) { // Default implementation does nothing Log.d("SmartGlassesCommunicator", "Stop video recording not implemented for this device"); } + + /** + * Get protobuf schema version information + * Default implementation returns unknown - specific communicators should override + * + * @return Protobuf schema version information + */ + public String getProtobufSchemaVersionInfo() { + // Default implementation returns unknown + Log.d("SmartGlassesCommunicator", "Protobuf schema version not implemented for this device"); + return "Schema v1 | Unknown"; + } + + /** + * Set VAD (Voice Activity Detection) enabled on smart glasses + * Default implementation does nothing - specific communicators should override + * + * @param enabled Whether to enable VAD + */ + public void setVadEnabled(boolean enabled) { + // Default implementation does nothing + Log.d("SmartGlassesCommunicator", "VAD not implemented for this device"); + } + + /** + * Set VAD (Voice Activity Detection) sensitivity on smart glasses + * Default implementation does nothing - specific communicators should override + * + * @param sensitivity The sensitivity level for VAD (0-100) + */ + public void setVadSensitivity(int sensitivity) { + // Default implementation does nothing + Log.d("SmartGlassesCommunicator", "VAD sensitivity not implemented for this device"); + } + + /** + * Request VAD (Voice Activity Detection) configuration from smart glasses + * Default implementation does nothing - specific communicators should override + */ + public void requestVadConfig() { + // Default implementation does nothing + Log.d("SmartGlassesCommunicator", "VAD config not implemented for this device"); + } } diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/UltraliteSGC.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/UltraliteSGC.java index d60db4d019..fd5f6fc934 100644 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/UltraliteSGC.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/UltraliteSGC.java @@ -236,7 +236,7 @@ public void findCompatibleDeviceNames() { } @Override - public void connectToSmartGlasses(){ + public void connectToSmartGlasses(SmartGlassesDevice device){ Log.d(TAG, "connectToSmartGlasses running..."); // int mCount = 10; // while ((mConnectState != 2) && (!hasUltraliteControl) && (mCount > 0)){ @@ -385,6 +385,19 @@ public void displayCustomContent(String json) { displayReferenceCardSimple("CustomDisplayNotImplemented", json); } + @Override + public void clearDisplay() { + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + Log.d(TAG, "=== SENDING CLEAR DISPLAY COMMAND TO ULTRALITE GLASSES ==="); + + // For Ultralite glasses, we can send an empty text wall to clear the display + // This is a stub implementation since Ultralite has limited display capabilities + Log.d(TAG, "[STUB] Ultralite glasses display cleared (no actual display)"); + } + public void showNaturalLanguageCommandScreen(String prompt, String naturalLanguageInput){ // int boxDelta = 3; diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/VirtualSGC.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/VirtualSGC.java index 1ae8535336..078248b98e 100644 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/VirtualSGC.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/VirtualSGC.java @@ -28,7 +28,7 @@ public VirtualSGC(Context context, SmartGlassesDevice smartGlassesDevice){ public void setFontSizes(){ } - public void connectToSmartGlasses(){ + public void connectToSmartGlasses(SmartGlassesDevice device){ Log.d(TAG, "Connecting to simulated glasses - enabling audio processing"); connectionEvent(SmartGlassesConnectionState.CONNECTED); } @@ -102,6 +102,9 @@ public void displayBitmap(Bitmap bmp) { @Override public void displayCustomContent(String json) {} + @Override + public void clearDisplay() {} + @Override public void findCompatibleDeviceNames() { EventBus.getDefault().post(new GlassesBluetoothSearchDiscoverEvent(smartGlassesDevice.deviceModelName, "NOTREQUIREDSKIP")); diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/special/SelfSGC.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/special/SelfSGC.java index 4f4c5638f1..d28dc7c0c0 100644 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/special/SelfSGC.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/special/SelfSGC.java @@ -93,6 +93,19 @@ public void displayCustomContent(String json) { } + @Override + public void clearDisplay() { + if (!isConnected()) { + Log.d(TAG, "Not connected to glasses"); + return; + } + Log.d(TAG, "=== SENDING CLEAR DISPLAY COMMAND TO SELF GLASSES ==="); + + // For Self glasses, we can send a message to indicate display cleared + // This is a stub implementation since Self glasses have limited display capabilities + Log.d(TAG, "[STUB] Self glasses display cleared (no actual display)"); + } + @Override public void showHomeScreen() { @@ -118,7 +131,7 @@ protected void setFontSizes(){ SMALL_FONT = 0; } - public void connectToSmartGlasses(){ + public void connectToSmartGlasses(SmartGlassesDevice device){ // Right now, this is the code running onboard our android-based meta ray-ban alternative // It has speakers, mic, camera, wifi // Let's just figure out camera for now diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassesconnection/SmartGlassesRepresentative.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassesconnection/SmartGlassesRepresentative.java index 16a7b4de42..1e14a9300b 100644 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassesconnection/SmartGlassesRepresentative.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassesconnection/SmartGlassesRepresentative.java @@ -27,9 +27,12 @@ import com.augmentos.augmentoslib.events.HomeScreenEvent; import com.augmentos.augmentoslib.events.SendBitmapViewRequestEvent; import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.SetFontSizeEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.DisplayTextEvent; +import com.augmentos.augmentos_core.smarterglassesmanager.eventbusmessages.DisplayImageEvent; import com.augmentos.augmentoslib.events.TextWallViewRequestEvent; import com.augmentos.augmentos_core.smarterglassesmanager.smartglassescommunicators.AudioWearableSGC; import com.augmentos.augmentos_core.smarterglassesmanager.smartglassescommunicators.EvenRealitiesG1SGC; +import com.augmentos.augmentos_core.smarterglassesmanager.smartglassescommunicators.MentraNexSGC; import com.augmentos.augmentos_core.smarterglassesmanager.smartglassescommunicators.FrameSGC; import com.augmentos.augmentos_core.smarterglassesmanager.smartglassescommunicators.MentraLiveSGC; import com.augmentos.augmentos_core.smarterglassesmanager.smartglassescommunicators.UltraliteSGC; @@ -128,7 +131,7 @@ public void findCompatibleDeviceNames(){ } } - public void connectToSmartGlasses(){ + public void connectToSmartGlasses(SmartGlassesDevice device) { // Similar to findCompatibleDeviceNames, always create a fresh communicator // This ensures we don't reuse a communicator with null fields after destroy() if (smartGlassesCommunicator != null) { @@ -141,7 +144,7 @@ public void connectToSmartGlasses(){ if (smartGlassesCommunicator != null) { Log.d(TAG, "Connecting to smart glasses with fresh communicator"); - smartGlassesCommunicator.connectToSmartGlasses(); + smartGlassesCommunicator.connectToSmartGlasses(device); } else { Log.e(TAG, "Failed to create SmartGlassesCommunicator for connection"); } @@ -186,6 +189,10 @@ private SmartGlassesCommunicator createCommunicator() { communicator = new EvenRealitiesG1SGC(context, smartGlassesDevice); break; + case MENTRA_NEX_GLASSES: + communicator = new MentraNexSGC(context, smartGlassesDevice); + break; + case SELF_OS_GLASSES: communicator = new SelfSGC(context, smartGlassesDevice); break; @@ -532,6 +539,22 @@ public void onPromptViewRequestEvent(PromptViewRequestEvent receivedEvent) { } } + @Subscribe + public void onDisplayTextNotified(DisplayTextEvent displayTextEvent) { + Log.d(TAG, "onDisplayTextNotified called"); + if (smartGlassesCommunicator != null) { + smartGlassesCommunicator.onDisplayTextNotified(displayTextEvent); + } + } + + @Subscribe + public void onDisplayImageNotified(DisplayImageEvent displayImageEvent) { + Log.d(TAG, "onDisplayImageNotified called"); + if (smartGlassesCommunicator != null) { + smartGlassesCommunicator.onDisplayImageNotified(displayImageEvent.imageType, displayImageEvent.imageSize); + } + } + public void changeMicrophoneState(List requiredData) {} /** diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/speechrecognition/augmentos/SpeechRecAugmentos.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/speechrecognition/augmentos/SpeechRecAugmentos.java index 5fbe1ccc03..38494a7bdd 100644 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/speechrecognition/augmentos/SpeechRecAugmentos.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/speechrecognition/augmentos/SpeechRecAugmentos.java @@ -57,7 +57,7 @@ public class SpeechRecAugmentos extends SpeechRecFramework { // Sherpa ONNX Transcriber private SherpaOnnxTranscriber sherpaTranscriber; - + // Backend data sending control flags private volatile boolean sendPcmToBackend = true; private volatile boolean sendTranscriptionToBackend = false; @@ -497,7 +497,7 @@ public void handleSpeechJson(JSONObject msg) { /** * Handles microphone state changes and propagates to all components - * + * * @param state true if microphone is on, false otherwise * @param requiredData List of required data */ @@ -506,7 +506,7 @@ public void microphoneStateChanged(boolean state, List r if (vadPolicy != null){ vadPolicy.microphoneStateChanged(state); } - + // Pass to transcriber if (sherpaTranscriber != null && sherpaTranscriber.isInitialized()) { sherpaTranscriber.microphoneStateChanged(state); @@ -535,7 +535,7 @@ public void microphoneStateChanged(boolean state, List r this.sendTranscriptionToBackend = false; } } - + Log.d(TAG, "Microphone state changed to: " + (state ? "ON" : "OFF") + " with required data: " + requiredData); } diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/supportedglasses/MentraNexGlasses.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/supportedglasses/MentraNexGlasses.java new file mode 100644 index 0000000000..d06d3036b3 --- /dev/null +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/supportedglasses/MentraNexGlasses.java @@ -0,0 +1,21 @@ +package com.augmentos.augmentos_core.smarterglassesmanager.supportedglasses; + +import com.augmentos.augmentos_core.smarterglassesmanager.supportedglasses.SmartGlassesDevice; +import com.augmentos.augmentos_core.smarterglassesmanager.supportedglasses.SmartGlassesOperatingSystem; + +public class MentraNexGlasses extends SmartGlassesDevice { + public MentraNexGlasses() { + deviceModelName = "Mentra Nex"; + deviceIconName = "er_g1"; + anySupport = true; + fullSupport = true; + glassesOs = SmartGlassesOperatingSystem.MENTRA_NEX_GLASSES; + hasDisplay = true; + hasSpeakers = false; + hasCamera = false; + hasInMic = true; + hasOutMic = false; + useScoMic = false; + weight = 37; + } +} \ No newline at end of file diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/supportedglasses/SmartGlassesDevice.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/supportedglasses/SmartGlassesDevice.java index 691d767d7e..8407ae5a92 100644 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/supportedglasses/SmartGlassesDevice.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/supportedglasses/SmartGlassesDevice.java @@ -7,6 +7,8 @@ public class SmartGlassesDevice implements Serializable { public String deviceModelName; public String deviceIconName; + public String deviceName; + public String deviceAddress; public boolean anySupport; public boolean fullSupport; public SmartGlassesOperatingSystem glassesOs; @@ -115,4 +117,20 @@ public int getConnectionState() { public void setConnectionState(int connectionState) { this.connectionState = connectionState; } + + public String getDeviceAddress() { + return deviceAddress; + } + + public void setDeviceAddress(String deviceAddress) { + this.deviceAddress = deviceAddress; + } + + public String getDeviceName() { + return deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } } diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/supportedglasses/SmartGlassesOperatingSystem.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/supportedglasses/SmartGlassesOperatingSystem.java index 55bf30009a..9906b5ffe2 100644 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/supportedglasses/SmartGlassesOperatingSystem.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/supportedglasses/SmartGlassesOperatingSystem.java @@ -6,6 +6,7 @@ public enum SmartGlassesOperatingSystem { ACTIVELOOK_OS_GLASSES, ULTRALITE_MCU_OS_GLASSES, EVEN_REALITIES_G1_MCU_OS_GLASSES, + MENTRA_NEX_GLASSES, INMO_GO_MCU_OS_GLASSES, AUDIO_WEARABLE_GLASSES, VIRTUAL_WEARABLE, diff --git a/android_core/app/src/main/java/com/augmentos/augmentos_core/ui/SettingsUi.java b/android_core/app/src/main/java/com/augmentos/augmentos_core/ui/SettingsUi.java index c7139366bd..2fa95793f6 100644 --- a/android_core/app/src/main/java/com/augmentos/augmentos_core/ui/SettingsUi.java +++ b/android_core/app/src/main/java/com/augmentos/augmentos_core/ui/SettingsUi.java @@ -64,7 +64,7 @@ public void onClick(View v) { connectSmartGlassesButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { ((MainActivity)getActivity()).mService.disconnectWearable(""); - ((MainActivity)getActivity()).mService.connectToWearable("",""); + ((MainActivity)getActivity()).mService.connectToWearable("","",""); } }); @@ -77,12 +77,13 @@ public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) { if (isChecked){ SmartGlassesManager.savePreferredWearable(getContext(), new AudioWearable().deviceModelName); ((MainActivity)getActivity()).mService.disconnectWearable(""); - ((MainActivity)getActivity()).mService.connectToWearable("",""); + ((MainActivity)getActivity()).mService.connectToWearable("","",""); } else { SmartGlassesManager.savePreferredWearable(getContext(), ""); + SmartGlassesManager.savePreferredWearableAddress(getContext(), ""); ((MainActivity)getActivity()).mService.disconnectWearable(""); - ((MainActivity)getActivity()).mService.connectToWearable("",""); + ((MainActivity)getActivity()).mService.connectToWearable("","",""); } } }); diff --git a/android_core/app/src/main/java/mentraos/ble/MentraosBle.java b/android_core/app/src/main/java/mentraos/ble/MentraosBle.java new file mode 100644 index 0000000000..10eb7da800 --- /dev/null +++ b/android_core/app/src/main/java/mentraos/ble/MentraosBle.java @@ -0,0 +1,53675 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: mentraos_ble.proto +// Protobuf Java Version: 4.32.0 + +package mentraos.ble; + +@com.google.protobuf.Generated +public final class MentraosBle { + private MentraosBle() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + MentraosBle.class.getName()); + } + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + registry.add(mentraos.ble.MentraosBle.mentraSchemaVersion); + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PhoneToGlassesOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.PhoneToGlasses) + com.google.protobuf.MessageOrBuilder { + + /** + * string msg_id = 1; + * @return The msgId. + */ + java.lang.String getMsgId(); + /** + * string msg_id = 1; + * @return The bytes for msgId. + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + *
+     * Connection Management
+     * 
+ * + * .mentraos.ble.DisconnectRequest disconnect = 10; + * @return Whether the disconnect field is set. + */ + boolean hasDisconnect(); + /** + *
+     * Connection Management
+     * 
+ * + * .mentraos.ble.DisconnectRequest disconnect = 10; + * @return The disconnect. + */ + mentraos.ble.MentraosBle.DisconnectRequest getDisconnect(); + /** + *
+     * Connection Management
+     * 
+ * + * .mentraos.ble.DisconnectRequest disconnect = 10; + */ + mentraos.ble.MentraosBle.DisconnectRequestOrBuilder getDisconnectOrBuilder(); + + /** + * .mentraos.ble.BatteryStateRequest battery_state = 11; + * @return Whether the batteryState field is set. + */ + boolean hasBatteryState(); + /** + * .mentraos.ble.BatteryStateRequest battery_state = 11; + * @return The batteryState. + */ + mentraos.ble.MentraosBle.BatteryStateRequest getBatteryState(); + /** + * .mentraos.ble.BatteryStateRequest battery_state = 11; + */ + mentraos.ble.MentraosBle.BatteryStateRequestOrBuilder getBatteryStateOrBuilder(); + + /** + * .mentraos.ble.GlassesInfoRequest glasses_info = 12; + * @return Whether the glassesInfo field is set. + */ + boolean hasGlassesInfo(); + /** + * .mentraos.ble.GlassesInfoRequest glasses_info = 12; + * @return The glassesInfo. + */ + mentraos.ble.MentraosBle.GlassesInfoRequest getGlassesInfo(); + /** + * .mentraos.ble.GlassesInfoRequest glasses_info = 12; + */ + mentraos.ble.MentraosBle.GlassesInfoRequestOrBuilder getGlassesInfoOrBuilder(); + + /** + * .mentraos.ble.PairingModeRequest pairing_mode = 13; + * @return Whether the pairingMode field is set. + */ + boolean hasPairingMode(); + /** + * .mentraos.ble.PairingModeRequest pairing_mode = 13; + * @return The pairingMode. + */ + mentraos.ble.MentraosBle.PairingModeRequest getPairingMode(); + /** + * .mentraos.ble.PairingModeRequest pairing_mode = 13; + */ + mentraos.ble.MentraosBle.PairingModeRequestOrBuilder getPairingModeOrBuilder(); + + /** + * .mentraos.ble.HeadPositionRequest head_position = 14; + * @return Whether the headPosition field is set. + */ + boolean hasHeadPosition(); + /** + * .mentraos.ble.HeadPositionRequest head_position = 14; + * @return The headPosition. + */ + mentraos.ble.MentraosBle.HeadPositionRequest getHeadPosition(); + /** + * .mentraos.ble.HeadPositionRequest head_position = 14; + */ + mentraos.ble.MentraosBle.HeadPositionRequestOrBuilder getHeadPositionOrBuilder(); + + /** + * .mentraos.ble.HeadUpAngleConfig head_up_angle = 15; + * @return Whether the headUpAngle field is set. + */ + boolean hasHeadUpAngle(); + /** + * .mentraos.ble.HeadUpAngleConfig head_up_angle = 15; + * @return The headUpAngle. + */ + mentraos.ble.MentraosBle.HeadUpAngleConfig getHeadUpAngle(); + /** + * .mentraos.ble.HeadUpAngleConfig head_up_angle = 15; + */ + mentraos.ble.MentraosBle.HeadUpAngleConfigOrBuilder getHeadUpAngleOrBuilder(); + + /** + * .mentraos.ble.PongResponse pong = 16; + * @return Whether the pong field is set. + */ + boolean hasPong(); + /** + * .mentraos.ble.PongResponse pong = 16; + * @return The pong. + */ + mentraos.ble.MentraosBle.PongResponse getPong(); + /** + * .mentraos.ble.PongResponse pong = 16; + */ + mentraos.ble.MentraosBle.PongResponseOrBuilder getPongOrBuilder(); + + /** + *
+     * Audio System
+     * 
+ * + * .mentraos.ble.MicStateConfig mic_state = 20; + * @return Whether the micState field is set. + */ + boolean hasMicState(); + /** + *
+     * Audio System
+     * 
+ * + * .mentraos.ble.MicStateConfig mic_state = 20; + * @return The micState. + */ + mentraos.ble.MentraosBle.MicStateConfig getMicState(); + /** + *
+     * Audio System
+     * 
+ * + * .mentraos.ble.MicStateConfig mic_state = 20; + */ + mentraos.ble.MentraosBle.MicStateConfigOrBuilder getMicStateOrBuilder(); + + /** + * .mentraos.ble.VadEnabledRequest set_vad_enabled = 23; + * @return Whether the setVadEnabled field is set. + */ + boolean hasSetVadEnabled(); + /** + * .mentraos.ble.VadEnabledRequest set_vad_enabled = 23; + * @return The setVadEnabled. + */ + mentraos.ble.MentraosBle.VadEnabledRequest getSetVadEnabled(); + /** + * .mentraos.ble.VadEnabledRequest set_vad_enabled = 23; + */ + mentraos.ble.MentraosBle.VadEnabledRequestOrBuilder getSetVadEnabledOrBuilder(); + + /** + * .mentraos.ble.VadConfigRequest set_vad_config = 24; + * @return Whether the setVadConfig field is set. + */ + boolean hasSetVadConfig(); + /** + * .mentraos.ble.VadConfigRequest set_vad_config = 24; + * @return The setVadConfig. + */ + mentraos.ble.MentraosBle.VadConfigRequest getSetVadConfig(); + /** + * .mentraos.ble.VadConfigRequest set_vad_config = 24; + */ + mentraos.ble.MentraosBle.VadConfigRequestOrBuilder getSetVadConfigOrBuilder(); + + /** + * .mentraos.ble.VadStatusRequest request_vad_status = 25; + * @return Whether the requestVadStatus field is set. + */ + boolean hasRequestVadStatus(); + /** + * .mentraos.ble.VadStatusRequest request_vad_status = 25; + * @return The requestVadStatus. + */ + mentraos.ble.MentraosBle.VadStatusRequest getRequestVadStatus(); + /** + * .mentraos.ble.VadStatusRequest request_vad_status = 25; + */ + mentraos.ble.MentraosBle.VadStatusRequestOrBuilder getRequestVadStatusOrBuilder(); + + /** + *
+     * Display System - These queue until commit
+     * 
+ * + * .mentraos.ble.DisplayText display_text = 30; + * @return Whether the displayText field is set. + */ + boolean hasDisplayText(); + /** + *
+     * Display System - These queue until commit
+     * 
+ * + * .mentraos.ble.DisplayText display_text = 30; + * @return The displayText. + */ + mentraos.ble.MentraosBle.DisplayText getDisplayText(); + /** + *
+     * Display System - These queue until commit
+     * 
+ * + * .mentraos.ble.DisplayText display_text = 30; + */ + mentraos.ble.MentraosBle.DisplayTextOrBuilder getDisplayTextOrBuilder(); + + /** + * .mentraos.ble.DisplayImage display_image = 31; + * @return Whether the displayImage field is set. + */ + boolean hasDisplayImage(); + /** + * .mentraos.ble.DisplayImage display_image = 31; + * @return The displayImage. + */ + mentraos.ble.MentraosBle.DisplayImage getDisplayImage(); + /** + * .mentraos.ble.DisplayImage display_image = 31; + */ + mentraos.ble.MentraosBle.DisplayImageOrBuilder getDisplayImageOrBuilder(); + + /** + * .mentraos.ble.CacheImage cache_image = 32; + * @return Whether the cacheImage field is set. + */ + boolean hasCacheImage(); + /** + * .mentraos.ble.CacheImage cache_image = 32; + * @return The cacheImage. + */ + mentraos.ble.MentraosBle.CacheImage getCacheImage(); + /** + * .mentraos.ble.CacheImage cache_image = 32; + */ + mentraos.ble.MentraosBle.CacheImageOrBuilder getCacheImageOrBuilder(); + + /** + * .mentraos.ble.DisplayCachedImage display_cached_image = 33; + * @return Whether the displayCachedImage field is set. + */ + boolean hasDisplayCachedImage(); + /** + * .mentraos.ble.DisplayCachedImage display_cached_image = 33; + * @return The displayCachedImage. + */ + mentraos.ble.MentraosBle.DisplayCachedImage getDisplayCachedImage(); + /** + * .mentraos.ble.DisplayCachedImage display_cached_image = 33; + */ + mentraos.ble.MentraosBle.DisplayCachedImageOrBuilder getDisplayCachedImageOrBuilder(); + + /** + * .mentraos.ble.ClearCachedImage clear_cached_image = 34; + * @return Whether the clearCachedImage field is set. + */ + boolean hasClearCachedImage(); + /** + * .mentraos.ble.ClearCachedImage clear_cached_image = 34; + * @return The clearCachedImage. + */ + mentraos.ble.MentraosBle.ClearCachedImage getClearCachedImage(); + /** + * .mentraos.ble.ClearCachedImage clear_cached_image = 34; + */ + mentraos.ble.MentraosBle.ClearCachedImageOrBuilder getClearCachedImageOrBuilder(); + + /** + * .mentraos.ble.DisplayScrollingText display_scrolling_text = 35; + * @return Whether the displayScrollingText field is set. + */ + boolean hasDisplayScrollingText(); + /** + * .mentraos.ble.DisplayScrollingText display_scrolling_text = 35; + * @return The displayScrollingText. + */ + mentraos.ble.MentraosBle.DisplayScrollingText getDisplayScrollingText(); + /** + * .mentraos.ble.DisplayScrollingText display_scrolling_text = 35; + */ + mentraos.ble.MentraosBle.DisplayScrollingTextOrBuilder getDisplayScrollingTextOrBuilder(); + + /** + * .mentraos.ble.DrawLine draw_line = 40; + * @return Whether the drawLine field is set. + */ + boolean hasDrawLine(); + /** + * .mentraos.ble.DrawLine draw_line = 40; + * @return The drawLine. + */ + mentraos.ble.MentraosBle.DrawLine getDrawLine(); + /** + * .mentraos.ble.DrawLine draw_line = 40; + */ + mentraos.ble.MentraosBle.DrawLineOrBuilder getDrawLineOrBuilder(); + + /** + * .mentraos.ble.DrawRect draw_rect = 41; + * @return Whether the drawRect field is set. + */ + boolean hasDrawRect(); + /** + * .mentraos.ble.DrawRect draw_rect = 41; + * @return The drawRect. + */ + mentraos.ble.MentraosBle.DrawRect getDrawRect(); + /** + * .mentraos.ble.DrawRect draw_rect = 41; + */ + mentraos.ble.MentraosBle.DrawRectOrBuilder getDrawRectOrBuilder(); + + /** + * .mentraos.ble.DrawCircle draw_circle = 42; + * @return Whether the drawCircle field is set. + */ + boolean hasDrawCircle(); + /** + * .mentraos.ble.DrawCircle draw_circle = 42; + * @return The drawCircle. + */ + mentraos.ble.MentraosBle.DrawCircle getDrawCircle(); + /** + * .mentraos.ble.DrawCircle draw_circle = 42; + */ + mentraos.ble.MentraosBle.DrawCircleOrBuilder getDrawCircleOrBuilder(); + + /** + *
+     * Send multiple commands at once
+     * 
+ * + * .mentraos.ble.DisplayBatch display_batch = 52; + * @return Whether the displayBatch field is set. + */ + boolean hasDisplayBatch(); + /** + *
+     * Send multiple commands at once
+     * 
+ * + * .mentraos.ble.DisplayBatch display_batch = 52; + * @return The displayBatch. + */ + mentraos.ble.MentraosBle.DisplayBatch getDisplayBatch(); + /** + *
+     * Send multiple commands at once
+     * 
+ * + * .mentraos.ble.DisplayBatch display_batch = 52; + */ + mentraos.ble.MentraosBle.DisplayBatchOrBuilder getDisplayBatchOrBuilder(); + + /** + *
+     * Renders all queued commands
+     * 
+ * + * .mentraos.ble.CommitDisplay commit = 43; + * @return Whether the commit field is set. + */ + boolean hasCommit(); + /** + *
+     * Renders all queued commands
+     * 
+ * + * .mentraos.ble.CommitDisplay commit = 43; + * @return The commit. + */ + mentraos.ble.MentraosBle.CommitDisplay getCommit(); + /** + *
+     * Renders all queued commands
+     * 
+ * + * .mentraos.ble.CommitDisplay commit = 43; + */ + mentraos.ble.MentraosBle.CommitDisplayOrBuilder getCommitOrBuilder(); + + /** + *
+     * Display Control - These execute immediately
+     * 
+ * + * .mentraos.ble.DisplayPowerConfig display_power = 36; + * @return Whether the displayPower field is set. + */ + boolean hasDisplayPower(); + /** + *
+     * Display Control - These execute immediately
+     * 
+ * + * .mentraos.ble.DisplayPowerConfig display_power = 36; + * @return The displayPower. + */ + mentraos.ble.MentraosBle.DisplayPowerConfig getDisplayPower(); + /** + *
+     * Display Control - These execute immediately
+     * 
+ * + * .mentraos.ble.DisplayPowerConfig display_power = 36; + */ + mentraos.ble.MentraosBle.DisplayPowerConfigOrBuilder getDisplayPowerOrBuilder(); + + /** + * .mentraos.ble.BrightnessConfig brightness = 37; + * @return Whether the brightness field is set. + */ + boolean hasBrightness(); + /** + * .mentraos.ble.BrightnessConfig brightness = 37; + * @return The brightness. + */ + mentraos.ble.MentraosBle.BrightnessConfig getBrightness(); + /** + * .mentraos.ble.BrightnessConfig brightness = 37; + */ + mentraos.ble.MentraosBle.BrightnessConfigOrBuilder getBrightnessOrBuilder(); + + /** + * .mentraos.ble.AutoBrightnessConfig auto_brightness = 38; + * @return Whether the autoBrightness field is set. + */ + boolean hasAutoBrightness(); + /** + * .mentraos.ble.AutoBrightnessConfig auto_brightness = 38; + * @return The autoBrightness. + */ + mentraos.ble.MentraosBle.AutoBrightnessConfig getAutoBrightness(); + /** + * .mentraos.ble.AutoBrightnessConfig auto_brightness = 38; + */ + mentraos.ble.MentraosBle.AutoBrightnessConfigOrBuilder getAutoBrightnessOrBuilder(); + + /** + * .mentraos.ble.AutoBrightnessMultiplier auto_brightness_mult = 39; + * @return Whether the autoBrightnessMult field is set. + */ + boolean hasAutoBrightnessMult(); + /** + * .mentraos.ble.AutoBrightnessMultiplier auto_brightness_mult = 39; + * @return The autoBrightnessMult. + */ + mentraos.ble.MentraosBle.AutoBrightnessMultiplier getAutoBrightnessMult(); + /** + * .mentraos.ble.AutoBrightnessMultiplier auto_brightness_mult = 39; + */ + mentraos.ble.MentraosBle.AutoBrightnessMultiplierOrBuilder getAutoBrightnessMultOrBuilder(); + + /** + * .mentraos.ble.DisplayDistanceConfig display_distance = 44; + * @return Whether the displayDistance field is set. + */ + boolean hasDisplayDistance(); + /** + * .mentraos.ble.DisplayDistanceConfig display_distance = 44; + * @return The displayDistance. + */ + mentraos.ble.MentraosBle.DisplayDistanceConfig getDisplayDistance(); + /** + * .mentraos.ble.DisplayDistanceConfig display_distance = 44; + */ + mentraos.ble.MentraosBle.DisplayDistanceConfigOrBuilder getDisplayDistanceOrBuilder(); + + /** + * .mentraos.ble.DisplayHeightConfig display_height = 45; + * @return Whether the displayHeight field is set. + */ + boolean hasDisplayHeight(); + /** + * .mentraos.ble.DisplayHeightConfig display_height = 45; + * @return The displayHeight. + */ + mentraos.ble.MentraosBle.DisplayHeightConfig getDisplayHeight(); + /** + * .mentraos.ble.DisplayHeightConfig display_height = 45; + */ + mentraos.ble.MentraosBle.DisplayHeightConfigOrBuilder getDisplayHeightOrBuilder(); + + /** + * .mentraos.ble.ClearDisplay clear_display = 46; + * @return Whether the clearDisplay field is set. + */ + boolean hasClearDisplay(); + /** + * .mentraos.ble.ClearDisplay clear_display = 46; + * @return The clearDisplay. + */ + mentraos.ble.MentraosBle.ClearDisplay getClearDisplay(); + /** + * .mentraos.ble.ClearDisplay clear_display = 46; + */ + mentraos.ble.MentraosBle.ClearDisplayOrBuilder getClearDisplayOrBuilder(); + + /** + *
+     * Get queue info
+     * 
+ * + * .mentraos.ble.DisplayQueueStatus queue_status_request = 51; + * @return Whether the queueStatusRequest field is set. + */ + boolean hasQueueStatusRequest(); + /** + *
+     * Get queue info
+     * 
+ * + * .mentraos.ble.DisplayQueueStatus queue_status_request = 51; + * @return The queueStatusRequest. + */ + mentraos.ble.MentraosBle.DisplayQueueStatus getQueueStatusRequest(); + /** + *
+     * Get queue info
+     * 
+ * + * .mentraos.ble.DisplayQueueStatus queue_status_request = 51; + */ + mentraos.ble.MentraosBle.DisplayQueueStatusOrBuilder getQueueStatusRequestOrBuilder(); + + /** + *
+     * Dashboard/Cacheboard System
+     * 
+ * + * .mentraos.ble.CacheDashboard cache_dashboard = 47; + * @return Whether the cacheDashboard field is set. + */ + boolean hasCacheDashboard(); + /** + *
+     * Dashboard/Cacheboard System
+     * 
+ * + * .mentraos.ble.CacheDashboard cache_dashboard = 47; + * @return The cacheDashboard. + */ + mentraos.ble.MentraosBle.CacheDashboard getCacheDashboard(); + /** + *
+     * Dashboard/Cacheboard System
+     * 
+ * + * .mentraos.ble.CacheDashboard cache_dashboard = 47; + */ + mentraos.ble.MentraosBle.CacheDashboardOrBuilder getCacheDashboardOrBuilder(); + + /** + * .mentraos.ble.ClearDashboard clear_dashboard = 48; + * @return Whether the clearDashboard field is set. + */ + boolean hasClearDashboard(); + /** + * .mentraos.ble.ClearDashboard clear_dashboard = 48; + * @return The clearDashboard. + */ + mentraos.ble.MentraosBle.ClearDashboard getClearDashboard(); + /** + * .mentraos.ble.ClearDashboard clear_dashboard = 48; + */ + mentraos.ble.MentraosBle.ClearDashboardOrBuilder getClearDashboardOrBuilder(); + + /** + * .mentraos.ble.ConfigureDashboardTrigger dashboard_trigger = 49; + * @return Whether the dashboardTrigger field is set. + */ + boolean hasDashboardTrigger(); + /** + * .mentraos.ble.ConfigureDashboardTrigger dashboard_trigger = 49; + * @return The dashboardTrigger. + */ + mentraos.ble.MentraosBle.ConfigureDashboardTrigger getDashboardTrigger(); + /** + * .mentraos.ble.ConfigureDashboardTrigger dashboard_trigger = 49; + */ + mentraos.ble.MentraosBle.ConfigureDashboardTriggerOrBuilder getDashboardTriggerOrBuilder(); + + /** + *
+     * User Input
+     * 
+ * + * .mentraos.ble.ImuEnabledConfig imu_enabled = 55; + * @return Whether the imuEnabled field is set. + */ + boolean hasImuEnabled(); + /** + *
+     * User Input
+     * 
+ * + * .mentraos.ble.ImuEnabledConfig imu_enabled = 55; + * @return The imuEnabled. + */ + mentraos.ble.MentraosBle.ImuEnabledConfig getImuEnabled(); + /** + *
+     * User Input
+     * 
+ * + * .mentraos.ble.ImuEnabledConfig imu_enabled = 55; + */ + mentraos.ble.MentraosBle.ImuEnabledConfigOrBuilder getImuEnabledOrBuilder(); + + /** + * .mentraos.ble.ImuSingleRequest imu_single = 56; + * @return Whether the imuSingle field is set. + */ + boolean hasImuSingle(); + /** + * .mentraos.ble.ImuSingleRequest imu_single = 56; + * @return The imuSingle. + */ + mentraos.ble.MentraosBle.ImuSingleRequest getImuSingle(); + /** + * .mentraos.ble.ImuSingleRequest imu_single = 56; + */ + mentraos.ble.MentraosBle.ImuSingleRequestOrBuilder getImuSingleOrBuilder(); + + /** + * .mentraos.ble.ImuStreamConfig imu_stream = 57; + * @return Whether the imuStream field is set. + */ + boolean hasImuStream(); + /** + * .mentraos.ble.ImuStreamConfig imu_stream = 57; + * @return The imuStream. + */ + mentraos.ble.MentraosBle.ImuStreamConfig getImuStream(); + /** + * .mentraos.ble.ImuStreamConfig imu_stream = 57; + */ + mentraos.ble.MentraosBle.ImuStreamConfigOrBuilder getImuStreamOrBuilder(); + + /** + * .mentraos.ble.HeadGestureConfig head_gesture = 58; + * @return Whether the headGesture field is set. + */ + boolean hasHeadGesture(); + /** + * .mentraos.ble.HeadGestureConfig head_gesture = 58; + * @return The headGesture. + */ + mentraos.ble.MentraosBle.HeadGestureConfig getHeadGesture(); + /** + * .mentraos.ble.HeadGestureConfig head_gesture = 58; + */ + mentraos.ble.MentraosBle.HeadGestureConfigOrBuilder getHeadGestureOrBuilder(); + + /** + *
+     * System Control
+     * 
+ * + * .mentraos.ble.RestartRequest restart = 60; + * @return Whether the restart field is set. + */ + boolean hasRestart(); + /** + *
+     * System Control
+     * 
+ * + * .mentraos.ble.RestartRequest restart = 60; + * @return The restart. + */ + mentraos.ble.MentraosBle.RestartRequest getRestart(); + /** + *
+     * System Control
+     * 
+ * + * .mentraos.ble.RestartRequest restart = 60; + */ + mentraos.ble.MentraosBle.RestartRequestOrBuilder getRestartOrBuilder(); + + /** + * .mentraos.ble.FactoryResetRequest factory_reset = 61; + * @return Whether the factoryReset field is set. + */ + boolean hasFactoryReset(); + /** + * .mentraos.ble.FactoryResetRequest factory_reset = 61; + * @return The factoryReset. + */ + mentraos.ble.MentraosBle.FactoryResetRequest getFactoryReset(); + /** + * .mentraos.ble.FactoryResetRequest factory_reset = 61; + */ + mentraos.ble.MentraosBle.FactoryResetRequestOrBuilder getFactoryResetOrBuilder(); + + /** + *
+     * Runtime protocol version query
+     * 
+ * + * .mentraos.ble.VersionRequest version_request = 70; + * @return Whether the versionRequest field is set. + */ + boolean hasVersionRequest(); + /** + *
+     * Runtime protocol version query
+     * 
+ * + * .mentraos.ble.VersionRequest version_request = 70; + * @return The versionRequest. + */ + mentraos.ble.MentraosBle.VersionRequest getVersionRequest(); + /** + *
+     * Runtime protocol version query
+     * 
+ * + * .mentraos.ble.VersionRequest version_request = 70; + */ + mentraos.ble.MentraosBle.VersionRequestOrBuilder getVersionRequestOrBuilder(); + + mentraos.ble.MentraosBle.PhoneToGlasses.PayloadCase getPayloadCase(); + } + /** + *
+   * All messages from phone to glasses
+   * 
+ * + * Protobuf type {@code mentraos.ble.PhoneToGlasses} + */ + public static final class PhoneToGlasses extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.PhoneToGlasses) + PhoneToGlassesOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + PhoneToGlasses.class.getName()); + } + // Use PhoneToGlasses.newBuilder() to construct. + private PhoneToGlasses(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PhoneToGlasses() { + msgId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_PhoneToGlasses_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_PhoneToGlasses_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.PhoneToGlasses.class, mentraos.ble.MentraosBle.PhoneToGlasses.Builder.class); + } + + private int payloadCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object payload_; + public enum PayloadCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DISCONNECT(10), + BATTERY_STATE(11), + GLASSES_INFO(12), + PAIRING_MODE(13), + HEAD_POSITION(14), + HEAD_UP_ANGLE(15), + PONG(16), + MIC_STATE(20), + SET_VAD_ENABLED(23), + SET_VAD_CONFIG(24), + REQUEST_VAD_STATUS(25), + DISPLAY_TEXT(30), + DISPLAY_IMAGE(31), + CACHE_IMAGE(32), + DISPLAY_CACHED_IMAGE(33), + CLEAR_CACHED_IMAGE(34), + DISPLAY_SCROLLING_TEXT(35), + DRAW_LINE(40), + DRAW_RECT(41), + DRAW_CIRCLE(42), + DISPLAY_BATCH(52), + COMMIT(43), + DISPLAY_POWER(36), + BRIGHTNESS(37), + AUTO_BRIGHTNESS(38), + AUTO_BRIGHTNESS_MULT(39), + DISPLAY_DISTANCE(44), + DISPLAY_HEIGHT(45), + CLEAR_DISPLAY(46), + QUEUE_STATUS_REQUEST(51), + CACHE_DASHBOARD(47), + CLEAR_DASHBOARD(48), + DASHBOARD_TRIGGER(49), + IMU_ENABLED(55), + IMU_SINGLE(56), + IMU_STREAM(57), + HEAD_GESTURE(58), + RESTART(60), + FACTORY_RESET(61), + VERSION_REQUEST(70), + PAYLOAD_NOT_SET(0); + private final int value; + private PayloadCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PayloadCase valueOf(int value) { + return forNumber(value); + } + + public static PayloadCase forNumber(int value) { + switch (value) { + case 10: return DISCONNECT; + case 11: return BATTERY_STATE; + case 12: return GLASSES_INFO; + case 13: return PAIRING_MODE; + case 14: return HEAD_POSITION; + case 15: return HEAD_UP_ANGLE; + case 16: return PONG; + case 20: return MIC_STATE; + case 23: return SET_VAD_ENABLED; + case 24: return SET_VAD_CONFIG; + case 25: return REQUEST_VAD_STATUS; + case 30: return DISPLAY_TEXT; + case 31: return DISPLAY_IMAGE; + case 32: return CACHE_IMAGE; + case 33: return DISPLAY_CACHED_IMAGE; + case 34: return CLEAR_CACHED_IMAGE; + case 35: return DISPLAY_SCROLLING_TEXT; + case 40: return DRAW_LINE; + case 41: return DRAW_RECT; + case 42: return DRAW_CIRCLE; + case 52: return DISPLAY_BATCH; + case 43: return COMMIT; + case 36: return DISPLAY_POWER; + case 37: return BRIGHTNESS; + case 38: return AUTO_BRIGHTNESS; + case 39: return AUTO_BRIGHTNESS_MULT; + case 44: return DISPLAY_DISTANCE; + case 45: return DISPLAY_HEIGHT; + case 46: return CLEAR_DISPLAY; + case 51: return QUEUE_STATUS_REQUEST; + case 47: return CACHE_DASHBOARD; + case 48: return CLEAR_DASHBOARD; + case 49: return DASHBOARD_TRIGGER; + case 55: return IMU_ENABLED; + case 56: return IMU_SINGLE; + case 57: return IMU_STREAM; + case 58: return HEAD_GESTURE; + case 60: return RESTART; + case 61: return FACTORY_RESET; + case 70: return VERSION_REQUEST; + case 0: return PAYLOAD_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public PayloadCase + getPayloadCase() { + return PayloadCase.forNumber( + payloadCase_); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + * @return The msgId. + */ + @java.lang.Override + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + * string msg_id = 1; + * @return The bytes for msgId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISCONNECT_FIELD_NUMBER = 10; + /** + *
+     * Connection Management
+     * 
+ * + * .mentraos.ble.DisconnectRequest disconnect = 10; + * @return Whether the disconnect field is set. + */ + @java.lang.Override + public boolean hasDisconnect() { + return payloadCase_ == 10; + } + /** + *
+     * Connection Management
+     * 
+ * + * .mentraos.ble.DisconnectRequest disconnect = 10; + * @return The disconnect. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisconnectRequest getDisconnect() { + if (payloadCase_ == 10) { + return (mentraos.ble.MentraosBle.DisconnectRequest) payload_; + } + return mentraos.ble.MentraosBle.DisconnectRequest.getDefaultInstance(); + } + /** + *
+     * Connection Management
+     * 
+ * + * .mentraos.ble.DisconnectRequest disconnect = 10; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisconnectRequestOrBuilder getDisconnectOrBuilder() { + if (payloadCase_ == 10) { + return (mentraos.ble.MentraosBle.DisconnectRequest) payload_; + } + return mentraos.ble.MentraosBle.DisconnectRequest.getDefaultInstance(); + } + + public static final int BATTERY_STATE_FIELD_NUMBER = 11; + /** + * .mentraos.ble.BatteryStateRequest battery_state = 11; + * @return Whether the batteryState field is set. + */ + @java.lang.Override + public boolean hasBatteryState() { + return payloadCase_ == 11; + } + /** + * .mentraos.ble.BatteryStateRequest battery_state = 11; + * @return The batteryState. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.BatteryStateRequest getBatteryState() { + if (payloadCase_ == 11) { + return (mentraos.ble.MentraosBle.BatteryStateRequest) payload_; + } + return mentraos.ble.MentraosBle.BatteryStateRequest.getDefaultInstance(); + } + /** + * .mentraos.ble.BatteryStateRequest battery_state = 11; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.BatteryStateRequestOrBuilder getBatteryStateOrBuilder() { + if (payloadCase_ == 11) { + return (mentraos.ble.MentraosBle.BatteryStateRequest) payload_; + } + return mentraos.ble.MentraosBle.BatteryStateRequest.getDefaultInstance(); + } + + public static final int GLASSES_INFO_FIELD_NUMBER = 12; + /** + * .mentraos.ble.GlassesInfoRequest glasses_info = 12; + * @return Whether the glassesInfo field is set. + */ + @java.lang.Override + public boolean hasGlassesInfo() { + return payloadCase_ == 12; + } + /** + * .mentraos.ble.GlassesInfoRequest glasses_info = 12; + * @return The glassesInfo. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.GlassesInfoRequest getGlassesInfo() { + if (payloadCase_ == 12) { + return (mentraos.ble.MentraosBle.GlassesInfoRequest) payload_; + } + return mentraos.ble.MentraosBle.GlassesInfoRequest.getDefaultInstance(); + } + /** + * .mentraos.ble.GlassesInfoRequest glasses_info = 12; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.GlassesInfoRequestOrBuilder getGlassesInfoOrBuilder() { + if (payloadCase_ == 12) { + return (mentraos.ble.MentraosBle.GlassesInfoRequest) payload_; + } + return mentraos.ble.MentraosBle.GlassesInfoRequest.getDefaultInstance(); + } + + public static final int PAIRING_MODE_FIELD_NUMBER = 13; + /** + * .mentraos.ble.PairingModeRequest pairing_mode = 13; + * @return Whether the pairingMode field is set. + */ + @java.lang.Override + public boolean hasPairingMode() { + return payloadCase_ == 13; + } + /** + * .mentraos.ble.PairingModeRequest pairing_mode = 13; + * @return The pairingMode. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.PairingModeRequest getPairingMode() { + if (payloadCase_ == 13) { + return (mentraos.ble.MentraosBle.PairingModeRequest) payload_; + } + return mentraos.ble.MentraosBle.PairingModeRequest.getDefaultInstance(); + } + /** + * .mentraos.ble.PairingModeRequest pairing_mode = 13; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.PairingModeRequestOrBuilder getPairingModeOrBuilder() { + if (payloadCase_ == 13) { + return (mentraos.ble.MentraosBle.PairingModeRequest) payload_; + } + return mentraos.ble.MentraosBle.PairingModeRequest.getDefaultInstance(); + } + + public static final int HEAD_POSITION_FIELD_NUMBER = 14; + /** + * .mentraos.ble.HeadPositionRequest head_position = 14; + * @return Whether the headPosition field is set. + */ + @java.lang.Override + public boolean hasHeadPosition() { + return payloadCase_ == 14; + } + /** + * .mentraos.ble.HeadPositionRequest head_position = 14; + * @return The headPosition. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadPositionRequest getHeadPosition() { + if (payloadCase_ == 14) { + return (mentraos.ble.MentraosBle.HeadPositionRequest) payload_; + } + return mentraos.ble.MentraosBle.HeadPositionRequest.getDefaultInstance(); + } + /** + * .mentraos.ble.HeadPositionRequest head_position = 14; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadPositionRequestOrBuilder getHeadPositionOrBuilder() { + if (payloadCase_ == 14) { + return (mentraos.ble.MentraosBle.HeadPositionRequest) payload_; + } + return mentraos.ble.MentraosBle.HeadPositionRequest.getDefaultInstance(); + } + + public static final int HEAD_UP_ANGLE_FIELD_NUMBER = 15; + /** + * .mentraos.ble.HeadUpAngleConfig head_up_angle = 15; + * @return Whether the headUpAngle field is set. + */ + @java.lang.Override + public boolean hasHeadUpAngle() { + return payloadCase_ == 15; + } + /** + * .mentraos.ble.HeadUpAngleConfig head_up_angle = 15; + * @return The headUpAngle. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadUpAngleConfig getHeadUpAngle() { + if (payloadCase_ == 15) { + return (mentraos.ble.MentraosBle.HeadUpAngleConfig) payload_; + } + return mentraos.ble.MentraosBle.HeadUpAngleConfig.getDefaultInstance(); + } + /** + * .mentraos.ble.HeadUpAngleConfig head_up_angle = 15; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadUpAngleConfigOrBuilder getHeadUpAngleOrBuilder() { + if (payloadCase_ == 15) { + return (mentraos.ble.MentraosBle.HeadUpAngleConfig) payload_; + } + return mentraos.ble.MentraosBle.HeadUpAngleConfig.getDefaultInstance(); + } + + public static final int PONG_FIELD_NUMBER = 16; + /** + * .mentraos.ble.PongResponse pong = 16; + * @return Whether the pong field is set. + */ + @java.lang.Override + public boolean hasPong() { + return payloadCase_ == 16; + } + /** + * .mentraos.ble.PongResponse pong = 16; + * @return The pong. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.PongResponse getPong() { + if (payloadCase_ == 16) { + return (mentraos.ble.MentraosBle.PongResponse) payload_; + } + return mentraos.ble.MentraosBle.PongResponse.getDefaultInstance(); + } + /** + * .mentraos.ble.PongResponse pong = 16; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.PongResponseOrBuilder getPongOrBuilder() { + if (payloadCase_ == 16) { + return (mentraos.ble.MentraosBle.PongResponse) payload_; + } + return mentraos.ble.MentraosBle.PongResponse.getDefaultInstance(); + } + + public static final int MIC_STATE_FIELD_NUMBER = 20; + /** + *
+     * Audio System
+     * 
+ * + * .mentraos.ble.MicStateConfig mic_state = 20; + * @return Whether the micState field is set. + */ + @java.lang.Override + public boolean hasMicState() { + return payloadCase_ == 20; + } + /** + *
+     * Audio System
+     * 
+ * + * .mentraos.ble.MicStateConfig mic_state = 20; + * @return The micState. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.MicStateConfig getMicState() { + if (payloadCase_ == 20) { + return (mentraos.ble.MentraosBle.MicStateConfig) payload_; + } + return mentraos.ble.MentraosBle.MicStateConfig.getDefaultInstance(); + } + /** + *
+     * Audio System
+     * 
+ * + * .mentraos.ble.MicStateConfig mic_state = 20; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.MicStateConfigOrBuilder getMicStateOrBuilder() { + if (payloadCase_ == 20) { + return (mentraos.ble.MentraosBle.MicStateConfig) payload_; + } + return mentraos.ble.MentraosBle.MicStateConfig.getDefaultInstance(); + } + + public static final int SET_VAD_ENABLED_FIELD_NUMBER = 23; + /** + * .mentraos.ble.VadEnabledRequest set_vad_enabled = 23; + * @return Whether the setVadEnabled field is set. + */ + @java.lang.Override + public boolean hasSetVadEnabled() { + return payloadCase_ == 23; + } + /** + * .mentraos.ble.VadEnabledRequest set_vad_enabled = 23; + * @return The setVadEnabled. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadEnabledRequest getSetVadEnabled() { + if (payloadCase_ == 23) { + return (mentraos.ble.MentraosBle.VadEnabledRequest) payload_; + } + return mentraos.ble.MentraosBle.VadEnabledRequest.getDefaultInstance(); + } + /** + * .mentraos.ble.VadEnabledRequest set_vad_enabled = 23; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadEnabledRequestOrBuilder getSetVadEnabledOrBuilder() { + if (payloadCase_ == 23) { + return (mentraos.ble.MentraosBle.VadEnabledRequest) payload_; + } + return mentraos.ble.MentraosBle.VadEnabledRequest.getDefaultInstance(); + } + + public static final int SET_VAD_CONFIG_FIELD_NUMBER = 24; + /** + * .mentraos.ble.VadConfigRequest set_vad_config = 24; + * @return Whether the setVadConfig field is set. + */ + @java.lang.Override + public boolean hasSetVadConfig() { + return payloadCase_ == 24; + } + /** + * .mentraos.ble.VadConfigRequest set_vad_config = 24; + * @return The setVadConfig. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadConfigRequest getSetVadConfig() { + if (payloadCase_ == 24) { + return (mentraos.ble.MentraosBle.VadConfigRequest) payload_; + } + return mentraos.ble.MentraosBle.VadConfigRequest.getDefaultInstance(); + } + /** + * .mentraos.ble.VadConfigRequest set_vad_config = 24; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadConfigRequestOrBuilder getSetVadConfigOrBuilder() { + if (payloadCase_ == 24) { + return (mentraos.ble.MentraosBle.VadConfigRequest) payload_; + } + return mentraos.ble.MentraosBle.VadConfigRequest.getDefaultInstance(); + } + + public static final int REQUEST_VAD_STATUS_FIELD_NUMBER = 25; + /** + * .mentraos.ble.VadStatusRequest request_vad_status = 25; + * @return Whether the requestVadStatus field is set. + */ + @java.lang.Override + public boolean hasRequestVadStatus() { + return payloadCase_ == 25; + } + /** + * .mentraos.ble.VadStatusRequest request_vad_status = 25; + * @return The requestVadStatus. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadStatusRequest getRequestVadStatus() { + if (payloadCase_ == 25) { + return (mentraos.ble.MentraosBle.VadStatusRequest) payload_; + } + return mentraos.ble.MentraosBle.VadStatusRequest.getDefaultInstance(); + } + /** + * .mentraos.ble.VadStatusRequest request_vad_status = 25; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadStatusRequestOrBuilder getRequestVadStatusOrBuilder() { + if (payloadCase_ == 25) { + return (mentraos.ble.MentraosBle.VadStatusRequest) payload_; + } + return mentraos.ble.MentraosBle.VadStatusRequest.getDefaultInstance(); + } + + public static final int DISPLAY_TEXT_FIELD_NUMBER = 30; + /** + *
+     * Display System - These queue until commit
+     * 
+ * + * .mentraos.ble.DisplayText display_text = 30; + * @return Whether the displayText field is set. + */ + @java.lang.Override + public boolean hasDisplayText() { + return payloadCase_ == 30; + } + /** + *
+     * Display System - These queue until commit
+     * 
+ * + * .mentraos.ble.DisplayText display_text = 30; + * @return The displayText. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayText getDisplayText() { + if (payloadCase_ == 30) { + return (mentraos.ble.MentraosBle.DisplayText) payload_; + } + return mentraos.ble.MentraosBle.DisplayText.getDefaultInstance(); + } + /** + *
+     * Display System - These queue until commit
+     * 
+ * + * .mentraos.ble.DisplayText display_text = 30; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayTextOrBuilder getDisplayTextOrBuilder() { + if (payloadCase_ == 30) { + return (mentraos.ble.MentraosBle.DisplayText) payload_; + } + return mentraos.ble.MentraosBle.DisplayText.getDefaultInstance(); + } + + public static final int DISPLAY_IMAGE_FIELD_NUMBER = 31; + /** + * .mentraos.ble.DisplayImage display_image = 31; + * @return Whether the displayImage field is set. + */ + @java.lang.Override + public boolean hasDisplayImage() { + return payloadCase_ == 31; + } + /** + * .mentraos.ble.DisplayImage display_image = 31; + * @return The displayImage. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayImage getDisplayImage() { + if (payloadCase_ == 31) { + return (mentraos.ble.MentraosBle.DisplayImage) payload_; + } + return mentraos.ble.MentraosBle.DisplayImage.getDefaultInstance(); + } + /** + * .mentraos.ble.DisplayImage display_image = 31; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayImageOrBuilder getDisplayImageOrBuilder() { + if (payloadCase_ == 31) { + return (mentraos.ble.MentraosBle.DisplayImage) payload_; + } + return mentraos.ble.MentraosBle.DisplayImage.getDefaultInstance(); + } + + public static final int CACHE_IMAGE_FIELD_NUMBER = 32; + /** + * .mentraos.ble.CacheImage cache_image = 32; + * @return Whether the cacheImage field is set. + */ + @java.lang.Override + public boolean hasCacheImage() { + return payloadCase_ == 32; + } + /** + * .mentraos.ble.CacheImage cache_image = 32; + * @return The cacheImage. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.CacheImage getCacheImage() { + if (payloadCase_ == 32) { + return (mentraos.ble.MentraosBle.CacheImage) payload_; + } + return mentraos.ble.MentraosBle.CacheImage.getDefaultInstance(); + } + /** + * .mentraos.ble.CacheImage cache_image = 32; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.CacheImageOrBuilder getCacheImageOrBuilder() { + if (payloadCase_ == 32) { + return (mentraos.ble.MentraosBle.CacheImage) payload_; + } + return mentraos.ble.MentraosBle.CacheImage.getDefaultInstance(); + } + + public static final int DISPLAY_CACHED_IMAGE_FIELD_NUMBER = 33; + /** + * .mentraos.ble.DisplayCachedImage display_cached_image = 33; + * @return Whether the displayCachedImage field is set. + */ + @java.lang.Override + public boolean hasDisplayCachedImage() { + return payloadCase_ == 33; + } + /** + * .mentraos.ble.DisplayCachedImage display_cached_image = 33; + * @return The displayCachedImage. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayCachedImage getDisplayCachedImage() { + if (payloadCase_ == 33) { + return (mentraos.ble.MentraosBle.DisplayCachedImage) payload_; + } + return mentraos.ble.MentraosBle.DisplayCachedImage.getDefaultInstance(); + } + /** + * .mentraos.ble.DisplayCachedImage display_cached_image = 33; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayCachedImageOrBuilder getDisplayCachedImageOrBuilder() { + if (payloadCase_ == 33) { + return (mentraos.ble.MentraosBle.DisplayCachedImage) payload_; + } + return mentraos.ble.MentraosBle.DisplayCachedImage.getDefaultInstance(); + } + + public static final int CLEAR_CACHED_IMAGE_FIELD_NUMBER = 34; + /** + * .mentraos.ble.ClearCachedImage clear_cached_image = 34; + * @return Whether the clearCachedImage field is set. + */ + @java.lang.Override + public boolean hasClearCachedImage() { + return payloadCase_ == 34; + } + /** + * .mentraos.ble.ClearCachedImage clear_cached_image = 34; + * @return The clearCachedImage. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ClearCachedImage getClearCachedImage() { + if (payloadCase_ == 34) { + return (mentraos.ble.MentraosBle.ClearCachedImage) payload_; + } + return mentraos.ble.MentraosBle.ClearCachedImage.getDefaultInstance(); + } + /** + * .mentraos.ble.ClearCachedImage clear_cached_image = 34; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ClearCachedImageOrBuilder getClearCachedImageOrBuilder() { + if (payloadCase_ == 34) { + return (mentraos.ble.MentraosBle.ClearCachedImage) payload_; + } + return mentraos.ble.MentraosBle.ClearCachedImage.getDefaultInstance(); + } + + public static final int DISPLAY_SCROLLING_TEXT_FIELD_NUMBER = 35; + /** + * .mentraos.ble.DisplayScrollingText display_scrolling_text = 35; + * @return Whether the displayScrollingText field is set. + */ + @java.lang.Override + public boolean hasDisplayScrollingText() { + return payloadCase_ == 35; + } + /** + * .mentraos.ble.DisplayScrollingText display_scrolling_text = 35; + * @return The displayScrollingText. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayScrollingText getDisplayScrollingText() { + if (payloadCase_ == 35) { + return (mentraos.ble.MentraosBle.DisplayScrollingText) payload_; + } + return mentraos.ble.MentraosBle.DisplayScrollingText.getDefaultInstance(); + } + /** + * .mentraos.ble.DisplayScrollingText display_scrolling_text = 35; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayScrollingTextOrBuilder getDisplayScrollingTextOrBuilder() { + if (payloadCase_ == 35) { + return (mentraos.ble.MentraosBle.DisplayScrollingText) payload_; + } + return mentraos.ble.MentraosBle.DisplayScrollingText.getDefaultInstance(); + } + + public static final int DRAW_LINE_FIELD_NUMBER = 40; + /** + * .mentraos.ble.DrawLine draw_line = 40; + * @return Whether the drawLine field is set. + */ + @java.lang.Override + public boolean hasDrawLine() { + return payloadCase_ == 40; + } + /** + * .mentraos.ble.DrawLine draw_line = 40; + * @return The drawLine. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawLine getDrawLine() { + if (payloadCase_ == 40) { + return (mentraos.ble.MentraosBle.DrawLine) payload_; + } + return mentraos.ble.MentraosBle.DrawLine.getDefaultInstance(); + } + /** + * .mentraos.ble.DrawLine draw_line = 40; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawLineOrBuilder getDrawLineOrBuilder() { + if (payloadCase_ == 40) { + return (mentraos.ble.MentraosBle.DrawLine) payload_; + } + return mentraos.ble.MentraosBle.DrawLine.getDefaultInstance(); + } + + public static final int DRAW_RECT_FIELD_NUMBER = 41; + /** + * .mentraos.ble.DrawRect draw_rect = 41; + * @return Whether the drawRect field is set. + */ + @java.lang.Override + public boolean hasDrawRect() { + return payloadCase_ == 41; + } + /** + * .mentraos.ble.DrawRect draw_rect = 41; + * @return The drawRect. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawRect getDrawRect() { + if (payloadCase_ == 41) { + return (mentraos.ble.MentraosBle.DrawRect) payload_; + } + return mentraos.ble.MentraosBle.DrawRect.getDefaultInstance(); + } + /** + * .mentraos.ble.DrawRect draw_rect = 41; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawRectOrBuilder getDrawRectOrBuilder() { + if (payloadCase_ == 41) { + return (mentraos.ble.MentraosBle.DrawRect) payload_; + } + return mentraos.ble.MentraosBle.DrawRect.getDefaultInstance(); + } + + public static final int DRAW_CIRCLE_FIELD_NUMBER = 42; + /** + * .mentraos.ble.DrawCircle draw_circle = 42; + * @return Whether the drawCircle field is set. + */ + @java.lang.Override + public boolean hasDrawCircle() { + return payloadCase_ == 42; + } + /** + * .mentraos.ble.DrawCircle draw_circle = 42; + * @return The drawCircle. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawCircle getDrawCircle() { + if (payloadCase_ == 42) { + return (mentraos.ble.MentraosBle.DrawCircle) payload_; + } + return mentraos.ble.MentraosBle.DrawCircle.getDefaultInstance(); + } + /** + * .mentraos.ble.DrawCircle draw_circle = 42; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawCircleOrBuilder getDrawCircleOrBuilder() { + if (payloadCase_ == 42) { + return (mentraos.ble.MentraosBle.DrawCircle) payload_; + } + return mentraos.ble.MentraosBle.DrawCircle.getDefaultInstance(); + } + + public static final int DISPLAY_BATCH_FIELD_NUMBER = 52; + /** + *
+     * Send multiple commands at once
+     * 
+ * + * .mentraos.ble.DisplayBatch display_batch = 52; + * @return Whether the displayBatch field is set. + */ + @java.lang.Override + public boolean hasDisplayBatch() { + return payloadCase_ == 52; + } + /** + *
+     * Send multiple commands at once
+     * 
+ * + * .mentraos.ble.DisplayBatch display_batch = 52; + * @return The displayBatch. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayBatch getDisplayBatch() { + if (payloadCase_ == 52) { + return (mentraos.ble.MentraosBle.DisplayBatch) payload_; + } + return mentraos.ble.MentraosBle.DisplayBatch.getDefaultInstance(); + } + /** + *
+     * Send multiple commands at once
+     * 
+ * + * .mentraos.ble.DisplayBatch display_batch = 52; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayBatchOrBuilder getDisplayBatchOrBuilder() { + if (payloadCase_ == 52) { + return (mentraos.ble.MentraosBle.DisplayBatch) payload_; + } + return mentraos.ble.MentraosBle.DisplayBatch.getDefaultInstance(); + } + + public static final int COMMIT_FIELD_NUMBER = 43; + /** + *
+     * Renders all queued commands
+     * 
+ * + * .mentraos.ble.CommitDisplay commit = 43; + * @return Whether the commit field is set. + */ + @java.lang.Override + public boolean hasCommit() { + return payloadCase_ == 43; + } + /** + *
+     * Renders all queued commands
+     * 
+ * + * .mentraos.ble.CommitDisplay commit = 43; + * @return The commit. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.CommitDisplay getCommit() { + if (payloadCase_ == 43) { + return (mentraos.ble.MentraosBle.CommitDisplay) payload_; + } + return mentraos.ble.MentraosBle.CommitDisplay.getDefaultInstance(); + } + /** + *
+     * Renders all queued commands
+     * 
+ * + * .mentraos.ble.CommitDisplay commit = 43; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.CommitDisplayOrBuilder getCommitOrBuilder() { + if (payloadCase_ == 43) { + return (mentraos.ble.MentraosBle.CommitDisplay) payload_; + } + return mentraos.ble.MentraosBle.CommitDisplay.getDefaultInstance(); + } + + public static final int DISPLAY_POWER_FIELD_NUMBER = 36; + /** + *
+     * Display Control - These execute immediately
+     * 
+ * + * .mentraos.ble.DisplayPowerConfig display_power = 36; + * @return Whether the displayPower field is set. + */ + @java.lang.Override + public boolean hasDisplayPower() { + return payloadCase_ == 36; + } + /** + *
+     * Display Control - These execute immediately
+     * 
+ * + * .mentraos.ble.DisplayPowerConfig display_power = 36; + * @return The displayPower. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayPowerConfig getDisplayPower() { + if (payloadCase_ == 36) { + return (mentraos.ble.MentraosBle.DisplayPowerConfig) payload_; + } + return mentraos.ble.MentraosBle.DisplayPowerConfig.getDefaultInstance(); + } + /** + *
+     * Display Control - These execute immediately
+     * 
+ * + * .mentraos.ble.DisplayPowerConfig display_power = 36; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayPowerConfigOrBuilder getDisplayPowerOrBuilder() { + if (payloadCase_ == 36) { + return (mentraos.ble.MentraosBle.DisplayPowerConfig) payload_; + } + return mentraos.ble.MentraosBle.DisplayPowerConfig.getDefaultInstance(); + } + + public static final int BRIGHTNESS_FIELD_NUMBER = 37; + /** + * .mentraos.ble.BrightnessConfig brightness = 37; + * @return Whether the brightness field is set. + */ + @java.lang.Override + public boolean hasBrightness() { + return payloadCase_ == 37; + } + /** + * .mentraos.ble.BrightnessConfig brightness = 37; + * @return The brightness. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.BrightnessConfig getBrightness() { + if (payloadCase_ == 37) { + return (mentraos.ble.MentraosBle.BrightnessConfig) payload_; + } + return mentraos.ble.MentraosBle.BrightnessConfig.getDefaultInstance(); + } + /** + * .mentraos.ble.BrightnessConfig brightness = 37; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.BrightnessConfigOrBuilder getBrightnessOrBuilder() { + if (payloadCase_ == 37) { + return (mentraos.ble.MentraosBle.BrightnessConfig) payload_; + } + return mentraos.ble.MentraosBle.BrightnessConfig.getDefaultInstance(); + } + + public static final int AUTO_BRIGHTNESS_FIELD_NUMBER = 38; + /** + * .mentraos.ble.AutoBrightnessConfig auto_brightness = 38; + * @return Whether the autoBrightness field is set. + */ + @java.lang.Override + public boolean hasAutoBrightness() { + return payloadCase_ == 38; + } + /** + * .mentraos.ble.AutoBrightnessConfig auto_brightness = 38; + * @return The autoBrightness. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.AutoBrightnessConfig getAutoBrightness() { + if (payloadCase_ == 38) { + return (mentraos.ble.MentraosBle.AutoBrightnessConfig) payload_; + } + return mentraos.ble.MentraosBle.AutoBrightnessConfig.getDefaultInstance(); + } + /** + * .mentraos.ble.AutoBrightnessConfig auto_brightness = 38; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.AutoBrightnessConfigOrBuilder getAutoBrightnessOrBuilder() { + if (payloadCase_ == 38) { + return (mentraos.ble.MentraosBle.AutoBrightnessConfig) payload_; + } + return mentraos.ble.MentraosBle.AutoBrightnessConfig.getDefaultInstance(); + } + + public static final int AUTO_BRIGHTNESS_MULT_FIELD_NUMBER = 39; + /** + * .mentraos.ble.AutoBrightnessMultiplier auto_brightness_mult = 39; + * @return Whether the autoBrightnessMult field is set. + */ + @java.lang.Override + public boolean hasAutoBrightnessMult() { + return payloadCase_ == 39; + } + /** + * .mentraos.ble.AutoBrightnessMultiplier auto_brightness_mult = 39; + * @return The autoBrightnessMult. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.AutoBrightnessMultiplier getAutoBrightnessMult() { + if (payloadCase_ == 39) { + return (mentraos.ble.MentraosBle.AutoBrightnessMultiplier) payload_; + } + return mentraos.ble.MentraosBle.AutoBrightnessMultiplier.getDefaultInstance(); + } + /** + * .mentraos.ble.AutoBrightnessMultiplier auto_brightness_mult = 39; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.AutoBrightnessMultiplierOrBuilder getAutoBrightnessMultOrBuilder() { + if (payloadCase_ == 39) { + return (mentraos.ble.MentraosBle.AutoBrightnessMultiplier) payload_; + } + return mentraos.ble.MentraosBle.AutoBrightnessMultiplier.getDefaultInstance(); + } + + public static final int DISPLAY_DISTANCE_FIELD_NUMBER = 44; + /** + * .mentraos.ble.DisplayDistanceConfig display_distance = 44; + * @return Whether the displayDistance field is set. + */ + @java.lang.Override + public boolean hasDisplayDistance() { + return payloadCase_ == 44; + } + /** + * .mentraos.ble.DisplayDistanceConfig display_distance = 44; + * @return The displayDistance. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayDistanceConfig getDisplayDistance() { + if (payloadCase_ == 44) { + return (mentraos.ble.MentraosBle.DisplayDistanceConfig) payload_; + } + return mentraos.ble.MentraosBle.DisplayDistanceConfig.getDefaultInstance(); + } + /** + * .mentraos.ble.DisplayDistanceConfig display_distance = 44; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayDistanceConfigOrBuilder getDisplayDistanceOrBuilder() { + if (payloadCase_ == 44) { + return (mentraos.ble.MentraosBle.DisplayDistanceConfig) payload_; + } + return mentraos.ble.MentraosBle.DisplayDistanceConfig.getDefaultInstance(); + } + + public static final int DISPLAY_HEIGHT_FIELD_NUMBER = 45; + /** + * .mentraos.ble.DisplayHeightConfig display_height = 45; + * @return Whether the displayHeight field is set. + */ + @java.lang.Override + public boolean hasDisplayHeight() { + return payloadCase_ == 45; + } + /** + * .mentraos.ble.DisplayHeightConfig display_height = 45; + * @return The displayHeight. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayHeightConfig getDisplayHeight() { + if (payloadCase_ == 45) { + return (mentraos.ble.MentraosBle.DisplayHeightConfig) payload_; + } + return mentraos.ble.MentraosBle.DisplayHeightConfig.getDefaultInstance(); + } + /** + * .mentraos.ble.DisplayHeightConfig display_height = 45; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayHeightConfigOrBuilder getDisplayHeightOrBuilder() { + if (payloadCase_ == 45) { + return (mentraos.ble.MentraosBle.DisplayHeightConfig) payload_; + } + return mentraos.ble.MentraosBle.DisplayHeightConfig.getDefaultInstance(); + } + + public static final int CLEAR_DISPLAY_FIELD_NUMBER = 46; + /** + * .mentraos.ble.ClearDisplay clear_display = 46; + * @return Whether the clearDisplay field is set. + */ + @java.lang.Override + public boolean hasClearDisplay() { + return payloadCase_ == 46; + } + /** + * .mentraos.ble.ClearDisplay clear_display = 46; + * @return The clearDisplay. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ClearDisplay getClearDisplay() { + if (payloadCase_ == 46) { + return (mentraos.ble.MentraosBle.ClearDisplay) payload_; + } + return mentraos.ble.MentraosBle.ClearDisplay.getDefaultInstance(); + } + /** + * .mentraos.ble.ClearDisplay clear_display = 46; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ClearDisplayOrBuilder getClearDisplayOrBuilder() { + if (payloadCase_ == 46) { + return (mentraos.ble.MentraosBle.ClearDisplay) payload_; + } + return mentraos.ble.MentraosBle.ClearDisplay.getDefaultInstance(); + } + + public static final int QUEUE_STATUS_REQUEST_FIELD_NUMBER = 51; + /** + *
+     * Get queue info
+     * 
+ * + * .mentraos.ble.DisplayQueueStatus queue_status_request = 51; + * @return Whether the queueStatusRequest field is set. + */ + @java.lang.Override + public boolean hasQueueStatusRequest() { + return payloadCase_ == 51; + } + /** + *
+     * Get queue info
+     * 
+ * + * .mentraos.ble.DisplayQueueStatus queue_status_request = 51; + * @return The queueStatusRequest. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayQueueStatus getQueueStatusRequest() { + if (payloadCase_ == 51) { + return (mentraos.ble.MentraosBle.DisplayQueueStatus) payload_; + } + return mentraos.ble.MentraosBle.DisplayQueueStatus.getDefaultInstance(); + } + /** + *
+     * Get queue info
+     * 
+ * + * .mentraos.ble.DisplayQueueStatus queue_status_request = 51; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayQueueStatusOrBuilder getQueueStatusRequestOrBuilder() { + if (payloadCase_ == 51) { + return (mentraos.ble.MentraosBle.DisplayQueueStatus) payload_; + } + return mentraos.ble.MentraosBle.DisplayQueueStatus.getDefaultInstance(); + } + + public static final int CACHE_DASHBOARD_FIELD_NUMBER = 47; + /** + *
+     * Dashboard/Cacheboard System
+     * 
+ * + * .mentraos.ble.CacheDashboard cache_dashboard = 47; + * @return Whether the cacheDashboard field is set. + */ + @java.lang.Override + public boolean hasCacheDashboard() { + return payloadCase_ == 47; + } + /** + *
+     * Dashboard/Cacheboard System
+     * 
+ * + * .mentraos.ble.CacheDashboard cache_dashboard = 47; + * @return The cacheDashboard. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.CacheDashboard getCacheDashboard() { + if (payloadCase_ == 47) { + return (mentraos.ble.MentraosBle.CacheDashboard) payload_; + } + return mentraos.ble.MentraosBle.CacheDashboard.getDefaultInstance(); + } + /** + *
+     * Dashboard/Cacheboard System
+     * 
+ * + * .mentraos.ble.CacheDashboard cache_dashboard = 47; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.CacheDashboardOrBuilder getCacheDashboardOrBuilder() { + if (payloadCase_ == 47) { + return (mentraos.ble.MentraosBle.CacheDashboard) payload_; + } + return mentraos.ble.MentraosBle.CacheDashboard.getDefaultInstance(); + } + + public static final int CLEAR_DASHBOARD_FIELD_NUMBER = 48; + /** + * .mentraos.ble.ClearDashboard clear_dashboard = 48; + * @return Whether the clearDashboard field is set. + */ + @java.lang.Override + public boolean hasClearDashboard() { + return payloadCase_ == 48; + } + /** + * .mentraos.ble.ClearDashboard clear_dashboard = 48; + * @return The clearDashboard. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ClearDashboard getClearDashboard() { + if (payloadCase_ == 48) { + return (mentraos.ble.MentraosBle.ClearDashboard) payload_; + } + return mentraos.ble.MentraosBle.ClearDashboard.getDefaultInstance(); + } + /** + * .mentraos.ble.ClearDashboard clear_dashboard = 48; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ClearDashboardOrBuilder getClearDashboardOrBuilder() { + if (payloadCase_ == 48) { + return (mentraos.ble.MentraosBle.ClearDashboard) payload_; + } + return mentraos.ble.MentraosBle.ClearDashboard.getDefaultInstance(); + } + + public static final int DASHBOARD_TRIGGER_FIELD_NUMBER = 49; + /** + * .mentraos.ble.ConfigureDashboardTrigger dashboard_trigger = 49; + * @return Whether the dashboardTrigger field is set. + */ + @java.lang.Override + public boolean hasDashboardTrigger() { + return payloadCase_ == 49; + } + /** + * .mentraos.ble.ConfigureDashboardTrigger dashboard_trigger = 49; + * @return The dashboardTrigger. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ConfigureDashboardTrigger getDashboardTrigger() { + if (payloadCase_ == 49) { + return (mentraos.ble.MentraosBle.ConfigureDashboardTrigger) payload_; + } + return mentraos.ble.MentraosBle.ConfigureDashboardTrigger.getDefaultInstance(); + } + /** + * .mentraos.ble.ConfigureDashboardTrigger dashboard_trigger = 49; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ConfigureDashboardTriggerOrBuilder getDashboardTriggerOrBuilder() { + if (payloadCase_ == 49) { + return (mentraos.ble.MentraosBle.ConfigureDashboardTrigger) payload_; + } + return mentraos.ble.MentraosBle.ConfigureDashboardTrigger.getDefaultInstance(); + } + + public static final int IMU_ENABLED_FIELD_NUMBER = 55; + /** + *
+     * User Input
+     * 
+ * + * .mentraos.ble.ImuEnabledConfig imu_enabled = 55; + * @return Whether the imuEnabled field is set. + */ + @java.lang.Override + public boolean hasImuEnabled() { + return payloadCase_ == 55; + } + /** + *
+     * User Input
+     * 
+ * + * .mentraos.ble.ImuEnabledConfig imu_enabled = 55; + * @return The imuEnabled. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImuEnabledConfig getImuEnabled() { + if (payloadCase_ == 55) { + return (mentraos.ble.MentraosBle.ImuEnabledConfig) payload_; + } + return mentraos.ble.MentraosBle.ImuEnabledConfig.getDefaultInstance(); + } + /** + *
+     * User Input
+     * 
+ * + * .mentraos.ble.ImuEnabledConfig imu_enabled = 55; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImuEnabledConfigOrBuilder getImuEnabledOrBuilder() { + if (payloadCase_ == 55) { + return (mentraos.ble.MentraosBle.ImuEnabledConfig) payload_; + } + return mentraos.ble.MentraosBle.ImuEnabledConfig.getDefaultInstance(); + } + + public static final int IMU_SINGLE_FIELD_NUMBER = 56; + /** + * .mentraos.ble.ImuSingleRequest imu_single = 56; + * @return Whether the imuSingle field is set. + */ + @java.lang.Override + public boolean hasImuSingle() { + return payloadCase_ == 56; + } + /** + * .mentraos.ble.ImuSingleRequest imu_single = 56; + * @return The imuSingle. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImuSingleRequest getImuSingle() { + if (payloadCase_ == 56) { + return (mentraos.ble.MentraosBle.ImuSingleRequest) payload_; + } + return mentraos.ble.MentraosBle.ImuSingleRequest.getDefaultInstance(); + } + /** + * .mentraos.ble.ImuSingleRequest imu_single = 56; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImuSingleRequestOrBuilder getImuSingleOrBuilder() { + if (payloadCase_ == 56) { + return (mentraos.ble.MentraosBle.ImuSingleRequest) payload_; + } + return mentraos.ble.MentraosBle.ImuSingleRequest.getDefaultInstance(); + } + + public static final int IMU_STREAM_FIELD_NUMBER = 57; + /** + * .mentraos.ble.ImuStreamConfig imu_stream = 57; + * @return Whether the imuStream field is set. + */ + @java.lang.Override + public boolean hasImuStream() { + return payloadCase_ == 57; + } + /** + * .mentraos.ble.ImuStreamConfig imu_stream = 57; + * @return The imuStream. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImuStreamConfig getImuStream() { + if (payloadCase_ == 57) { + return (mentraos.ble.MentraosBle.ImuStreamConfig) payload_; + } + return mentraos.ble.MentraosBle.ImuStreamConfig.getDefaultInstance(); + } + /** + * .mentraos.ble.ImuStreamConfig imu_stream = 57; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImuStreamConfigOrBuilder getImuStreamOrBuilder() { + if (payloadCase_ == 57) { + return (mentraos.ble.MentraosBle.ImuStreamConfig) payload_; + } + return mentraos.ble.MentraosBle.ImuStreamConfig.getDefaultInstance(); + } + + public static final int HEAD_GESTURE_FIELD_NUMBER = 58; + /** + * .mentraos.ble.HeadGestureConfig head_gesture = 58; + * @return Whether the headGesture field is set. + */ + @java.lang.Override + public boolean hasHeadGesture() { + return payloadCase_ == 58; + } + /** + * .mentraos.ble.HeadGestureConfig head_gesture = 58; + * @return The headGesture. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadGestureConfig getHeadGesture() { + if (payloadCase_ == 58) { + return (mentraos.ble.MentraosBle.HeadGestureConfig) payload_; + } + return mentraos.ble.MentraosBle.HeadGestureConfig.getDefaultInstance(); + } + /** + * .mentraos.ble.HeadGestureConfig head_gesture = 58; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadGestureConfigOrBuilder getHeadGestureOrBuilder() { + if (payloadCase_ == 58) { + return (mentraos.ble.MentraosBle.HeadGestureConfig) payload_; + } + return mentraos.ble.MentraosBle.HeadGestureConfig.getDefaultInstance(); + } + + public static final int RESTART_FIELD_NUMBER = 60; + /** + *
+     * System Control
+     * 
+ * + * .mentraos.ble.RestartRequest restart = 60; + * @return Whether the restart field is set. + */ + @java.lang.Override + public boolean hasRestart() { + return payloadCase_ == 60; + } + /** + *
+     * System Control
+     * 
+ * + * .mentraos.ble.RestartRequest restart = 60; + * @return The restart. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.RestartRequest getRestart() { + if (payloadCase_ == 60) { + return (mentraos.ble.MentraosBle.RestartRequest) payload_; + } + return mentraos.ble.MentraosBle.RestartRequest.getDefaultInstance(); + } + /** + *
+     * System Control
+     * 
+ * + * .mentraos.ble.RestartRequest restart = 60; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.RestartRequestOrBuilder getRestartOrBuilder() { + if (payloadCase_ == 60) { + return (mentraos.ble.MentraosBle.RestartRequest) payload_; + } + return mentraos.ble.MentraosBle.RestartRequest.getDefaultInstance(); + } + + public static final int FACTORY_RESET_FIELD_NUMBER = 61; + /** + * .mentraos.ble.FactoryResetRequest factory_reset = 61; + * @return Whether the factoryReset field is set. + */ + @java.lang.Override + public boolean hasFactoryReset() { + return payloadCase_ == 61; + } + /** + * .mentraos.ble.FactoryResetRequest factory_reset = 61; + * @return The factoryReset. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.FactoryResetRequest getFactoryReset() { + if (payloadCase_ == 61) { + return (mentraos.ble.MentraosBle.FactoryResetRequest) payload_; + } + return mentraos.ble.MentraosBle.FactoryResetRequest.getDefaultInstance(); + } + /** + * .mentraos.ble.FactoryResetRequest factory_reset = 61; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.FactoryResetRequestOrBuilder getFactoryResetOrBuilder() { + if (payloadCase_ == 61) { + return (mentraos.ble.MentraosBle.FactoryResetRequest) payload_; + } + return mentraos.ble.MentraosBle.FactoryResetRequest.getDefaultInstance(); + } + + public static final int VERSION_REQUEST_FIELD_NUMBER = 70; + /** + *
+     * Runtime protocol version query
+     * 
+ * + * .mentraos.ble.VersionRequest version_request = 70; + * @return Whether the versionRequest field is set. + */ + @java.lang.Override + public boolean hasVersionRequest() { + return payloadCase_ == 70; + } + /** + *
+     * Runtime protocol version query
+     * 
+ * + * .mentraos.ble.VersionRequest version_request = 70; + * @return The versionRequest. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VersionRequest getVersionRequest() { + if (payloadCase_ == 70) { + return (mentraos.ble.MentraosBle.VersionRequest) payload_; + } + return mentraos.ble.MentraosBle.VersionRequest.getDefaultInstance(); + } + /** + *
+     * Runtime protocol version query
+     * 
+ * + * .mentraos.ble.VersionRequest version_request = 70; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VersionRequestOrBuilder getVersionRequestOrBuilder() { + if (payloadCase_ == 70) { + return (mentraos.ble.MentraosBle.VersionRequest) payload_; + } + return mentraos.ble.MentraosBle.VersionRequest.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(msgId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, msgId_); + } + if (payloadCase_ == 10) { + output.writeMessage(10, (mentraos.ble.MentraosBle.DisconnectRequest) payload_); + } + if (payloadCase_ == 11) { + output.writeMessage(11, (mentraos.ble.MentraosBle.BatteryStateRequest) payload_); + } + if (payloadCase_ == 12) { + output.writeMessage(12, (mentraos.ble.MentraosBle.GlassesInfoRequest) payload_); + } + if (payloadCase_ == 13) { + output.writeMessage(13, (mentraos.ble.MentraosBle.PairingModeRequest) payload_); + } + if (payloadCase_ == 14) { + output.writeMessage(14, (mentraos.ble.MentraosBle.HeadPositionRequest) payload_); + } + if (payloadCase_ == 15) { + output.writeMessage(15, (mentraos.ble.MentraosBle.HeadUpAngleConfig) payload_); + } + if (payloadCase_ == 16) { + output.writeMessage(16, (mentraos.ble.MentraosBle.PongResponse) payload_); + } + if (payloadCase_ == 20) { + output.writeMessage(20, (mentraos.ble.MentraosBle.MicStateConfig) payload_); + } + if (payloadCase_ == 23) { + output.writeMessage(23, (mentraos.ble.MentraosBle.VadEnabledRequest) payload_); + } + if (payloadCase_ == 24) { + output.writeMessage(24, (mentraos.ble.MentraosBle.VadConfigRequest) payload_); + } + if (payloadCase_ == 25) { + output.writeMessage(25, (mentraos.ble.MentraosBle.VadStatusRequest) payload_); + } + if (payloadCase_ == 30) { + output.writeMessage(30, (mentraos.ble.MentraosBle.DisplayText) payload_); + } + if (payloadCase_ == 31) { + output.writeMessage(31, (mentraos.ble.MentraosBle.DisplayImage) payload_); + } + if (payloadCase_ == 32) { + output.writeMessage(32, (mentraos.ble.MentraosBle.CacheImage) payload_); + } + if (payloadCase_ == 33) { + output.writeMessage(33, (mentraos.ble.MentraosBle.DisplayCachedImage) payload_); + } + if (payloadCase_ == 34) { + output.writeMessage(34, (mentraos.ble.MentraosBle.ClearCachedImage) payload_); + } + if (payloadCase_ == 35) { + output.writeMessage(35, (mentraos.ble.MentraosBle.DisplayScrollingText) payload_); + } + if (payloadCase_ == 36) { + output.writeMessage(36, (mentraos.ble.MentraosBle.DisplayPowerConfig) payload_); + } + if (payloadCase_ == 37) { + output.writeMessage(37, (mentraos.ble.MentraosBle.BrightnessConfig) payload_); + } + if (payloadCase_ == 38) { + output.writeMessage(38, (mentraos.ble.MentraosBle.AutoBrightnessConfig) payload_); + } + if (payloadCase_ == 39) { + output.writeMessage(39, (mentraos.ble.MentraosBle.AutoBrightnessMultiplier) payload_); + } + if (payloadCase_ == 40) { + output.writeMessage(40, (mentraos.ble.MentraosBle.DrawLine) payload_); + } + if (payloadCase_ == 41) { + output.writeMessage(41, (mentraos.ble.MentraosBle.DrawRect) payload_); + } + if (payloadCase_ == 42) { + output.writeMessage(42, (mentraos.ble.MentraosBle.DrawCircle) payload_); + } + if (payloadCase_ == 43) { + output.writeMessage(43, (mentraos.ble.MentraosBle.CommitDisplay) payload_); + } + if (payloadCase_ == 44) { + output.writeMessage(44, (mentraos.ble.MentraosBle.DisplayDistanceConfig) payload_); + } + if (payloadCase_ == 45) { + output.writeMessage(45, (mentraos.ble.MentraosBle.DisplayHeightConfig) payload_); + } + if (payloadCase_ == 46) { + output.writeMessage(46, (mentraos.ble.MentraosBle.ClearDisplay) payload_); + } + if (payloadCase_ == 47) { + output.writeMessage(47, (mentraos.ble.MentraosBle.CacheDashboard) payload_); + } + if (payloadCase_ == 48) { + output.writeMessage(48, (mentraos.ble.MentraosBle.ClearDashboard) payload_); + } + if (payloadCase_ == 49) { + output.writeMessage(49, (mentraos.ble.MentraosBle.ConfigureDashboardTrigger) payload_); + } + if (payloadCase_ == 51) { + output.writeMessage(51, (mentraos.ble.MentraosBle.DisplayQueueStatus) payload_); + } + if (payloadCase_ == 52) { + output.writeMessage(52, (mentraos.ble.MentraosBle.DisplayBatch) payload_); + } + if (payloadCase_ == 55) { + output.writeMessage(55, (mentraos.ble.MentraosBle.ImuEnabledConfig) payload_); + } + if (payloadCase_ == 56) { + output.writeMessage(56, (mentraos.ble.MentraosBle.ImuSingleRequest) payload_); + } + if (payloadCase_ == 57) { + output.writeMessage(57, (mentraos.ble.MentraosBle.ImuStreamConfig) payload_); + } + if (payloadCase_ == 58) { + output.writeMessage(58, (mentraos.ble.MentraosBle.HeadGestureConfig) payload_); + } + if (payloadCase_ == 60) { + output.writeMessage(60, (mentraos.ble.MentraosBle.RestartRequest) payload_); + } + if (payloadCase_ == 61) { + output.writeMessage(61, (mentraos.ble.MentraosBle.FactoryResetRequest) payload_); + } + if (payloadCase_ == 70) { + output.writeMessage(70, (mentraos.ble.MentraosBle.VersionRequest) payload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(msgId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, msgId_); + } + if (payloadCase_ == 10) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, (mentraos.ble.MentraosBle.DisconnectRequest) payload_); + } + if (payloadCase_ == 11) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, (mentraos.ble.MentraosBle.BatteryStateRequest) payload_); + } + if (payloadCase_ == 12) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, (mentraos.ble.MentraosBle.GlassesInfoRequest) payload_); + } + if (payloadCase_ == 13) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, (mentraos.ble.MentraosBle.PairingModeRequest) payload_); + } + if (payloadCase_ == 14) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, (mentraos.ble.MentraosBle.HeadPositionRequest) payload_); + } + if (payloadCase_ == 15) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, (mentraos.ble.MentraosBle.HeadUpAngleConfig) payload_); + } + if (payloadCase_ == 16) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, (mentraos.ble.MentraosBle.PongResponse) payload_); + } + if (payloadCase_ == 20) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, (mentraos.ble.MentraosBle.MicStateConfig) payload_); + } + if (payloadCase_ == 23) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(23, (mentraos.ble.MentraosBle.VadEnabledRequest) payload_); + } + if (payloadCase_ == 24) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(24, (mentraos.ble.MentraosBle.VadConfigRequest) payload_); + } + if (payloadCase_ == 25) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(25, (mentraos.ble.MentraosBle.VadStatusRequest) payload_); + } + if (payloadCase_ == 30) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(30, (mentraos.ble.MentraosBle.DisplayText) payload_); + } + if (payloadCase_ == 31) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(31, (mentraos.ble.MentraosBle.DisplayImage) payload_); + } + if (payloadCase_ == 32) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(32, (mentraos.ble.MentraosBle.CacheImage) payload_); + } + if (payloadCase_ == 33) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(33, (mentraos.ble.MentraosBle.DisplayCachedImage) payload_); + } + if (payloadCase_ == 34) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(34, (mentraos.ble.MentraosBle.ClearCachedImage) payload_); + } + if (payloadCase_ == 35) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(35, (mentraos.ble.MentraosBle.DisplayScrollingText) payload_); + } + if (payloadCase_ == 36) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(36, (mentraos.ble.MentraosBle.DisplayPowerConfig) payload_); + } + if (payloadCase_ == 37) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(37, (mentraos.ble.MentraosBle.BrightnessConfig) payload_); + } + if (payloadCase_ == 38) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(38, (mentraos.ble.MentraosBle.AutoBrightnessConfig) payload_); + } + if (payloadCase_ == 39) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(39, (mentraos.ble.MentraosBle.AutoBrightnessMultiplier) payload_); + } + if (payloadCase_ == 40) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(40, (mentraos.ble.MentraosBle.DrawLine) payload_); + } + if (payloadCase_ == 41) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(41, (mentraos.ble.MentraosBle.DrawRect) payload_); + } + if (payloadCase_ == 42) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(42, (mentraos.ble.MentraosBle.DrawCircle) payload_); + } + if (payloadCase_ == 43) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(43, (mentraos.ble.MentraosBle.CommitDisplay) payload_); + } + if (payloadCase_ == 44) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(44, (mentraos.ble.MentraosBle.DisplayDistanceConfig) payload_); + } + if (payloadCase_ == 45) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(45, (mentraos.ble.MentraosBle.DisplayHeightConfig) payload_); + } + if (payloadCase_ == 46) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(46, (mentraos.ble.MentraosBle.ClearDisplay) payload_); + } + if (payloadCase_ == 47) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(47, (mentraos.ble.MentraosBle.CacheDashboard) payload_); + } + if (payloadCase_ == 48) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(48, (mentraos.ble.MentraosBle.ClearDashboard) payload_); + } + if (payloadCase_ == 49) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(49, (mentraos.ble.MentraosBle.ConfigureDashboardTrigger) payload_); + } + if (payloadCase_ == 51) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(51, (mentraos.ble.MentraosBle.DisplayQueueStatus) payload_); + } + if (payloadCase_ == 52) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(52, (mentraos.ble.MentraosBle.DisplayBatch) payload_); + } + if (payloadCase_ == 55) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(55, (mentraos.ble.MentraosBle.ImuEnabledConfig) payload_); + } + if (payloadCase_ == 56) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(56, (mentraos.ble.MentraosBle.ImuSingleRequest) payload_); + } + if (payloadCase_ == 57) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(57, (mentraos.ble.MentraosBle.ImuStreamConfig) payload_); + } + if (payloadCase_ == 58) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(58, (mentraos.ble.MentraosBle.HeadGestureConfig) payload_); + } + if (payloadCase_ == 60) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(60, (mentraos.ble.MentraosBle.RestartRequest) payload_); + } + if (payloadCase_ == 61) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(61, (mentraos.ble.MentraosBle.FactoryResetRequest) payload_); + } + if (payloadCase_ == 70) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(70, (mentraos.ble.MentraosBle.VersionRequest) payload_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.PhoneToGlasses)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.PhoneToGlasses other = (mentraos.ble.MentraosBle.PhoneToGlasses) obj; + + if (!getMsgId() + .equals(other.getMsgId())) return false; + if (!getPayloadCase().equals(other.getPayloadCase())) return false; + switch (payloadCase_) { + case 10: + if (!getDisconnect() + .equals(other.getDisconnect())) return false; + break; + case 11: + if (!getBatteryState() + .equals(other.getBatteryState())) return false; + break; + case 12: + if (!getGlassesInfo() + .equals(other.getGlassesInfo())) return false; + break; + case 13: + if (!getPairingMode() + .equals(other.getPairingMode())) return false; + break; + case 14: + if (!getHeadPosition() + .equals(other.getHeadPosition())) return false; + break; + case 15: + if (!getHeadUpAngle() + .equals(other.getHeadUpAngle())) return false; + break; + case 16: + if (!getPong() + .equals(other.getPong())) return false; + break; + case 20: + if (!getMicState() + .equals(other.getMicState())) return false; + break; + case 23: + if (!getSetVadEnabled() + .equals(other.getSetVadEnabled())) return false; + break; + case 24: + if (!getSetVadConfig() + .equals(other.getSetVadConfig())) return false; + break; + case 25: + if (!getRequestVadStatus() + .equals(other.getRequestVadStatus())) return false; + break; + case 30: + if (!getDisplayText() + .equals(other.getDisplayText())) return false; + break; + case 31: + if (!getDisplayImage() + .equals(other.getDisplayImage())) return false; + break; + case 32: + if (!getCacheImage() + .equals(other.getCacheImage())) return false; + break; + case 33: + if (!getDisplayCachedImage() + .equals(other.getDisplayCachedImage())) return false; + break; + case 34: + if (!getClearCachedImage() + .equals(other.getClearCachedImage())) return false; + break; + case 35: + if (!getDisplayScrollingText() + .equals(other.getDisplayScrollingText())) return false; + break; + case 40: + if (!getDrawLine() + .equals(other.getDrawLine())) return false; + break; + case 41: + if (!getDrawRect() + .equals(other.getDrawRect())) return false; + break; + case 42: + if (!getDrawCircle() + .equals(other.getDrawCircle())) return false; + break; + case 52: + if (!getDisplayBatch() + .equals(other.getDisplayBatch())) return false; + break; + case 43: + if (!getCommit() + .equals(other.getCommit())) return false; + break; + case 36: + if (!getDisplayPower() + .equals(other.getDisplayPower())) return false; + break; + case 37: + if (!getBrightness() + .equals(other.getBrightness())) return false; + break; + case 38: + if (!getAutoBrightness() + .equals(other.getAutoBrightness())) return false; + break; + case 39: + if (!getAutoBrightnessMult() + .equals(other.getAutoBrightnessMult())) return false; + break; + case 44: + if (!getDisplayDistance() + .equals(other.getDisplayDistance())) return false; + break; + case 45: + if (!getDisplayHeight() + .equals(other.getDisplayHeight())) return false; + break; + case 46: + if (!getClearDisplay() + .equals(other.getClearDisplay())) return false; + break; + case 51: + if (!getQueueStatusRequest() + .equals(other.getQueueStatusRequest())) return false; + break; + case 47: + if (!getCacheDashboard() + .equals(other.getCacheDashboard())) return false; + break; + case 48: + if (!getClearDashboard() + .equals(other.getClearDashboard())) return false; + break; + case 49: + if (!getDashboardTrigger() + .equals(other.getDashboardTrigger())) return false; + break; + case 55: + if (!getImuEnabled() + .equals(other.getImuEnabled())) return false; + break; + case 56: + if (!getImuSingle() + .equals(other.getImuSingle())) return false; + break; + case 57: + if (!getImuStream() + .equals(other.getImuStream())) return false; + break; + case 58: + if (!getHeadGesture() + .equals(other.getHeadGesture())) return false; + break; + case 60: + if (!getRestart() + .equals(other.getRestart())) return false; + break; + case 61: + if (!getFactoryReset() + .equals(other.getFactoryReset())) return false; + break; + case 70: + if (!getVersionRequest() + .equals(other.getVersionRequest())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + switch (payloadCase_) { + case 10: + hash = (37 * hash) + DISCONNECT_FIELD_NUMBER; + hash = (53 * hash) + getDisconnect().hashCode(); + break; + case 11: + hash = (37 * hash) + BATTERY_STATE_FIELD_NUMBER; + hash = (53 * hash) + getBatteryState().hashCode(); + break; + case 12: + hash = (37 * hash) + GLASSES_INFO_FIELD_NUMBER; + hash = (53 * hash) + getGlassesInfo().hashCode(); + break; + case 13: + hash = (37 * hash) + PAIRING_MODE_FIELD_NUMBER; + hash = (53 * hash) + getPairingMode().hashCode(); + break; + case 14: + hash = (37 * hash) + HEAD_POSITION_FIELD_NUMBER; + hash = (53 * hash) + getHeadPosition().hashCode(); + break; + case 15: + hash = (37 * hash) + HEAD_UP_ANGLE_FIELD_NUMBER; + hash = (53 * hash) + getHeadUpAngle().hashCode(); + break; + case 16: + hash = (37 * hash) + PONG_FIELD_NUMBER; + hash = (53 * hash) + getPong().hashCode(); + break; + case 20: + hash = (37 * hash) + MIC_STATE_FIELD_NUMBER; + hash = (53 * hash) + getMicState().hashCode(); + break; + case 23: + hash = (37 * hash) + SET_VAD_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + getSetVadEnabled().hashCode(); + break; + case 24: + hash = (37 * hash) + SET_VAD_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSetVadConfig().hashCode(); + break; + case 25: + hash = (37 * hash) + REQUEST_VAD_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getRequestVadStatus().hashCode(); + break; + case 30: + hash = (37 * hash) + DISPLAY_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getDisplayText().hashCode(); + break; + case 31: + hash = (37 * hash) + DISPLAY_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getDisplayImage().hashCode(); + break; + case 32: + hash = (37 * hash) + CACHE_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getCacheImage().hashCode(); + break; + case 33: + hash = (37 * hash) + DISPLAY_CACHED_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getDisplayCachedImage().hashCode(); + break; + case 34: + hash = (37 * hash) + CLEAR_CACHED_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getClearCachedImage().hashCode(); + break; + case 35: + hash = (37 * hash) + DISPLAY_SCROLLING_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getDisplayScrollingText().hashCode(); + break; + case 40: + hash = (37 * hash) + DRAW_LINE_FIELD_NUMBER; + hash = (53 * hash) + getDrawLine().hashCode(); + break; + case 41: + hash = (37 * hash) + DRAW_RECT_FIELD_NUMBER; + hash = (53 * hash) + getDrawRect().hashCode(); + break; + case 42: + hash = (37 * hash) + DRAW_CIRCLE_FIELD_NUMBER; + hash = (53 * hash) + getDrawCircle().hashCode(); + break; + case 52: + hash = (37 * hash) + DISPLAY_BATCH_FIELD_NUMBER; + hash = (53 * hash) + getDisplayBatch().hashCode(); + break; + case 43: + hash = (37 * hash) + COMMIT_FIELD_NUMBER; + hash = (53 * hash) + getCommit().hashCode(); + break; + case 36: + hash = (37 * hash) + DISPLAY_POWER_FIELD_NUMBER; + hash = (53 * hash) + getDisplayPower().hashCode(); + break; + case 37: + hash = (37 * hash) + BRIGHTNESS_FIELD_NUMBER; + hash = (53 * hash) + getBrightness().hashCode(); + break; + case 38: + hash = (37 * hash) + AUTO_BRIGHTNESS_FIELD_NUMBER; + hash = (53 * hash) + getAutoBrightness().hashCode(); + break; + case 39: + hash = (37 * hash) + AUTO_BRIGHTNESS_MULT_FIELD_NUMBER; + hash = (53 * hash) + getAutoBrightnessMult().hashCode(); + break; + case 44: + hash = (37 * hash) + DISPLAY_DISTANCE_FIELD_NUMBER; + hash = (53 * hash) + getDisplayDistance().hashCode(); + break; + case 45: + hash = (37 * hash) + DISPLAY_HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getDisplayHeight().hashCode(); + break; + case 46: + hash = (37 * hash) + CLEAR_DISPLAY_FIELD_NUMBER; + hash = (53 * hash) + getClearDisplay().hashCode(); + break; + case 51: + hash = (37 * hash) + QUEUE_STATUS_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getQueueStatusRequest().hashCode(); + break; + case 47: + hash = (37 * hash) + CACHE_DASHBOARD_FIELD_NUMBER; + hash = (53 * hash) + getCacheDashboard().hashCode(); + break; + case 48: + hash = (37 * hash) + CLEAR_DASHBOARD_FIELD_NUMBER; + hash = (53 * hash) + getClearDashboard().hashCode(); + break; + case 49: + hash = (37 * hash) + DASHBOARD_TRIGGER_FIELD_NUMBER; + hash = (53 * hash) + getDashboardTrigger().hashCode(); + break; + case 55: + hash = (37 * hash) + IMU_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + getImuEnabled().hashCode(); + break; + case 56: + hash = (37 * hash) + IMU_SINGLE_FIELD_NUMBER; + hash = (53 * hash) + getImuSingle().hashCode(); + break; + case 57: + hash = (37 * hash) + IMU_STREAM_FIELD_NUMBER; + hash = (53 * hash) + getImuStream().hashCode(); + break; + case 58: + hash = (37 * hash) + HEAD_GESTURE_FIELD_NUMBER; + hash = (53 * hash) + getHeadGesture().hashCode(); + break; + case 60: + hash = (37 * hash) + RESTART_FIELD_NUMBER; + hash = (53 * hash) + getRestart().hashCode(); + break; + case 61: + hash = (37 * hash) + FACTORY_RESET_FIELD_NUMBER; + hash = (53 * hash) + getFactoryReset().hashCode(); + break; + case 70: + hash = (37 * hash) + VERSION_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getVersionRequest().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.PhoneToGlasses parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.PhoneToGlasses parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.PhoneToGlasses parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.PhoneToGlasses parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.PhoneToGlasses parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.PhoneToGlasses parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.PhoneToGlasses parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.PhoneToGlasses parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.PhoneToGlasses parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.PhoneToGlasses parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.PhoneToGlasses parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.PhoneToGlasses parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.PhoneToGlasses prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * All messages from phone to glasses
+     * 
+ * + * Protobuf type {@code mentraos.ble.PhoneToGlasses} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.PhoneToGlasses) + mentraos.ble.MentraosBle.PhoneToGlassesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_PhoneToGlasses_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_PhoneToGlasses_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.PhoneToGlasses.class, mentraos.ble.MentraosBle.PhoneToGlasses.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.PhoneToGlasses.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bitField1_ = 0; + msgId_ = ""; + if (disconnectBuilder_ != null) { + disconnectBuilder_.clear(); + } + if (batteryStateBuilder_ != null) { + batteryStateBuilder_.clear(); + } + if (glassesInfoBuilder_ != null) { + glassesInfoBuilder_.clear(); + } + if (pairingModeBuilder_ != null) { + pairingModeBuilder_.clear(); + } + if (headPositionBuilder_ != null) { + headPositionBuilder_.clear(); + } + if (headUpAngleBuilder_ != null) { + headUpAngleBuilder_.clear(); + } + if (pongBuilder_ != null) { + pongBuilder_.clear(); + } + if (micStateBuilder_ != null) { + micStateBuilder_.clear(); + } + if (setVadEnabledBuilder_ != null) { + setVadEnabledBuilder_.clear(); + } + if (setVadConfigBuilder_ != null) { + setVadConfigBuilder_.clear(); + } + if (requestVadStatusBuilder_ != null) { + requestVadStatusBuilder_.clear(); + } + if (displayTextBuilder_ != null) { + displayTextBuilder_.clear(); + } + if (displayImageBuilder_ != null) { + displayImageBuilder_.clear(); + } + if (cacheImageBuilder_ != null) { + cacheImageBuilder_.clear(); + } + if (displayCachedImageBuilder_ != null) { + displayCachedImageBuilder_.clear(); + } + if (clearCachedImageBuilder_ != null) { + clearCachedImageBuilder_.clear(); + } + if (displayScrollingTextBuilder_ != null) { + displayScrollingTextBuilder_.clear(); + } + if (drawLineBuilder_ != null) { + drawLineBuilder_.clear(); + } + if (drawRectBuilder_ != null) { + drawRectBuilder_.clear(); + } + if (drawCircleBuilder_ != null) { + drawCircleBuilder_.clear(); + } + if (displayBatchBuilder_ != null) { + displayBatchBuilder_.clear(); + } + if (commitBuilder_ != null) { + commitBuilder_.clear(); + } + if (displayPowerBuilder_ != null) { + displayPowerBuilder_.clear(); + } + if (brightnessBuilder_ != null) { + brightnessBuilder_.clear(); + } + if (autoBrightnessBuilder_ != null) { + autoBrightnessBuilder_.clear(); + } + if (autoBrightnessMultBuilder_ != null) { + autoBrightnessMultBuilder_.clear(); + } + if (displayDistanceBuilder_ != null) { + displayDistanceBuilder_.clear(); + } + if (displayHeightBuilder_ != null) { + displayHeightBuilder_.clear(); + } + if (clearDisplayBuilder_ != null) { + clearDisplayBuilder_.clear(); + } + if (queueStatusRequestBuilder_ != null) { + queueStatusRequestBuilder_.clear(); + } + if (cacheDashboardBuilder_ != null) { + cacheDashboardBuilder_.clear(); + } + if (clearDashboardBuilder_ != null) { + clearDashboardBuilder_.clear(); + } + if (dashboardTriggerBuilder_ != null) { + dashboardTriggerBuilder_.clear(); + } + if (imuEnabledBuilder_ != null) { + imuEnabledBuilder_.clear(); + } + if (imuSingleBuilder_ != null) { + imuSingleBuilder_.clear(); + } + if (imuStreamBuilder_ != null) { + imuStreamBuilder_.clear(); + } + if (headGestureBuilder_ != null) { + headGestureBuilder_.clear(); + } + if (restartBuilder_ != null) { + restartBuilder_.clear(); + } + if (factoryResetBuilder_ != null) { + factoryResetBuilder_.clear(); + } + if (versionRequestBuilder_ != null) { + versionRequestBuilder_.clear(); + } + payloadCase_ = 0; + payload_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_PhoneToGlasses_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.PhoneToGlasses getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.PhoneToGlasses.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.PhoneToGlasses build() { + mentraos.ble.MentraosBle.PhoneToGlasses result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.PhoneToGlasses buildPartial() { + mentraos.ble.MentraosBle.PhoneToGlasses result = new mentraos.ble.MentraosBle.PhoneToGlasses(this); + if (bitField0_ != 0) { buildPartial0(result); } + if (bitField1_ != 0) { buildPartial1(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.PhoneToGlasses result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.msgId_ = msgId_; + } + } + + private void buildPartial1(mentraos.ble.MentraosBle.PhoneToGlasses result) { + int from_bitField1_ = bitField1_; + } + + private void buildPartialOneofs(mentraos.ble.MentraosBle.PhoneToGlasses result) { + result.payloadCase_ = payloadCase_; + result.payload_ = this.payload_; + if (payloadCase_ == 10 && + disconnectBuilder_ != null) { + result.payload_ = disconnectBuilder_.build(); + } + if (payloadCase_ == 11 && + batteryStateBuilder_ != null) { + result.payload_ = batteryStateBuilder_.build(); + } + if (payloadCase_ == 12 && + glassesInfoBuilder_ != null) { + result.payload_ = glassesInfoBuilder_.build(); + } + if (payloadCase_ == 13 && + pairingModeBuilder_ != null) { + result.payload_ = pairingModeBuilder_.build(); + } + if (payloadCase_ == 14 && + headPositionBuilder_ != null) { + result.payload_ = headPositionBuilder_.build(); + } + if (payloadCase_ == 15 && + headUpAngleBuilder_ != null) { + result.payload_ = headUpAngleBuilder_.build(); + } + if (payloadCase_ == 16 && + pongBuilder_ != null) { + result.payload_ = pongBuilder_.build(); + } + if (payloadCase_ == 20 && + micStateBuilder_ != null) { + result.payload_ = micStateBuilder_.build(); + } + if (payloadCase_ == 23 && + setVadEnabledBuilder_ != null) { + result.payload_ = setVadEnabledBuilder_.build(); + } + if (payloadCase_ == 24 && + setVadConfigBuilder_ != null) { + result.payload_ = setVadConfigBuilder_.build(); + } + if (payloadCase_ == 25 && + requestVadStatusBuilder_ != null) { + result.payload_ = requestVadStatusBuilder_.build(); + } + if (payloadCase_ == 30 && + displayTextBuilder_ != null) { + result.payload_ = displayTextBuilder_.build(); + } + if (payloadCase_ == 31 && + displayImageBuilder_ != null) { + result.payload_ = displayImageBuilder_.build(); + } + if (payloadCase_ == 32 && + cacheImageBuilder_ != null) { + result.payload_ = cacheImageBuilder_.build(); + } + if (payloadCase_ == 33 && + displayCachedImageBuilder_ != null) { + result.payload_ = displayCachedImageBuilder_.build(); + } + if (payloadCase_ == 34 && + clearCachedImageBuilder_ != null) { + result.payload_ = clearCachedImageBuilder_.build(); + } + if (payloadCase_ == 35 && + displayScrollingTextBuilder_ != null) { + result.payload_ = displayScrollingTextBuilder_.build(); + } + if (payloadCase_ == 40 && + drawLineBuilder_ != null) { + result.payload_ = drawLineBuilder_.build(); + } + if (payloadCase_ == 41 && + drawRectBuilder_ != null) { + result.payload_ = drawRectBuilder_.build(); + } + if (payloadCase_ == 42 && + drawCircleBuilder_ != null) { + result.payload_ = drawCircleBuilder_.build(); + } + if (payloadCase_ == 52 && + displayBatchBuilder_ != null) { + result.payload_ = displayBatchBuilder_.build(); + } + if (payloadCase_ == 43 && + commitBuilder_ != null) { + result.payload_ = commitBuilder_.build(); + } + if (payloadCase_ == 36 && + displayPowerBuilder_ != null) { + result.payload_ = displayPowerBuilder_.build(); + } + if (payloadCase_ == 37 && + brightnessBuilder_ != null) { + result.payload_ = brightnessBuilder_.build(); + } + if (payloadCase_ == 38 && + autoBrightnessBuilder_ != null) { + result.payload_ = autoBrightnessBuilder_.build(); + } + if (payloadCase_ == 39 && + autoBrightnessMultBuilder_ != null) { + result.payload_ = autoBrightnessMultBuilder_.build(); + } + if (payloadCase_ == 44 && + displayDistanceBuilder_ != null) { + result.payload_ = displayDistanceBuilder_.build(); + } + if (payloadCase_ == 45 && + displayHeightBuilder_ != null) { + result.payload_ = displayHeightBuilder_.build(); + } + if (payloadCase_ == 46 && + clearDisplayBuilder_ != null) { + result.payload_ = clearDisplayBuilder_.build(); + } + if (payloadCase_ == 51 && + queueStatusRequestBuilder_ != null) { + result.payload_ = queueStatusRequestBuilder_.build(); + } + if (payloadCase_ == 47 && + cacheDashboardBuilder_ != null) { + result.payload_ = cacheDashboardBuilder_.build(); + } + if (payloadCase_ == 48 && + clearDashboardBuilder_ != null) { + result.payload_ = clearDashboardBuilder_.build(); + } + if (payloadCase_ == 49 && + dashboardTriggerBuilder_ != null) { + result.payload_ = dashboardTriggerBuilder_.build(); + } + if (payloadCase_ == 55 && + imuEnabledBuilder_ != null) { + result.payload_ = imuEnabledBuilder_.build(); + } + if (payloadCase_ == 56 && + imuSingleBuilder_ != null) { + result.payload_ = imuSingleBuilder_.build(); + } + if (payloadCase_ == 57 && + imuStreamBuilder_ != null) { + result.payload_ = imuStreamBuilder_.build(); + } + if (payloadCase_ == 58 && + headGestureBuilder_ != null) { + result.payload_ = headGestureBuilder_.build(); + } + if (payloadCase_ == 60 && + restartBuilder_ != null) { + result.payload_ = restartBuilder_.build(); + } + if (payloadCase_ == 61 && + factoryResetBuilder_ != null) { + result.payload_ = factoryResetBuilder_.build(); + } + if (payloadCase_ == 70 && + versionRequestBuilder_ != null) { + result.payload_ = versionRequestBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.PhoneToGlasses) { + return mergeFrom((mentraos.ble.MentraosBle.PhoneToGlasses)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.PhoneToGlasses other) { + if (other == mentraos.ble.MentraosBle.PhoneToGlasses.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + bitField0_ |= 0x00000001; + onChanged(); + } + switch (other.getPayloadCase()) { + case DISCONNECT: { + mergeDisconnect(other.getDisconnect()); + break; + } + case BATTERY_STATE: { + mergeBatteryState(other.getBatteryState()); + break; + } + case GLASSES_INFO: { + mergeGlassesInfo(other.getGlassesInfo()); + break; + } + case PAIRING_MODE: { + mergePairingMode(other.getPairingMode()); + break; + } + case HEAD_POSITION: { + mergeHeadPosition(other.getHeadPosition()); + break; + } + case HEAD_UP_ANGLE: { + mergeHeadUpAngle(other.getHeadUpAngle()); + break; + } + case PONG: { + mergePong(other.getPong()); + break; + } + case MIC_STATE: { + mergeMicState(other.getMicState()); + break; + } + case SET_VAD_ENABLED: { + mergeSetVadEnabled(other.getSetVadEnabled()); + break; + } + case SET_VAD_CONFIG: { + mergeSetVadConfig(other.getSetVadConfig()); + break; + } + case REQUEST_VAD_STATUS: { + mergeRequestVadStatus(other.getRequestVadStatus()); + break; + } + case DISPLAY_TEXT: { + mergeDisplayText(other.getDisplayText()); + break; + } + case DISPLAY_IMAGE: { + mergeDisplayImage(other.getDisplayImage()); + break; + } + case CACHE_IMAGE: { + mergeCacheImage(other.getCacheImage()); + break; + } + case DISPLAY_CACHED_IMAGE: { + mergeDisplayCachedImage(other.getDisplayCachedImage()); + break; + } + case CLEAR_CACHED_IMAGE: { + mergeClearCachedImage(other.getClearCachedImage()); + break; + } + case DISPLAY_SCROLLING_TEXT: { + mergeDisplayScrollingText(other.getDisplayScrollingText()); + break; + } + case DRAW_LINE: { + mergeDrawLine(other.getDrawLine()); + break; + } + case DRAW_RECT: { + mergeDrawRect(other.getDrawRect()); + break; + } + case DRAW_CIRCLE: { + mergeDrawCircle(other.getDrawCircle()); + break; + } + case DISPLAY_BATCH: { + mergeDisplayBatch(other.getDisplayBatch()); + break; + } + case COMMIT: { + mergeCommit(other.getCommit()); + break; + } + case DISPLAY_POWER: { + mergeDisplayPower(other.getDisplayPower()); + break; + } + case BRIGHTNESS: { + mergeBrightness(other.getBrightness()); + break; + } + case AUTO_BRIGHTNESS: { + mergeAutoBrightness(other.getAutoBrightness()); + break; + } + case AUTO_BRIGHTNESS_MULT: { + mergeAutoBrightnessMult(other.getAutoBrightnessMult()); + break; + } + case DISPLAY_DISTANCE: { + mergeDisplayDistance(other.getDisplayDistance()); + break; + } + case DISPLAY_HEIGHT: { + mergeDisplayHeight(other.getDisplayHeight()); + break; + } + case CLEAR_DISPLAY: { + mergeClearDisplay(other.getClearDisplay()); + break; + } + case QUEUE_STATUS_REQUEST: { + mergeQueueStatusRequest(other.getQueueStatusRequest()); + break; + } + case CACHE_DASHBOARD: { + mergeCacheDashboard(other.getCacheDashboard()); + break; + } + case CLEAR_DASHBOARD: { + mergeClearDashboard(other.getClearDashboard()); + break; + } + case DASHBOARD_TRIGGER: { + mergeDashboardTrigger(other.getDashboardTrigger()); + break; + } + case IMU_ENABLED: { + mergeImuEnabled(other.getImuEnabled()); + break; + } + case IMU_SINGLE: { + mergeImuSingle(other.getImuSingle()); + break; + } + case IMU_STREAM: { + mergeImuStream(other.getImuStream()); + break; + } + case HEAD_GESTURE: { + mergeHeadGesture(other.getHeadGesture()); + break; + } + case RESTART: { + mergeRestart(other.getRestart()); + break; + } + case FACTORY_RESET: { + mergeFactoryReset(other.getFactoryReset()); + break; + } + case VERSION_REQUEST: { + mergeVersionRequest(other.getVersionRequest()); + break; + } + case PAYLOAD_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + msgId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 82: { + input.readMessage( + internalGetDisconnectFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 10; + break; + } // case 82 + case 90: { + input.readMessage( + internalGetBatteryStateFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 11; + break; + } // case 90 + case 98: { + input.readMessage( + internalGetGlassesInfoFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 12; + break; + } // case 98 + case 106: { + input.readMessage( + internalGetPairingModeFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 13; + break; + } // case 106 + case 114: { + input.readMessage( + internalGetHeadPositionFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 14; + break; + } // case 114 + case 122: { + input.readMessage( + internalGetHeadUpAngleFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 15; + break; + } // case 122 + case 130: { + input.readMessage( + internalGetPongFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 16; + break; + } // case 130 + case 162: { + input.readMessage( + internalGetMicStateFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 20; + break; + } // case 162 + case 186: { + input.readMessage( + internalGetSetVadEnabledFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 23; + break; + } // case 186 + case 194: { + input.readMessage( + internalGetSetVadConfigFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 24; + break; + } // case 194 + case 202: { + input.readMessage( + internalGetRequestVadStatusFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 25; + break; + } // case 202 + case 242: { + input.readMessage( + internalGetDisplayTextFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 30; + break; + } // case 242 + case 250: { + input.readMessage( + internalGetDisplayImageFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 31; + break; + } // case 250 + case 258: { + input.readMessage( + internalGetCacheImageFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 32; + break; + } // case 258 + case 266: { + input.readMessage( + internalGetDisplayCachedImageFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 33; + break; + } // case 266 + case 274: { + input.readMessage( + internalGetClearCachedImageFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 34; + break; + } // case 274 + case 282: { + input.readMessage( + internalGetDisplayScrollingTextFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 35; + break; + } // case 282 + case 290: { + input.readMessage( + internalGetDisplayPowerFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 36; + break; + } // case 290 + case 298: { + input.readMessage( + internalGetBrightnessFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 37; + break; + } // case 298 + case 306: { + input.readMessage( + internalGetAutoBrightnessFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 38; + break; + } // case 306 + case 314: { + input.readMessage( + internalGetAutoBrightnessMultFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 39; + break; + } // case 314 + case 322: { + input.readMessage( + internalGetDrawLineFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 40; + break; + } // case 322 + case 330: { + input.readMessage( + internalGetDrawRectFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 41; + break; + } // case 330 + case 338: { + input.readMessage( + internalGetDrawCircleFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 42; + break; + } // case 338 + case 346: { + input.readMessage( + internalGetCommitFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 43; + break; + } // case 346 + case 354: { + input.readMessage( + internalGetDisplayDistanceFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 44; + break; + } // case 354 + case 362: { + input.readMessage( + internalGetDisplayHeightFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 45; + break; + } // case 362 + case 370: { + input.readMessage( + internalGetClearDisplayFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 46; + break; + } // case 370 + case 378: { + input.readMessage( + internalGetCacheDashboardFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 47; + break; + } // case 378 + case 386: { + input.readMessage( + internalGetClearDashboardFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 48; + break; + } // case 386 + case 394: { + input.readMessage( + internalGetDashboardTriggerFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 49; + break; + } // case 394 + case 410: { + input.readMessage( + internalGetQueueStatusRequestFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 51; + break; + } // case 410 + case 418: { + input.readMessage( + internalGetDisplayBatchFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 52; + break; + } // case 418 + case 442: { + input.readMessage( + internalGetImuEnabledFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 55; + break; + } // case 442 + case 450: { + input.readMessage( + internalGetImuSingleFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 56; + break; + } // case 450 + case 458: { + input.readMessage( + internalGetImuStreamFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 57; + break; + } // case 458 + case 466: { + input.readMessage( + internalGetHeadGestureFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 58; + break; + } // case 466 + case 482: { + input.readMessage( + internalGetRestartFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 60; + break; + } // case 482 + case 490: { + input.readMessage( + internalGetFactoryResetFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 61; + break; + } // case 490 + case 562: { + input.readMessage( + internalGetVersionRequestFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 70; + break; + } // case 562 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int payloadCase_ = 0; + private java.lang.Object payload_; + public PayloadCase + getPayloadCase() { + return PayloadCase.forNumber( + payloadCase_); + } + + public Builder clearPayload() { + payloadCase_ = 0; + payload_ = null; + onChanged(); + return this; + } + + private int bitField0_; + private int bitField1_; + + private java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + * @return The msgId. + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg_id = 1; + * @return The bytes for msgId. + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg_id = 1; + * @param value The msgId to set. + * @return This builder for chaining. + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msgId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string msg_id = 1; + * @return This builder for chaining. + */ + public Builder clearMsgId() { + msgId_ = getDefaultInstance().getMsgId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string msg_id = 1; + * @param value The bytes for msgId to set. + * @return This builder for chaining. + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msgId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisconnectRequest, mentraos.ble.MentraosBle.DisconnectRequest.Builder, mentraos.ble.MentraosBle.DisconnectRequestOrBuilder> disconnectBuilder_; + /** + *
+       * Connection Management
+       * 
+ * + * .mentraos.ble.DisconnectRequest disconnect = 10; + * @return Whether the disconnect field is set. + */ + @java.lang.Override + public boolean hasDisconnect() { + return payloadCase_ == 10; + } + /** + *
+       * Connection Management
+       * 
+ * + * .mentraos.ble.DisconnectRequest disconnect = 10; + * @return The disconnect. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisconnectRequest getDisconnect() { + if (disconnectBuilder_ == null) { + if (payloadCase_ == 10) { + return (mentraos.ble.MentraosBle.DisconnectRequest) payload_; + } + return mentraos.ble.MentraosBle.DisconnectRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 10) { + return disconnectBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DisconnectRequest.getDefaultInstance(); + } + } + /** + *
+       * Connection Management
+       * 
+ * + * .mentraos.ble.DisconnectRequest disconnect = 10; + */ + public Builder setDisconnect(mentraos.ble.MentraosBle.DisconnectRequest value) { + if (disconnectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + disconnectBuilder_.setMessage(value); + } + payloadCase_ = 10; + return this; + } + /** + *
+       * Connection Management
+       * 
+ * + * .mentraos.ble.DisconnectRequest disconnect = 10; + */ + public Builder setDisconnect( + mentraos.ble.MentraosBle.DisconnectRequest.Builder builderForValue) { + if (disconnectBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + disconnectBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 10; + return this; + } + /** + *
+       * Connection Management
+       * 
+ * + * .mentraos.ble.DisconnectRequest disconnect = 10; + */ + public Builder mergeDisconnect(mentraos.ble.MentraosBle.DisconnectRequest value) { + if (disconnectBuilder_ == null) { + if (payloadCase_ == 10 && + payload_ != mentraos.ble.MentraosBle.DisconnectRequest.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.DisconnectRequest.newBuilder((mentraos.ble.MentraosBle.DisconnectRequest) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 10) { + disconnectBuilder_.mergeFrom(value); + } else { + disconnectBuilder_.setMessage(value); + } + } + payloadCase_ = 10; + return this; + } + /** + *
+       * Connection Management
+       * 
+ * + * .mentraos.ble.DisconnectRequest disconnect = 10; + */ + public Builder clearDisconnect() { + if (disconnectBuilder_ == null) { + if (payloadCase_ == 10) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 10) { + payloadCase_ = 0; + payload_ = null; + } + disconnectBuilder_.clear(); + } + return this; + } + /** + *
+       * Connection Management
+       * 
+ * + * .mentraos.ble.DisconnectRequest disconnect = 10; + */ + public mentraos.ble.MentraosBle.DisconnectRequest.Builder getDisconnectBuilder() { + return internalGetDisconnectFieldBuilder().getBuilder(); + } + /** + *
+       * Connection Management
+       * 
+ * + * .mentraos.ble.DisconnectRequest disconnect = 10; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisconnectRequestOrBuilder getDisconnectOrBuilder() { + if ((payloadCase_ == 10) && (disconnectBuilder_ != null)) { + return disconnectBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 10) { + return (mentraos.ble.MentraosBle.DisconnectRequest) payload_; + } + return mentraos.ble.MentraosBle.DisconnectRequest.getDefaultInstance(); + } + } + /** + *
+       * Connection Management
+       * 
+ * + * .mentraos.ble.DisconnectRequest disconnect = 10; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisconnectRequest, mentraos.ble.MentraosBle.DisconnectRequest.Builder, mentraos.ble.MentraosBle.DisconnectRequestOrBuilder> + internalGetDisconnectFieldBuilder() { + if (disconnectBuilder_ == null) { + if (!(payloadCase_ == 10)) { + payload_ = mentraos.ble.MentraosBle.DisconnectRequest.getDefaultInstance(); + } + disconnectBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisconnectRequest, mentraos.ble.MentraosBle.DisconnectRequest.Builder, mentraos.ble.MentraosBle.DisconnectRequestOrBuilder>( + (mentraos.ble.MentraosBle.DisconnectRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 10; + onChanged(); + return disconnectBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.BatteryStateRequest, mentraos.ble.MentraosBle.BatteryStateRequest.Builder, mentraos.ble.MentraosBle.BatteryStateRequestOrBuilder> batteryStateBuilder_; + /** + * .mentraos.ble.BatteryStateRequest battery_state = 11; + * @return Whether the batteryState field is set. + */ + @java.lang.Override + public boolean hasBatteryState() { + return payloadCase_ == 11; + } + /** + * .mentraos.ble.BatteryStateRequest battery_state = 11; + * @return The batteryState. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.BatteryStateRequest getBatteryState() { + if (batteryStateBuilder_ == null) { + if (payloadCase_ == 11) { + return (mentraos.ble.MentraosBle.BatteryStateRequest) payload_; + } + return mentraos.ble.MentraosBle.BatteryStateRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 11) { + return batteryStateBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.BatteryStateRequest.getDefaultInstance(); + } + } + /** + * .mentraos.ble.BatteryStateRequest battery_state = 11; + */ + public Builder setBatteryState(mentraos.ble.MentraosBle.BatteryStateRequest value) { + if (batteryStateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + batteryStateBuilder_.setMessage(value); + } + payloadCase_ = 11; + return this; + } + /** + * .mentraos.ble.BatteryStateRequest battery_state = 11; + */ + public Builder setBatteryState( + mentraos.ble.MentraosBle.BatteryStateRequest.Builder builderForValue) { + if (batteryStateBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + batteryStateBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 11; + return this; + } + /** + * .mentraos.ble.BatteryStateRequest battery_state = 11; + */ + public Builder mergeBatteryState(mentraos.ble.MentraosBle.BatteryStateRequest value) { + if (batteryStateBuilder_ == null) { + if (payloadCase_ == 11 && + payload_ != mentraos.ble.MentraosBle.BatteryStateRequest.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.BatteryStateRequest.newBuilder((mentraos.ble.MentraosBle.BatteryStateRequest) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 11) { + batteryStateBuilder_.mergeFrom(value); + } else { + batteryStateBuilder_.setMessage(value); + } + } + payloadCase_ = 11; + return this; + } + /** + * .mentraos.ble.BatteryStateRequest battery_state = 11; + */ + public Builder clearBatteryState() { + if (batteryStateBuilder_ == null) { + if (payloadCase_ == 11) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 11) { + payloadCase_ = 0; + payload_ = null; + } + batteryStateBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.BatteryStateRequest battery_state = 11; + */ + public mentraos.ble.MentraosBle.BatteryStateRequest.Builder getBatteryStateBuilder() { + return internalGetBatteryStateFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.BatteryStateRequest battery_state = 11; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.BatteryStateRequestOrBuilder getBatteryStateOrBuilder() { + if ((payloadCase_ == 11) && (batteryStateBuilder_ != null)) { + return batteryStateBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 11) { + return (mentraos.ble.MentraosBle.BatteryStateRequest) payload_; + } + return mentraos.ble.MentraosBle.BatteryStateRequest.getDefaultInstance(); + } + } + /** + * .mentraos.ble.BatteryStateRequest battery_state = 11; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.BatteryStateRequest, mentraos.ble.MentraosBle.BatteryStateRequest.Builder, mentraos.ble.MentraosBle.BatteryStateRequestOrBuilder> + internalGetBatteryStateFieldBuilder() { + if (batteryStateBuilder_ == null) { + if (!(payloadCase_ == 11)) { + payload_ = mentraos.ble.MentraosBle.BatteryStateRequest.getDefaultInstance(); + } + batteryStateBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.BatteryStateRequest, mentraos.ble.MentraosBle.BatteryStateRequest.Builder, mentraos.ble.MentraosBle.BatteryStateRequestOrBuilder>( + (mentraos.ble.MentraosBle.BatteryStateRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 11; + onChanged(); + return batteryStateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.GlassesInfoRequest, mentraos.ble.MentraosBle.GlassesInfoRequest.Builder, mentraos.ble.MentraosBle.GlassesInfoRequestOrBuilder> glassesInfoBuilder_; + /** + * .mentraos.ble.GlassesInfoRequest glasses_info = 12; + * @return Whether the glassesInfo field is set. + */ + @java.lang.Override + public boolean hasGlassesInfo() { + return payloadCase_ == 12; + } + /** + * .mentraos.ble.GlassesInfoRequest glasses_info = 12; + * @return The glassesInfo. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.GlassesInfoRequest getGlassesInfo() { + if (glassesInfoBuilder_ == null) { + if (payloadCase_ == 12) { + return (mentraos.ble.MentraosBle.GlassesInfoRequest) payload_; + } + return mentraos.ble.MentraosBle.GlassesInfoRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 12) { + return glassesInfoBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.GlassesInfoRequest.getDefaultInstance(); + } + } + /** + * .mentraos.ble.GlassesInfoRequest glasses_info = 12; + */ + public Builder setGlassesInfo(mentraos.ble.MentraosBle.GlassesInfoRequest value) { + if (glassesInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + glassesInfoBuilder_.setMessage(value); + } + payloadCase_ = 12; + return this; + } + /** + * .mentraos.ble.GlassesInfoRequest glasses_info = 12; + */ + public Builder setGlassesInfo( + mentraos.ble.MentraosBle.GlassesInfoRequest.Builder builderForValue) { + if (glassesInfoBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + glassesInfoBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 12; + return this; + } + /** + * .mentraos.ble.GlassesInfoRequest glasses_info = 12; + */ + public Builder mergeGlassesInfo(mentraos.ble.MentraosBle.GlassesInfoRequest value) { + if (glassesInfoBuilder_ == null) { + if (payloadCase_ == 12 && + payload_ != mentraos.ble.MentraosBle.GlassesInfoRequest.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.GlassesInfoRequest.newBuilder((mentraos.ble.MentraosBle.GlassesInfoRequest) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 12) { + glassesInfoBuilder_.mergeFrom(value); + } else { + glassesInfoBuilder_.setMessage(value); + } + } + payloadCase_ = 12; + return this; + } + /** + * .mentraos.ble.GlassesInfoRequest glasses_info = 12; + */ + public Builder clearGlassesInfo() { + if (glassesInfoBuilder_ == null) { + if (payloadCase_ == 12) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 12) { + payloadCase_ = 0; + payload_ = null; + } + glassesInfoBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.GlassesInfoRequest glasses_info = 12; + */ + public mentraos.ble.MentraosBle.GlassesInfoRequest.Builder getGlassesInfoBuilder() { + return internalGetGlassesInfoFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.GlassesInfoRequest glasses_info = 12; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.GlassesInfoRequestOrBuilder getGlassesInfoOrBuilder() { + if ((payloadCase_ == 12) && (glassesInfoBuilder_ != null)) { + return glassesInfoBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 12) { + return (mentraos.ble.MentraosBle.GlassesInfoRequest) payload_; + } + return mentraos.ble.MentraosBle.GlassesInfoRequest.getDefaultInstance(); + } + } + /** + * .mentraos.ble.GlassesInfoRequest glasses_info = 12; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.GlassesInfoRequest, mentraos.ble.MentraosBle.GlassesInfoRequest.Builder, mentraos.ble.MentraosBle.GlassesInfoRequestOrBuilder> + internalGetGlassesInfoFieldBuilder() { + if (glassesInfoBuilder_ == null) { + if (!(payloadCase_ == 12)) { + payload_ = mentraos.ble.MentraosBle.GlassesInfoRequest.getDefaultInstance(); + } + glassesInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.GlassesInfoRequest, mentraos.ble.MentraosBle.GlassesInfoRequest.Builder, mentraos.ble.MentraosBle.GlassesInfoRequestOrBuilder>( + (mentraos.ble.MentraosBle.GlassesInfoRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 12; + onChanged(); + return glassesInfoBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.PairingModeRequest, mentraos.ble.MentraosBle.PairingModeRequest.Builder, mentraos.ble.MentraosBle.PairingModeRequestOrBuilder> pairingModeBuilder_; + /** + * .mentraos.ble.PairingModeRequest pairing_mode = 13; + * @return Whether the pairingMode field is set. + */ + @java.lang.Override + public boolean hasPairingMode() { + return payloadCase_ == 13; + } + /** + * .mentraos.ble.PairingModeRequest pairing_mode = 13; + * @return The pairingMode. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.PairingModeRequest getPairingMode() { + if (pairingModeBuilder_ == null) { + if (payloadCase_ == 13) { + return (mentraos.ble.MentraosBle.PairingModeRequest) payload_; + } + return mentraos.ble.MentraosBle.PairingModeRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 13) { + return pairingModeBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.PairingModeRequest.getDefaultInstance(); + } + } + /** + * .mentraos.ble.PairingModeRequest pairing_mode = 13; + */ + public Builder setPairingMode(mentraos.ble.MentraosBle.PairingModeRequest value) { + if (pairingModeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + pairingModeBuilder_.setMessage(value); + } + payloadCase_ = 13; + return this; + } + /** + * .mentraos.ble.PairingModeRequest pairing_mode = 13; + */ + public Builder setPairingMode( + mentraos.ble.MentraosBle.PairingModeRequest.Builder builderForValue) { + if (pairingModeBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + pairingModeBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 13; + return this; + } + /** + * .mentraos.ble.PairingModeRequest pairing_mode = 13; + */ + public Builder mergePairingMode(mentraos.ble.MentraosBle.PairingModeRequest value) { + if (pairingModeBuilder_ == null) { + if (payloadCase_ == 13 && + payload_ != mentraos.ble.MentraosBle.PairingModeRequest.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.PairingModeRequest.newBuilder((mentraos.ble.MentraosBle.PairingModeRequest) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 13) { + pairingModeBuilder_.mergeFrom(value); + } else { + pairingModeBuilder_.setMessage(value); + } + } + payloadCase_ = 13; + return this; + } + /** + * .mentraos.ble.PairingModeRequest pairing_mode = 13; + */ + public Builder clearPairingMode() { + if (pairingModeBuilder_ == null) { + if (payloadCase_ == 13) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 13) { + payloadCase_ = 0; + payload_ = null; + } + pairingModeBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.PairingModeRequest pairing_mode = 13; + */ + public mentraos.ble.MentraosBle.PairingModeRequest.Builder getPairingModeBuilder() { + return internalGetPairingModeFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.PairingModeRequest pairing_mode = 13; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.PairingModeRequestOrBuilder getPairingModeOrBuilder() { + if ((payloadCase_ == 13) && (pairingModeBuilder_ != null)) { + return pairingModeBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 13) { + return (mentraos.ble.MentraosBle.PairingModeRequest) payload_; + } + return mentraos.ble.MentraosBle.PairingModeRequest.getDefaultInstance(); + } + } + /** + * .mentraos.ble.PairingModeRequest pairing_mode = 13; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.PairingModeRequest, mentraos.ble.MentraosBle.PairingModeRequest.Builder, mentraos.ble.MentraosBle.PairingModeRequestOrBuilder> + internalGetPairingModeFieldBuilder() { + if (pairingModeBuilder_ == null) { + if (!(payloadCase_ == 13)) { + payload_ = mentraos.ble.MentraosBle.PairingModeRequest.getDefaultInstance(); + } + pairingModeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.PairingModeRequest, mentraos.ble.MentraosBle.PairingModeRequest.Builder, mentraos.ble.MentraosBle.PairingModeRequestOrBuilder>( + (mentraos.ble.MentraosBle.PairingModeRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 13; + onChanged(); + return pairingModeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.HeadPositionRequest, mentraos.ble.MentraosBle.HeadPositionRequest.Builder, mentraos.ble.MentraosBle.HeadPositionRequestOrBuilder> headPositionBuilder_; + /** + * .mentraos.ble.HeadPositionRequest head_position = 14; + * @return Whether the headPosition field is set. + */ + @java.lang.Override + public boolean hasHeadPosition() { + return payloadCase_ == 14; + } + /** + * .mentraos.ble.HeadPositionRequest head_position = 14; + * @return The headPosition. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadPositionRequest getHeadPosition() { + if (headPositionBuilder_ == null) { + if (payloadCase_ == 14) { + return (mentraos.ble.MentraosBle.HeadPositionRequest) payload_; + } + return mentraos.ble.MentraosBle.HeadPositionRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 14) { + return headPositionBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.HeadPositionRequest.getDefaultInstance(); + } + } + /** + * .mentraos.ble.HeadPositionRequest head_position = 14; + */ + public Builder setHeadPosition(mentraos.ble.MentraosBle.HeadPositionRequest value) { + if (headPositionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + headPositionBuilder_.setMessage(value); + } + payloadCase_ = 14; + return this; + } + /** + * .mentraos.ble.HeadPositionRequest head_position = 14; + */ + public Builder setHeadPosition( + mentraos.ble.MentraosBle.HeadPositionRequest.Builder builderForValue) { + if (headPositionBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + headPositionBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 14; + return this; + } + /** + * .mentraos.ble.HeadPositionRequest head_position = 14; + */ + public Builder mergeHeadPosition(mentraos.ble.MentraosBle.HeadPositionRequest value) { + if (headPositionBuilder_ == null) { + if (payloadCase_ == 14 && + payload_ != mentraos.ble.MentraosBle.HeadPositionRequest.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.HeadPositionRequest.newBuilder((mentraos.ble.MentraosBle.HeadPositionRequest) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 14) { + headPositionBuilder_.mergeFrom(value); + } else { + headPositionBuilder_.setMessage(value); + } + } + payloadCase_ = 14; + return this; + } + /** + * .mentraos.ble.HeadPositionRequest head_position = 14; + */ + public Builder clearHeadPosition() { + if (headPositionBuilder_ == null) { + if (payloadCase_ == 14) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 14) { + payloadCase_ = 0; + payload_ = null; + } + headPositionBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.HeadPositionRequest head_position = 14; + */ + public mentraos.ble.MentraosBle.HeadPositionRequest.Builder getHeadPositionBuilder() { + return internalGetHeadPositionFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.HeadPositionRequest head_position = 14; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadPositionRequestOrBuilder getHeadPositionOrBuilder() { + if ((payloadCase_ == 14) && (headPositionBuilder_ != null)) { + return headPositionBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 14) { + return (mentraos.ble.MentraosBle.HeadPositionRequest) payload_; + } + return mentraos.ble.MentraosBle.HeadPositionRequest.getDefaultInstance(); + } + } + /** + * .mentraos.ble.HeadPositionRequest head_position = 14; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.HeadPositionRequest, mentraos.ble.MentraosBle.HeadPositionRequest.Builder, mentraos.ble.MentraosBle.HeadPositionRequestOrBuilder> + internalGetHeadPositionFieldBuilder() { + if (headPositionBuilder_ == null) { + if (!(payloadCase_ == 14)) { + payload_ = mentraos.ble.MentraosBle.HeadPositionRequest.getDefaultInstance(); + } + headPositionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.HeadPositionRequest, mentraos.ble.MentraosBle.HeadPositionRequest.Builder, mentraos.ble.MentraosBle.HeadPositionRequestOrBuilder>( + (mentraos.ble.MentraosBle.HeadPositionRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 14; + onChanged(); + return headPositionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.HeadUpAngleConfig, mentraos.ble.MentraosBle.HeadUpAngleConfig.Builder, mentraos.ble.MentraosBle.HeadUpAngleConfigOrBuilder> headUpAngleBuilder_; + /** + * .mentraos.ble.HeadUpAngleConfig head_up_angle = 15; + * @return Whether the headUpAngle field is set. + */ + @java.lang.Override + public boolean hasHeadUpAngle() { + return payloadCase_ == 15; + } + /** + * .mentraos.ble.HeadUpAngleConfig head_up_angle = 15; + * @return The headUpAngle. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadUpAngleConfig getHeadUpAngle() { + if (headUpAngleBuilder_ == null) { + if (payloadCase_ == 15) { + return (mentraos.ble.MentraosBle.HeadUpAngleConfig) payload_; + } + return mentraos.ble.MentraosBle.HeadUpAngleConfig.getDefaultInstance(); + } else { + if (payloadCase_ == 15) { + return headUpAngleBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.HeadUpAngleConfig.getDefaultInstance(); + } + } + /** + * .mentraos.ble.HeadUpAngleConfig head_up_angle = 15; + */ + public Builder setHeadUpAngle(mentraos.ble.MentraosBle.HeadUpAngleConfig value) { + if (headUpAngleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + headUpAngleBuilder_.setMessage(value); + } + payloadCase_ = 15; + return this; + } + /** + * .mentraos.ble.HeadUpAngleConfig head_up_angle = 15; + */ + public Builder setHeadUpAngle( + mentraos.ble.MentraosBle.HeadUpAngleConfig.Builder builderForValue) { + if (headUpAngleBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + headUpAngleBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 15; + return this; + } + /** + * .mentraos.ble.HeadUpAngleConfig head_up_angle = 15; + */ + public Builder mergeHeadUpAngle(mentraos.ble.MentraosBle.HeadUpAngleConfig value) { + if (headUpAngleBuilder_ == null) { + if (payloadCase_ == 15 && + payload_ != mentraos.ble.MentraosBle.HeadUpAngleConfig.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.HeadUpAngleConfig.newBuilder((mentraos.ble.MentraosBle.HeadUpAngleConfig) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 15) { + headUpAngleBuilder_.mergeFrom(value); + } else { + headUpAngleBuilder_.setMessage(value); + } + } + payloadCase_ = 15; + return this; + } + /** + * .mentraos.ble.HeadUpAngleConfig head_up_angle = 15; + */ + public Builder clearHeadUpAngle() { + if (headUpAngleBuilder_ == null) { + if (payloadCase_ == 15) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 15) { + payloadCase_ = 0; + payload_ = null; + } + headUpAngleBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.HeadUpAngleConfig head_up_angle = 15; + */ + public mentraos.ble.MentraosBle.HeadUpAngleConfig.Builder getHeadUpAngleBuilder() { + return internalGetHeadUpAngleFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.HeadUpAngleConfig head_up_angle = 15; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadUpAngleConfigOrBuilder getHeadUpAngleOrBuilder() { + if ((payloadCase_ == 15) && (headUpAngleBuilder_ != null)) { + return headUpAngleBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 15) { + return (mentraos.ble.MentraosBle.HeadUpAngleConfig) payload_; + } + return mentraos.ble.MentraosBle.HeadUpAngleConfig.getDefaultInstance(); + } + } + /** + * .mentraos.ble.HeadUpAngleConfig head_up_angle = 15; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.HeadUpAngleConfig, mentraos.ble.MentraosBle.HeadUpAngleConfig.Builder, mentraos.ble.MentraosBle.HeadUpAngleConfigOrBuilder> + internalGetHeadUpAngleFieldBuilder() { + if (headUpAngleBuilder_ == null) { + if (!(payloadCase_ == 15)) { + payload_ = mentraos.ble.MentraosBle.HeadUpAngleConfig.getDefaultInstance(); + } + headUpAngleBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.HeadUpAngleConfig, mentraos.ble.MentraosBle.HeadUpAngleConfig.Builder, mentraos.ble.MentraosBle.HeadUpAngleConfigOrBuilder>( + (mentraos.ble.MentraosBle.HeadUpAngleConfig) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 15; + onChanged(); + return headUpAngleBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.PongResponse, mentraos.ble.MentraosBle.PongResponse.Builder, mentraos.ble.MentraosBle.PongResponseOrBuilder> pongBuilder_; + /** + * .mentraos.ble.PongResponse pong = 16; + * @return Whether the pong field is set. + */ + @java.lang.Override + public boolean hasPong() { + return payloadCase_ == 16; + } + /** + * .mentraos.ble.PongResponse pong = 16; + * @return The pong. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.PongResponse getPong() { + if (pongBuilder_ == null) { + if (payloadCase_ == 16) { + return (mentraos.ble.MentraosBle.PongResponse) payload_; + } + return mentraos.ble.MentraosBle.PongResponse.getDefaultInstance(); + } else { + if (payloadCase_ == 16) { + return pongBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.PongResponse.getDefaultInstance(); + } + } + /** + * .mentraos.ble.PongResponse pong = 16; + */ + public Builder setPong(mentraos.ble.MentraosBle.PongResponse value) { + if (pongBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + pongBuilder_.setMessage(value); + } + payloadCase_ = 16; + return this; + } + /** + * .mentraos.ble.PongResponse pong = 16; + */ + public Builder setPong( + mentraos.ble.MentraosBle.PongResponse.Builder builderForValue) { + if (pongBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + pongBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 16; + return this; + } + /** + * .mentraos.ble.PongResponse pong = 16; + */ + public Builder mergePong(mentraos.ble.MentraosBle.PongResponse value) { + if (pongBuilder_ == null) { + if (payloadCase_ == 16 && + payload_ != mentraos.ble.MentraosBle.PongResponse.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.PongResponse.newBuilder((mentraos.ble.MentraosBle.PongResponse) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 16) { + pongBuilder_.mergeFrom(value); + } else { + pongBuilder_.setMessage(value); + } + } + payloadCase_ = 16; + return this; + } + /** + * .mentraos.ble.PongResponse pong = 16; + */ + public Builder clearPong() { + if (pongBuilder_ == null) { + if (payloadCase_ == 16) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 16) { + payloadCase_ = 0; + payload_ = null; + } + pongBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.PongResponse pong = 16; + */ + public mentraos.ble.MentraosBle.PongResponse.Builder getPongBuilder() { + return internalGetPongFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.PongResponse pong = 16; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.PongResponseOrBuilder getPongOrBuilder() { + if ((payloadCase_ == 16) && (pongBuilder_ != null)) { + return pongBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 16) { + return (mentraos.ble.MentraosBle.PongResponse) payload_; + } + return mentraos.ble.MentraosBle.PongResponse.getDefaultInstance(); + } + } + /** + * .mentraos.ble.PongResponse pong = 16; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.PongResponse, mentraos.ble.MentraosBle.PongResponse.Builder, mentraos.ble.MentraosBle.PongResponseOrBuilder> + internalGetPongFieldBuilder() { + if (pongBuilder_ == null) { + if (!(payloadCase_ == 16)) { + payload_ = mentraos.ble.MentraosBle.PongResponse.getDefaultInstance(); + } + pongBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.PongResponse, mentraos.ble.MentraosBle.PongResponse.Builder, mentraos.ble.MentraosBle.PongResponseOrBuilder>( + (mentraos.ble.MentraosBle.PongResponse) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 16; + onChanged(); + return pongBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.MicStateConfig, mentraos.ble.MentraosBle.MicStateConfig.Builder, mentraos.ble.MentraosBle.MicStateConfigOrBuilder> micStateBuilder_; + /** + *
+       * Audio System
+       * 
+ * + * .mentraos.ble.MicStateConfig mic_state = 20; + * @return Whether the micState field is set. + */ + @java.lang.Override + public boolean hasMicState() { + return payloadCase_ == 20; + } + /** + *
+       * Audio System
+       * 
+ * + * .mentraos.ble.MicStateConfig mic_state = 20; + * @return The micState. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.MicStateConfig getMicState() { + if (micStateBuilder_ == null) { + if (payloadCase_ == 20) { + return (mentraos.ble.MentraosBle.MicStateConfig) payload_; + } + return mentraos.ble.MentraosBle.MicStateConfig.getDefaultInstance(); + } else { + if (payloadCase_ == 20) { + return micStateBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.MicStateConfig.getDefaultInstance(); + } + } + /** + *
+       * Audio System
+       * 
+ * + * .mentraos.ble.MicStateConfig mic_state = 20; + */ + public Builder setMicState(mentraos.ble.MentraosBle.MicStateConfig value) { + if (micStateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + micStateBuilder_.setMessage(value); + } + payloadCase_ = 20; + return this; + } + /** + *
+       * Audio System
+       * 
+ * + * .mentraos.ble.MicStateConfig mic_state = 20; + */ + public Builder setMicState( + mentraos.ble.MentraosBle.MicStateConfig.Builder builderForValue) { + if (micStateBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + micStateBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 20; + return this; + } + /** + *
+       * Audio System
+       * 
+ * + * .mentraos.ble.MicStateConfig mic_state = 20; + */ + public Builder mergeMicState(mentraos.ble.MentraosBle.MicStateConfig value) { + if (micStateBuilder_ == null) { + if (payloadCase_ == 20 && + payload_ != mentraos.ble.MentraosBle.MicStateConfig.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.MicStateConfig.newBuilder((mentraos.ble.MentraosBle.MicStateConfig) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 20) { + micStateBuilder_.mergeFrom(value); + } else { + micStateBuilder_.setMessage(value); + } + } + payloadCase_ = 20; + return this; + } + /** + *
+       * Audio System
+       * 
+ * + * .mentraos.ble.MicStateConfig mic_state = 20; + */ + public Builder clearMicState() { + if (micStateBuilder_ == null) { + if (payloadCase_ == 20) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 20) { + payloadCase_ = 0; + payload_ = null; + } + micStateBuilder_.clear(); + } + return this; + } + /** + *
+       * Audio System
+       * 
+ * + * .mentraos.ble.MicStateConfig mic_state = 20; + */ + public mentraos.ble.MentraosBle.MicStateConfig.Builder getMicStateBuilder() { + return internalGetMicStateFieldBuilder().getBuilder(); + } + /** + *
+       * Audio System
+       * 
+ * + * .mentraos.ble.MicStateConfig mic_state = 20; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.MicStateConfigOrBuilder getMicStateOrBuilder() { + if ((payloadCase_ == 20) && (micStateBuilder_ != null)) { + return micStateBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 20) { + return (mentraos.ble.MentraosBle.MicStateConfig) payload_; + } + return mentraos.ble.MentraosBle.MicStateConfig.getDefaultInstance(); + } + } + /** + *
+       * Audio System
+       * 
+ * + * .mentraos.ble.MicStateConfig mic_state = 20; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.MicStateConfig, mentraos.ble.MentraosBle.MicStateConfig.Builder, mentraos.ble.MentraosBle.MicStateConfigOrBuilder> + internalGetMicStateFieldBuilder() { + if (micStateBuilder_ == null) { + if (!(payloadCase_ == 20)) { + payload_ = mentraos.ble.MentraosBle.MicStateConfig.getDefaultInstance(); + } + micStateBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.MicStateConfig, mentraos.ble.MentraosBle.MicStateConfig.Builder, mentraos.ble.MentraosBle.MicStateConfigOrBuilder>( + (mentraos.ble.MentraosBle.MicStateConfig) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 20; + onChanged(); + return micStateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadEnabledRequest, mentraos.ble.MentraosBle.VadEnabledRequest.Builder, mentraos.ble.MentraosBle.VadEnabledRequestOrBuilder> setVadEnabledBuilder_; + /** + * .mentraos.ble.VadEnabledRequest set_vad_enabled = 23; + * @return Whether the setVadEnabled field is set. + */ + @java.lang.Override + public boolean hasSetVadEnabled() { + return payloadCase_ == 23; + } + /** + * .mentraos.ble.VadEnabledRequest set_vad_enabled = 23; + * @return The setVadEnabled. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadEnabledRequest getSetVadEnabled() { + if (setVadEnabledBuilder_ == null) { + if (payloadCase_ == 23) { + return (mentraos.ble.MentraosBle.VadEnabledRequest) payload_; + } + return mentraos.ble.MentraosBle.VadEnabledRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 23) { + return setVadEnabledBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.VadEnabledRequest.getDefaultInstance(); + } + } + /** + * .mentraos.ble.VadEnabledRequest set_vad_enabled = 23; + */ + public Builder setSetVadEnabled(mentraos.ble.MentraosBle.VadEnabledRequest value) { + if (setVadEnabledBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + setVadEnabledBuilder_.setMessage(value); + } + payloadCase_ = 23; + return this; + } + /** + * .mentraos.ble.VadEnabledRequest set_vad_enabled = 23; + */ + public Builder setSetVadEnabled( + mentraos.ble.MentraosBle.VadEnabledRequest.Builder builderForValue) { + if (setVadEnabledBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + setVadEnabledBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 23; + return this; + } + /** + * .mentraos.ble.VadEnabledRequest set_vad_enabled = 23; + */ + public Builder mergeSetVadEnabled(mentraos.ble.MentraosBle.VadEnabledRequest value) { + if (setVadEnabledBuilder_ == null) { + if (payloadCase_ == 23 && + payload_ != mentraos.ble.MentraosBle.VadEnabledRequest.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.VadEnabledRequest.newBuilder((mentraos.ble.MentraosBle.VadEnabledRequest) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 23) { + setVadEnabledBuilder_.mergeFrom(value); + } else { + setVadEnabledBuilder_.setMessage(value); + } + } + payloadCase_ = 23; + return this; + } + /** + * .mentraos.ble.VadEnabledRequest set_vad_enabled = 23; + */ + public Builder clearSetVadEnabled() { + if (setVadEnabledBuilder_ == null) { + if (payloadCase_ == 23) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 23) { + payloadCase_ = 0; + payload_ = null; + } + setVadEnabledBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.VadEnabledRequest set_vad_enabled = 23; + */ + public mentraos.ble.MentraosBle.VadEnabledRequest.Builder getSetVadEnabledBuilder() { + return internalGetSetVadEnabledFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.VadEnabledRequest set_vad_enabled = 23; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadEnabledRequestOrBuilder getSetVadEnabledOrBuilder() { + if ((payloadCase_ == 23) && (setVadEnabledBuilder_ != null)) { + return setVadEnabledBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 23) { + return (mentraos.ble.MentraosBle.VadEnabledRequest) payload_; + } + return mentraos.ble.MentraosBle.VadEnabledRequest.getDefaultInstance(); + } + } + /** + * .mentraos.ble.VadEnabledRequest set_vad_enabled = 23; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadEnabledRequest, mentraos.ble.MentraosBle.VadEnabledRequest.Builder, mentraos.ble.MentraosBle.VadEnabledRequestOrBuilder> + internalGetSetVadEnabledFieldBuilder() { + if (setVadEnabledBuilder_ == null) { + if (!(payloadCase_ == 23)) { + payload_ = mentraos.ble.MentraosBle.VadEnabledRequest.getDefaultInstance(); + } + setVadEnabledBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadEnabledRequest, mentraos.ble.MentraosBle.VadEnabledRequest.Builder, mentraos.ble.MentraosBle.VadEnabledRequestOrBuilder>( + (mentraos.ble.MentraosBle.VadEnabledRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 23; + onChanged(); + return setVadEnabledBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadConfigRequest, mentraos.ble.MentraosBle.VadConfigRequest.Builder, mentraos.ble.MentraosBle.VadConfigRequestOrBuilder> setVadConfigBuilder_; + /** + * .mentraos.ble.VadConfigRequest set_vad_config = 24; + * @return Whether the setVadConfig field is set. + */ + @java.lang.Override + public boolean hasSetVadConfig() { + return payloadCase_ == 24; + } + /** + * .mentraos.ble.VadConfigRequest set_vad_config = 24; + * @return The setVadConfig. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadConfigRequest getSetVadConfig() { + if (setVadConfigBuilder_ == null) { + if (payloadCase_ == 24) { + return (mentraos.ble.MentraosBle.VadConfigRequest) payload_; + } + return mentraos.ble.MentraosBle.VadConfigRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 24) { + return setVadConfigBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.VadConfigRequest.getDefaultInstance(); + } + } + /** + * .mentraos.ble.VadConfigRequest set_vad_config = 24; + */ + public Builder setSetVadConfig(mentraos.ble.MentraosBle.VadConfigRequest value) { + if (setVadConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + setVadConfigBuilder_.setMessage(value); + } + payloadCase_ = 24; + return this; + } + /** + * .mentraos.ble.VadConfigRequest set_vad_config = 24; + */ + public Builder setSetVadConfig( + mentraos.ble.MentraosBle.VadConfigRequest.Builder builderForValue) { + if (setVadConfigBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + setVadConfigBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 24; + return this; + } + /** + * .mentraos.ble.VadConfigRequest set_vad_config = 24; + */ + public Builder mergeSetVadConfig(mentraos.ble.MentraosBle.VadConfigRequest value) { + if (setVadConfigBuilder_ == null) { + if (payloadCase_ == 24 && + payload_ != mentraos.ble.MentraosBle.VadConfigRequest.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.VadConfigRequest.newBuilder((mentraos.ble.MentraosBle.VadConfigRequest) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 24) { + setVadConfigBuilder_.mergeFrom(value); + } else { + setVadConfigBuilder_.setMessage(value); + } + } + payloadCase_ = 24; + return this; + } + /** + * .mentraos.ble.VadConfigRequest set_vad_config = 24; + */ + public Builder clearSetVadConfig() { + if (setVadConfigBuilder_ == null) { + if (payloadCase_ == 24) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 24) { + payloadCase_ = 0; + payload_ = null; + } + setVadConfigBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.VadConfigRequest set_vad_config = 24; + */ + public mentraos.ble.MentraosBle.VadConfigRequest.Builder getSetVadConfigBuilder() { + return internalGetSetVadConfigFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.VadConfigRequest set_vad_config = 24; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadConfigRequestOrBuilder getSetVadConfigOrBuilder() { + if ((payloadCase_ == 24) && (setVadConfigBuilder_ != null)) { + return setVadConfigBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 24) { + return (mentraos.ble.MentraosBle.VadConfigRequest) payload_; + } + return mentraos.ble.MentraosBle.VadConfigRequest.getDefaultInstance(); + } + } + /** + * .mentraos.ble.VadConfigRequest set_vad_config = 24; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadConfigRequest, mentraos.ble.MentraosBle.VadConfigRequest.Builder, mentraos.ble.MentraosBle.VadConfigRequestOrBuilder> + internalGetSetVadConfigFieldBuilder() { + if (setVadConfigBuilder_ == null) { + if (!(payloadCase_ == 24)) { + payload_ = mentraos.ble.MentraosBle.VadConfigRequest.getDefaultInstance(); + } + setVadConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadConfigRequest, mentraos.ble.MentraosBle.VadConfigRequest.Builder, mentraos.ble.MentraosBle.VadConfigRequestOrBuilder>( + (mentraos.ble.MentraosBle.VadConfigRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 24; + onChanged(); + return setVadConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadStatusRequest, mentraos.ble.MentraosBle.VadStatusRequest.Builder, mentraos.ble.MentraosBle.VadStatusRequestOrBuilder> requestVadStatusBuilder_; + /** + * .mentraos.ble.VadStatusRequest request_vad_status = 25; + * @return Whether the requestVadStatus field is set. + */ + @java.lang.Override + public boolean hasRequestVadStatus() { + return payloadCase_ == 25; + } + /** + * .mentraos.ble.VadStatusRequest request_vad_status = 25; + * @return The requestVadStatus. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadStatusRequest getRequestVadStatus() { + if (requestVadStatusBuilder_ == null) { + if (payloadCase_ == 25) { + return (mentraos.ble.MentraosBle.VadStatusRequest) payload_; + } + return mentraos.ble.MentraosBle.VadStatusRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 25) { + return requestVadStatusBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.VadStatusRequest.getDefaultInstance(); + } + } + /** + * .mentraos.ble.VadStatusRequest request_vad_status = 25; + */ + public Builder setRequestVadStatus(mentraos.ble.MentraosBle.VadStatusRequest value) { + if (requestVadStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + requestVadStatusBuilder_.setMessage(value); + } + payloadCase_ = 25; + return this; + } + /** + * .mentraos.ble.VadStatusRequest request_vad_status = 25; + */ + public Builder setRequestVadStatus( + mentraos.ble.MentraosBle.VadStatusRequest.Builder builderForValue) { + if (requestVadStatusBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + requestVadStatusBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 25; + return this; + } + /** + * .mentraos.ble.VadStatusRequest request_vad_status = 25; + */ + public Builder mergeRequestVadStatus(mentraos.ble.MentraosBle.VadStatusRequest value) { + if (requestVadStatusBuilder_ == null) { + if (payloadCase_ == 25 && + payload_ != mentraos.ble.MentraosBle.VadStatusRequest.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.VadStatusRequest.newBuilder((mentraos.ble.MentraosBle.VadStatusRequest) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 25) { + requestVadStatusBuilder_.mergeFrom(value); + } else { + requestVadStatusBuilder_.setMessage(value); + } + } + payloadCase_ = 25; + return this; + } + /** + * .mentraos.ble.VadStatusRequest request_vad_status = 25; + */ + public Builder clearRequestVadStatus() { + if (requestVadStatusBuilder_ == null) { + if (payloadCase_ == 25) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 25) { + payloadCase_ = 0; + payload_ = null; + } + requestVadStatusBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.VadStatusRequest request_vad_status = 25; + */ + public mentraos.ble.MentraosBle.VadStatusRequest.Builder getRequestVadStatusBuilder() { + return internalGetRequestVadStatusFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.VadStatusRequest request_vad_status = 25; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadStatusRequestOrBuilder getRequestVadStatusOrBuilder() { + if ((payloadCase_ == 25) && (requestVadStatusBuilder_ != null)) { + return requestVadStatusBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 25) { + return (mentraos.ble.MentraosBle.VadStatusRequest) payload_; + } + return mentraos.ble.MentraosBle.VadStatusRequest.getDefaultInstance(); + } + } + /** + * .mentraos.ble.VadStatusRequest request_vad_status = 25; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadStatusRequest, mentraos.ble.MentraosBle.VadStatusRequest.Builder, mentraos.ble.MentraosBle.VadStatusRequestOrBuilder> + internalGetRequestVadStatusFieldBuilder() { + if (requestVadStatusBuilder_ == null) { + if (!(payloadCase_ == 25)) { + payload_ = mentraos.ble.MentraosBle.VadStatusRequest.getDefaultInstance(); + } + requestVadStatusBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadStatusRequest, mentraos.ble.MentraosBle.VadStatusRequest.Builder, mentraos.ble.MentraosBle.VadStatusRequestOrBuilder>( + (mentraos.ble.MentraosBle.VadStatusRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 25; + onChanged(); + return requestVadStatusBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayText, mentraos.ble.MentraosBle.DisplayText.Builder, mentraos.ble.MentraosBle.DisplayTextOrBuilder> displayTextBuilder_; + /** + *
+       * Display System - These queue until commit
+       * 
+ * + * .mentraos.ble.DisplayText display_text = 30; + * @return Whether the displayText field is set. + */ + @java.lang.Override + public boolean hasDisplayText() { + return payloadCase_ == 30; + } + /** + *
+       * Display System - These queue until commit
+       * 
+ * + * .mentraos.ble.DisplayText display_text = 30; + * @return The displayText. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayText getDisplayText() { + if (displayTextBuilder_ == null) { + if (payloadCase_ == 30) { + return (mentraos.ble.MentraosBle.DisplayText) payload_; + } + return mentraos.ble.MentraosBle.DisplayText.getDefaultInstance(); + } else { + if (payloadCase_ == 30) { + return displayTextBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DisplayText.getDefaultInstance(); + } + } + /** + *
+       * Display System - These queue until commit
+       * 
+ * + * .mentraos.ble.DisplayText display_text = 30; + */ + public Builder setDisplayText(mentraos.ble.MentraosBle.DisplayText value) { + if (displayTextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + displayTextBuilder_.setMessage(value); + } + payloadCase_ = 30; + return this; + } + /** + *
+       * Display System - These queue until commit
+       * 
+ * + * .mentraos.ble.DisplayText display_text = 30; + */ + public Builder setDisplayText( + mentraos.ble.MentraosBle.DisplayText.Builder builderForValue) { + if (displayTextBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + displayTextBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 30; + return this; + } + /** + *
+       * Display System - These queue until commit
+       * 
+ * + * .mentraos.ble.DisplayText display_text = 30; + */ + public Builder mergeDisplayText(mentraos.ble.MentraosBle.DisplayText value) { + if (displayTextBuilder_ == null) { + if (payloadCase_ == 30 && + payload_ != mentraos.ble.MentraosBle.DisplayText.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.DisplayText.newBuilder((mentraos.ble.MentraosBle.DisplayText) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 30) { + displayTextBuilder_.mergeFrom(value); + } else { + displayTextBuilder_.setMessage(value); + } + } + payloadCase_ = 30; + return this; + } + /** + *
+       * Display System - These queue until commit
+       * 
+ * + * .mentraos.ble.DisplayText display_text = 30; + */ + public Builder clearDisplayText() { + if (displayTextBuilder_ == null) { + if (payloadCase_ == 30) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 30) { + payloadCase_ = 0; + payload_ = null; + } + displayTextBuilder_.clear(); + } + return this; + } + /** + *
+       * Display System - These queue until commit
+       * 
+ * + * .mentraos.ble.DisplayText display_text = 30; + */ + public mentraos.ble.MentraosBle.DisplayText.Builder getDisplayTextBuilder() { + return internalGetDisplayTextFieldBuilder().getBuilder(); + } + /** + *
+       * Display System - These queue until commit
+       * 
+ * + * .mentraos.ble.DisplayText display_text = 30; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayTextOrBuilder getDisplayTextOrBuilder() { + if ((payloadCase_ == 30) && (displayTextBuilder_ != null)) { + return displayTextBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 30) { + return (mentraos.ble.MentraosBle.DisplayText) payload_; + } + return mentraos.ble.MentraosBle.DisplayText.getDefaultInstance(); + } + } + /** + *
+       * Display System - These queue until commit
+       * 
+ * + * .mentraos.ble.DisplayText display_text = 30; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayText, mentraos.ble.MentraosBle.DisplayText.Builder, mentraos.ble.MentraosBle.DisplayTextOrBuilder> + internalGetDisplayTextFieldBuilder() { + if (displayTextBuilder_ == null) { + if (!(payloadCase_ == 30)) { + payload_ = mentraos.ble.MentraosBle.DisplayText.getDefaultInstance(); + } + displayTextBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayText, mentraos.ble.MentraosBle.DisplayText.Builder, mentraos.ble.MentraosBle.DisplayTextOrBuilder>( + (mentraos.ble.MentraosBle.DisplayText) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 30; + onChanged(); + return displayTextBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayImage, mentraos.ble.MentraosBle.DisplayImage.Builder, mentraos.ble.MentraosBle.DisplayImageOrBuilder> displayImageBuilder_; + /** + * .mentraos.ble.DisplayImage display_image = 31; + * @return Whether the displayImage field is set. + */ + @java.lang.Override + public boolean hasDisplayImage() { + return payloadCase_ == 31; + } + /** + * .mentraos.ble.DisplayImage display_image = 31; + * @return The displayImage. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayImage getDisplayImage() { + if (displayImageBuilder_ == null) { + if (payloadCase_ == 31) { + return (mentraos.ble.MentraosBle.DisplayImage) payload_; + } + return mentraos.ble.MentraosBle.DisplayImage.getDefaultInstance(); + } else { + if (payloadCase_ == 31) { + return displayImageBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DisplayImage.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DisplayImage display_image = 31; + */ + public Builder setDisplayImage(mentraos.ble.MentraosBle.DisplayImage value) { + if (displayImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + displayImageBuilder_.setMessage(value); + } + payloadCase_ = 31; + return this; + } + /** + * .mentraos.ble.DisplayImage display_image = 31; + */ + public Builder setDisplayImage( + mentraos.ble.MentraosBle.DisplayImage.Builder builderForValue) { + if (displayImageBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + displayImageBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 31; + return this; + } + /** + * .mentraos.ble.DisplayImage display_image = 31; + */ + public Builder mergeDisplayImage(mentraos.ble.MentraosBle.DisplayImage value) { + if (displayImageBuilder_ == null) { + if (payloadCase_ == 31 && + payload_ != mentraos.ble.MentraosBle.DisplayImage.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.DisplayImage.newBuilder((mentraos.ble.MentraosBle.DisplayImage) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 31) { + displayImageBuilder_.mergeFrom(value); + } else { + displayImageBuilder_.setMessage(value); + } + } + payloadCase_ = 31; + return this; + } + /** + * .mentraos.ble.DisplayImage display_image = 31; + */ + public Builder clearDisplayImage() { + if (displayImageBuilder_ == null) { + if (payloadCase_ == 31) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 31) { + payloadCase_ = 0; + payload_ = null; + } + displayImageBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.DisplayImage display_image = 31; + */ + public mentraos.ble.MentraosBle.DisplayImage.Builder getDisplayImageBuilder() { + return internalGetDisplayImageFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.DisplayImage display_image = 31; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayImageOrBuilder getDisplayImageOrBuilder() { + if ((payloadCase_ == 31) && (displayImageBuilder_ != null)) { + return displayImageBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 31) { + return (mentraos.ble.MentraosBle.DisplayImage) payload_; + } + return mentraos.ble.MentraosBle.DisplayImage.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DisplayImage display_image = 31; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayImage, mentraos.ble.MentraosBle.DisplayImage.Builder, mentraos.ble.MentraosBle.DisplayImageOrBuilder> + internalGetDisplayImageFieldBuilder() { + if (displayImageBuilder_ == null) { + if (!(payloadCase_ == 31)) { + payload_ = mentraos.ble.MentraosBle.DisplayImage.getDefaultInstance(); + } + displayImageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayImage, mentraos.ble.MentraosBle.DisplayImage.Builder, mentraos.ble.MentraosBle.DisplayImageOrBuilder>( + (mentraos.ble.MentraosBle.DisplayImage) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 31; + onChanged(); + return displayImageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.CacheImage, mentraos.ble.MentraosBle.CacheImage.Builder, mentraos.ble.MentraosBle.CacheImageOrBuilder> cacheImageBuilder_; + /** + * .mentraos.ble.CacheImage cache_image = 32; + * @return Whether the cacheImage field is set. + */ + @java.lang.Override + public boolean hasCacheImage() { + return payloadCase_ == 32; + } + /** + * .mentraos.ble.CacheImage cache_image = 32; + * @return The cacheImage. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.CacheImage getCacheImage() { + if (cacheImageBuilder_ == null) { + if (payloadCase_ == 32) { + return (mentraos.ble.MentraosBle.CacheImage) payload_; + } + return mentraos.ble.MentraosBle.CacheImage.getDefaultInstance(); + } else { + if (payloadCase_ == 32) { + return cacheImageBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.CacheImage.getDefaultInstance(); + } + } + /** + * .mentraos.ble.CacheImage cache_image = 32; + */ + public Builder setCacheImage(mentraos.ble.MentraosBle.CacheImage value) { + if (cacheImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + cacheImageBuilder_.setMessage(value); + } + payloadCase_ = 32; + return this; + } + /** + * .mentraos.ble.CacheImage cache_image = 32; + */ + public Builder setCacheImage( + mentraos.ble.MentraosBle.CacheImage.Builder builderForValue) { + if (cacheImageBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + cacheImageBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 32; + return this; + } + /** + * .mentraos.ble.CacheImage cache_image = 32; + */ + public Builder mergeCacheImage(mentraos.ble.MentraosBle.CacheImage value) { + if (cacheImageBuilder_ == null) { + if (payloadCase_ == 32 && + payload_ != mentraos.ble.MentraosBle.CacheImage.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.CacheImage.newBuilder((mentraos.ble.MentraosBle.CacheImage) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 32) { + cacheImageBuilder_.mergeFrom(value); + } else { + cacheImageBuilder_.setMessage(value); + } + } + payloadCase_ = 32; + return this; + } + /** + * .mentraos.ble.CacheImage cache_image = 32; + */ + public Builder clearCacheImage() { + if (cacheImageBuilder_ == null) { + if (payloadCase_ == 32) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 32) { + payloadCase_ = 0; + payload_ = null; + } + cacheImageBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.CacheImage cache_image = 32; + */ + public mentraos.ble.MentraosBle.CacheImage.Builder getCacheImageBuilder() { + return internalGetCacheImageFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.CacheImage cache_image = 32; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.CacheImageOrBuilder getCacheImageOrBuilder() { + if ((payloadCase_ == 32) && (cacheImageBuilder_ != null)) { + return cacheImageBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 32) { + return (mentraos.ble.MentraosBle.CacheImage) payload_; + } + return mentraos.ble.MentraosBle.CacheImage.getDefaultInstance(); + } + } + /** + * .mentraos.ble.CacheImage cache_image = 32; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.CacheImage, mentraos.ble.MentraosBle.CacheImage.Builder, mentraos.ble.MentraosBle.CacheImageOrBuilder> + internalGetCacheImageFieldBuilder() { + if (cacheImageBuilder_ == null) { + if (!(payloadCase_ == 32)) { + payload_ = mentraos.ble.MentraosBle.CacheImage.getDefaultInstance(); + } + cacheImageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.CacheImage, mentraos.ble.MentraosBle.CacheImage.Builder, mentraos.ble.MentraosBle.CacheImageOrBuilder>( + (mentraos.ble.MentraosBle.CacheImage) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 32; + onChanged(); + return cacheImageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayCachedImage, mentraos.ble.MentraosBle.DisplayCachedImage.Builder, mentraos.ble.MentraosBle.DisplayCachedImageOrBuilder> displayCachedImageBuilder_; + /** + * .mentraos.ble.DisplayCachedImage display_cached_image = 33; + * @return Whether the displayCachedImage field is set. + */ + @java.lang.Override + public boolean hasDisplayCachedImage() { + return payloadCase_ == 33; + } + /** + * .mentraos.ble.DisplayCachedImage display_cached_image = 33; + * @return The displayCachedImage. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayCachedImage getDisplayCachedImage() { + if (displayCachedImageBuilder_ == null) { + if (payloadCase_ == 33) { + return (mentraos.ble.MentraosBle.DisplayCachedImage) payload_; + } + return mentraos.ble.MentraosBle.DisplayCachedImage.getDefaultInstance(); + } else { + if (payloadCase_ == 33) { + return displayCachedImageBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DisplayCachedImage.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DisplayCachedImage display_cached_image = 33; + */ + public Builder setDisplayCachedImage(mentraos.ble.MentraosBle.DisplayCachedImage value) { + if (displayCachedImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + displayCachedImageBuilder_.setMessage(value); + } + payloadCase_ = 33; + return this; + } + /** + * .mentraos.ble.DisplayCachedImage display_cached_image = 33; + */ + public Builder setDisplayCachedImage( + mentraos.ble.MentraosBle.DisplayCachedImage.Builder builderForValue) { + if (displayCachedImageBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + displayCachedImageBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 33; + return this; + } + /** + * .mentraos.ble.DisplayCachedImage display_cached_image = 33; + */ + public Builder mergeDisplayCachedImage(mentraos.ble.MentraosBle.DisplayCachedImage value) { + if (displayCachedImageBuilder_ == null) { + if (payloadCase_ == 33 && + payload_ != mentraos.ble.MentraosBle.DisplayCachedImage.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.DisplayCachedImage.newBuilder((mentraos.ble.MentraosBle.DisplayCachedImage) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 33) { + displayCachedImageBuilder_.mergeFrom(value); + } else { + displayCachedImageBuilder_.setMessage(value); + } + } + payloadCase_ = 33; + return this; + } + /** + * .mentraos.ble.DisplayCachedImage display_cached_image = 33; + */ + public Builder clearDisplayCachedImage() { + if (displayCachedImageBuilder_ == null) { + if (payloadCase_ == 33) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 33) { + payloadCase_ = 0; + payload_ = null; + } + displayCachedImageBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.DisplayCachedImage display_cached_image = 33; + */ + public mentraos.ble.MentraosBle.DisplayCachedImage.Builder getDisplayCachedImageBuilder() { + return internalGetDisplayCachedImageFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.DisplayCachedImage display_cached_image = 33; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayCachedImageOrBuilder getDisplayCachedImageOrBuilder() { + if ((payloadCase_ == 33) && (displayCachedImageBuilder_ != null)) { + return displayCachedImageBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 33) { + return (mentraos.ble.MentraosBle.DisplayCachedImage) payload_; + } + return mentraos.ble.MentraosBle.DisplayCachedImage.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DisplayCachedImage display_cached_image = 33; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayCachedImage, mentraos.ble.MentraosBle.DisplayCachedImage.Builder, mentraos.ble.MentraosBle.DisplayCachedImageOrBuilder> + internalGetDisplayCachedImageFieldBuilder() { + if (displayCachedImageBuilder_ == null) { + if (!(payloadCase_ == 33)) { + payload_ = mentraos.ble.MentraosBle.DisplayCachedImage.getDefaultInstance(); + } + displayCachedImageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayCachedImage, mentraos.ble.MentraosBle.DisplayCachedImage.Builder, mentraos.ble.MentraosBle.DisplayCachedImageOrBuilder>( + (mentraos.ble.MentraosBle.DisplayCachedImage) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 33; + onChanged(); + return displayCachedImageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ClearCachedImage, mentraos.ble.MentraosBle.ClearCachedImage.Builder, mentraos.ble.MentraosBle.ClearCachedImageOrBuilder> clearCachedImageBuilder_; + /** + * .mentraos.ble.ClearCachedImage clear_cached_image = 34; + * @return Whether the clearCachedImage field is set. + */ + @java.lang.Override + public boolean hasClearCachedImage() { + return payloadCase_ == 34; + } + /** + * .mentraos.ble.ClearCachedImage clear_cached_image = 34; + * @return The clearCachedImage. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ClearCachedImage getClearCachedImage() { + if (clearCachedImageBuilder_ == null) { + if (payloadCase_ == 34) { + return (mentraos.ble.MentraosBle.ClearCachedImage) payload_; + } + return mentraos.ble.MentraosBle.ClearCachedImage.getDefaultInstance(); + } else { + if (payloadCase_ == 34) { + return clearCachedImageBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.ClearCachedImage.getDefaultInstance(); + } + } + /** + * .mentraos.ble.ClearCachedImage clear_cached_image = 34; + */ + public Builder setClearCachedImage(mentraos.ble.MentraosBle.ClearCachedImage value) { + if (clearCachedImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + clearCachedImageBuilder_.setMessage(value); + } + payloadCase_ = 34; + return this; + } + /** + * .mentraos.ble.ClearCachedImage clear_cached_image = 34; + */ + public Builder setClearCachedImage( + mentraos.ble.MentraosBle.ClearCachedImage.Builder builderForValue) { + if (clearCachedImageBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + clearCachedImageBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 34; + return this; + } + /** + * .mentraos.ble.ClearCachedImage clear_cached_image = 34; + */ + public Builder mergeClearCachedImage(mentraos.ble.MentraosBle.ClearCachedImage value) { + if (clearCachedImageBuilder_ == null) { + if (payloadCase_ == 34 && + payload_ != mentraos.ble.MentraosBle.ClearCachedImage.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.ClearCachedImage.newBuilder((mentraos.ble.MentraosBle.ClearCachedImage) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 34) { + clearCachedImageBuilder_.mergeFrom(value); + } else { + clearCachedImageBuilder_.setMessage(value); + } + } + payloadCase_ = 34; + return this; + } + /** + * .mentraos.ble.ClearCachedImage clear_cached_image = 34; + */ + public Builder clearClearCachedImage() { + if (clearCachedImageBuilder_ == null) { + if (payloadCase_ == 34) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 34) { + payloadCase_ = 0; + payload_ = null; + } + clearCachedImageBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.ClearCachedImage clear_cached_image = 34; + */ + public mentraos.ble.MentraosBle.ClearCachedImage.Builder getClearCachedImageBuilder() { + return internalGetClearCachedImageFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.ClearCachedImage clear_cached_image = 34; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ClearCachedImageOrBuilder getClearCachedImageOrBuilder() { + if ((payloadCase_ == 34) && (clearCachedImageBuilder_ != null)) { + return clearCachedImageBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 34) { + return (mentraos.ble.MentraosBle.ClearCachedImage) payload_; + } + return mentraos.ble.MentraosBle.ClearCachedImage.getDefaultInstance(); + } + } + /** + * .mentraos.ble.ClearCachedImage clear_cached_image = 34; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ClearCachedImage, mentraos.ble.MentraosBle.ClearCachedImage.Builder, mentraos.ble.MentraosBle.ClearCachedImageOrBuilder> + internalGetClearCachedImageFieldBuilder() { + if (clearCachedImageBuilder_ == null) { + if (!(payloadCase_ == 34)) { + payload_ = mentraos.ble.MentraosBle.ClearCachedImage.getDefaultInstance(); + } + clearCachedImageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ClearCachedImage, mentraos.ble.MentraosBle.ClearCachedImage.Builder, mentraos.ble.MentraosBle.ClearCachedImageOrBuilder>( + (mentraos.ble.MentraosBle.ClearCachedImage) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 34; + onChanged(); + return clearCachedImageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayScrollingText, mentraos.ble.MentraosBle.DisplayScrollingText.Builder, mentraos.ble.MentraosBle.DisplayScrollingTextOrBuilder> displayScrollingTextBuilder_; + /** + * .mentraos.ble.DisplayScrollingText display_scrolling_text = 35; + * @return Whether the displayScrollingText field is set. + */ + @java.lang.Override + public boolean hasDisplayScrollingText() { + return payloadCase_ == 35; + } + /** + * .mentraos.ble.DisplayScrollingText display_scrolling_text = 35; + * @return The displayScrollingText. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayScrollingText getDisplayScrollingText() { + if (displayScrollingTextBuilder_ == null) { + if (payloadCase_ == 35) { + return (mentraos.ble.MentraosBle.DisplayScrollingText) payload_; + } + return mentraos.ble.MentraosBle.DisplayScrollingText.getDefaultInstance(); + } else { + if (payloadCase_ == 35) { + return displayScrollingTextBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DisplayScrollingText.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DisplayScrollingText display_scrolling_text = 35; + */ + public Builder setDisplayScrollingText(mentraos.ble.MentraosBle.DisplayScrollingText value) { + if (displayScrollingTextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + displayScrollingTextBuilder_.setMessage(value); + } + payloadCase_ = 35; + return this; + } + /** + * .mentraos.ble.DisplayScrollingText display_scrolling_text = 35; + */ + public Builder setDisplayScrollingText( + mentraos.ble.MentraosBle.DisplayScrollingText.Builder builderForValue) { + if (displayScrollingTextBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + displayScrollingTextBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 35; + return this; + } + /** + * .mentraos.ble.DisplayScrollingText display_scrolling_text = 35; + */ + public Builder mergeDisplayScrollingText(mentraos.ble.MentraosBle.DisplayScrollingText value) { + if (displayScrollingTextBuilder_ == null) { + if (payloadCase_ == 35 && + payload_ != mentraos.ble.MentraosBle.DisplayScrollingText.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.DisplayScrollingText.newBuilder((mentraos.ble.MentraosBle.DisplayScrollingText) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 35) { + displayScrollingTextBuilder_.mergeFrom(value); + } else { + displayScrollingTextBuilder_.setMessage(value); + } + } + payloadCase_ = 35; + return this; + } + /** + * .mentraos.ble.DisplayScrollingText display_scrolling_text = 35; + */ + public Builder clearDisplayScrollingText() { + if (displayScrollingTextBuilder_ == null) { + if (payloadCase_ == 35) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 35) { + payloadCase_ = 0; + payload_ = null; + } + displayScrollingTextBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.DisplayScrollingText display_scrolling_text = 35; + */ + public mentraos.ble.MentraosBle.DisplayScrollingText.Builder getDisplayScrollingTextBuilder() { + return internalGetDisplayScrollingTextFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.DisplayScrollingText display_scrolling_text = 35; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayScrollingTextOrBuilder getDisplayScrollingTextOrBuilder() { + if ((payloadCase_ == 35) && (displayScrollingTextBuilder_ != null)) { + return displayScrollingTextBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 35) { + return (mentraos.ble.MentraosBle.DisplayScrollingText) payload_; + } + return mentraos.ble.MentraosBle.DisplayScrollingText.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DisplayScrollingText display_scrolling_text = 35; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayScrollingText, mentraos.ble.MentraosBle.DisplayScrollingText.Builder, mentraos.ble.MentraosBle.DisplayScrollingTextOrBuilder> + internalGetDisplayScrollingTextFieldBuilder() { + if (displayScrollingTextBuilder_ == null) { + if (!(payloadCase_ == 35)) { + payload_ = mentraos.ble.MentraosBle.DisplayScrollingText.getDefaultInstance(); + } + displayScrollingTextBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayScrollingText, mentraos.ble.MentraosBle.DisplayScrollingText.Builder, mentraos.ble.MentraosBle.DisplayScrollingTextOrBuilder>( + (mentraos.ble.MentraosBle.DisplayScrollingText) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 35; + onChanged(); + return displayScrollingTextBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DrawLine, mentraos.ble.MentraosBle.DrawLine.Builder, mentraos.ble.MentraosBle.DrawLineOrBuilder> drawLineBuilder_; + /** + * .mentraos.ble.DrawLine draw_line = 40; + * @return Whether the drawLine field is set. + */ + @java.lang.Override + public boolean hasDrawLine() { + return payloadCase_ == 40; + } + /** + * .mentraos.ble.DrawLine draw_line = 40; + * @return The drawLine. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawLine getDrawLine() { + if (drawLineBuilder_ == null) { + if (payloadCase_ == 40) { + return (mentraos.ble.MentraosBle.DrawLine) payload_; + } + return mentraos.ble.MentraosBle.DrawLine.getDefaultInstance(); + } else { + if (payloadCase_ == 40) { + return drawLineBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DrawLine.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DrawLine draw_line = 40; + */ + public Builder setDrawLine(mentraos.ble.MentraosBle.DrawLine value) { + if (drawLineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + drawLineBuilder_.setMessage(value); + } + payloadCase_ = 40; + return this; + } + /** + * .mentraos.ble.DrawLine draw_line = 40; + */ + public Builder setDrawLine( + mentraos.ble.MentraosBle.DrawLine.Builder builderForValue) { + if (drawLineBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + drawLineBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 40; + return this; + } + /** + * .mentraos.ble.DrawLine draw_line = 40; + */ + public Builder mergeDrawLine(mentraos.ble.MentraosBle.DrawLine value) { + if (drawLineBuilder_ == null) { + if (payloadCase_ == 40 && + payload_ != mentraos.ble.MentraosBle.DrawLine.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.DrawLine.newBuilder((mentraos.ble.MentraosBle.DrawLine) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 40) { + drawLineBuilder_.mergeFrom(value); + } else { + drawLineBuilder_.setMessage(value); + } + } + payloadCase_ = 40; + return this; + } + /** + * .mentraos.ble.DrawLine draw_line = 40; + */ + public Builder clearDrawLine() { + if (drawLineBuilder_ == null) { + if (payloadCase_ == 40) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 40) { + payloadCase_ = 0; + payload_ = null; + } + drawLineBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.DrawLine draw_line = 40; + */ + public mentraos.ble.MentraosBle.DrawLine.Builder getDrawLineBuilder() { + return internalGetDrawLineFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.DrawLine draw_line = 40; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawLineOrBuilder getDrawLineOrBuilder() { + if ((payloadCase_ == 40) && (drawLineBuilder_ != null)) { + return drawLineBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 40) { + return (mentraos.ble.MentraosBle.DrawLine) payload_; + } + return mentraos.ble.MentraosBle.DrawLine.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DrawLine draw_line = 40; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DrawLine, mentraos.ble.MentraosBle.DrawLine.Builder, mentraos.ble.MentraosBle.DrawLineOrBuilder> + internalGetDrawLineFieldBuilder() { + if (drawLineBuilder_ == null) { + if (!(payloadCase_ == 40)) { + payload_ = mentraos.ble.MentraosBle.DrawLine.getDefaultInstance(); + } + drawLineBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DrawLine, mentraos.ble.MentraosBle.DrawLine.Builder, mentraos.ble.MentraosBle.DrawLineOrBuilder>( + (mentraos.ble.MentraosBle.DrawLine) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 40; + onChanged(); + return drawLineBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DrawRect, mentraos.ble.MentraosBle.DrawRect.Builder, mentraos.ble.MentraosBle.DrawRectOrBuilder> drawRectBuilder_; + /** + * .mentraos.ble.DrawRect draw_rect = 41; + * @return Whether the drawRect field is set. + */ + @java.lang.Override + public boolean hasDrawRect() { + return payloadCase_ == 41; + } + /** + * .mentraos.ble.DrawRect draw_rect = 41; + * @return The drawRect. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawRect getDrawRect() { + if (drawRectBuilder_ == null) { + if (payloadCase_ == 41) { + return (mentraos.ble.MentraosBle.DrawRect) payload_; + } + return mentraos.ble.MentraosBle.DrawRect.getDefaultInstance(); + } else { + if (payloadCase_ == 41) { + return drawRectBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DrawRect.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DrawRect draw_rect = 41; + */ + public Builder setDrawRect(mentraos.ble.MentraosBle.DrawRect value) { + if (drawRectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + drawRectBuilder_.setMessage(value); + } + payloadCase_ = 41; + return this; + } + /** + * .mentraos.ble.DrawRect draw_rect = 41; + */ + public Builder setDrawRect( + mentraos.ble.MentraosBle.DrawRect.Builder builderForValue) { + if (drawRectBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + drawRectBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 41; + return this; + } + /** + * .mentraos.ble.DrawRect draw_rect = 41; + */ + public Builder mergeDrawRect(mentraos.ble.MentraosBle.DrawRect value) { + if (drawRectBuilder_ == null) { + if (payloadCase_ == 41 && + payload_ != mentraos.ble.MentraosBle.DrawRect.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.DrawRect.newBuilder((mentraos.ble.MentraosBle.DrawRect) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 41) { + drawRectBuilder_.mergeFrom(value); + } else { + drawRectBuilder_.setMessage(value); + } + } + payloadCase_ = 41; + return this; + } + /** + * .mentraos.ble.DrawRect draw_rect = 41; + */ + public Builder clearDrawRect() { + if (drawRectBuilder_ == null) { + if (payloadCase_ == 41) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 41) { + payloadCase_ = 0; + payload_ = null; + } + drawRectBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.DrawRect draw_rect = 41; + */ + public mentraos.ble.MentraosBle.DrawRect.Builder getDrawRectBuilder() { + return internalGetDrawRectFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.DrawRect draw_rect = 41; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawRectOrBuilder getDrawRectOrBuilder() { + if ((payloadCase_ == 41) && (drawRectBuilder_ != null)) { + return drawRectBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 41) { + return (mentraos.ble.MentraosBle.DrawRect) payload_; + } + return mentraos.ble.MentraosBle.DrawRect.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DrawRect draw_rect = 41; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DrawRect, mentraos.ble.MentraosBle.DrawRect.Builder, mentraos.ble.MentraosBle.DrawRectOrBuilder> + internalGetDrawRectFieldBuilder() { + if (drawRectBuilder_ == null) { + if (!(payloadCase_ == 41)) { + payload_ = mentraos.ble.MentraosBle.DrawRect.getDefaultInstance(); + } + drawRectBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DrawRect, mentraos.ble.MentraosBle.DrawRect.Builder, mentraos.ble.MentraosBle.DrawRectOrBuilder>( + (mentraos.ble.MentraosBle.DrawRect) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 41; + onChanged(); + return drawRectBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DrawCircle, mentraos.ble.MentraosBle.DrawCircle.Builder, mentraos.ble.MentraosBle.DrawCircleOrBuilder> drawCircleBuilder_; + /** + * .mentraos.ble.DrawCircle draw_circle = 42; + * @return Whether the drawCircle field is set. + */ + @java.lang.Override + public boolean hasDrawCircle() { + return payloadCase_ == 42; + } + /** + * .mentraos.ble.DrawCircle draw_circle = 42; + * @return The drawCircle. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawCircle getDrawCircle() { + if (drawCircleBuilder_ == null) { + if (payloadCase_ == 42) { + return (mentraos.ble.MentraosBle.DrawCircle) payload_; + } + return mentraos.ble.MentraosBle.DrawCircle.getDefaultInstance(); + } else { + if (payloadCase_ == 42) { + return drawCircleBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DrawCircle.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DrawCircle draw_circle = 42; + */ + public Builder setDrawCircle(mentraos.ble.MentraosBle.DrawCircle value) { + if (drawCircleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + drawCircleBuilder_.setMessage(value); + } + payloadCase_ = 42; + return this; + } + /** + * .mentraos.ble.DrawCircle draw_circle = 42; + */ + public Builder setDrawCircle( + mentraos.ble.MentraosBle.DrawCircle.Builder builderForValue) { + if (drawCircleBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + drawCircleBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 42; + return this; + } + /** + * .mentraos.ble.DrawCircle draw_circle = 42; + */ + public Builder mergeDrawCircle(mentraos.ble.MentraosBle.DrawCircle value) { + if (drawCircleBuilder_ == null) { + if (payloadCase_ == 42 && + payload_ != mentraos.ble.MentraosBle.DrawCircle.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.DrawCircle.newBuilder((mentraos.ble.MentraosBle.DrawCircle) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 42) { + drawCircleBuilder_.mergeFrom(value); + } else { + drawCircleBuilder_.setMessage(value); + } + } + payloadCase_ = 42; + return this; + } + /** + * .mentraos.ble.DrawCircle draw_circle = 42; + */ + public Builder clearDrawCircle() { + if (drawCircleBuilder_ == null) { + if (payloadCase_ == 42) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 42) { + payloadCase_ = 0; + payload_ = null; + } + drawCircleBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.DrawCircle draw_circle = 42; + */ + public mentraos.ble.MentraosBle.DrawCircle.Builder getDrawCircleBuilder() { + return internalGetDrawCircleFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.DrawCircle draw_circle = 42; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawCircleOrBuilder getDrawCircleOrBuilder() { + if ((payloadCase_ == 42) && (drawCircleBuilder_ != null)) { + return drawCircleBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 42) { + return (mentraos.ble.MentraosBle.DrawCircle) payload_; + } + return mentraos.ble.MentraosBle.DrawCircle.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DrawCircle draw_circle = 42; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DrawCircle, mentraos.ble.MentraosBle.DrawCircle.Builder, mentraos.ble.MentraosBle.DrawCircleOrBuilder> + internalGetDrawCircleFieldBuilder() { + if (drawCircleBuilder_ == null) { + if (!(payloadCase_ == 42)) { + payload_ = mentraos.ble.MentraosBle.DrawCircle.getDefaultInstance(); + } + drawCircleBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DrawCircle, mentraos.ble.MentraosBle.DrawCircle.Builder, mentraos.ble.MentraosBle.DrawCircleOrBuilder>( + (mentraos.ble.MentraosBle.DrawCircle) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 42; + onChanged(); + return drawCircleBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayBatch, mentraos.ble.MentraosBle.DisplayBatch.Builder, mentraos.ble.MentraosBle.DisplayBatchOrBuilder> displayBatchBuilder_; + /** + *
+       * Send multiple commands at once
+       * 
+ * + * .mentraos.ble.DisplayBatch display_batch = 52; + * @return Whether the displayBatch field is set. + */ + @java.lang.Override + public boolean hasDisplayBatch() { + return payloadCase_ == 52; + } + /** + *
+       * Send multiple commands at once
+       * 
+ * + * .mentraos.ble.DisplayBatch display_batch = 52; + * @return The displayBatch. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayBatch getDisplayBatch() { + if (displayBatchBuilder_ == null) { + if (payloadCase_ == 52) { + return (mentraos.ble.MentraosBle.DisplayBatch) payload_; + } + return mentraos.ble.MentraosBle.DisplayBatch.getDefaultInstance(); + } else { + if (payloadCase_ == 52) { + return displayBatchBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DisplayBatch.getDefaultInstance(); + } + } + /** + *
+       * Send multiple commands at once
+       * 
+ * + * .mentraos.ble.DisplayBatch display_batch = 52; + */ + public Builder setDisplayBatch(mentraos.ble.MentraosBle.DisplayBatch value) { + if (displayBatchBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + displayBatchBuilder_.setMessage(value); + } + payloadCase_ = 52; + return this; + } + /** + *
+       * Send multiple commands at once
+       * 
+ * + * .mentraos.ble.DisplayBatch display_batch = 52; + */ + public Builder setDisplayBatch( + mentraos.ble.MentraosBle.DisplayBatch.Builder builderForValue) { + if (displayBatchBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + displayBatchBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 52; + return this; + } + /** + *
+       * Send multiple commands at once
+       * 
+ * + * .mentraos.ble.DisplayBatch display_batch = 52; + */ + public Builder mergeDisplayBatch(mentraos.ble.MentraosBle.DisplayBatch value) { + if (displayBatchBuilder_ == null) { + if (payloadCase_ == 52 && + payload_ != mentraos.ble.MentraosBle.DisplayBatch.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.DisplayBatch.newBuilder((mentraos.ble.MentraosBle.DisplayBatch) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 52) { + displayBatchBuilder_.mergeFrom(value); + } else { + displayBatchBuilder_.setMessage(value); + } + } + payloadCase_ = 52; + return this; + } + /** + *
+       * Send multiple commands at once
+       * 
+ * + * .mentraos.ble.DisplayBatch display_batch = 52; + */ + public Builder clearDisplayBatch() { + if (displayBatchBuilder_ == null) { + if (payloadCase_ == 52) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 52) { + payloadCase_ = 0; + payload_ = null; + } + displayBatchBuilder_.clear(); + } + return this; + } + /** + *
+       * Send multiple commands at once
+       * 
+ * + * .mentraos.ble.DisplayBatch display_batch = 52; + */ + public mentraos.ble.MentraosBle.DisplayBatch.Builder getDisplayBatchBuilder() { + return internalGetDisplayBatchFieldBuilder().getBuilder(); + } + /** + *
+       * Send multiple commands at once
+       * 
+ * + * .mentraos.ble.DisplayBatch display_batch = 52; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayBatchOrBuilder getDisplayBatchOrBuilder() { + if ((payloadCase_ == 52) && (displayBatchBuilder_ != null)) { + return displayBatchBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 52) { + return (mentraos.ble.MentraosBle.DisplayBatch) payload_; + } + return mentraos.ble.MentraosBle.DisplayBatch.getDefaultInstance(); + } + } + /** + *
+       * Send multiple commands at once
+       * 
+ * + * .mentraos.ble.DisplayBatch display_batch = 52; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayBatch, mentraos.ble.MentraosBle.DisplayBatch.Builder, mentraos.ble.MentraosBle.DisplayBatchOrBuilder> + internalGetDisplayBatchFieldBuilder() { + if (displayBatchBuilder_ == null) { + if (!(payloadCase_ == 52)) { + payload_ = mentraos.ble.MentraosBle.DisplayBatch.getDefaultInstance(); + } + displayBatchBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayBatch, mentraos.ble.MentraosBle.DisplayBatch.Builder, mentraos.ble.MentraosBle.DisplayBatchOrBuilder>( + (mentraos.ble.MentraosBle.DisplayBatch) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 52; + onChanged(); + return displayBatchBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.CommitDisplay, mentraos.ble.MentraosBle.CommitDisplay.Builder, mentraos.ble.MentraosBle.CommitDisplayOrBuilder> commitBuilder_; + /** + *
+       * Renders all queued commands
+       * 
+ * + * .mentraos.ble.CommitDisplay commit = 43; + * @return Whether the commit field is set. + */ + @java.lang.Override + public boolean hasCommit() { + return payloadCase_ == 43; + } + /** + *
+       * Renders all queued commands
+       * 
+ * + * .mentraos.ble.CommitDisplay commit = 43; + * @return The commit. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.CommitDisplay getCommit() { + if (commitBuilder_ == null) { + if (payloadCase_ == 43) { + return (mentraos.ble.MentraosBle.CommitDisplay) payload_; + } + return mentraos.ble.MentraosBle.CommitDisplay.getDefaultInstance(); + } else { + if (payloadCase_ == 43) { + return commitBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.CommitDisplay.getDefaultInstance(); + } + } + /** + *
+       * Renders all queued commands
+       * 
+ * + * .mentraos.ble.CommitDisplay commit = 43; + */ + public Builder setCommit(mentraos.ble.MentraosBle.CommitDisplay value) { + if (commitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + commitBuilder_.setMessage(value); + } + payloadCase_ = 43; + return this; + } + /** + *
+       * Renders all queued commands
+       * 
+ * + * .mentraos.ble.CommitDisplay commit = 43; + */ + public Builder setCommit( + mentraos.ble.MentraosBle.CommitDisplay.Builder builderForValue) { + if (commitBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + commitBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 43; + return this; + } + /** + *
+       * Renders all queued commands
+       * 
+ * + * .mentraos.ble.CommitDisplay commit = 43; + */ + public Builder mergeCommit(mentraos.ble.MentraosBle.CommitDisplay value) { + if (commitBuilder_ == null) { + if (payloadCase_ == 43 && + payload_ != mentraos.ble.MentraosBle.CommitDisplay.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.CommitDisplay.newBuilder((mentraos.ble.MentraosBle.CommitDisplay) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 43) { + commitBuilder_.mergeFrom(value); + } else { + commitBuilder_.setMessage(value); + } + } + payloadCase_ = 43; + return this; + } + /** + *
+       * Renders all queued commands
+       * 
+ * + * .mentraos.ble.CommitDisplay commit = 43; + */ + public Builder clearCommit() { + if (commitBuilder_ == null) { + if (payloadCase_ == 43) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 43) { + payloadCase_ = 0; + payload_ = null; + } + commitBuilder_.clear(); + } + return this; + } + /** + *
+       * Renders all queued commands
+       * 
+ * + * .mentraos.ble.CommitDisplay commit = 43; + */ + public mentraos.ble.MentraosBle.CommitDisplay.Builder getCommitBuilder() { + return internalGetCommitFieldBuilder().getBuilder(); + } + /** + *
+       * Renders all queued commands
+       * 
+ * + * .mentraos.ble.CommitDisplay commit = 43; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.CommitDisplayOrBuilder getCommitOrBuilder() { + if ((payloadCase_ == 43) && (commitBuilder_ != null)) { + return commitBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 43) { + return (mentraos.ble.MentraosBle.CommitDisplay) payload_; + } + return mentraos.ble.MentraosBle.CommitDisplay.getDefaultInstance(); + } + } + /** + *
+       * Renders all queued commands
+       * 
+ * + * .mentraos.ble.CommitDisplay commit = 43; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.CommitDisplay, mentraos.ble.MentraosBle.CommitDisplay.Builder, mentraos.ble.MentraosBle.CommitDisplayOrBuilder> + internalGetCommitFieldBuilder() { + if (commitBuilder_ == null) { + if (!(payloadCase_ == 43)) { + payload_ = mentraos.ble.MentraosBle.CommitDisplay.getDefaultInstance(); + } + commitBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.CommitDisplay, mentraos.ble.MentraosBle.CommitDisplay.Builder, mentraos.ble.MentraosBle.CommitDisplayOrBuilder>( + (mentraos.ble.MentraosBle.CommitDisplay) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 43; + onChanged(); + return commitBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayPowerConfig, mentraos.ble.MentraosBle.DisplayPowerConfig.Builder, mentraos.ble.MentraosBle.DisplayPowerConfigOrBuilder> displayPowerBuilder_; + /** + *
+       * Display Control - These execute immediately
+       * 
+ * + * .mentraos.ble.DisplayPowerConfig display_power = 36; + * @return Whether the displayPower field is set. + */ + @java.lang.Override + public boolean hasDisplayPower() { + return payloadCase_ == 36; + } + /** + *
+       * Display Control - These execute immediately
+       * 
+ * + * .mentraos.ble.DisplayPowerConfig display_power = 36; + * @return The displayPower. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayPowerConfig getDisplayPower() { + if (displayPowerBuilder_ == null) { + if (payloadCase_ == 36) { + return (mentraos.ble.MentraosBle.DisplayPowerConfig) payload_; + } + return mentraos.ble.MentraosBle.DisplayPowerConfig.getDefaultInstance(); + } else { + if (payloadCase_ == 36) { + return displayPowerBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DisplayPowerConfig.getDefaultInstance(); + } + } + /** + *
+       * Display Control - These execute immediately
+       * 
+ * + * .mentraos.ble.DisplayPowerConfig display_power = 36; + */ + public Builder setDisplayPower(mentraos.ble.MentraosBle.DisplayPowerConfig value) { + if (displayPowerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + displayPowerBuilder_.setMessage(value); + } + payloadCase_ = 36; + return this; + } + /** + *
+       * Display Control - These execute immediately
+       * 
+ * + * .mentraos.ble.DisplayPowerConfig display_power = 36; + */ + public Builder setDisplayPower( + mentraos.ble.MentraosBle.DisplayPowerConfig.Builder builderForValue) { + if (displayPowerBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + displayPowerBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 36; + return this; + } + /** + *
+       * Display Control - These execute immediately
+       * 
+ * + * .mentraos.ble.DisplayPowerConfig display_power = 36; + */ + public Builder mergeDisplayPower(mentraos.ble.MentraosBle.DisplayPowerConfig value) { + if (displayPowerBuilder_ == null) { + if (payloadCase_ == 36 && + payload_ != mentraos.ble.MentraosBle.DisplayPowerConfig.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.DisplayPowerConfig.newBuilder((mentraos.ble.MentraosBle.DisplayPowerConfig) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 36) { + displayPowerBuilder_.mergeFrom(value); + } else { + displayPowerBuilder_.setMessage(value); + } + } + payloadCase_ = 36; + return this; + } + /** + *
+       * Display Control - These execute immediately
+       * 
+ * + * .mentraos.ble.DisplayPowerConfig display_power = 36; + */ + public Builder clearDisplayPower() { + if (displayPowerBuilder_ == null) { + if (payloadCase_ == 36) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 36) { + payloadCase_ = 0; + payload_ = null; + } + displayPowerBuilder_.clear(); + } + return this; + } + /** + *
+       * Display Control - These execute immediately
+       * 
+ * + * .mentraos.ble.DisplayPowerConfig display_power = 36; + */ + public mentraos.ble.MentraosBle.DisplayPowerConfig.Builder getDisplayPowerBuilder() { + return internalGetDisplayPowerFieldBuilder().getBuilder(); + } + /** + *
+       * Display Control - These execute immediately
+       * 
+ * + * .mentraos.ble.DisplayPowerConfig display_power = 36; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayPowerConfigOrBuilder getDisplayPowerOrBuilder() { + if ((payloadCase_ == 36) && (displayPowerBuilder_ != null)) { + return displayPowerBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 36) { + return (mentraos.ble.MentraosBle.DisplayPowerConfig) payload_; + } + return mentraos.ble.MentraosBle.DisplayPowerConfig.getDefaultInstance(); + } + } + /** + *
+       * Display Control - These execute immediately
+       * 
+ * + * .mentraos.ble.DisplayPowerConfig display_power = 36; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayPowerConfig, mentraos.ble.MentraosBle.DisplayPowerConfig.Builder, mentraos.ble.MentraosBle.DisplayPowerConfigOrBuilder> + internalGetDisplayPowerFieldBuilder() { + if (displayPowerBuilder_ == null) { + if (!(payloadCase_ == 36)) { + payload_ = mentraos.ble.MentraosBle.DisplayPowerConfig.getDefaultInstance(); + } + displayPowerBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayPowerConfig, mentraos.ble.MentraosBle.DisplayPowerConfig.Builder, mentraos.ble.MentraosBle.DisplayPowerConfigOrBuilder>( + (mentraos.ble.MentraosBle.DisplayPowerConfig) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 36; + onChanged(); + return displayPowerBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.BrightnessConfig, mentraos.ble.MentraosBle.BrightnessConfig.Builder, mentraos.ble.MentraosBle.BrightnessConfigOrBuilder> brightnessBuilder_; + /** + * .mentraos.ble.BrightnessConfig brightness = 37; + * @return Whether the brightness field is set. + */ + @java.lang.Override + public boolean hasBrightness() { + return payloadCase_ == 37; + } + /** + * .mentraos.ble.BrightnessConfig brightness = 37; + * @return The brightness. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.BrightnessConfig getBrightness() { + if (brightnessBuilder_ == null) { + if (payloadCase_ == 37) { + return (mentraos.ble.MentraosBle.BrightnessConfig) payload_; + } + return mentraos.ble.MentraosBle.BrightnessConfig.getDefaultInstance(); + } else { + if (payloadCase_ == 37) { + return brightnessBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.BrightnessConfig.getDefaultInstance(); + } + } + /** + * .mentraos.ble.BrightnessConfig brightness = 37; + */ + public Builder setBrightness(mentraos.ble.MentraosBle.BrightnessConfig value) { + if (brightnessBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + brightnessBuilder_.setMessage(value); + } + payloadCase_ = 37; + return this; + } + /** + * .mentraos.ble.BrightnessConfig brightness = 37; + */ + public Builder setBrightness( + mentraos.ble.MentraosBle.BrightnessConfig.Builder builderForValue) { + if (brightnessBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + brightnessBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 37; + return this; + } + /** + * .mentraos.ble.BrightnessConfig brightness = 37; + */ + public Builder mergeBrightness(mentraos.ble.MentraosBle.BrightnessConfig value) { + if (brightnessBuilder_ == null) { + if (payloadCase_ == 37 && + payload_ != mentraos.ble.MentraosBle.BrightnessConfig.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.BrightnessConfig.newBuilder((mentraos.ble.MentraosBle.BrightnessConfig) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 37) { + brightnessBuilder_.mergeFrom(value); + } else { + brightnessBuilder_.setMessage(value); + } + } + payloadCase_ = 37; + return this; + } + /** + * .mentraos.ble.BrightnessConfig brightness = 37; + */ + public Builder clearBrightness() { + if (brightnessBuilder_ == null) { + if (payloadCase_ == 37) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 37) { + payloadCase_ = 0; + payload_ = null; + } + brightnessBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.BrightnessConfig brightness = 37; + */ + public mentraos.ble.MentraosBle.BrightnessConfig.Builder getBrightnessBuilder() { + return internalGetBrightnessFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.BrightnessConfig brightness = 37; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.BrightnessConfigOrBuilder getBrightnessOrBuilder() { + if ((payloadCase_ == 37) && (brightnessBuilder_ != null)) { + return brightnessBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 37) { + return (mentraos.ble.MentraosBle.BrightnessConfig) payload_; + } + return mentraos.ble.MentraosBle.BrightnessConfig.getDefaultInstance(); + } + } + /** + * .mentraos.ble.BrightnessConfig brightness = 37; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.BrightnessConfig, mentraos.ble.MentraosBle.BrightnessConfig.Builder, mentraos.ble.MentraosBle.BrightnessConfigOrBuilder> + internalGetBrightnessFieldBuilder() { + if (brightnessBuilder_ == null) { + if (!(payloadCase_ == 37)) { + payload_ = mentraos.ble.MentraosBle.BrightnessConfig.getDefaultInstance(); + } + brightnessBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.BrightnessConfig, mentraos.ble.MentraosBle.BrightnessConfig.Builder, mentraos.ble.MentraosBle.BrightnessConfigOrBuilder>( + (mentraos.ble.MentraosBle.BrightnessConfig) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 37; + onChanged(); + return brightnessBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.AutoBrightnessConfig, mentraos.ble.MentraosBle.AutoBrightnessConfig.Builder, mentraos.ble.MentraosBle.AutoBrightnessConfigOrBuilder> autoBrightnessBuilder_; + /** + * .mentraos.ble.AutoBrightnessConfig auto_brightness = 38; + * @return Whether the autoBrightness field is set. + */ + @java.lang.Override + public boolean hasAutoBrightness() { + return payloadCase_ == 38; + } + /** + * .mentraos.ble.AutoBrightnessConfig auto_brightness = 38; + * @return The autoBrightness. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.AutoBrightnessConfig getAutoBrightness() { + if (autoBrightnessBuilder_ == null) { + if (payloadCase_ == 38) { + return (mentraos.ble.MentraosBle.AutoBrightnessConfig) payload_; + } + return mentraos.ble.MentraosBle.AutoBrightnessConfig.getDefaultInstance(); + } else { + if (payloadCase_ == 38) { + return autoBrightnessBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.AutoBrightnessConfig.getDefaultInstance(); + } + } + /** + * .mentraos.ble.AutoBrightnessConfig auto_brightness = 38; + */ + public Builder setAutoBrightness(mentraos.ble.MentraosBle.AutoBrightnessConfig value) { + if (autoBrightnessBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + autoBrightnessBuilder_.setMessage(value); + } + payloadCase_ = 38; + return this; + } + /** + * .mentraos.ble.AutoBrightnessConfig auto_brightness = 38; + */ + public Builder setAutoBrightness( + mentraos.ble.MentraosBle.AutoBrightnessConfig.Builder builderForValue) { + if (autoBrightnessBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + autoBrightnessBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 38; + return this; + } + /** + * .mentraos.ble.AutoBrightnessConfig auto_brightness = 38; + */ + public Builder mergeAutoBrightness(mentraos.ble.MentraosBle.AutoBrightnessConfig value) { + if (autoBrightnessBuilder_ == null) { + if (payloadCase_ == 38 && + payload_ != mentraos.ble.MentraosBle.AutoBrightnessConfig.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.AutoBrightnessConfig.newBuilder((mentraos.ble.MentraosBle.AutoBrightnessConfig) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 38) { + autoBrightnessBuilder_.mergeFrom(value); + } else { + autoBrightnessBuilder_.setMessage(value); + } + } + payloadCase_ = 38; + return this; + } + /** + * .mentraos.ble.AutoBrightnessConfig auto_brightness = 38; + */ + public Builder clearAutoBrightness() { + if (autoBrightnessBuilder_ == null) { + if (payloadCase_ == 38) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 38) { + payloadCase_ = 0; + payload_ = null; + } + autoBrightnessBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.AutoBrightnessConfig auto_brightness = 38; + */ + public mentraos.ble.MentraosBle.AutoBrightnessConfig.Builder getAutoBrightnessBuilder() { + return internalGetAutoBrightnessFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.AutoBrightnessConfig auto_brightness = 38; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.AutoBrightnessConfigOrBuilder getAutoBrightnessOrBuilder() { + if ((payloadCase_ == 38) && (autoBrightnessBuilder_ != null)) { + return autoBrightnessBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 38) { + return (mentraos.ble.MentraosBle.AutoBrightnessConfig) payload_; + } + return mentraos.ble.MentraosBle.AutoBrightnessConfig.getDefaultInstance(); + } + } + /** + * .mentraos.ble.AutoBrightnessConfig auto_brightness = 38; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.AutoBrightnessConfig, mentraos.ble.MentraosBle.AutoBrightnessConfig.Builder, mentraos.ble.MentraosBle.AutoBrightnessConfigOrBuilder> + internalGetAutoBrightnessFieldBuilder() { + if (autoBrightnessBuilder_ == null) { + if (!(payloadCase_ == 38)) { + payload_ = mentraos.ble.MentraosBle.AutoBrightnessConfig.getDefaultInstance(); + } + autoBrightnessBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.AutoBrightnessConfig, mentraos.ble.MentraosBle.AutoBrightnessConfig.Builder, mentraos.ble.MentraosBle.AutoBrightnessConfigOrBuilder>( + (mentraos.ble.MentraosBle.AutoBrightnessConfig) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 38; + onChanged(); + return autoBrightnessBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.AutoBrightnessMultiplier, mentraos.ble.MentraosBle.AutoBrightnessMultiplier.Builder, mentraos.ble.MentraosBle.AutoBrightnessMultiplierOrBuilder> autoBrightnessMultBuilder_; + /** + * .mentraos.ble.AutoBrightnessMultiplier auto_brightness_mult = 39; + * @return Whether the autoBrightnessMult field is set. + */ + @java.lang.Override + public boolean hasAutoBrightnessMult() { + return payloadCase_ == 39; + } + /** + * .mentraos.ble.AutoBrightnessMultiplier auto_brightness_mult = 39; + * @return The autoBrightnessMult. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.AutoBrightnessMultiplier getAutoBrightnessMult() { + if (autoBrightnessMultBuilder_ == null) { + if (payloadCase_ == 39) { + return (mentraos.ble.MentraosBle.AutoBrightnessMultiplier) payload_; + } + return mentraos.ble.MentraosBle.AutoBrightnessMultiplier.getDefaultInstance(); + } else { + if (payloadCase_ == 39) { + return autoBrightnessMultBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.AutoBrightnessMultiplier.getDefaultInstance(); + } + } + /** + * .mentraos.ble.AutoBrightnessMultiplier auto_brightness_mult = 39; + */ + public Builder setAutoBrightnessMult(mentraos.ble.MentraosBle.AutoBrightnessMultiplier value) { + if (autoBrightnessMultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + autoBrightnessMultBuilder_.setMessage(value); + } + payloadCase_ = 39; + return this; + } + /** + * .mentraos.ble.AutoBrightnessMultiplier auto_brightness_mult = 39; + */ + public Builder setAutoBrightnessMult( + mentraos.ble.MentraosBle.AutoBrightnessMultiplier.Builder builderForValue) { + if (autoBrightnessMultBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + autoBrightnessMultBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 39; + return this; + } + /** + * .mentraos.ble.AutoBrightnessMultiplier auto_brightness_mult = 39; + */ + public Builder mergeAutoBrightnessMult(mentraos.ble.MentraosBle.AutoBrightnessMultiplier value) { + if (autoBrightnessMultBuilder_ == null) { + if (payloadCase_ == 39 && + payload_ != mentraos.ble.MentraosBle.AutoBrightnessMultiplier.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.AutoBrightnessMultiplier.newBuilder((mentraos.ble.MentraosBle.AutoBrightnessMultiplier) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 39) { + autoBrightnessMultBuilder_.mergeFrom(value); + } else { + autoBrightnessMultBuilder_.setMessage(value); + } + } + payloadCase_ = 39; + return this; + } + /** + * .mentraos.ble.AutoBrightnessMultiplier auto_brightness_mult = 39; + */ + public Builder clearAutoBrightnessMult() { + if (autoBrightnessMultBuilder_ == null) { + if (payloadCase_ == 39) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 39) { + payloadCase_ = 0; + payload_ = null; + } + autoBrightnessMultBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.AutoBrightnessMultiplier auto_brightness_mult = 39; + */ + public mentraos.ble.MentraosBle.AutoBrightnessMultiplier.Builder getAutoBrightnessMultBuilder() { + return internalGetAutoBrightnessMultFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.AutoBrightnessMultiplier auto_brightness_mult = 39; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.AutoBrightnessMultiplierOrBuilder getAutoBrightnessMultOrBuilder() { + if ((payloadCase_ == 39) && (autoBrightnessMultBuilder_ != null)) { + return autoBrightnessMultBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 39) { + return (mentraos.ble.MentraosBle.AutoBrightnessMultiplier) payload_; + } + return mentraos.ble.MentraosBle.AutoBrightnessMultiplier.getDefaultInstance(); + } + } + /** + * .mentraos.ble.AutoBrightnessMultiplier auto_brightness_mult = 39; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.AutoBrightnessMultiplier, mentraos.ble.MentraosBle.AutoBrightnessMultiplier.Builder, mentraos.ble.MentraosBle.AutoBrightnessMultiplierOrBuilder> + internalGetAutoBrightnessMultFieldBuilder() { + if (autoBrightnessMultBuilder_ == null) { + if (!(payloadCase_ == 39)) { + payload_ = mentraos.ble.MentraosBle.AutoBrightnessMultiplier.getDefaultInstance(); + } + autoBrightnessMultBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.AutoBrightnessMultiplier, mentraos.ble.MentraosBle.AutoBrightnessMultiplier.Builder, mentraos.ble.MentraosBle.AutoBrightnessMultiplierOrBuilder>( + (mentraos.ble.MentraosBle.AutoBrightnessMultiplier) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 39; + onChanged(); + return autoBrightnessMultBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayDistanceConfig, mentraos.ble.MentraosBle.DisplayDistanceConfig.Builder, mentraos.ble.MentraosBle.DisplayDistanceConfigOrBuilder> displayDistanceBuilder_; + /** + * .mentraos.ble.DisplayDistanceConfig display_distance = 44; + * @return Whether the displayDistance field is set. + */ + @java.lang.Override + public boolean hasDisplayDistance() { + return payloadCase_ == 44; + } + /** + * .mentraos.ble.DisplayDistanceConfig display_distance = 44; + * @return The displayDistance. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayDistanceConfig getDisplayDistance() { + if (displayDistanceBuilder_ == null) { + if (payloadCase_ == 44) { + return (mentraos.ble.MentraosBle.DisplayDistanceConfig) payload_; + } + return mentraos.ble.MentraosBle.DisplayDistanceConfig.getDefaultInstance(); + } else { + if (payloadCase_ == 44) { + return displayDistanceBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DisplayDistanceConfig.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DisplayDistanceConfig display_distance = 44; + */ + public Builder setDisplayDistance(mentraos.ble.MentraosBle.DisplayDistanceConfig value) { + if (displayDistanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + displayDistanceBuilder_.setMessage(value); + } + payloadCase_ = 44; + return this; + } + /** + * .mentraos.ble.DisplayDistanceConfig display_distance = 44; + */ + public Builder setDisplayDistance( + mentraos.ble.MentraosBle.DisplayDistanceConfig.Builder builderForValue) { + if (displayDistanceBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + displayDistanceBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 44; + return this; + } + /** + * .mentraos.ble.DisplayDistanceConfig display_distance = 44; + */ + public Builder mergeDisplayDistance(mentraos.ble.MentraosBle.DisplayDistanceConfig value) { + if (displayDistanceBuilder_ == null) { + if (payloadCase_ == 44 && + payload_ != mentraos.ble.MentraosBle.DisplayDistanceConfig.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.DisplayDistanceConfig.newBuilder((mentraos.ble.MentraosBle.DisplayDistanceConfig) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 44) { + displayDistanceBuilder_.mergeFrom(value); + } else { + displayDistanceBuilder_.setMessage(value); + } + } + payloadCase_ = 44; + return this; + } + /** + * .mentraos.ble.DisplayDistanceConfig display_distance = 44; + */ + public Builder clearDisplayDistance() { + if (displayDistanceBuilder_ == null) { + if (payloadCase_ == 44) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 44) { + payloadCase_ = 0; + payload_ = null; + } + displayDistanceBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.DisplayDistanceConfig display_distance = 44; + */ + public mentraos.ble.MentraosBle.DisplayDistanceConfig.Builder getDisplayDistanceBuilder() { + return internalGetDisplayDistanceFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.DisplayDistanceConfig display_distance = 44; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayDistanceConfigOrBuilder getDisplayDistanceOrBuilder() { + if ((payloadCase_ == 44) && (displayDistanceBuilder_ != null)) { + return displayDistanceBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 44) { + return (mentraos.ble.MentraosBle.DisplayDistanceConfig) payload_; + } + return mentraos.ble.MentraosBle.DisplayDistanceConfig.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DisplayDistanceConfig display_distance = 44; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayDistanceConfig, mentraos.ble.MentraosBle.DisplayDistanceConfig.Builder, mentraos.ble.MentraosBle.DisplayDistanceConfigOrBuilder> + internalGetDisplayDistanceFieldBuilder() { + if (displayDistanceBuilder_ == null) { + if (!(payloadCase_ == 44)) { + payload_ = mentraos.ble.MentraosBle.DisplayDistanceConfig.getDefaultInstance(); + } + displayDistanceBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayDistanceConfig, mentraos.ble.MentraosBle.DisplayDistanceConfig.Builder, mentraos.ble.MentraosBle.DisplayDistanceConfigOrBuilder>( + (mentraos.ble.MentraosBle.DisplayDistanceConfig) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 44; + onChanged(); + return displayDistanceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayHeightConfig, mentraos.ble.MentraosBle.DisplayHeightConfig.Builder, mentraos.ble.MentraosBle.DisplayHeightConfigOrBuilder> displayHeightBuilder_; + /** + * .mentraos.ble.DisplayHeightConfig display_height = 45; + * @return Whether the displayHeight field is set. + */ + @java.lang.Override + public boolean hasDisplayHeight() { + return payloadCase_ == 45; + } + /** + * .mentraos.ble.DisplayHeightConfig display_height = 45; + * @return The displayHeight. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayHeightConfig getDisplayHeight() { + if (displayHeightBuilder_ == null) { + if (payloadCase_ == 45) { + return (mentraos.ble.MentraosBle.DisplayHeightConfig) payload_; + } + return mentraos.ble.MentraosBle.DisplayHeightConfig.getDefaultInstance(); + } else { + if (payloadCase_ == 45) { + return displayHeightBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DisplayHeightConfig.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DisplayHeightConfig display_height = 45; + */ + public Builder setDisplayHeight(mentraos.ble.MentraosBle.DisplayHeightConfig value) { + if (displayHeightBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + displayHeightBuilder_.setMessage(value); + } + payloadCase_ = 45; + return this; + } + /** + * .mentraos.ble.DisplayHeightConfig display_height = 45; + */ + public Builder setDisplayHeight( + mentraos.ble.MentraosBle.DisplayHeightConfig.Builder builderForValue) { + if (displayHeightBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + displayHeightBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 45; + return this; + } + /** + * .mentraos.ble.DisplayHeightConfig display_height = 45; + */ + public Builder mergeDisplayHeight(mentraos.ble.MentraosBle.DisplayHeightConfig value) { + if (displayHeightBuilder_ == null) { + if (payloadCase_ == 45 && + payload_ != mentraos.ble.MentraosBle.DisplayHeightConfig.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.DisplayHeightConfig.newBuilder((mentraos.ble.MentraosBle.DisplayHeightConfig) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 45) { + displayHeightBuilder_.mergeFrom(value); + } else { + displayHeightBuilder_.setMessage(value); + } + } + payloadCase_ = 45; + return this; + } + /** + * .mentraos.ble.DisplayHeightConfig display_height = 45; + */ + public Builder clearDisplayHeight() { + if (displayHeightBuilder_ == null) { + if (payloadCase_ == 45) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 45) { + payloadCase_ = 0; + payload_ = null; + } + displayHeightBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.DisplayHeightConfig display_height = 45; + */ + public mentraos.ble.MentraosBle.DisplayHeightConfig.Builder getDisplayHeightBuilder() { + return internalGetDisplayHeightFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.DisplayHeightConfig display_height = 45; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayHeightConfigOrBuilder getDisplayHeightOrBuilder() { + if ((payloadCase_ == 45) && (displayHeightBuilder_ != null)) { + return displayHeightBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 45) { + return (mentraos.ble.MentraosBle.DisplayHeightConfig) payload_; + } + return mentraos.ble.MentraosBle.DisplayHeightConfig.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DisplayHeightConfig display_height = 45; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayHeightConfig, mentraos.ble.MentraosBle.DisplayHeightConfig.Builder, mentraos.ble.MentraosBle.DisplayHeightConfigOrBuilder> + internalGetDisplayHeightFieldBuilder() { + if (displayHeightBuilder_ == null) { + if (!(payloadCase_ == 45)) { + payload_ = mentraos.ble.MentraosBle.DisplayHeightConfig.getDefaultInstance(); + } + displayHeightBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayHeightConfig, mentraos.ble.MentraosBle.DisplayHeightConfig.Builder, mentraos.ble.MentraosBle.DisplayHeightConfigOrBuilder>( + (mentraos.ble.MentraosBle.DisplayHeightConfig) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 45; + onChanged(); + return displayHeightBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ClearDisplay, mentraos.ble.MentraosBle.ClearDisplay.Builder, mentraos.ble.MentraosBle.ClearDisplayOrBuilder> clearDisplayBuilder_; + /** + * .mentraos.ble.ClearDisplay clear_display = 46; + * @return Whether the clearDisplay field is set. + */ + @java.lang.Override + public boolean hasClearDisplay() { + return payloadCase_ == 46; + } + /** + * .mentraos.ble.ClearDisplay clear_display = 46; + * @return The clearDisplay. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ClearDisplay getClearDisplay() { + if (clearDisplayBuilder_ == null) { + if (payloadCase_ == 46) { + return (mentraos.ble.MentraosBle.ClearDisplay) payload_; + } + return mentraos.ble.MentraosBle.ClearDisplay.getDefaultInstance(); + } else { + if (payloadCase_ == 46) { + return clearDisplayBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.ClearDisplay.getDefaultInstance(); + } + } + /** + * .mentraos.ble.ClearDisplay clear_display = 46; + */ + public Builder setClearDisplay(mentraos.ble.MentraosBle.ClearDisplay value) { + if (clearDisplayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + clearDisplayBuilder_.setMessage(value); + } + payloadCase_ = 46; + return this; + } + /** + * .mentraos.ble.ClearDisplay clear_display = 46; + */ + public Builder setClearDisplay( + mentraos.ble.MentraosBle.ClearDisplay.Builder builderForValue) { + if (clearDisplayBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + clearDisplayBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 46; + return this; + } + /** + * .mentraos.ble.ClearDisplay clear_display = 46; + */ + public Builder mergeClearDisplay(mentraos.ble.MentraosBle.ClearDisplay value) { + if (clearDisplayBuilder_ == null) { + if (payloadCase_ == 46 && + payload_ != mentraos.ble.MentraosBle.ClearDisplay.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.ClearDisplay.newBuilder((mentraos.ble.MentraosBle.ClearDisplay) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 46) { + clearDisplayBuilder_.mergeFrom(value); + } else { + clearDisplayBuilder_.setMessage(value); + } + } + payloadCase_ = 46; + return this; + } + /** + * .mentraos.ble.ClearDisplay clear_display = 46; + */ + public Builder clearClearDisplay() { + if (clearDisplayBuilder_ == null) { + if (payloadCase_ == 46) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 46) { + payloadCase_ = 0; + payload_ = null; + } + clearDisplayBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.ClearDisplay clear_display = 46; + */ + public mentraos.ble.MentraosBle.ClearDisplay.Builder getClearDisplayBuilder() { + return internalGetClearDisplayFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.ClearDisplay clear_display = 46; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ClearDisplayOrBuilder getClearDisplayOrBuilder() { + if ((payloadCase_ == 46) && (clearDisplayBuilder_ != null)) { + return clearDisplayBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 46) { + return (mentraos.ble.MentraosBle.ClearDisplay) payload_; + } + return mentraos.ble.MentraosBle.ClearDisplay.getDefaultInstance(); + } + } + /** + * .mentraos.ble.ClearDisplay clear_display = 46; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ClearDisplay, mentraos.ble.MentraosBle.ClearDisplay.Builder, mentraos.ble.MentraosBle.ClearDisplayOrBuilder> + internalGetClearDisplayFieldBuilder() { + if (clearDisplayBuilder_ == null) { + if (!(payloadCase_ == 46)) { + payload_ = mentraos.ble.MentraosBle.ClearDisplay.getDefaultInstance(); + } + clearDisplayBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ClearDisplay, mentraos.ble.MentraosBle.ClearDisplay.Builder, mentraos.ble.MentraosBle.ClearDisplayOrBuilder>( + (mentraos.ble.MentraosBle.ClearDisplay) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 46; + onChanged(); + return clearDisplayBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayQueueStatus, mentraos.ble.MentraosBle.DisplayQueueStatus.Builder, mentraos.ble.MentraosBle.DisplayQueueStatusOrBuilder> queueStatusRequestBuilder_; + /** + *
+       * Get queue info
+       * 
+ * + * .mentraos.ble.DisplayQueueStatus queue_status_request = 51; + * @return Whether the queueStatusRequest field is set. + */ + @java.lang.Override + public boolean hasQueueStatusRequest() { + return payloadCase_ == 51; + } + /** + *
+       * Get queue info
+       * 
+ * + * .mentraos.ble.DisplayQueueStatus queue_status_request = 51; + * @return The queueStatusRequest. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayQueueStatus getQueueStatusRequest() { + if (queueStatusRequestBuilder_ == null) { + if (payloadCase_ == 51) { + return (mentraos.ble.MentraosBle.DisplayQueueStatus) payload_; + } + return mentraos.ble.MentraosBle.DisplayQueueStatus.getDefaultInstance(); + } else { + if (payloadCase_ == 51) { + return queueStatusRequestBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DisplayQueueStatus.getDefaultInstance(); + } + } + /** + *
+       * Get queue info
+       * 
+ * + * .mentraos.ble.DisplayQueueStatus queue_status_request = 51; + */ + public Builder setQueueStatusRequest(mentraos.ble.MentraosBle.DisplayQueueStatus value) { + if (queueStatusRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + queueStatusRequestBuilder_.setMessage(value); + } + payloadCase_ = 51; + return this; + } + /** + *
+       * Get queue info
+       * 
+ * + * .mentraos.ble.DisplayQueueStatus queue_status_request = 51; + */ + public Builder setQueueStatusRequest( + mentraos.ble.MentraosBle.DisplayQueueStatus.Builder builderForValue) { + if (queueStatusRequestBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + queueStatusRequestBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 51; + return this; + } + /** + *
+       * Get queue info
+       * 
+ * + * .mentraos.ble.DisplayQueueStatus queue_status_request = 51; + */ + public Builder mergeQueueStatusRequest(mentraos.ble.MentraosBle.DisplayQueueStatus value) { + if (queueStatusRequestBuilder_ == null) { + if (payloadCase_ == 51 && + payload_ != mentraos.ble.MentraosBle.DisplayQueueStatus.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.DisplayQueueStatus.newBuilder((mentraos.ble.MentraosBle.DisplayQueueStatus) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 51) { + queueStatusRequestBuilder_.mergeFrom(value); + } else { + queueStatusRequestBuilder_.setMessage(value); + } + } + payloadCase_ = 51; + return this; + } + /** + *
+       * Get queue info
+       * 
+ * + * .mentraos.ble.DisplayQueueStatus queue_status_request = 51; + */ + public Builder clearQueueStatusRequest() { + if (queueStatusRequestBuilder_ == null) { + if (payloadCase_ == 51) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 51) { + payloadCase_ = 0; + payload_ = null; + } + queueStatusRequestBuilder_.clear(); + } + return this; + } + /** + *
+       * Get queue info
+       * 
+ * + * .mentraos.ble.DisplayQueueStatus queue_status_request = 51; + */ + public mentraos.ble.MentraosBle.DisplayQueueStatus.Builder getQueueStatusRequestBuilder() { + return internalGetQueueStatusRequestFieldBuilder().getBuilder(); + } + /** + *
+       * Get queue info
+       * 
+ * + * .mentraos.ble.DisplayQueueStatus queue_status_request = 51; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayQueueStatusOrBuilder getQueueStatusRequestOrBuilder() { + if ((payloadCase_ == 51) && (queueStatusRequestBuilder_ != null)) { + return queueStatusRequestBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 51) { + return (mentraos.ble.MentraosBle.DisplayQueueStatus) payload_; + } + return mentraos.ble.MentraosBle.DisplayQueueStatus.getDefaultInstance(); + } + } + /** + *
+       * Get queue info
+       * 
+ * + * .mentraos.ble.DisplayQueueStatus queue_status_request = 51; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayQueueStatus, mentraos.ble.MentraosBle.DisplayQueueStatus.Builder, mentraos.ble.MentraosBle.DisplayQueueStatusOrBuilder> + internalGetQueueStatusRequestFieldBuilder() { + if (queueStatusRequestBuilder_ == null) { + if (!(payloadCase_ == 51)) { + payload_ = mentraos.ble.MentraosBle.DisplayQueueStatus.getDefaultInstance(); + } + queueStatusRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayQueueStatus, mentraos.ble.MentraosBle.DisplayQueueStatus.Builder, mentraos.ble.MentraosBle.DisplayQueueStatusOrBuilder>( + (mentraos.ble.MentraosBle.DisplayQueueStatus) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 51; + onChanged(); + return queueStatusRequestBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.CacheDashboard, mentraos.ble.MentraosBle.CacheDashboard.Builder, mentraos.ble.MentraosBle.CacheDashboardOrBuilder> cacheDashboardBuilder_; + /** + *
+       * Dashboard/Cacheboard System
+       * 
+ * + * .mentraos.ble.CacheDashboard cache_dashboard = 47; + * @return Whether the cacheDashboard field is set. + */ + @java.lang.Override + public boolean hasCacheDashboard() { + return payloadCase_ == 47; + } + /** + *
+       * Dashboard/Cacheboard System
+       * 
+ * + * .mentraos.ble.CacheDashboard cache_dashboard = 47; + * @return The cacheDashboard. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.CacheDashboard getCacheDashboard() { + if (cacheDashboardBuilder_ == null) { + if (payloadCase_ == 47) { + return (mentraos.ble.MentraosBle.CacheDashboard) payload_; + } + return mentraos.ble.MentraosBle.CacheDashboard.getDefaultInstance(); + } else { + if (payloadCase_ == 47) { + return cacheDashboardBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.CacheDashboard.getDefaultInstance(); + } + } + /** + *
+       * Dashboard/Cacheboard System
+       * 
+ * + * .mentraos.ble.CacheDashboard cache_dashboard = 47; + */ + public Builder setCacheDashboard(mentraos.ble.MentraosBle.CacheDashboard value) { + if (cacheDashboardBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + cacheDashboardBuilder_.setMessage(value); + } + payloadCase_ = 47; + return this; + } + /** + *
+       * Dashboard/Cacheboard System
+       * 
+ * + * .mentraos.ble.CacheDashboard cache_dashboard = 47; + */ + public Builder setCacheDashboard( + mentraos.ble.MentraosBle.CacheDashboard.Builder builderForValue) { + if (cacheDashboardBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + cacheDashboardBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 47; + return this; + } + /** + *
+       * Dashboard/Cacheboard System
+       * 
+ * + * .mentraos.ble.CacheDashboard cache_dashboard = 47; + */ + public Builder mergeCacheDashboard(mentraos.ble.MentraosBle.CacheDashboard value) { + if (cacheDashboardBuilder_ == null) { + if (payloadCase_ == 47 && + payload_ != mentraos.ble.MentraosBle.CacheDashboard.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.CacheDashboard.newBuilder((mentraos.ble.MentraosBle.CacheDashboard) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 47) { + cacheDashboardBuilder_.mergeFrom(value); + } else { + cacheDashboardBuilder_.setMessage(value); + } + } + payloadCase_ = 47; + return this; + } + /** + *
+       * Dashboard/Cacheboard System
+       * 
+ * + * .mentraos.ble.CacheDashboard cache_dashboard = 47; + */ + public Builder clearCacheDashboard() { + if (cacheDashboardBuilder_ == null) { + if (payloadCase_ == 47) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 47) { + payloadCase_ = 0; + payload_ = null; + } + cacheDashboardBuilder_.clear(); + } + return this; + } + /** + *
+       * Dashboard/Cacheboard System
+       * 
+ * + * .mentraos.ble.CacheDashboard cache_dashboard = 47; + */ + public mentraos.ble.MentraosBle.CacheDashboard.Builder getCacheDashboardBuilder() { + return internalGetCacheDashboardFieldBuilder().getBuilder(); + } + /** + *
+       * Dashboard/Cacheboard System
+       * 
+ * + * .mentraos.ble.CacheDashboard cache_dashboard = 47; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.CacheDashboardOrBuilder getCacheDashboardOrBuilder() { + if ((payloadCase_ == 47) && (cacheDashboardBuilder_ != null)) { + return cacheDashboardBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 47) { + return (mentraos.ble.MentraosBle.CacheDashboard) payload_; + } + return mentraos.ble.MentraosBle.CacheDashboard.getDefaultInstance(); + } + } + /** + *
+       * Dashboard/Cacheboard System
+       * 
+ * + * .mentraos.ble.CacheDashboard cache_dashboard = 47; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.CacheDashboard, mentraos.ble.MentraosBle.CacheDashboard.Builder, mentraos.ble.MentraosBle.CacheDashboardOrBuilder> + internalGetCacheDashboardFieldBuilder() { + if (cacheDashboardBuilder_ == null) { + if (!(payloadCase_ == 47)) { + payload_ = mentraos.ble.MentraosBle.CacheDashboard.getDefaultInstance(); + } + cacheDashboardBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.CacheDashboard, mentraos.ble.MentraosBle.CacheDashboard.Builder, mentraos.ble.MentraosBle.CacheDashboardOrBuilder>( + (mentraos.ble.MentraosBle.CacheDashboard) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 47; + onChanged(); + return cacheDashboardBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ClearDashboard, mentraos.ble.MentraosBle.ClearDashboard.Builder, mentraos.ble.MentraosBle.ClearDashboardOrBuilder> clearDashboardBuilder_; + /** + * .mentraos.ble.ClearDashboard clear_dashboard = 48; + * @return Whether the clearDashboard field is set. + */ + @java.lang.Override + public boolean hasClearDashboard() { + return payloadCase_ == 48; + } + /** + * .mentraos.ble.ClearDashboard clear_dashboard = 48; + * @return The clearDashboard. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ClearDashboard getClearDashboard() { + if (clearDashboardBuilder_ == null) { + if (payloadCase_ == 48) { + return (mentraos.ble.MentraosBle.ClearDashboard) payload_; + } + return mentraos.ble.MentraosBle.ClearDashboard.getDefaultInstance(); + } else { + if (payloadCase_ == 48) { + return clearDashboardBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.ClearDashboard.getDefaultInstance(); + } + } + /** + * .mentraos.ble.ClearDashboard clear_dashboard = 48; + */ + public Builder setClearDashboard(mentraos.ble.MentraosBle.ClearDashboard value) { + if (clearDashboardBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + clearDashboardBuilder_.setMessage(value); + } + payloadCase_ = 48; + return this; + } + /** + * .mentraos.ble.ClearDashboard clear_dashboard = 48; + */ + public Builder setClearDashboard( + mentraos.ble.MentraosBle.ClearDashboard.Builder builderForValue) { + if (clearDashboardBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + clearDashboardBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 48; + return this; + } + /** + * .mentraos.ble.ClearDashboard clear_dashboard = 48; + */ + public Builder mergeClearDashboard(mentraos.ble.MentraosBle.ClearDashboard value) { + if (clearDashboardBuilder_ == null) { + if (payloadCase_ == 48 && + payload_ != mentraos.ble.MentraosBle.ClearDashboard.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.ClearDashboard.newBuilder((mentraos.ble.MentraosBle.ClearDashboard) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 48) { + clearDashboardBuilder_.mergeFrom(value); + } else { + clearDashboardBuilder_.setMessage(value); + } + } + payloadCase_ = 48; + return this; + } + /** + * .mentraos.ble.ClearDashboard clear_dashboard = 48; + */ + public Builder clearClearDashboard() { + if (clearDashboardBuilder_ == null) { + if (payloadCase_ == 48) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 48) { + payloadCase_ = 0; + payload_ = null; + } + clearDashboardBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.ClearDashboard clear_dashboard = 48; + */ + public mentraos.ble.MentraosBle.ClearDashboard.Builder getClearDashboardBuilder() { + return internalGetClearDashboardFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.ClearDashboard clear_dashboard = 48; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ClearDashboardOrBuilder getClearDashboardOrBuilder() { + if ((payloadCase_ == 48) && (clearDashboardBuilder_ != null)) { + return clearDashboardBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 48) { + return (mentraos.ble.MentraosBle.ClearDashboard) payload_; + } + return mentraos.ble.MentraosBle.ClearDashboard.getDefaultInstance(); + } + } + /** + * .mentraos.ble.ClearDashboard clear_dashboard = 48; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ClearDashboard, mentraos.ble.MentraosBle.ClearDashboard.Builder, mentraos.ble.MentraosBle.ClearDashboardOrBuilder> + internalGetClearDashboardFieldBuilder() { + if (clearDashboardBuilder_ == null) { + if (!(payloadCase_ == 48)) { + payload_ = mentraos.ble.MentraosBle.ClearDashboard.getDefaultInstance(); + } + clearDashboardBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ClearDashboard, mentraos.ble.MentraosBle.ClearDashboard.Builder, mentraos.ble.MentraosBle.ClearDashboardOrBuilder>( + (mentraos.ble.MentraosBle.ClearDashboard) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 48; + onChanged(); + return clearDashboardBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ConfigureDashboardTrigger, mentraos.ble.MentraosBle.ConfigureDashboardTrigger.Builder, mentraos.ble.MentraosBle.ConfigureDashboardTriggerOrBuilder> dashboardTriggerBuilder_; + /** + * .mentraos.ble.ConfigureDashboardTrigger dashboard_trigger = 49; + * @return Whether the dashboardTrigger field is set. + */ + @java.lang.Override + public boolean hasDashboardTrigger() { + return payloadCase_ == 49; + } + /** + * .mentraos.ble.ConfigureDashboardTrigger dashboard_trigger = 49; + * @return The dashboardTrigger. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ConfigureDashboardTrigger getDashboardTrigger() { + if (dashboardTriggerBuilder_ == null) { + if (payloadCase_ == 49) { + return (mentraos.ble.MentraosBle.ConfigureDashboardTrigger) payload_; + } + return mentraos.ble.MentraosBle.ConfigureDashboardTrigger.getDefaultInstance(); + } else { + if (payloadCase_ == 49) { + return dashboardTriggerBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.ConfigureDashboardTrigger.getDefaultInstance(); + } + } + /** + * .mentraos.ble.ConfigureDashboardTrigger dashboard_trigger = 49; + */ + public Builder setDashboardTrigger(mentraos.ble.MentraosBle.ConfigureDashboardTrigger value) { + if (dashboardTriggerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + dashboardTriggerBuilder_.setMessage(value); + } + payloadCase_ = 49; + return this; + } + /** + * .mentraos.ble.ConfigureDashboardTrigger dashboard_trigger = 49; + */ + public Builder setDashboardTrigger( + mentraos.ble.MentraosBle.ConfigureDashboardTrigger.Builder builderForValue) { + if (dashboardTriggerBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + dashboardTriggerBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 49; + return this; + } + /** + * .mentraos.ble.ConfigureDashboardTrigger dashboard_trigger = 49; + */ + public Builder mergeDashboardTrigger(mentraos.ble.MentraosBle.ConfigureDashboardTrigger value) { + if (dashboardTriggerBuilder_ == null) { + if (payloadCase_ == 49 && + payload_ != mentraos.ble.MentraosBle.ConfigureDashboardTrigger.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.ConfigureDashboardTrigger.newBuilder((mentraos.ble.MentraosBle.ConfigureDashboardTrigger) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 49) { + dashboardTriggerBuilder_.mergeFrom(value); + } else { + dashboardTriggerBuilder_.setMessage(value); + } + } + payloadCase_ = 49; + return this; + } + /** + * .mentraos.ble.ConfigureDashboardTrigger dashboard_trigger = 49; + */ + public Builder clearDashboardTrigger() { + if (dashboardTriggerBuilder_ == null) { + if (payloadCase_ == 49) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 49) { + payloadCase_ = 0; + payload_ = null; + } + dashboardTriggerBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.ConfigureDashboardTrigger dashboard_trigger = 49; + */ + public mentraos.ble.MentraosBle.ConfigureDashboardTrigger.Builder getDashboardTriggerBuilder() { + return internalGetDashboardTriggerFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.ConfigureDashboardTrigger dashboard_trigger = 49; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ConfigureDashboardTriggerOrBuilder getDashboardTriggerOrBuilder() { + if ((payloadCase_ == 49) && (dashboardTriggerBuilder_ != null)) { + return dashboardTriggerBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 49) { + return (mentraos.ble.MentraosBle.ConfigureDashboardTrigger) payload_; + } + return mentraos.ble.MentraosBle.ConfigureDashboardTrigger.getDefaultInstance(); + } + } + /** + * .mentraos.ble.ConfigureDashboardTrigger dashboard_trigger = 49; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ConfigureDashboardTrigger, mentraos.ble.MentraosBle.ConfigureDashboardTrigger.Builder, mentraos.ble.MentraosBle.ConfigureDashboardTriggerOrBuilder> + internalGetDashboardTriggerFieldBuilder() { + if (dashboardTriggerBuilder_ == null) { + if (!(payloadCase_ == 49)) { + payload_ = mentraos.ble.MentraosBle.ConfigureDashboardTrigger.getDefaultInstance(); + } + dashboardTriggerBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ConfigureDashboardTrigger, mentraos.ble.MentraosBle.ConfigureDashboardTrigger.Builder, mentraos.ble.MentraosBle.ConfigureDashboardTriggerOrBuilder>( + (mentraos.ble.MentraosBle.ConfigureDashboardTrigger) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 49; + onChanged(); + return dashboardTriggerBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ImuEnabledConfig, mentraos.ble.MentraosBle.ImuEnabledConfig.Builder, mentraos.ble.MentraosBle.ImuEnabledConfigOrBuilder> imuEnabledBuilder_; + /** + *
+       * User Input
+       * 
+ * + * .mentraos.ble.ImuEnabledConfig imu_enabled = 55; + * @return Whether the imuEnabled field is set. + */ + @java.lang.Override + public boolean hasImuEnabled() { + return payloadCase_ == 55; + } + /** + *
+       * User Input
+       * 
+ * + * .mentraos.ble.ImuEnabledConfig imu_enabled = 55; + * @return The imuEnabled. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImuEnabledConfig getImuEnabled() { + if (imuEnabledBuilder_ == null) { + if (payloadCase_ == 55) { + return (mentraos.ble.MentraosBle.ImuEnabledConfig) payload_; + } + return mentraos.ble.MentraosBle.ImuEnabledConfig.getDefaultInstance(); + } else { + if (payloadCase_ == 55) { + return imuEnabledBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.ImuEnabledConfig.getDefaultInstance(); + } + } + /** + *
+       * User Input
+       * 
+ * + * .mentraos.ble.ImuEnabledConfig imu_enabled = 55; + */ + public Builder setImuEnabled(mentraos.ble.MentraosBle.ImuEnabledConfig value) { + if (imuEnabledBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + imuEnabledBuilder_.setMessage(value); + } + payloadCase_ = 55; + return this; + } + /** + *
+       * User Input
+       * 
+ * + * .mentraos.ble.ImuEnabledConfig imu_enabled = 55; + */ + public Builder setImuEnabled( + mentraos.ble.MentraosBle.ImuEnabledConfig.Builder builderForValue) { + if (imuEnabledBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + imuEnabledBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 55; + return this; + } + /** + *
+       * User Input
+       * 
+ * + * .mentraos.ble.ImuEnabledConfig imu_enabled = 55; + */ + public Builder mergeImuEnabled(mentraos.ble.MentraosBle.ImuEnabledConfig value) { + if (imuEnabledBuilder_ == null) { + if (payloadCase_ == 55 && + payload_ != mentraos.ble.MentraosBle.ImuEnabledConfig.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.ImuEnabledConfig.newBuilder((mentraos.ble.MentraosBle.ImuEnabledConfig) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 55) { + imuEnabledBuilder_.mergeFrom(value); + } else { + imuEnabledBuilder_.setMessage(value); + } + } + payloadCase_ = 55; + return this; + } + /** + *
+       * User Input
+       * 
+ * + * .mentraos.ble.ImuEnabledConfig imu_enabled = 55; + */ + public Builder clearImuEnabled() { + if (imuEnabledBuilder_ == null) { + if (payloadCase_ == 55) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 55) { + payloadCase_ = 0; + payload_ = null; + } + imuEnabledBuilder_.clear(); + } + return this; + } + /** + *
+       * User Input
+       * 
+ * + * .mentraos.ble.ImuEnabledConfig imu_enabled = 55; + */ + public mentraos.ble.MentraosBle.ImuEnabledConfig.Builder getImuEnabledBuilder() { + return internalGetImuEnabledFieldBuilder().getBuilder(); + } + /** + *
+       * User Input
+       * 
+ * + * .mentraos.ble.ImuEnabledConfig imu_enabled = 55; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImuEnabledConfigOrBuilder getImuEnabledOrBuilder() { + if ((payloadCase_ == 55) && (imuEnabledBuilder_ != null)) { + return imuEnabledBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 55) { + return (mentraos.ble.MentraosBle.ImuEnabledConfig) payload_; + } + return mentraos.ble.MentraosBle.ImuEnabledConfig.getDefaultInstance(); + } + } + /** + *
+       * User Input
+       * 
+ * + * .mentraos.ble.ImuEnabledConfig imu_enabled = 55; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ImuEnabledConfig, mentraos.ble.MentraosBle.ImuEnabledConfig.Builder, mentraos.ble.MentraosBle.ImuEnabledConfigOrBuilder> + internalGetImuEnabledFieldBuilder() { + if (imuEnabledBuilder_ == null) { + if (!(payloadCase_ == 55)) { + payload_ = mentraos.ble.MentraosBle.ImuEnabledConfig.getDefaultInstance(); + } + imuEnabledBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ImuEnabledConfig, mentraos.ble.MentraosBle.ImuEnabledConfig.Builder, mentraos.ble.MentraosBle.ImuEnabledConfigOrBuilder>( + (mentraos.ble.MentraosBle.ImuEnabledConfig) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 55; + onChanged(); + return imuEnabledBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ImuSingleRequest, mentraos.ble.MentraosBle.ImuSingleRequest.Builder, mentraos.ble.MentraosBle.ImuSingleRequestOrBuilder> imuSingleBuilder_; + /** + * .mentraos.ble.ImuSingleRequest imu_single = 56; + * @return Whether the imuSingle field is set. + */ + @java.lang.Override + public boolean hasImuSingle() { + return payloadCase_ == 56; + } + /** + * .mentraos.ble.ImuSingleRequest imu_single = 56; + * @return The imuSingle. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImuSingleRequest getImuSingle() { + if (imuSingleBuilder_ == null) { + if (payloadCase_ == 56) { + return (mentraos.ble.MentraosBle.ImuSingleRequest) payload_; + } + return mentraos.ble.MentraosBle.ImuSingleRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 56) { + return imuSingleBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.ImuSingleRequest.getDefaultInstance(); + } + } + /** + * .mentraos.ble.ImuSingleRequest imu_single = 56; + */ + public Builder setImuSingle(mentraos.ble.MentraosBle.ImuSingleRequest value) { + if (imuSingleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + imuSingleBuilder_.setMessage(value); + } + payloadCase_ = 56; + return this; + } + /** + * .mentraos.ble.ImuSingleRequest imu_single = 56; + */ + public Builder setImuSingle( + mentraos.ble.MentraosBle.ImuSingleRequest.Builder builderForValue) { + if (imuSingleBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + imuSingleBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 56; + return this; + } + /** + * .mentraos.ble.ImuSingleRequest imu_single = 56; + */ + public Builder mergeImuSingle(mentraos.ble.MentraosBle.ImuSingleRequest value) { + if (imuSingleBuilder_ == null) { + if (payloadCase_ == 56 && + payload_ != mentraos.ble.MentraosBle.ImuSingleRequest.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.ImuSingleRequest.newBuilder((mentraos.ble.MentraosBle.ImuSingleRequest) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 56) { + imuSingleBuilder_.mergeFrom(value); + } else { + imuSingleBuilder_.setMessage(value); + } + } + payloadCase_ = 56; + return this; + } + /** + * .mentraos.ble.ImuSingleRequest imu_single = 56; + */ + public Builder clearImuSingle() { + if (imuSingleBuilder_ == null) { + if (payloadCase_ == 56) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 56) { + payloadCase_ = 0; + payload_ = null; + } + imuSingleBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.ImuSingleRequest imu_single = 56; + */ + public mentraos.ble.MentraosBle.ImuSingleRequest.Builder getImuSingleBuilder() { + return internalGetImuSingleFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.ImuSingleRequest imu_single = 56; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImuSingleRequestOrBuilder getImuSingleOrBuilder() { + if ((payloadCase_ == 56) && (imuSingleBuilder_ != null)) { + return imuSingleBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 56) { + return (mentraos.ble.MentraosBle.ImuSingleRequest) payload_; + } + return mentraos.ble.MentraosBle.ImuSingleRequest.getDefaultInstance(); + } + } + /** + * .mentraos.ble.ImuSingleRequest imu_single = 56; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ImuSingleRequest, mentraos.ble.MentraosBle.ImuSingleRequest.Builder, mentraos.ble.MentraosBle.ImuSingleRequestOrBuilder> + internalGetImuSingleFieldBuilder() { + if (imuSingleBuilder_ == null) { + if (!(payloadCase_ == 56)) { + payload_ = mentraos.ble.MentraosBle.ImuSingleRequest.getDefaultInstance(); + } + imuSingleBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ImuSingleRequest, mentraos.ble.MentraosBle.ImuSingleRequest.Builder, mentraos.ble.MentraosBle.ImuSingleRequestOrBuilder>( + (mentraos.ble.MentraosBle.ImuSingleRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 56; + onChanged(); + return imuSingleBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ImuStreamConfig, mentraos.ble.MentraosBle.ImuStreamConfig.Builder, mentraos.ble.MentraosBle.ImuStreamConfigOrBuilder> imuStreamBuilder_; + /** + * .mentraos.ble.ImuStreamConfig imu_stream = 57; + * @return Whether the imuStream field is set. + */ + @java.lang.Override + public boolean hasImuStream() { + return payloadCase_ == 57; + } + /** + * .mentraos.ble.ImuStreamConfig imu_stream = 57; + * @return The imuStream. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImuStreamConfig getImuStream() { + if (imuStreamBuilder_ == null) { + if (payloadCase_ == 57) { + return (mentraos.ble.MentraosBle.ImuStreamConfig) payload_; + } + return mentraos.ble.MentraosBle.ImuStreamConfig.getDefaultInstance(); + } else { + if (payloadCase_ == 57) { + return imuStreamBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.ImuStreamConfig.getDefaultInstance(); + } + } + /** + * .mentraos.ble.ImuStreamConfig imu_stream = 57; + */ + public Builder setImuStream(mentraos.ble.MentraosBle.ImuStreamConfig value) { + if (imuStreamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + imuStreamBuilder_.setMessage(value); + } + payloadCase_ = 57; + return this; + } + /** + * .mentraos.ble.ImuStreamConfig imu_stream = 57; + */ + public Builder setImuStream( + mentraos.ble.MentraosBle.ImuStreamConfig.Builder builderForValue) { + if (imuStreamBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + imuStreamBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 57; + return this; + } + /** + * .mentraos.ble.ImuStreamConfig imu_stream = 57; + */ + public Builder mergeImuStream(mentraos.ble.MentraosBle.ImuStreamConfig value) { + if (imuStreamBuilder_ == null) { + if (payloadCase_ == 57 && + payload_ != mentraos.ble.MentraosBle.ImuStreamConfig.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.ImuStreamConfig.newBuilder((mentraos.ble.MentraosBle.ImuStreamConfig) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 57) { + imuStreamBuilder_.mergeFrom(value); + } else { + imuStreamBuilder_.setMessage(value); + } + } + payloadCase_ = 57; + return this; + } + /** + * .mentraos.ble.ImuStreamConfig imu_stream = 57; + */ + public Builder clearImuStream() { + if (imuStreamBuilder_ == null) { + if (payloadCase_ == 57) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 57) { + payloadCase_ = 0; + payload_ = null; + } + imuStreamBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.ImuStreamConfig imu_stream = 57; + */ + public mentraos.ble.MentraosBle.ImuStreamConfig.Builder getImuStreamBuilder() { + return internalGetImuStreamFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.ImuStreamConfig imu_stream = 57; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImuStreamConfigOrBuilder getImuStreamOrBuilder() { + if ((payloadCase_ == 57) && (imuStreamBuilder_ != null)) { + return imuStreamBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 57) { + return (mentraos.ble.MentraosBle.ImuStreamConfig) payload_; + } + return mentraos.ble.MentraosBle.ImuStreamConfig.getDefaultInstance(); + } + } + /** + * .mentraos.ble.ImuStreamConfig imu_stream = 57; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ImuStreamConfig, mentraos.ble.MentraosBle.ImuStreamConfig.Builder, mentraos.ble.MentraosBle.ImuStreamConfigOrBuilder> + internalGetImuStreamFieldBuilder() { + if (imuStreamBuilder_ == null) { + if (!(payloadCase_ == 57)) { + payload_ = mentraos.ble.MentraosBle.ImuStreamConfig.getDefaultInstance(); + } + imuStreamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ImuStreamConfig, mentraos.ble.MentraosBle.ImuStreamConfig.Builder, mentraos.ble.MentraosBle.ImuStreamConfigOrBuilder>( + (mentraos.ble.MentraosBle.ImuStreamConfig) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 57; + onChanged(); + return imuStreamBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.HeadGestureConfig, mentraos.ble.MentraosBle.HeadGestureConfig.Builder, mentraos.ble.MentraosBle.HeadGestureConfigOrBuilder> headGestureBuilder_; + /** + * .mentraos.ble.HeadGestureConfig head_gesture = 58; + * @return Whether the headGesture field is set. + */ + @java.lang.Override + public boolean hasHeadGesture() { + return payloadCase_ == 58; + } + /** + * .mentraos.ble.HeadGestureConfig head_gesture = 58; + * @return The headGesture. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadGestureConfig getHeadGesture() { + if (headGestureBuilder_ == null) { + if (payloadCase_ == 58) { + return (mentraos.ble.MentraosBle.HeadGestureConfig) payload_; + } + return mentraos.ble.MentraosBle.HeadGestureConfig.getDefaultInstance(); + } else { + if (payloadCase_ == 58) { + return headGestureBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.HeadGestureConfig.getDefaultInstance(); + } + } + /** + * .mentraos.ble.HeadGestureConfig head_gesture = 58; + */ + public Builder setHeadGesture(mentraos.ble.MentraosBle.HeadGestureConfig value) { + if (headGestureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + headGestureBuilder_.setMessage(value); + } + payloadCase_ = 58; + return this; + } + /** + * .mentraos.ble.HeadGestureConfig head_gesture = 58; + */ + public Builder setHeadGesture( + mentraos.ble.MentraosBle.HeadGestureConfig.Builder builderForValue) { + if (headGestureBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + headGestureBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 58; + return this; + } + /** + * .mentraos.ble.HeadGestureConfig head_gesture = 58; + */ + public Builder mergeHeadGesture(mentraos.ble.MentraosBle.HeadGestureConfig value) { + if (headGestureBuilder_ == null) { + if (payloadCase_ == 58 && + payload_ != mentraos.ble.MentraosBle.HeadGestureConfig.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.HeadGestureConfig.newBuilder((mentraos.ble.MentraosBle.HeadGestureConfig) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 58) { + headGestureBuilder_.mergeFrom(value); + } else { + headGestureBuilder_.setMessage(value); + } + } + payloadCase_ = 58; + return this; + } + /** + * .mentraos.ble.HeadGestureConfig head_gesture = 58; + */ + public Builder clearHeadGesture() { + if (headGestureBuilder_ == null) { + if (payloadCase_ == 58) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 58) { + payloadCase_ = 0; + payload_ = null; + } + headGestureBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.HeadGestureConfig head_gesture = 58; + */ + public mentraos.ble.MentraosBle.HeadGestureConfig.Builder getHeadGestureBuilder() { + return internalGetHeadGestureFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.HeadGestureConfig head_gesture = 58; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadGestureConfigOrBuilder getHeadGestureOrBuilder() { + if ((payloadCase_ == 58) && (headGestureBuilder_ != null)) { + return headGestureBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 58) { + return (mentraos.ble.MentraosBle.HeadGestureConfig) payload_; + } + return mentraos.ble.MentraosBle.HeadGestureConfig.getDefaultInstance(); + } + } + /** + * .mentraos.ble.HeadGestureConfig head_gesture = 58; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.HeadGestureConfig, mentraos.ble.MentraosBle.HeadGestureConfig.Builder, mentraos.ble.MentraosBle.HeadGestureConfigOrBuilder> + internalGetHeadGestureFieldBuilder() { + if (headGestureBuilder_ == null) { + if (!(payloadCase_ == 58)) { + payload_ = mentraos.ble.MentraosBle.HeadGestureConfig.getDefaultInstance(); + } + headGestureBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.HeadGestureConfig, mentraos.ble.MentraosBle.HeadGestureConfig.Builder, mentraos.ble.MentraosBle.HeadGestureConfigOrBuilder>( + (mentraos.ble.MentraosBle.HeadGestureConfig) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 58; + onChanged(); + return headGestureBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.RestartRequest, mentraos.ble.MentraosBle.RestartRequest.Builder, mentraos.ble.MentraosBle.RestartRequestOrBuilder> restartBuilder_; + /** + *
+       * System Control
+       * 
+ * + * .mentraos.ble.RestartRequest restart = 60; + * @return Whether the restart field is set. + */ + @java.lang.Override + public boolean hasRestart() { + return payloadCase_ == 60; + } + /** + *
+       * System Control
+       * 
+ * + * .mentraos.ble.RestartRequest restart = 60; + * @return The restart. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.RestartRequest getRestart() { + if (restartBuilder_ == null) { + if (payloadCase_ == 60) { + return (mentraos.ble.MentraosBle.RestartRequest) payload_; + } + return mentraos.ble.MentraosBle.RestartRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 60) { + return restartBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.RestartRequest.getDefaultInstance(); + } + } + /** + *
+       * System Control
+       * 
+ * + * .mentraos.ble.RestartRequest restart = 60; + */ + public Builder setRestart(mentraos.ble.MentraosBle.RestartRequest value) { + if (restartBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + restartBuilder_.setMessage(value); + } + payloadCase_ = 60; + return this; + } + /** + *
+       * System Control
+       * 
+ * + * .mentraos.ble.RestartRequest restart = 60; + */ + public Builder setRestart( + mentraos.ble.MentraosBle.RestartRequest.Builder builderForValue) { + if (restartBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + restartBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 60; + return this; + } + /** + *
+       * System Control
+       * 
+ * + * .mentraos.ble.RestartRequest restart = 60; + */ + public Builder mergeRestart(mentraos.ble.MentraosBle.RestartRequest value) { + if (restartBuilder_ == null) { + if (payloadCase_ == 60 && + payload_ != mentraos.ble.MentraosBle.RestartRequest.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.RestartRequest.newBuilder((mentraos.ble.MentraosBle.RestartRequest) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 60) { + restartBuilder_.mergeFrom(value); + } else { + restartBuilder_.setMessage(value); + } + } + payloadCase_ = 60; + return this; + } + /** + *
+       * System Control
+       * 
+ * + * .mentraos.ble.RestartRequest restart = 60; + */ + public Builder clearRestart() { + if (restartBuilder_ == null) { + if (payloadCase_ == 60) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 60) { + payloadCase_ = 0; + payload_ = null; + } + restartBuilder_.clear(); + } + return this; + } + /** + *
+       * System Control
+       * 
+ * + * .mentraos.ble.RestartRequest restart = 60; + */ + public mentraos.ble.MentraosBle.RestartRequest.Builder getRestartBuilder() { + return internalGetRestartFieldBuilder().getBuilder(); + } + /** + *
+       * System Control
+       * 
+ * + * .mentraos.ble.RestartRequest restart = 60; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.RestartRequestOrBuilder getRestartOrBuilder() { + if ((payloadCase_ == 60) && (restartBuilder_ != null)) { + return restartBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 60) { + return (mentraos.ble.MentraosBle.RestartRequest) payload_; + } + return mentraos.ble.MentraosBle.RestartRequest.getDefaultInstance(); + } + } + /** + *
+       * System Control
+       * 
+ * + * .mentraos.ble.RestartRequest restart = 60; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.RestartRequest, mentraos.ble.MentraosBle.RestartRequest.Builder, mentraos.ble.MentraosBle.RestartRequestOrBuilder> + internalGetRestartFieldBuilder() { + if (restartBuilder_ == null) { + if (!(payloadCase_ == 60)) { + payload_ = mentraos.ble.MentraosBle.RestartRequest.getDefaultInstance(); + } + restartBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.RestartRequest, mentraos.ble.MentraosBle.RestartRequest.Builder, mentraos.ble.MentraosBle.RestartRequestOrBuilder>( + (mentraos.ble.MentraosBle.RestartRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 60; + onChanged(); + return restartBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.FactoryResetRequest, mentraos.ble.MentraosBle.FactoryResetRequest.Builder, mentraos.ble.MentraosBle.FactoryResetRequestOrBuilder> factoryResetBuilder_; + /** + * .mentraos.ble.FactoryResetRequest factory_reset = 61; + * @return Whether the factoryReset field is set. + */ + @java.lang.Override + public boolean hasFactoryReset() { + return payloadCase_ == 61; + } + /** + * .mentraos.ble.FactoryResetRequest factory_reset = 61; + * @return The factoryReset. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.FactoryResetRequest getFactoryReset() { + if (factoryResetBuilder_ == null) { + if (payloadCase_ == 61) { + return (mentraos.ble.MentraosBle.FactoryResetRequest) payload_; + } + return mentraos.ble.MentraosBle.FactoryResetRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 61) { + return factoryResetBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.FactoryResetRequest.getDefaultInstance(); + } + } + /** + * .mentraos.ble.FactoryResetRequest factory_reset = 61; + */ + public Builder setFactoryReset(mentraos.ble.MentraosBle.FactoryResetRequest value) { + if (factoryResetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + factoryResetBuilder_.setMessage(value); + } + payloadCase_ = 61; + return this; + } + /** + * .mentraos.ble.FactoryResetRequest factory_reset = 61; + */ + public Builder setFactoryReset( + mentraos.ble.MentraosBle.FactoryResetRequest.Builder builderForValue) { + if (factoryResetBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + factoryResetBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 61; + return this; + } + /** + * .mentraos.ble.FactoryResetRequest factory_reset = 61; + */ + public Builder mergeFactoryReset(mentraos.ble.MentraosBle.FactoryResetRequest value) { + if (factoryResetBuilder_ == null) { + if (payloadCase_ == 61 && + payload_ != mentraos.ble.MentraosBle.FactoryResetRequest.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.FactoryResetRequest.newBuilder((mentraos.ble.MentraosBle.FactoryResetRequest) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 61) { + factoryResetBuilder_.mergeFrom(value); + } else { + factoryResetBuilder_.setMessage(value); + } + } + payloadCase_ = 61; + return this; + } + /** + * .mentraos.ble.FactoryResetRequest factory_reset = 61; + */ + public Builder clearFactoryReset() { + if (factoryResetBuilder_ == null) { + if (payloadCase_ == 61) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 61) { + payloadCase_ = 0; + payload_ = null; + } + factoryResetBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.FactoryResetRequest factory_reset = 61; + */ + public mentraos.ble.MentraosBle.FactoryResetRequest.Builder getFactoryResetBuilder() { + return internalGetFactoryResetFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.FactoryResetRequest factory_reset = 61; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.FactoryResetRequestOrBuilder getFactoryResetOrBuilder() { + if ((payloadCase_ == 61) && (factoryResetBuilder_ != null)) { + return factoryResetBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 61) { + return (mentraos.ble.MentraosBle.FactoryResetRequest) payload_; + } + return mentraos.ble.MentraosBle.FactoryResetRequest.getDefaultInstance(); + } + } + /** + * .mentraos.ble.FactoryResetRequest factory_reset = 61; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.FactoryResetRequest, mentraos.ble.MentraosBle.FactoryResetRequest.Builder, mentraos.ble.MentraosBle.FactoryResetRequestOrBuilder> + internalGetFactoryResetFieldBuilder() { + if (factoryResetBuilder_ == null) { + if (!(payloadCase_ == 61)) { + payload_ = mentraos.ble.MentraosBle.FactoryResetRequest.getDefaultInstance(); + } + factoryResetBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.FactoryResetRequest, mentraos.ble.MentraosBle.FactoryResetRequest.Builder, mentraos.ble.MentraosBle.FactoryResetRequestOrBuilder>( + (mentraos.ble.MentraosBle.FactoryResetRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 61; + onChanged(); + return factoryResetBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VersionRequest, mentraos.ble.MentraosBle.VersionRequest.Builder, mentraos.ble.MentraosBle.VersionRequestOrBuilder> versionRequestBuilder_; + /** + *
+       * Runtime protocol version query
+       * 
+ * + * .mentraos.ble.VersionRequest version_request = 70; + * @return Whether the versionRequest field is set. + */ + @java.lang.Override + public boolean hasVersionRequest() { + return payloadCase_ == 70; + } + /** + *
+       * Runtime protocol version query
+       * 
+ * + * .mentraos.ble.VersionRequest version_request = 70; + * @return The versionRequest. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VersionRequest getVersionRequest() { + if (versionRequestBuilder_ == null) { + if (payloadCase_ == 70) { + return (mentraos.ble.MentraosBle.VersionRequest) payload_; + } + return mentraos.ble.MentraosBle.VersionRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 70) { + return versionRequestBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.VersionRequest.getDefaultInstance(); + } + } + /** + *
+       * Runtime protocol version query
+       * 
+ * + * .mentraos.ble.VersionRequest version_request = 70; + */ + public Builder setVersionRequest(mentraos.ble.MentraosBle.VersionRequest value) { + if (versionRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + versionRequestBuilder_.setMessage(value); + } + payloadCase_ = 70; + return this; + } + /** + *
+       * Runtime protocol version query
+       * 
+ * + * .mentraos.ble.VersionRequest version_request = 70; + */ + public Builder setVersionRequest( + mentraos.ble.MentraosBle.VersionRequest.Builder builderForValue) { + if (versionRequestBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + versionRequestBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 70; + return this; + } + /** + *
+       * Runtime protocol version query
+       * 
+ * + * .mentraos.ble.VersionRequest version_request = 70; + */ + public Builder mergeVersionRequest(mentraos.ble.MentraosBle.VersionRequest value) { + if (versionRequestBuilder_ == null) { + if (payloadCase_ == 70 && + payload_ != mentraos.ble.MentraosBle.VersionRequest.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.VersionRequest.newBuilder((mentraos.ble.MentraosBle.VersionRequest) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 70) { + versionRequestBuilder_.mergeFrom(value); + } else { + versionRequestBuilder_.setMessage(value); + } + } + payloadCase_ = 70; + return this; + } + /** + *
+       * Runtime protocol version query
+       * 
+ * + * .mentraos.ble.VersionRequest version_request = 70; + */ + public Builder clearVersionRequest() { + if (versionRequestBuilder_ == null) { + if (payloadCase_ == 70) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 70) { + payloadCase_ = 0; + payload_ = null; + } + versionRequestBuilder_.clear(); + } + return this; + } + /** + *
+       * Runtime protocol version query
+       * 
+ * + * .mentraos.ble.VersionRequest version_request = 70; + */ + public mentraos.ble.MentraosBle.VersionRequest.Builder getVersionRequestBuilder() { + return internalGetVersionRequestFieldBuilder().getBuilder(); + } + /** + *
+       * Runtime protocol version query
+       * 
+ * + * .mentraos.ble.VersionRequest version_request = 70; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VersionRequestOrBuilder getVersionRequestOrBuilder() { + if ((payloadCase_ == 70) && (versionRequestBuilder_ != null)) { + return versionRequestBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 70) { + return (mentraos.ble.MentraosBle.VersionRequest) payload_; + } + return mentraos.ble.MentraosBle.VersionRequest.getDefaultInstance(); + } + } + /** + *
+       * Runtime protocol version query
+       * 
+ * + * .mentraos.ble.VersionRequest version_request = 70; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VersionRequest, mentraos.ble.MentraosBle.VersionRequest.Builder, mentraos.ble.MentraosBle.VersionRequestOrBuilder> + internalGetVersionRequestFieldBuilder() { + if (versionRequestBuilder_ == null) { + if (!(payloadCase_ == 70)) { + payload_ = mentraos.ble.MentraosBle.VersionRequest.getDefaultInstance(); + } + versionRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VersionRequest, mentraos.ble.MentraosBle.VersionRequest.Builder, mentraos.ble.MentraosBle.VersionRequestOrBuilder>( + (mentraos.ble.MentraosBle.VersionRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 70; + onChanged(); + return versionRequestBuilder_; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.PhoneToGlasses) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.PhoneToGlasses) + private static final mentraos.ble.MentraosBle.PhoneToGlasses DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.PhoneToGlasses(); + } + + public static mentraos.ble.MentraosBle.PhoneToGlasses getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PhoneToGlasses parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.PhoneToGlasses getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GlassesToPhoneOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.GlassesToPhone) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Connection Management
+     * 
+ * + * .mentraos.ble.BatteryStatus battery_status = 10; + * @return Whether the batteryStatus field is set. + */ + boolean hasBatteryStatus(); + /** + *
+     * Connection Management
+     * 
+ * + * .mentraos.ble.BatteryStatus battery_status = 10; + * @return The batteryStatus. + */ + mentraos.ble.MentraosBle.BatteryStatus getBatteryStatus(); + /** + *
+     * Connection Management
+     * 
+ * + * .mentraos.ble.BatteryStatus battery_status = 10; + */ + mentraos.ble.MentraosBle.BatteryStatusOrBuilder getBatteryStatusOrBuilder(); + + /** + * .mentraos.ble.ChargingState charging_state = 11; + * @return Whether the chargingState field is set. + */ + boolean hasChargingState(); + /** + * .mentraos.ble.ChargingState charging_state = 11; + * @return The chargingState. + */ + mentraos.ble.MentraosBle.ChargingState getChargingState(); + /** + * .mentraos.ble.ChargingState charging_state = 11; + */ + mentraos.ble.MentraosBle.ChargingStateOrBuilder getChargingStateOrBuilder(); + + /** + * .mentraos.ble.DeviceInfo device_info = 12; + * @return Whether the deviceInfo field is set. + */ + boolean hasDeviceInfo(); + /** + * .mentraos.ble.DeviceInfo device_info = 12; + * @return The deviceInfo. + */ + mentraos.ble.MentraosBle.DeviceInfo getDeviceInfo(); + /** + * .mentraos.ble.DeviceInfo device_info = 12; + */ + mentraos.ble.MentraosBle.DeviceInfoOrBuilder getDeviceInfoOrBuilder(); + + /** + * .mentraos.ble.HeadPosition head_position = 13; + * @return Whether the headPosition field is set. + */ + boolean hasHeadPosition(); + /** + * .mentraos.ble.HeadPosition head_position = 13; + * @return The headPosition. + */ + mentraos.ble.MentraosBle.HeadPosition getHeadPosition(); + /** + * .mentraos.ble.HeadPosition head_position = 13; + */ + mentraos.ble.MentraosBle.HeadPositionOrBuilder getHeadPositionOrBuilder(); + + /** + * .mentraos.ble.HeadUpAngleResponse head_up_angle_set = 14; + * @return Whether the headUpAngleSet field is set. + */ + boolean hasHeadUpAngleSet(); + /** + * .mentraos.ble.HeadUpAngleResponse head_up_angle_set = 14; + * @return The headUpAngleSet. + */ + mentraos.ble.MentraosBle.HeadUpAngleResponse getHeadUpAngleSet(); + /** + * .mentraos.ble.HeadUpAngleResponse head_up_angle_set = 14; + */ + mentraos.ble.MentraosBle.HeadUpAngleResponseOrBuilder getHeadUpAngleSetOrBuilder(); + + /** + * .mentraos.ble.PingRequest ping = 15; + * @return Whether the ping field is set. + */ + boolean hasPing(); + /** + * .mentraos.ble.PingRequest ping = 15; + * @return The ping. + */ + mentraos.ble.MentraosBle.PingRequest getPing(); + /** + * .mentraos.ble.PingRequest ping = 15; + */ + mentraos.ble.MentraosBle.PingRequestOrBuilder getPingOrBuilder(); + + /** + *
+     * Audio System
+     * 
+ * + * .mentraos.ble.VadEvent vad_event = 20; + * @return Whether the vadEvent field is set. + */ + boolean hasVadEvent(); + /** + *
+     * Audio System
+     * 
+ * + * .mentraos.ble.VadEvent vad_event = 20; + * @return The vadEvent. + */ + mentraos.ble.MentraosBle.VadEvent getVadEvent(); + /** + *
+     * Audio System
+     * 
+ * + * .mentraos.ble.VadEvent vad_event = 20; + */ + mentraos.ble.MentraosBle.VadEventOrBuilder getVadEventOrBuilder(); + + /** + *
+     * response to set_vad_enabled
+     * 
+ * + * .mentraos.ble.VadEnabledResponse vad_enabled_set = 21; + * @return Whether the vadEnabledSet field is set. + */ + boolean hasVadEnabledSet(); + /** + *
+     * response to set_vad_enabled
+     * 
+ * + * .mentraos.ble.VadEnabledResponse vad_enabled_set = 21; + * @return The vadEnabledSet. + */ + mentraos.ble.MentraosBle.VadEnabledResponse getVadEnabledSet(); + /** + *
+     * response to set_vad_enabled
+     * 
+ * + * .mentraos.ble.VadEnabledResponse vad_enabled_set = 21; + */ + mentraos.ble.MentraosBle.VadEnabledResponseOrBuilder getVadEnabledSetOrBuilder(); + + /** + *
+     * response to set_vad_config
+     * 
+ * + * .mentraos.ble.VadConfigResponse vad_configured = 22; + * @return Whether the vadConfigured field is set. + */ + boolean hasVadConfigured(); + /** + *
+     * response to set_vad_config
+     * 
+ * + * .mentraos.ble.VadConfigResponse vad_configured = 22; + * @return The vadConfigured. + */ + mentraos.ble.MentraosBle.VadConfigResponse getVadConfigured(); + /** + *
+     * response to set_vad_config
+     * 
+ * + * .mentraos.ble.VadConfigResponse vad_configured = 22; + */ + mentraos.ble.MentraosBle.VadConfigResponseOrBuilder getVadConfiguredOrBuilder(); + + /** + *
+     * response to request_vad_status
+     * 
+ * + * .mentraos.ble.VadStatus vad_status = 23; + * @return Whether the vadStatus field is set. + */ + boolean hasVadStatus(); + /** + *
+     * response to request_vad_status
+     * 
+ * + * .mentraos.ble.VadStatus vad_status = 23; + * @return The vadStatus. + */ + mentraos.ble.MentraosBle.VadStatus getVadStatus(); + /** + *
+     * response to request_vad_status
+     * 
+ * + * .mentraos.ble.VadStatus vad_status = 23; + */ + mentraos.ble.MentraosBle.VadStatusOrBuilder getVadStatusOrBuilder(); + + /** + *
+     * Display System
+     * 
+ * + * .mentraos.ble.ImageTransferComplete image_transfer_complete = 30; + * @return Whether the imageTransferComplete field is set. + */ + boolean hasImageTransferComplete(); + /** + *
+     * Display System
+     * 
+ * + * .mentraos.ble.ImageTransferComplete image_transfer_complete = 30; + * @return The imageTransferComplete. + */ + mentraos.ble.MentraosBle.ImageTransferComplete getImageTransferComplete(); + /** + *
+     * Display System
+     * 
+ * + * .mentraos.ble.ImageTransferComplete image_transfer_complete = 30; + */ + mentraos.ble.MentraosBle.ImageTransferCompleteOrBuilder getImageTransferCompleteOrBuilder(); + + /** + * .mentraos.ble.DisplayQueueInfo display_queue_info = 31; + * @return Whether the displayQueueInfo field is set. + */ + boolean hasDisplayQueueInfo(); + /** + * .mentraos.ble.DisplayQueueInfo display_queue_info = 31; + * @return The displayQueueInfo. + */ + mentraos.ble.MentraosBle.DisplayQueueInfo getDisplayQueueInfo(); + /** + * .mentraos.ble.DisplayQueueInfo display_queue_info = 31; + */ + mentraos.ble.MentraosBle.DisplayQueueInfoOrBuilder getDisplayQueueInfoOrBuilder(); + + /** + *
+     * User Input
+     * 
+ * + * .mentraos.ble.ImuData imu_data = 40; + * @return Whether the imuData field is set. + */ + boolean hasImuData(); + /** + *
+     * User Input
+     * 
+ * + * .mentraos.ble.ImuData imu_data = 40; + * @return The imuData. + */ + mentraos.ble.MentraosBle.ImuData getImuData(); + /** + *
+     * User Input
+     * 
+ * + * .mentraos.ble.ImuData imu_data = 40; + */ + mentraos.ble.MentraosBle.ImuDataOrBuilder getImuDataOrBuilder(); + + /** + * .mentraos.ble.ButtonEvent button_event = 41; + * @return Whether the buttonEvent field is set. + */ + boolean hasButtonEvent(); + /** + * .mentraos.ble.ButtonEvent button_event = 41; + * @return The buttonEvent. + */ + mentraos.ble.MentraosBle.ButtonEvent getButtonEvent(); + /** + * .mentraos.ble.ButtonEvent button_event = 41; + */ + mentraos.ble.MentraosBle.ButtonEventOrBuilder getButtonEventOrBuilder(); + + /** + * .mentraos.ble.HeadGesture head_gesture = 42; + * @return Whether the headGesture field is set. + */ + boolean hasHeadGesture(); + /** + * .mentraos.ble.HeadGesture head_gesture = 42; + * @return The headGesture. + */ + mentraos.ble.MentraosBle.HeadGesture getHeadGesture(); + /** + * .mentraos.ble.HeadGesture head_gesture = 42; + */ + mentraos.ble.MentraosBle.HeadGestureOrBuilder getHeadGestureOrBuilder(); + + /** + *
+     * Dashboard System
+     * 
+ * + * .mentraos.ble.DashboardShown dashboard_shown = 43; + * @return Whether the dashboardShown field is set. + */ + boolean hasDashboardShown(); + /** + *
+     * Dashboard System
+     * 
+ * + * .mentraos.ble.DashboardShown dashboard_shown = 43; + * @return The dashboardShown. + */ + mentraos.ble.MentraosBle.DashboardShown getDashboardShown(); + /** + *
+     * Dashboard System
+     * 
+ * + * .mentraos.ble.DashboardShown dashboard_shown = 43; + */ + mentraos.ble.MentraosBle.DashboardShownOrBuilder getDashboardShownOrBuilder(); + + /** + *
+     * Runtime protocol version response
+     * 
+ * + * .mentraos.ble.VersionResponse version_response = 70; + * @return Whether the versionResponse field is set. + */ + boolean hasVersionResponse(); + /** + *
+     * Runtime protocol version response
+     * 
+ * + * .mentraos.ble.VersionResponse version_response = 70; + * @return The versionResponse. + */ + mentraos.ble.MentraosBle.VersionResponse getVersionResponse(); + /** + *
+     * Runtime protocol version response
+     * 
+ * + * .mentraos.ble.VersionResponse version_response = 70; + */ + mentraos.ble.MentraosBle.VersionResponseOrBuilder getVersionResponseOrBuilder(); + + mentraos.ble.MentraosBle.GlassesToPhone.PayloadCase getPayloadCase(); + } + /** + *
+   * All messages from glasses to phone
+   * 
+ * + * Protobuf type {@code mentraos.ble.GlassesToPhone} + */ + public static final class GlassesToPhone extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.GlassesToPhone) + GlassesToPhoneOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + GlassesToPhone.class.getName()); + } + // Use GlassesToPhone.newBuilder() to construct. + private GlassesToPhone(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private GlassesToPhone() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_GlassesToPhone_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_GlassesToPhone_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.GlassesToPhone.class, mentraos.ble.MentraosBle.GlassesToPhone.Builder.class); + } + + private int payloadCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object payload_; + public enum PayloadCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BATTERY_STATUS(10), + CHARGING_STATE(11), + DEVICE_INFO(12), + HEAD_POSITION(13), + HEAD_UP_ANGLE_SET(14), + PING(15), + VAD_EVENT(20), + VAD_ENABLED_SET(21), + VAD_CONFIGURED(22), + VAD_STATUS(23), + IMAGE_TRANSFER_COMPLETE(30), + DISPLAY_QUEUE_INFO(31), + IMU_DATA(40), + BUTTON_EVENT(41), + HEAD_GESTURE(42), + DASHBOARD_SHOWN(43), + VERSION_RESPONSE(70), + PAYLOAD_NOT_SET(0); + private final int value; + private PayloadCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PayloadCase valueOf(int value) { + return forNumber(value); + } + + public static PayloadCase forNumber(int value) { + switch (value) { + case 10: return BATTERY_STATUS; + case 11: return CHARGING_STATE; + case 12: return DEVICE_INFO; + case 13: return HEAD_POSITION; + case 14: return HEAD_UP_ANGLE_SET; + case 15: return PING; + case 20: return VAD_EVENT; + case 21: return VAD_ENABLED_SET; + case 22: return VAD_CONFIGURED; + case 23: return VAD_STATUS; + case 30: return IMAGE_TRANSFER_COMPLETE; + case 31: return DISPLAY_QUEUE_INFO; + case 40: return IMU_DATA; + case 41: return BUTTON_EVENT; + case 42: return HEAD_GESTURE; + case 43: return DASHBOARD_SHOWN; + case 70: return VERSION_RESPONSE; + case 0: return PAYLOAD_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public PayloadCase + getPayloadCase() { + return PayloadCase.forNumber( + payloadCase_); + } + + public static final int BATTERY_STATUS_FIELD_NUMBER = 10; + /** + *
+     * Connection Management
+     * 
+ * + * .mentraos.ble.BatteryStatus battery_status = 10; + * @return Whether the batteryStatus field is set. + */ + @java.lang.Override + public boolean hasBatteryStatus() { + return payloadCase_ == 10; + } + /** + *
+     * Connection Management
+     * 
+ * + * .mentraos.ble.BatteryStatus battery_status = 10; + * @return The batteryStatus. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.BatteryStatus getBatteryStatus() { + if (payloadCase_ == 10) { + return (mentraos.ble.MentraosBle.BatteryStatus) payload_; + } + return mentraos.ble.MentraosBle.BatteryStatus.getDefaultInstance(); + } + /** + *
+     * Connection Management
+     * 
+ * + * .mentraos.ble.BatteryStatus battery_status = 10; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.BatteryStatusOrBuilder getBatteryStatusOrBuilder() { + if (payloadCase_ == 10) { + return (mentraos.ble.MentraosBle.BatteryStatus) payload_; + } + return mentraos.ble.MentraosBle.BatteryStatus.getDefaultInstance(); + } + + public static final int CHARGING_STATE_FIELD_NUMBER = 11; + /** + * .mentraos.ble.ChargingState charging_state = 11; + * @return Whether the chargingState field is set. + */ + @java.lang.Override + public boolean hasChargingState() { + return payloadCase_ == 11; + } + /** + * .mentraos.ble.ChargingState charging_state = 11; + * @return The chargingState. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ChargingState getChargingState() { + if (payloadCase_ == 11) { + return (mentraos.ble.MentraosBle.ChargingState) payload_; + } + return mentraos.ble.MentraosBle.ChargingState.getDefaultInstance(); + } + /** + * .mentraos.ble.ChargingState charging_state = 11; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ChargingStateOrBuilder getChargingStateOrBuilder() { + if (payloadCase_ == 11) { + return (mentraos.ble.MentraosBle.ChargingState) payload_; + } + return mentraos.ble.MentraosBle.ChargingState.getDefaultInstance(); + } + + public static final int DEVICE_INFO_FIELD_NUMBER = 12; + /** + * .mentraos.ble.DeviceInfo device_info = 12; + * @return Whether the deviceInfo field is set. + */ + @java.lang.Override + public boolean hasDeviceInfo() { + return payloadCase_ == 12; + } + /** + * .mentraos.ble.DeviceInfo device_info = 12; + * @return The deviceInfo. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DeviceInfo getDeviceInfo() { + if (payloadCase_ == 12) { + return (mentraos.ble.MentraosBle.DeviceInfo) payload_; + } + return mentraos.ble.MentraosBle.DeviceInfo.getDefaultInstance(); + } + /** + * .mentraos.ble.DeviceInfo device_info = 12; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DeviceInfoOrBuilder getDeviceInfoOrBuilder() { + if (payloadCase_ == 12) { + return (mentraos.ble.MentraosBle.DeviceInfo) payload_; + } + return mentraos.ble.MentraosBle.DeviceInfo.getDefaultInstance(); + } + + public static final int HEAD_POSITION_FIELD_NUMBER = 13; + /** + * .mentraos.ble.HeadPosition head_position = 13; + * @return Whether the headPosition field is set. + */ + @java.lang.Override + public boolean hasHeadPosition() { + return payloadCase_ == 13; + } + /** + * .mentraos.ble.HeadPosition head_position = 13; + * @return The headPosition. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadPosition getHeadPosition() { + if (payloadCase_ == 13) { + return (mentraos.ble.MentraosBle.HeadPosition) payload_; + } + return mentraos.ble.MentraosBle.HeadPosition.getDefaultInstance(); + } + /** + * .mentraos.ble.HeadPosition head_position = 13; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadPositionOrBuilder getHeadPositionOrBuilder() { + if (payloadCase_ == 13) { + return (mentraos.ble.MentraosBle.HeadPosition) payload_; + } + return mentraos.ble.MentraosBle.HeadPosition.getDefaultInstance(); + } + + public static final int HEAD_UP_ANGLE_SET_FIELD_NUMBER = 14; + /** + * .mentraos.ble.HeadUpAngleResponse head_up_angle_set = 14; + * @return Whether the headUpAngleSet field is set. + */ + @java.lang.Override + public boolean hasHeadUpAngleSet() { + return payloadCase_ == 14; + } + /** + * .mentraos.ble.HeadUpAngleResponse head_up_angle_set = 14; + * @return The headUpAngleSet. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadUpAngleResponse getHeadUpAngleSet() { + if (payloadCase_ == 14) { + return (mentraos.ble.MentraosBle.HeadUpAngleResponse) payload_; + } + return mentraos.ble.MentraosBle.HeadUpAngleResponse.getDefaultInstance(); + } + /** + * .mentraos.ble.HeadUpAngleResponse head_up_angle_set = 14; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadUpAngleResponseOrBuilder getHeadUpAngleSetOrBuilder() { + if (payloadCase_ == 14) { + return (mentraos.ble.MentraosBle.HeadUpAngleResponse) payload_; + } + return mentraos.ble.MentraosBle.HeadUpAngleResponse.getDefaultInstance(); + } + + public static final int PING_FIELD_NUMBER = 15; + /** + * .mentraos.ble.PingRequest ping = 15; + * @return Whether the ping field is set. + */ + @java.lang.Override + public boolean hasPing() { + return payloadCase_ == 15; + } + /** + * .mentraos.ble.PingRequest ping = 15; + * @return The ping. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.PingRequest getPing() { + if (payloadCase_ == 15) { + return (mentraos.ble.MentraosBle.PingRequest) payload_; + } + return mentraos.ble.MentraosBle.PingRequest.getDefaultInstance(); + } + /** + * .mentraos.ble.PingRequest ping = 15; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.PingRequestOrBuilder getPingOrBuilder() { + if (payloadCase_ == 15) { + return (mentraos.ble.MentraosBle.PingRequest) payload_; + } + return mentraos.ble.MentraosBle.PingRequest.getDefaultInstance(); + } + + public static final int VAD_EVENT_FIELD_NUMBER = 20; + /** + *
+     * Audio System
+     * 
+ * + * .mentraos.ble.VadEvent vad_event = 20; + * @return Whether the vadEvent field is set. + */ + @java.lang.Override + public boolean hasVadEvent() { + return payloadCase_ == 20; + } + /** + *
+     * Audio System
+     * 
+ * + * .mentraos.ble.VadEvent vad_event = 20; + * @return The vadEvent. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadEvent getVadEvent() { + if (payloadCase_ == 20) { + return (mentraos.ble.MentraosBle.VadEvent) payload_; + } + return mentraos.ble.MentraosBle.VadEvent.getDefaultInstance(); + } + /** + *
+     * Audio System
+     * 
+ * + * .mentraos.ble.VadEvent vad_event = 20; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadEventOrBuilder getVadEventOrBuilder() { + if (payloadCase_ == 20) { + return (mentraos.ble.MentraosBle.VadEvent) payload_; + } + return mentraos.ble.MentraosBle.VadEvent.getDefaultInstance(); + } + + public static final int VAD_ENABLED_SET_FIELD_NUMBER = 21; + /** + *
+     * response to set_vad_enabled
+     * 
+ * + * .mentraos.ble.VadEnabledResponse vad_enabled_set = 21; + * @return Whether the vadEnabledSet field is set. + */ + @java.lang.Override + public boolean hasVadEnabledSet() { + return payloadCase_ == 21; + } + /** + *
+     * response to set_vad_enabled
+     * 
+ * + * .mentraos.ble.VadEnabledResponse vad_enabled_set = 21; + * @return The vadEnabledSet. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadEnabledResponse getVadEnabledSet() { + if (payloadCase_ == 21) { + return (mentraos.ble.MentraosBle.VadEnabledResponse) payload_; + } + return mentraos.ble.MentraosBle.VadEnabledResponse.getDefaultInstance(); + } + /** + *
+     * response to set_vad_enabled
+     * 
+ * + * .mentraos.ble.VadEnabledResponse vad_enabled_set = 21; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadEnabledResponseOrBuilder getVadEnabledSetOrBuilder() { + if (payloadCase_ == 21) { + return (mentraos.ble.MentraosBle.VadEnabledResponse) payload_; + } + return mentraos.ble.MentraosBle.VadEnabledResponse.getDefaultInstance(); + } + + public static final int VAD_CONFIGURED_FIELD_NUMBER = 22; + /** + *
+     * response to set_vad_config
+     * 
+ * + * .mentraos.ble.VadConfigResponse vad_configured = 22; + * @return Whether the vadConfigured field is set. + */ + @java.lang.Override + public boolean hasVadConfigured() { + return payloadCase_ == 22; + } + /** + *
+     * response to set_vad_config
+     * 
+ * + * .mentraos.ble.VadConfigResponse vad_configured = 22; + * @return The vadConfigured. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadConfigResponse getVadConfigured() { + if (payloadCase_ == 22) { + return (mentraos.ble.MentraosBle.VadConfigResponse) payload_; + } + return mentraos.ble.MentraosBle.VadConfigResponse.getDefaultInstance(); + } + /** + *
+     * response to set_vad_config
+     * 
+ * + * .mentraos.ble.VadConfigResponse vad_configured = 22; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadConfigResponseOrBuilder getVadConfiguredOrBuilder() { + if (payloadCase_ == 22) { + return (mentraos.ble.MentraosBle.VadConfigResponse) payload_; + } + return mentraos.ble.MentraosBle.VadConfigResponse.getDefaultInstance(); + } + + public static final int VAD_STATUS_FIELD_NUMBER = 23; + /** + *
+     * response to request_vad_status
+     * 
+ * + * .mentraos.ble.VadStatus vad_status = 23; + * @return Whether the vadStatus field is set. + */ + @java.lang.Override + public boolean hasVadStatus() { + return payloadCase_ == 23; + } + /** + *
+     * response to request_vad_status
+     * 
+ * + * .mentraos.ble.VadStatus vad_status = 23; + * @return The vadStatus. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadStatus getVadStatus() { + if (payloadCase_ == 23) { + return (mentraos.ble.MentraosBle.VadStatus) payload_; + } + return mentraos.ble.MentraosBle.VadStatus.getDefaultInstance(); + } + /** + *
+     * response to request_vad_status
+     * 
+ * + * .mentraos.ble.VadStatus vad_status = 23; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadStatusOrBuilder getVadStatusOrBuilder() { + if (payloadCase_ == 23) { + return (mentraos.ble.MentraosBle.VadStatus) payload_; + } + return mentraos.ble.MentraosBle.VadStatus.getDefaultInstance(); + } + + public static final int IMAGE_TRANSFER_COMPLETE_FIELD_NUMBER = 30; + /** + *
+     * Display System
+     * 
+ * + * .mentraos.ble.ImageTransferComplete image_transfer_complete = 30; + * @return Whether the imageTransferComplete field is set. + */ + @java.lang.Override + public boolean hasImageTransferComplete() { + return payloadCase_ == 30; + } + /** + *
+     * Display System
+     * 
+ * + * .mentraos.ble.ImageTransferComplete image_transfer_complete = 30; + * @return The imageTransferComplete. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImageTransferComplete getImageTransferComplete() { + if (payloadCase_ == 30) { + return (mentraos.ble.MentraosBle.ImageTransferComplete) payload_; + } + return mentraos.ble.MentraosBle.ImageTransferComplete.getDefaultInstance(); + } + /** + *
+     * Display System
+     * 
+ * + * .mentraos.ble.ImageTransferComplete image_transfer_complete = 30; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImageTransferCompleteOrBuilder getImageTransferCompleteOrBuilder() { + if (payloadCase_ == 30) { + return (mentraos.ble.MentraosBle.ImageTransferComplete) payload_; + } + return mentraos.ble.MentraosBle.ImageTransferComplete.getDefaultInstance(); + } + + public static final int DISPLAY_QUEUE_INFO_FIELD_NUMBER = 31; + /** + * .mentraos.ble.DisplayQueueInfo display_queue_info = 31; + * @return Whether the displayQueueInfo field is set. + */ + @java.lang.Override + public boolean hasDisplayQueueInfo() { + return payloadCase_ == 31; + } + /** + * .mentraos.ble.DisplayQueueInfo display_queue_info = 31; + * @return The displayQueueInfo. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayQueueInfo getDisplayQueueInfo() { + if (payloadCase_ == 31) { + return (mentraos.ble.MentraosBle.DisplayQueueInfo) payload_; + } + return mentraos.ble.MentraosBle.DisplayQueueInfo.getDefaultInstance(); + } + /** + * .mentraos.ble.DisplayQueueInfo display_queue_info = 31; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayQueueInfoOrBuilder getDisplayQueueInfoOrBuilder() { + if (payloadCase_ == 31) { + return (mentraos.ble.MentraosBle.DisplayQueueInfo) payload_; + } + return mentraos.ble.MentraosBle.DisplayQueueInfo.getDefaultInstance(); + } + + public static final int IMU_DATA_FIELD_NUMBER = 40; + /** + *
+     * User Input
+     * 
+ * + * .mentraos.ble.ImuData imu_data = 40; + * @return Whether the imuData field is set. + */ + @java.lang.Override + public boolean hasImuData() { + return payloadCase_ == 40; + } + /** + *
+     * User Input
+     * 
+ * + * .mentraos.ble.ImuData imu_data = 40; + * @return The imuData. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImuData getImuData() { + if (payloadCase_ == 40) { + return (mentraos.ble.MentraosBle.ImuData) payload_; + } + return mentraos.ble.MentraosBle.ImuData.getDefaultInstance(); + } + /** + *
+     * User Input
+     * 
+ * + * .mentraos.ble.ImuData imu_data = 40; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImuDataOrBuilder getImuDataOrBuilder() { + if (payloadCase_ == 40) { + return (mentraos.ble.MentraosBle.ImuData) payload_; + } + return mentraos.ble.MentraosBle.ImuData.getDefaultInstance(); + } + + public static final int BUTTON_EVENT_FIELD_NUMBER = 41; + /** + * .mentraos.ble.ButtonEvent button_event = 41; + * @return Whether the buttonEvent field is set. + */ + @java.lang.Override + public boolean hasButtonEvent() { + return payloadCase_ == 41; + } + /** + * .mentraos.ble.ButtonEvent button_event = 41; + * @return The buttonEvent. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ButtonEvent getButtonEvent() { + if (payloadCase_ == 41) { + return (mentraos.ble.MentraosBle.ButtonEvent) payload_; + } + return mentraos.ble.MentraosBle.ButtonEvent.getDefaultInstance(); + } + /** + * .mentraos.ble.ButtonEvent button_event = 41; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ButtonEventOrBuilder getButtonEventOrBuilder() { + if (payloadCase_ == 41) { + return (mentraos.ble.MentraosBle.ButtonEvent) payload_; + } + return mentraos.ble.MentraosBle.ButtonEvent.getDefaultInstance(); + } + + public static final int HEAD_GESTURE_FIELD_NUMBER = 42; + /** + * .mentraos.ble.HeadGesture head_gesture = 42; + * @return Whether the headGesture field is set. + */ + @java.lang.Override + public boolean hasHeadGesture() { + return payloadCase_ == 42; + } + /** + * .mentraos.ble.HeadGesture head_gesture = 42; + * @return The headGesture. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadGesture getHeadGesture() { + if (payloadCase_ == 42) { + return (mentraos.ble.MentraosBle.HeadGesture) payload_; + } + return mentraos.ble.MentraosBle.HeadGesture.getDefaultInstance(); + } + /** + * .mentraos.ble.HeadGesture head_gesture = 42; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadGestureOrBuilder getHeadGestureOrBuilder() { + if (payloadCase_ == 42) { + return (mentraos.ble.MentraosBle.HeadGesture) payload_; + } + return mentraos.ble.MentraosBle.HeadGesture.getDefaultInstance(); + } + + public static final int DASHBOARD_SHOWN_FIELD_NUMBER = 43; + /** + *
+     * Dashboard System
+     * 
+ * + * .mentraos.ble.DashboardShown dashboard_shown = 43; + * @return Whether the dashboardShown field is set. + */ + @java.lang.Override + public boolean hasDashboardShown() { + return payloadCase_ == 43; + } + /** + *
+     * Dashboard System
+     * 
+ * + * .mentraos.ble.DashboardShown dashboard_shown = 43; + * @return The dashboardShown. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DashboardShown getDashboardShown() { + if (payloadCase_ == 43) { + return (mentraos.ble.MentraosBle.DashboardShown) payload_; + } + return mentraos.ble.MentraosBle.DashboardShown.getDefaultInstance(); + } + /** + *
+     * Dashboard System
+     * 
+ * + * .mentraos.ble.DashboardShown dashboard_shown = 43; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DashboardShownOrBuilder getDashboardShownOrBuilder() { + if (payloadCase_ == 43) { + return (mentraos.ble.MentraosBle.DashboardShown) payload_; + } + return mentraos.ble.MentraosBle.DashboardShown.getDefaultInstance(); + } + + public static final int VERSION_RESPONSE_FIELD_NUMBER = 70; + /** + *
+     * Runtime protocol version response
+     * 
+ * + * .mentraos.ble.VersionResponse version_response = 70; + * @return Whether the versionResponse field is set. + */ + @java.lang.Override + public boolean hasVersionResponse() { + return payloadCase_ == 70; + } + /** + *
+     * Runtime protocol version response
+     * 
+ * + * .mentraos.ble.VersionResponse version_response = 70; + * @return The versionResponse. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VersionResponse getVersionResponse() { + if (payloadCase_ == 70) { + return (mentraos.ble.MentraosBle.VersionResponse) payload_; + } + return mentraos.ble.MentraosBle.VersionResponse.getDefaultInstance(); + } + /** + *
+     * Runtime protocol version response
+     * 
+ * + * .mentraos.ble.VersionResponse version_response = 70; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VersionResponseOrBuilder getVersionResponseOrBuilder() { + if (payloadCase_ == 70) { + return (mentraos.ble.MentraosBle.VersionResponse) payload_; + } + return mentraos.ble.MentraosBle.VersionResponse.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (payloadCase_ == 10) { + output.writeMessage(10, (mentraos.ble.MentraosBle.BatteryStatus) payload_); + } + if (payloadCase_ == 11) { + output.writeMessage(11, (mentraos.ble.MentraosBle.ChargingState) payload_); + } + if (payloadCase_ == 12) { + output.writeMessage(12, (mentraos.ble.MentraosBle.DeviceInfo) payload_); + } + if (payloadCase_ == 13) { + output.writeMessage(13, (mentraos.ble.MentraosBle.HeadPosition) payload_); + } + if (payloadCase_ == 14) { + output.writeMessage(14, (mentraos.ble.MentraosBle.HeadUpAngleResponse) payload_); + } + if (payloadCase_ == 15) { + output.writeMessage(15, (mentraos.ble.MentraosBle.PingRequest) payload_); + } + if (payloadCase_ == 20) { + output.writeMessage(20, (mentraos.ble.MentraosBle.VadEvent) payload_); + } + if (payloadCase_ == 21) { + output.writeMessage(21, (mentraos.ble.MentraosBle.VadEnabledResponse) payload_); + } + if (payloadCase_ == 22) { + output.writeMessage(22, (mentraos.ble.MentraosBle.VadConfigResponse) payload_); + } + if (payloadCase_ == 23) { + output.writeMessage(23, (mentraos.ble.MentraosBle.VadStatus) payload_); + } + if (payloadCase_ == 30) { + output.writeMessage(30, (mentraos.ble.MentraosBle.ImageTransferComplete) payload_); + } + if (payloadCase_ == 31) { + output.writeMessage(31, (mentraos.ble.MentraosBle.DisplayQueueInfo) payload_); + } + if (payloadCase_ == 40) { + output.writeMessage(40, (mentraos.ble.MentraosBle.ImuData) payload_); + } + if (payloadCase_ == 41) { + output.writeMessage(41, (mentraos.ble.MentraosBle.ButtonEvent) payload_); + } + if (payloadCase_ == 42) { + output.writeMessage(42, (mentraos.ble.MentraosBle.HeadGesture) payload_); + } + if (payloadCase_ == 43) { + output.writeMessage(43, (mentraos.ble.MentraosBle.DashboardShown) payload_); + } + if (payloadCase_ == 70) { + output.writeMessage(70, (mentraos.ble.MentraosBle.VersionResponse) payload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (payloadCase_ == 10) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, (mentraos.ble.MentraosBle.BatteryStatus) payload_); + } + if (payloadCase_ == 11) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, (mentraos.ble.MentraosBle.ChargingState) payload_); + } + if (payloadCase_ == 12) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, (mentraos.ble.MentraosBle.DeviceInfo) payload_); + } + if (payloadCase_ == 13) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, (mentraos.ble.MentraosBle.HeadPosition) payload_); + } + if (payloadCase_ == 14) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, (mentraos.ble.MentraosBle.HeadUpAngleResponse) payload_); + } + if (payloadCase_ == 15) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, (mentraos.ble.MentraosBle.PingRequest) payload_); + } + if (payloadCase_ == 20) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, (mentraos.ble.MentraosBle.VadEvent) payload_); + } + if (payloadCase_ == 21) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, (mentraos.ble.MentraosBle.VadEnabledResponse) payload_); + } + if (payloadCase_ == 22) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(22, (mentraos.ble.MentraosBle.VadConfigResponse) payload_); + } + if (payloadCase_ == 23) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(23, (mentraos.ble.MentraosBle.VadStatus) payload_); + } + if (payloadCase_ == 30) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(30, (mentraos.ble.MentraosBle.ImageTransferComplete) payload_); + } + if (payloadCase_ == 31) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(31, (mentraos.ble.MentraosBle.DisplayQueueInfo) payload_); + } + if (payloadCase_ == 40) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(40, (mentraos.ble.MentraosBle.ImuData) payload_); + } + if (payloadCase_ == 41) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(41, (mentraos.ble.MentraosBle.ButtonEvent) payload_); + } + if (payloadCase_ == 42) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(42, (mentraos.ble.MentraosBle.HeadGesture) payload_); + } + if (payloadCase_ == 43) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(43, (mentraos.ble.MentraosBle.DashboardShown) payload_); + } + if (payloadCase_ == 70) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(70, (mentraos.ble.MentraosBle.VersionResponse) payload_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.GlassesToPhone)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.GlassesToPhone other = (mentraos.ble.MentraosBle.GlassesToPhone) obj; + + if (!getPayloadCase().equals(other.getPayloadCase())) return false; + switch (payloadCase_) { + case 10: + if (!getBatteryStatus() + .equals(other.getBatteryStatus())) return false; + break; + case 11: + if (!getChargingState() + .equals(other.getChargingState())) return false; + break; + case 12: + if (!getDeviceInfo() + .equals(other.getDeviceInfo())) return false; + break; + case 13: + if (!getHeadPosition() + .equals(other.getHeadPosition())) return false; + break; + case 14: + if (!getHeadUpAngleSet() + .equals(other.getHeadUpAngleSet())) return false; + break; + case 15: + if (!getPing() + .equals(other.getPing())) return false; + break; + case 20: + if (!getVadEvent() + .equals(other.getVadEvent())) return false; + break; + case 21: + if (!getVadEnabledSet() + .equals(other.getVadEnabledSet())) return false; + break; + case 22: + if (!getVadConfigured() + .equals(other.getVadConfigured())) return false; + break; + case 23: + if (!getVadStatus() + .equals(other.getVadStatus())) return false; + break; + case 30: + if (!getImageTransferComplete() + .equals(other.getImageTransferComplete())) return false; + break; + case 31: + if (!getDisplayQueueInfo() + .equals(other.getDisplayQueueInfo())) return false; + break; + case 40: + if (!getImuData() + .equals(other.getImuData())) return false; + break; + case 41: + if (!getButtonEvent() + .equals(other.getButtonEvent())) return false; + break; + case 42: + if (!getHeadGesture() + .equals(other.getHeadGesture())) return false; + break; + case 43: + if (!getDashboardShown() + .equals(other.getDashboardShown())) return false; + break; + case 70: + if (!getVersionResponse() + .equals(other.getVersionResponse())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (payloadCase_) { + case 10: + hash = (37 * hash) + BATTERY_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getBatteryStatus().hashCode(); + break; + case 11: + hash = (37 * hash) + CHARGING_STATE_FIELD_NUMBER; + hash = (53 * hash) + getChargingState().hashCode(); + break; + case 12: + hash = (37 * hash) + DEVICE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getDeviceInfo().hashCode(); + break; + case 13: + hash = (37 * hash) + HEAD_POSITION_FIELD_NUMBER; + hash = (53 * hash) + getHeadPosition().hashCode(); + break; + case 14: + hash = (37 * hash) + HEAD_UP_ANGLE_SET_FIELD_NUMBER; + hash = (53 * hash) + getHeadUpAngleSet().hashCode(); + break; + case 15: + hash = (37 * hash) + PING_FIELD_NUMBER; + hash = (53 * hash) + getPing().hashCode(); + break; + case 20: + hash = (37 * hash) + VAD_EVENT_FIELD_NUMBER; + hash = (53 * hash) + getVadEvent().hashCode(); + break; + case 21: + hash = (37 * hash) + VAD_ENABLED_SET_FIELD_NUMBER; + hash = (53 * hash) + getVadEnabledSet().hashCode(); + break; + case 22: + hash = (37 * hash) + VAD_CONFIGURED_FIELD_NUMBER; + hash = (53 * hash) + getVadConfigured().hashCode(); + break; + case 23: + hash = (37 * hash) + VAD_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getVadStatus().hashCode(); + break; + case 30: + hash = (37 * hash) + IMAGE_TRANSFER_COMPLETE_FIELD_NUMBER; + hash = (53 * hash) + getImageTransferComplete().hashCode(); + break; + case 31: + hash = (37 * hash) + DISPLAY_QUEUE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getDisplayQueueInfo().hashCode(); + break; + case 40: + hash = (37 * hash) + IMU_DATA_FIELD_NUMBER; + hash = (53 * hash) + getImuData().hashCode(); + break; + case 41: + hash = (37 * hash) + BUTTON_EVENT_FIELD_NUMBER; + hash = (53 * hash) + getButtonEvent().hashCode(); + break; + case 42: + hash = (37 * hash) + HEAD_GESTURE_FIELD_NUMBER; + hash = (53 * hash) + getHeadGesture().hashCode(); + break; + case 43: + hash = (37 * hash) + DASHBOARD_SHOWN_FIELD_NUMBER; + hash = (53 * hash) + getDashboardShown().hashCode(); + break; + case 70: + hash = (37 * hash) + VERSION_RESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getVersionResponse().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.GlassesToPhone parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.GlassesToPhone parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.GlassesToPhone parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.GlassesToPhone parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.GlassesToPhone parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.GlassesToPhone parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.GlassesToPhone parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.GlassesToPhone parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.GlassesToPhone parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.GlassesToPhone parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.GlassesToPhone parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.GlassesToPhone parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.GlassesToPhone prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * All messages from glasses to phone
+     * 
+ * + * Protobuf type {@code mentraos.ble.GlassesToPhone} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.GlassesToPhone) + mentraos.ble.MentraosBle.GlassesToPhoneOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_GlassesToPhone_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_GlassesToPhone_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.GlassesToPhone.class, mentraos.ble.MentraosBle.GlassesToPhone.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.GlassesToPhone.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (batteryStatusBuilder_ != null) { + batteryStatusBuilder_.clear(); + } + if (chargingStateBuilder_ != null) { + chargingStateBuilder_.clear(); + } + if (deviceInfoBuilder_ != null) { + deviceInfoBuilder_.clear(); + } + if (headPositionBuilder_ != null) { + headPositionBuilder_.clear(); + } + if (headUpAngleSetBuilder_ != null) { + headUpAngleSetBuilder_.clear(); + } + if (pingBuilder_ != null) { + pingBuilder_.clear(); + } + if (vadEventBuilder_ != null) { + vadEventBuilder_.clear(); + } + if (vadEnabledSetBuilder_ != null) { + vadEnabledSetBuilder_.clear(); + } + if (vadConfiguredBuilder_ != null) { + vadConfiguredBuilder_.clear(); + } + if (vadStatusBuilder_ != null) { + vadStatusBuilder_.clear(); + } + if (imageTransferCompleteBuilder_ != null) { + imageTransferCompleteBuilder_.clear(); + } + if (displayQueueInfoBuilder_ != null) { + displayQueueInfoBuilder_.clear(); + } + if (imuDataBuilder_ != null) { + imuDataBuilder_.clear(); + } + if (buttonEventBuilder_ != null) { + buttonEventBuilder_.clear(); + } + if (headGestureBuilder_ != null) { + headGestureBuilder_.clear(); + } + if (dashboardShownBuilder_ != null) { + dashboardShownBuilder_.clear(); + } + if (versionResponseBuilder_ != null) { + versionResponseBuilder_.clear(); + } + payloadCase_ = 0; + payload_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_GlassesToPhone_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.GlassesToPhone getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.GlassesToPhone.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.GlassesToPhone build() { + mentraos.ble.MentraosBle.GlassesToPhone result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.GlassesToPhone buildPartial() { + mentraos.ble.MentraosBle.GlassesToPhone result = new mentraos.ble.MentraosBle.GlassesToPhone(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.GlassesToPhone result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(mentraos.ble.MentraosBle.GlassesToPhone result) { + result.payloadCase_ = payloadCase_; + result.payload_ = this.payload_; + if (payloadCase_ == 10 && + batteryStatusBuilder_ != null) { + result.payload_ = batteryStatusBuilder_.build(); + } + if (payloadCase_ == 11 && + chargingStateBuilder_ != null) { + result.payload_ = chargingStateBuilder_.build(); + } + if (payloadCase_ == 12 && + deviceInfoBuilder_ != null) { + result.payload_ = deviceInfoBuilder_.build(); + } + if (payloadCase_ == 13 && + headPositionBuilder_ != null) { + result.payload_ = headPositionBuilder_.build(); + } + if (payloadCase_ == 14 && + headUpAngleSetBuilder_ != null) { + result.payload_ = headUpAngleSetBuilder_.build(); + } + if (payloadCase_ == 15 && + pingBuilder_ != null) { + result.payload_ = pingBuilder_.build(); + } + if (payloadCase_ == 20 && + vadEventBuilder_ != null) { + result.payload_ = vadEventBuilder_.build(); + } + if (payloadCase_ == 21 && + vadEnabledSetBuilder_ != null) { + result.payload_ = vadEnabledSetBuilder_.build(); + } + if (payloadCase_ == 22 && + vadConfiguredBuilder_ != null) { + result.payload_ = vadConfiguredBuilder_.build(); + } + if (payloadCase_ == 23 && + vadStatusBuilder_ != null) { + result.payload_ = vadStatusBuilder_.build(); + } + if (payloadCase_ == 30 && + imageTransferCompleteBuilder_ != null) { + result.payload_ = imageTransferCompleteBuilder_.build(); + } + if (payloadCase_ == 31 && + displayQueueInfoBuilder_ != null) { + result.payload_ = displayQueueInfoBuilder_.build(); + } + if (payloadCase_ == 40 && + imuDataBuilder_ != null) { + result.payload_ = imuDataBuilder_.build(); + } + if (payloadCase_ == 41 && + buttonEventBuilder_ != null) { + result.payload_ = buttonEventBuilder_.build(); + } + if (payloadCase_ == 42 && + headGestureBuilder_ != null) { + result.payload_ = headGestureBuilder_.build(); + } + if (payloadCase_ == 43 && + dashboardShownBuilder_ != null) { + result.payload_ = dashboardShownBuilder_.build(); + } + if (payloadCase_ == 70 && + versionResponseBuilder_ != null) { + result.payload_ = versionResponseBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.GlassesToPhone) { + return mergeFrom((mentraos.ble.MentraosBle.GlassesToPhone)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.GlassesToPhone other) { + if (other == mentraos.ble.MentraosBle.GlassesToPhone.getDefaultInstance()) return this; + switch (other.getPayloadCase()) { + case BATTERY_STATUS: { + mergeBatteryStatus(other.getBatteryStatus()); + break; + } + case CHARGING_STATE: { + mergeChargingState(other.getChargingState()); + break; + } + case DEVICE_INFO: { + mergeDeviceInfo(other.getDeviceInfo()); + break; + } + case HEAD_POSITION: { + mergeHeadPosition(other.getHeadPosition()); + break; + } + case HEAD_UP_ANGLE_SET: { + mergeHeadUpAngleSet(other.getHeadUpAngleSet()); + break; + } + case PING: { + mergePing(other.getPing()); + break; + } + case VAD_EVENT: { + mergeVadEvent(other.getVadEvent()); + break; + } + case VAD_ENABLED_SET: { + mergeVadEnabledSet(other.getVadEnabledSet()); + break; + } + case VAD_CONFIGURED: { + mergeVadConfigured(other.getVadConfigured()); + break; + } + case VAD_STATUS: { + mergeVadStatus(other.getVadStatus()); + break; + } + case IMAGE_TRANSFER_COMPLETE: { + mergeImageTransferComplete(other.getImageTransferComplete()); + break; + } + case DISPLAY_QUEUE_INFO: { + mergeDisplayQueueInfo(other.getDisplayQueueInfo()); + break; + } + case IMU_DATA: { + mergeImuData(other.getImuData()); + break; + } + case BUTTON_EVENT: { + mergeButtonEvent(other.getButtonEvent()); + break; + } + case HEAD_GESTURE: { + mergeHeadGesture(other.getHeadGesture()); + break; + } + case DASHBOARD_SHOWN: { + mergeDashboardShown(other.getDashboardShown()); + break; + } + case VERSION_RESPONSE: { + mergeVersionResponse(other.getVersionResponse()); + break; + } + case PAYLOAD_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 82: { + input.readMessage( + internalGetBatteryStatusFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 10; + break; + } // case 82 + case 90: { + input.readMessage( + internalGetChargingStateFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 11; + break; + } // case 90 + case 98: { + input.readMessage( + internalGetDeviceInfoFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 12; + break; + } // case 98 + case 106: { + input.readMessage( + internalGetHeadPositionFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 13; + break; + } // case 106 + case 114: { + input.readMessage( + internalGetHeadUpAngleSetFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 14; + break; + } // case 114 + case 122: { + input.readMessage( + internalGetPingFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 15; + break; + } // case 122 + case 162: { + input.readMessage( + internalGetVadEventFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 20; + break; + } // case 162 + case 170: { + input.readMessage( + internalGetVadEnabledSetFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 21; + break; + } // case 170 + case 178: { + input.readMessage( + internalGetVadConfiguredFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 22; + break; + } // case 178 + case 186: { + input.readMessage( + internalGetVadStatusFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 23; + break; + } // case 186 + case 242: { + input.readMessage( + internalGetImageTransferCompleteFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 30; + break; + } // case 242 + case 250: { + input.readMessage( + internalGetDisplayQueueInfoFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 31; + break; + } // case 250 + case 322: { + input.readMessage( + internalGetImuDataFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 40; + break; + } // case 322 + case 330: { + input.readMessage( + internalGetButtonEventFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 41; + break; + } // case 330 + case 338: { + input.readMessage( + internalGetHeadGestureFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 42; + break; + } // case 338 + case 346: { + input.readMessage( + internalGetDashboardShownFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 43; + break; + } // case 346 + case 562: { + input.readMessage( + internalGetVersionResponseFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 70; + break; + } // case 562 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int payloadCase_ = 0; + private java.lang.Object payload_; + public PayloadCase + getPayloadCase() { + return PayloadCase.forNumber( + payloadCase_); + } + + public Builder clearPayload() { + payloadCase_ = 0; + payload_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.BatteryStatus, mentraos.ble.MentraosBle.BatteryStatus.Builder, mentraos.ble.MentraosBle.BatteryStatusOrBuilder> batteryStatusBuilder_; + /** + *
+       * Connection Management
+       * 
+ * + * .mentraos.ble.BatteryStatus battery_status = 10; + * @return Whether the batteryStatus field is set. + */ + @java.lang.Override + public boolean hasBatteryStatus() { + return payloadCase_ == 10; + } + /** + *
+       * Connection Management
+       * 
+ * + * .mentraos.ble.BatteryStatus battery_status = 10; + * @return The batteryStatus. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.BatteryStatus getBatteryStatus() { + if (batteryStatusBuilder_ == null) { + if (payloadCase_ == 10) { + return (mentraos.ble.MentraosBle.BatteryStatus) payload_; + } + return mentraos.ble.MentraosBle.BatteryStatus.getDefaultInstance(); + } else { + if (payloadCase_ == 10) { + return batteryStatusBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.BatteryStatus.getDefaultInstance(); + } + } + /** + *
+       * Connection Management
+       * 
+ * + * .mentraos.ble.BatteryStatus battery_status = 10; + */ + public Builder setBatteryStatus(mentraos.ble.MentraosBle.BatteryStatus value) { + if (batteryStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + batteryStatusBuilder_.setMessage(value); + } + payloadCase_ = 10; + return this; + } + /** + *
+       * Connection Management
+       * 
+ * + * .mentraos.ble.BatteryStatus battery_status = 10; + */ + public Builder setBatteryStatus( + mentraos.ble.MentraosBle.BatteryStatus.Builder builderForValue) { + if (batteryStatusBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + batteryStatusBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 10; + return this; + } + /** + *
+       * Connection Management
+       * 
+ * + * .mentraos.ble.BatteryStatus battery_status = 10; + */ + public Builder mergeBatteryStatus(mentraos.ble.MentraosBle.BatteryStatus value) { + if (batteryStatusBuilder_ == null) { + if (payloadCase_ == 10 && + payload_ != mentraos.ble.MentraosBle.BatteryStatus.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.BatteryStatus.newBuilder((mentraos.ble.MentraosBle.BatteryStatus) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 10) { + batteryStatusBuilder_.mergeFrom(value); + } else { + batteryStatusBuilder_.setMessage(value); + } + } + payloadCase_ = 10; + return this; + } + /** + *
+       * Connection Management
+       * 
+ * + * .mentraos.ble.BatteryStatus battery_status = 10; + */ + public Builder clearBatteryStatus() { + if (batteryStatusBuilder_ == null) { + if (payloadCase_ == 10) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 10) { + payloadCase_ = 0; + payload_ = null; + } + batteryStatusBuilder_.clear(); + } + return this; + } + /** + *
+       * Connection Management
+       * 
+ * + * .mentraos.ble.BatteryStatus battery_status = 10; + */ + public mentraos.ble.MentraosBle.BatteryStatus.Builder getBatteryStatusBuilder() { + return internalGetBatteryStatusFieldBuilder().getBuilder(); + } + /** + *
+       * Connection Management
+       * 
+ * + * .mentraos.ble.BatteryStatus battery_status = 10; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.BatteryStatusOrBuilder getBatteryStatusOrBuilder() { + if ((payloadCase_ == 10) && (batteryStatusBuilder_ != null)) { + return batteryStatusBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 10) { + return (mentraos.ble.MentraosBle.BatteryStatus) payload_; + } + return mentraos.ble.MentraosBle.BatteryStatus.getDefaultInstance(); + } + } + /** + *
+       * Connection Management
+       * 
+ * + * .mentraos.ble.BatteryStatus battery_status = 10; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.BatteryStatus, mentraos.ble.MentraosBle.BatteryStatus.Builder, mentraos.ble.MentraosBle.BatteryStatusOrBuilder> + internalGetBatteryStatusFieldBuilder() { + if (batteryStatusBuilder_ == null) { + if (!(payloadCase_ == 10)) { + payload_ = mentraos.ble.MentraosBle.BatteryStatus.getDefaultInstance(); + } + batteryStatusBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.BatteryStatus, mentraos.ble.MentraosBle.BatteryStatus.Builder, mentraos.ble.MentraosBle.BatteryStatusOrBuilder>( + (mentraos.ble.MentraosBle.BatteryStatus) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 10; + onChanged(); + return batteryStatusBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ChargingState, mentraos.ble.MentraosBle.ChargingState.Builder, mentraos.ble.MentraosBle.ChargingStateOrBuilder> chargingStateBuilder_; + /** + * .mentraos.ble.ChargingState charging_state = 11; + * @return Whether the chargingState field is set. + */ + @java.lang.Override + public boolean hasChargingState() { + return payloadCase_ == 11; + } + /** + * .mentraos.ble.ChargingState charging_state = 11; + * @return The chargingState. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ChargingState getChargingState() { + if (chargingStateBuilder_ == null) { + if (payloadCase_ == 11) { + return (mentraos.ble.MentraosBle.ChargingState) payload_; + } + return mentraos.ble.MentraosBle.ChargingState.getDefaultInstance(); + } else { + if (payloadCase_ == 11) { + return chargingStateBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.ChargingState.getDefaultInstance(); + } + } + /** + * .mentraos.ble.ChargingState charging_state = 11; + */ + public Builder setChargingState(mentraos.ble.MentraosBle.ChargingState value) { + if (chargingStateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + chargingStateBuilder_.setMessage(value); + } + payloadCase_ = 11; + return this; + } + /** + * .mentraos.ble.ChargingState charging_state = 11; + */ + public Builder setChargingState( + mentraos.ble.MentraosBle.ChargingState.Builder builderForValue) { + if (chargingStateBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + chargingStateBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 11; + return this; + } + /** + * .mentraos.ble.ChargingState charging_state = 11; + */ + public Builder mergeChargingState(mentraos.ble.MentraosBle.ChargingState value) { + if (chargingStateBuilder_ == null) { + if (payloadCase_ == 11 && + payload_ != mentraos.ble.MentraosBle.ChargingState.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.ChargingState.newBuilder((mentraos.ble.MentraosBle.ChargingState) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 11) { + chargingStateBuilder_.mergeFrom(value); + } else { + chargingStateBuilder_.setMessage(value); + } + } + payloadCase_ = 11; + return this; + } + /** + * .mentraos.ble.ChargingState charging_state = 11; + */ + public Builder clearChargingState() { + if (chargingStateBuilder_ == null) { + if (payloadCase_ == 11) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 11) { + payloadCase_ = 0; + payload_ = null; + } + chargingStateBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.ChargingState charging_state = 11; + */ + public mentraos.ble.MentraosBle.ChargingState.Builder getChargingStateBuilder() { + return internalGetChargingStateFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.ChargingState charging_state = 11; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ChargingStateOrBuilder getChargingStateOrBuilder() { + if ((payloadCase_ == 11) && (chargingStateBuilder_ != null)) { + return chargingStateBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 11) { + return (mentraos.ble.MentraosBle.ChargingState) payload_; + } + return mentraos.ble.MentraosBle.ChargingState.getDefaultInstance(); + } + } + /** + * .mentraos.ble.ChargingState charging_state = 11; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ChargingState, mentraos.ble.MentraosBle.ChargingState.Builder, mentraos.ble.MentraosBle.ChargingStateOrBuilder> + internalGetChargingStateFieldBuilder() { + if (chargingStateBuilder_ == null) { + if (!(payloadCase_ == 11)) { + payload_ = mentraos.ble.MentraosBle.ChargingState.getDefaultInstance(); + } + chargingStateBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ChargingState, mentraos.ble.MentraosBle.ChargingState.Builder, mentraos.ble.MentraosBle.ChargingStateOrBuilder>( + (mentraos.ble.MentraosBle.ChargingState) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 11; + onChanged(); + return chargingStateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DeviceInfo, mentraos.ble.MentraosBle.DeviceInfo.Builder, mentraos.ble.MentraosBle.DeviceInfoOrBuilder> deviceInfoBuilder_; + /** + * .mentraos.ble.DeviceInfo device_info = 12; + * @return Whether the deviceInfo field is set. + */ + @java.lang.Override + public boolean hasDeviceInfo() { + return payloadCase_ == 12; + } + /** + * .mentraos.ble.DeviceInfo device_info = 12; + * @return The deviceInfo. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DeviceInfo getDeviceInfo() { + if (deviceInfoBuilder_ == null) { + if (payloadCase_ == 12) { + return (mentraos.ble.MentraosBle.DeviceInfo) payload_; + } + return mentraos.ble.MentraosBle.DeviceInfo.getDefaultInstance(); + } else { + if (payloadCase_ == 12) { + return deviceInfoBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DeviceInfo.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DeviceInfo device_info = 12; + */ + public Builder setDeviceInfo(mentraos.ble.MentraosBle.DeviceInfo value) { + if (deviceInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + deviceInfoBuilder_.setMessage(value); + } + payloadCase_ = 12; + return this; + } + /** + * .mentraos.ble.DeviceInfo device_info = 12; + */ + public Builder setDeviceInfo( + mentraos.ble.MentraosBle.DeviceInfo.Builder builderForValue) { + if (deviceInfoBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + deviceInfoBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 12; + return this; + } + /** + * .mentraos.ble.DeviceInfo device_info = 12; + */ + public Builder mergeDeviceInfo(mentraos.ble.MentraosBle.DeviceInfo value) { + if (deviceInfoBuilder_ == null) { + if (payloadCase_ == 12 && + payload_ != mentraos.ble.MentraosBle.DeviceInfo.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.DeviceInfo.newBuilder((mentraos.ble.MentraosBle.DeviceInfo) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 12) { + deviceInfoBuilder_.mergeFrom(value); + } else { + deviceInfoBuilder_.setMessage(value); + } + } + payloadCase_ = 12; + return this; + } + /** + * .mentraos.ble.DeviceInfo device_info = 12; + */ + public Builder clearDeviceInfo() { + if (deviceInfoBuilder_ == null) { + if (payloadCase_ == 12) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 12) { + payloadCase_ = 0; + payload_ = null; + } + deviceInfoBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.DeviceInfo device_info = 12; + */ + public mentraos.ble.MentraosBle.DeviceInfo.Builder getDeviceInfoBuilder() { + return internalGetDeviceInfoFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.DeviceInfo device_info = 12; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DeviceInfoOrBuilder getDeviceInfoOrBuilder() { + if ((payloadCase_ == 12) && (deviceInfoBuilder_ != null)) { + return deviceInfoBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 12) { + return (mentraos.ble.MentraosBle.DeviceInfo) payload_; + } + return mentraos.ble.MentraosBle.DeviceInfo.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DeviceInfo device_info = 12; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DeviceInfo, mentraos.ble.MentraosBle.DeviceInfo.Builder, mentraos.ble.MentraosBle.DeviceInfoOrBuilder> + internalGetDeviceInfoFieldBuilder() { + if (deviceInfoBuilder_ == null) { + if (!(payloadCase_ == 12)) { + payload_ = mentraos.ble.MentraosBle.DeviceInfo.getDefaultInstance(); + } + deviceInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DeviceInfo, mentraos.ble.MentraosBle.DeviceInfo.Builder, mentraos.ble.MentraosBle.DeviceInfoOrBuilder>( + (mentraos.ble.MentraosBle.DeviceInfo) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 12; + onChanged(); + return deviceInfoBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.HeadPosition, mentraos.ble.MentraosBle.HeadPosition.Builder, mentraos.ble.MentraosBle.HeadPositionOrBuilder> headPositionBuilder_; + /** + * .mentraos.ble.HeadPosition head_position = 13; + * @return Whether the headPosition field is set. + */ + @java.lang.Override + public boolean hasHeadPosition() { + return payloadCase_ == 13; + } + /** + * .mentraos.ble.HeadPosition head_position = 13; + * @return The headPosition. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadPosition getHeadPosition() { + if (headPositionBuilder_ == null) { + if (payloadCase_ == 13) { + return (mentraos.ble.MentraosBle.HeadPosition) payload_; + } + return mentraos.ble.MentraosBle.HeadPosition.getDefaultInstance(); + } else { + if (payloadCase_ == 13) { + return headPositionBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.HeadPosition.getDefaultInstance(); + } + } + /** + * .mentraos.ble.HeadPosition head_position = 13; + */ + public Builder setHeadPosition(mentraos.ble.MentraosBle.HeadPosition value) { + if (headPositionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + headPositionBuilder_.setMessage(value); + } + payloadCase_ = 13; + return this; + } + /** + * .mentraos.ble.HeadPosition head_position = 13; + */ + public Builder setHeadPosition( + mentraos.ble.MentraosBle.HeadPosition.Builder builderForValue) { + if (headPositionBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + headPositionBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 13; + return this; + } + /** + * .mentraos.ble.HeadPosition head_position = 13; + */ + public Builder mergeHeadPosition(mentraos.ble.MentraosBle.HeadPosition value) { + if (headPositionBuilder_ == null) { + if (payloadCase_ == 13 && + payload_ != mentraos.ble.MentraosBle.HeadPosition.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.HeadPosition.newBuilder((mentraos.ble.MentraosBle.HeadPosition) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 13) { + headPositionBuilder_.mergeFrom(value); + } else { + headPositionBuilder_.setMessage(value); + } + } + payloadCase_ = 13; + return this; + } + /** + * .mentraos.ble.HeadPosition head_position = 13; + */ + public Builder clearHeadPosition() { + if (headPositionBuilder_ == null) { + if (payloadCase_ == 13) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 13) { + payloadCase_ = 0; + payload_ = null; + } + headPositionBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.HeadPosition head_position = 13; + */ + public mentraos.ble.MentraosBle.HeadPosition.Builder getHeadPositionBuilder() { + return internalGetHeadPositionFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.HeadPosition head_position = 13; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadPositionOrBuilder getHeadPositionOrBuilder() { + if ((payloadCase_ == 13) && (headPositionBuilder_ != null)) { + return headPositionBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 13) { + return (mentraos.ble.MentraosBle.HeadPosition) payload_; + } + return mentraos.ble.MentraosBle.HeadPosition.getDefaultInstance(); + } + } + /** + * .mentraos.ble.HeadPosition head_position = 13; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.HeadPosition, mentraos.ble.MentraosBle.HeadPosition.Builder, mentraos.ble.MentraosBle.HeadPositionOrBuilder> + internalGetHeadPositionFieldBuilder() { + if (headPositionBuilder_ == null) { + if (!(payloadCase_ == 13)) { + payload_ = mentraos.ble.MentraosBle.HeadPosition.getDefaultInstance(); + } + headPositionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.HeadPosition, mentraos.ble.MentraosBle.HeadPosition.Builder, mentraos.ble.MentraosBle.HeadPositionOrBuilder>( + (mentraos.ble.MentraosBle.HeadPosition) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 13; + onChanged(); + return headPositionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.HeadUpAngleResponse, mentraos.ble.MentraosBle.HeadUpAngleResponse.Builder, mentraos.ble.MentraosBle.HeadUpAngleResponseOrBuilder> headUpAngleSetBuilder_; + /** + * .mentraos.ble.HeadUpAngleResponse head_up_angle_set = 14; + * @return Whether the headUpAngleSet field is set. + */ + @java.lang.Override + public boolean hasHeadUpAngleSet() { + return payloadCase_ == 14; + } + /** + * .mentraos.ble.HeadUpAngleResponse head_up_angle_set = 14; + * @return The headUpAngleSet. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadUpAngleResponse getHeadUpAngleSet() { + if (headUpAngleSetBuilder_ == null) { + if (payloadCase_ == 14) { + return (mentraos.ble.MentraosBle.HeadUpAngleResponse) payload_; + } + return mentraos.ble.MentraosBle.HeadUpAngleResponse.getDefaultInstance(); + } else { + if (payloadCase_ == 14) { + return headUpAngleSetBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.HeadUpAngleResponse.getDefaultInstance(); + } + } + /** + * .mentraos.ble.HeadUpAngleResponse head_up_angle_set = 14; + */ + public Builder setHeadUpAngleSet(mentraos.ble.MentraosBle.HeadUpAngleResponse value) { + if (headUpAngleSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + headUpAngleSetBuilder_.setMessage(value); + } + payloadCase_ = 14; + return this; + } + /** + * .mentraos.ble.HeadUpAngleResponse head_up_angle_set = 14; + */ + public Builder setHeadUpAngleSet( + mentraos.ble.MentraosBle.HeadUpAngleResponse.Builder builderForValue) { + if (headUpAngleSetBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + headUpAngleSetBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 14; + return this; + } + /** + * .mentraos.ble.HeadUpAngleResponse head_up_angle_set = 14; + */ + public Builder mergeHeadUpAngleSet(mentraos.ble.MentraosBle.HeadUpAngleResponse value) { + if (headUpAngleSetBuilder_ == null) { + if (payloadCase_ == 14 && + payload_ != mentraos.ble.MentraosBle.HeadUpAngleResponse.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.HeadUpAngleResponse.newBuilder((mentraos.ble.MentraosBle.HeadUpAngleResponse) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 14) { + headUpAngleSetBuilder_.mergeFrom(value); + } else { + headUpAngleSetBuilder_.setMessage(value); + } + } + payloadCase_ = 14; + return this; + } + /** + * .mentraos.ble.HeadUpAngleResponse head_up_angle_set = 14; + */ + public Builder clearHeadUpAngleSet() { + if (headUpAngleSetBuilder_ == null) { + if (payloadCase_ == 14) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 14) { + payloadCase_ = 0; + payload_ = null; + } + headUpAngleSetBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.HeadUpAngleResponse head_up_angle_set = 14; + */ + public mentraos.ble.MentraosBle.HeadUpAngleResponse.Builder getHeadUpAngleSetBuilder() { + return internalGetHeadUpAngleSetFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.HeadUpAngleResponse head_up_angle_set = 14; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadUpAngleResponseOrBuilder getHeadUpAngleSetOrBuilder() { + if ((payloadCase_ == 14) && (headUpAngleSetBuilder_ != null)) { + return headUpAngleSetBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 14) { + return (mentraos.ble.MentraosBle.HeadUpAngleResponse) payload_; + } + return mentraos.ble.MentraosBle.HeadUpAngleResponse.getDefaultInstance(); + } + } + /** + * .mentraos.ble.HeadUpAngleResponse head_up_angle_set = 14; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.HeadUpAngleResponse, mentraos.ble.MentraosBle.HeadUpAngleResponse.Builder, mentraos.ble.MentraosBle.HeadUpAngleResponseOrBuilder> + internalGetHeadUpAngleSetFieldBuilder() { + if (headUpAngleSetBuilder_ == null) { + if (!(payloadCase_ == 14)) { + payload_ = mentraos.ble.MentraosBle.HeadUpAngleResponse.getDefaultInstance(); + } + headUpAngleSetBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.HeadUpAngleResponse, mentraos.ble.MentraosBle.HeadUpAngleResponse.Builder, mentraos.ble.MentraosBle.HeadUpAngleResponseOrBuilder>( + (mentraos.ble.MentraosBle.HeadUpAngleResponse) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 14; + onChanged(); + return headUpAngleSetBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.PingRequest, mentraos.ble.MentraosBle.PingRequest.Builder, mentraos.ble.MentraosBle.PingRequestOrBuilder> pingBuilder_; + /** + * .mentraos.ble.PingRequest ping = 15; + * @return Whether the ping field is set. + */ + @java.lang.Override + public boolean hasPing() { + return payloadCase_ == 15; + } + /** + * .mentraos.ble.PingRequest ping = 15; + * @return The ping. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.PingRequest getPing() { + if (pingBuilder_ == null) { + if (payloadCase_ == 15) { + return (mentraos.ble.MentraosBle.PingRequest) payload_; + } + return mentraos.ble.MentraosBle.PingRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 15) { + return pingBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.PingRequest.getDefaultInstance(); + } + } + /** + * .mentraos.ble.PingRequest ping = 15; + */ + public Builder setPing(mentraos.ble.MentraosBle.PingRequest value) { + if (pingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + pingBuilder_.setMessage(value); + } + payloadCase_ = 15; + return this; + } + /** + * .mentraos.ble.PingRequest ping = 15; + */ + public Builder setPing( + mentraos.ble.MentraosBle.PingRequest.Builder builderForValue) { + if (pingBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + pingBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 15; + return this; + } + /** + * .mentraos.ble.PingRequest ping = 15; + */ + public Builder mergePing(mentraos.ble.MentraosBle.PingRequest value) { + if (pingBuilder_ == null) { + if (payloadCase_ == 15 && + payload_ != mentraos.ble.MentraosBle.PingRequest.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.PingRequest.newBuilder((mentraos.ble.MentraosBle.PingRequest) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 15) { + pingBuilder_.mergeFrom(value); + } else { + pingBuilder_.setMessage(value); + } + } + payloadCase_ = 15; + return this; + } + /** + * .mentraos.ble.PingRequest ping = 15; + */ + public Builder clearPing() { + if (pingBuilder_ == null) { + if (payloadCase_ == 15) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 15) { + payloadCase_ = 0; + payload_ = null; + } + pingBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.PingRequest ping = 15; + */ + public mentraos.ble.MentraosBle.PingRequest.Builder getPingBuilder() { + return internalGetPingFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.PingRequest ping = 15; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.PingRequestOrBuilder getPingOrBuilder() { + if ((payloadCase_ == 15) && (pingBuilder_ != null)) { + return pingBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 15) { + return (mentraos.ble.MentraosBle.PingRequest) payload_; + } + return mentraos.ble.MentraosBle.PingRequest.getDefaultInstance(); + } + } + /** + * .mentraos.ble.PingRequest ping = 15; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.PingRequest, mentraos.ble.MentraosBle.PingRequest.Builder, mentraos.ble.MentraosBle.PingRequestOrBuilder> + internalGetPingFieldBuilder() { + if (pingBuilder_ == null) { + if (!(payloadCase_ == 15)) { + payload_ = mentraos.ble.MentraosBle.PingRequest.getDefaultInstance(); + } + pingBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.PingRequest, mentraos.ble.MentraosBle.PingRequest.Builder, mentraos.ble.MentraosBle.PingRequestOrBuilder>( + (mentraos.ble.MentraosBle.PingRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 15; + onChanged(); + return pingBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadEvent, mentraos.ble.MentraosBle.VadEvent.Builder, mentraos.ble.MentraosBle.VadEventOrBuilder> vadEventBuilder_; + /** + *
+       * Audio System
+       * 
+ * + * .mentraos.ble.VadEvent vad_event = 20; + * @return Whether the vadEvent field is set. + */ + @java.lang.Override + public boolean hasVadEvent() { + return payloadCase_ == 20; + } + /** + *
+       * Audio System
+       * 
+ * + * .mentraos.ble.VadEvent vad_event = 20; + * @return The vadEvent. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadEvent getVadEvent() { + if (vadEventBuilder_ == null) { + if (payloadCase_ == 20) { + return (mentraos.ble.MentraosBle.VadEvent) payload_; + } + return mentraos.ble.MentraosBle.VadEvent.getDefaultInstance(); + } else { + if (payloadCase_ == 20) { + return vadEventBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.VadEvent.getDefaultInstance(); + } + } + /** + *
+       * Audio System
+       * 
+ * + * .mentraos.ble.VadEvent vad_event = 20; + */ + public Builder setVadEvent(mentraos.ble.MentraosBle.VadEvent value) { + if (vadEventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + vadEventBuilder_.setMessage(value); + } + payloadCase_ = 20; + return this; + } + /** + *
+       * Audio System
+       * 
+ * + * .mentraos.ble.VadEvent vad_event = 20; + */ + public Builder setVadEvent( + mentraos.ble.MentraosBle.VadEvent.Builder builderForValue) { + if (vadEventBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + vadEventBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 20; + return this; + } + /** + *
+       * Audio System
+       * 
+ * + * .mentraos.ble.VadEvent vad_event = 20; + */ + public Builder mergeVadEvent(mentraos.ble.MentraosBle.VadEvent value) { + if (vadEventBuilder_ == null) { + if (payloadCase_ == 20 && + payload_ != mentraos.ble.MentraosBle.VadEvent.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.VadEvent.newBuilder((mentraos.ble.MentraosBle.VadEvent) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 20) { + vadEventBuilder_.mergeFrom(value); + } else { + vadEventBuilder_.setMessage(value); + } + } + payloadCase_ = 20; + return this; + } + /** + *
+       * Audio System
+       * 
+ * + * .mentraos.ble.VadEvent vad_event = 20; + */ + public Builder clearVadEvent() { + if (vadEventBuilder_ == null) { + if (payloadCase_ == 20) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 20) { + payloadCase_ = 0; + payload_ = null; + } + vadEventBuilder_.clear(); + } + return this; + } + /** + *
+       * Audio System
+       * 
+ * + * .mentraos.ble.VadEvent vad_event = 20; + */ + public mentraos.ble.MentraosBle.VadEvent.Builder getVadEventBuilder() { + return internalGetVadEventFieldBuilder().getBuilder(); + } + /** + *
+       * Audio System
+       * 
+ * + * .mentraos.ble.VadEvent vad_event = 20; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadEventOrBuilder getVadEventOrBuilder() { + if ((payloadCase_ == 20) && (vadEventBuilder_ != null)) { + return vadEventBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 20) { + return (mentraos.ble.MentraosBle.VadEvent) payload_; + } + return mentraos.ble.MentraosBle.VadEvent.getDefaultInstance(); + } + } + /** + *
+       * Audio System
+       * 
+ * + * .mentraos.ble.VadEvent vad_event = 20; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadEvent, mentraos.ble.MentraosBle.VadEvent.Builder, mentraos.ble.MentraosBle.VadEventOrBuilder> + internalGetVadEventFieldBuilder() { + if (vadEventBuilder_ == null) { + if (!(payloadCase_ == 20)) { + payload_ = mentraos.ble.MentraosBle.VadEvent.getDefaultInstance(); + } + vadEventBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadEvent, mentraos.ble.MentraosBle.VadEvent.Builder, mentraos.ble.MentraosBle.VadEventOrBuilder>( + (mentraos.ble.MentraosBle.VadEvent) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 20; + onChanged(); + return vadEventBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadEnabledResponse, mentraos.ble.MentraosBle.VadEnabledResponse.Builder, mentraos.ble.MentraosBle.VadEnabledResponseOrBuilder> vadEnabledSetBuilder_; + /** + *
+       * response to set_vad_enabled
+       * 
+ * + * .mentraos.ble.VadEnabledResponse vad_enabled_set = 21; + * @return Whether the vadEnabledSet field is set. + */ + @java.lang.Override + public boolean hasVadEnabledSet() { + return payloadCase_ == 21; + } + /** + *
+       * response to set_vad_enabled
+       * 
+ * + * .mentraos.ble.VadEnabledResponse vad_enabled_set = 21; + * @return The vadEnabledSet. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadEnabledResponse getVadEnabledSet() { + if (vadEnabledSetBuilder_ == null) { + if (payloadCase_ == 21) { + return (mentraos.ble.MentraosBle.VadEnabledResponse) payload_; + } + return mentraos.ble.MentraosBle.VadEnabledResponse.getDefaultInstance(); + } else { + if (payloadCase_ == 21) { + return vadEnabledSetBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.VadEnabledResponse.getDefaultInstance(); + } + } + /** + *
+       * response to set_vad_enabled
+       * 
+ * + * .mentraos.ble.VadEnabledResponse vad_enabled_set = 21; + */ + public Builder setVadEnabledSet(mentraos.ble.MentraosBle.VadEnabledResponse value) { + if (vadEnabledSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + vadEnabledSetBuilder_.setMessage(value); + } + payloadCase_ = 21; + return this; + } + /** + *
+       * response to set_vad_enabled
+       * 
+ * + * .mentraos.ble.VadEnabledResponse vad_enabled_set = 21; + */ + public Builder setVadEnabledSet( + mentraos.ble.MentraosBle.VadEnabledResponse.Builder builderForValue) { + if (vadEnabledSetBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + vadEnabledSetBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 21; + return this; + } + /** + *
+       * response to set_vad_enabled
+       * 
+ * + * .mentraos.ble.VadEnabledResponse vad_enabled_set = 21; + */ + public Builder mergeVadEnabledSet(mentraos.ble.MentraosBle.VadEnabledResponse value) { + if (vadEnabledSetBuilder_ == null) { + if (payloadCase_ == 21 && + payload_ != mentraos.ble.MentraosBle.VadEnabledResponse.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.VadEnabledResponse.newBuilder((mentraos.ble.MentraosBle.VadEnabledResponse) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 21) { + vadEnabledSetBuilder_.mergeFrom(value); + } else { + vadEnabledSetBuilder_.setMessage(value); + } + } + payloadCase_ = 21; + return this; + } + /** + *
+       * response to set_vad_enabled
+       * 
+ * + * .mentraos.ble.VadEnabledResponse vad_enabled_set = 21; + */ + public Builder clearVadEnabledSet() { + if (vadEnabledSetBuilder_ == null) { + if (payloadCase_ == 21) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 21) { + payloadCase_ = 0; + payload_ = null; + } + vadEnabledSetBuilder_.clear(); + } + return this; + } + /** + *
+       * response to set_vad_enabled
+       * 
+ * + * .mentraos.ble.VadEnabledResponse vad_enabled_set = 21; + */ + public mentraos.ble.MentraosBle.VadEnabledResponse.Builder getVadEnabledSetBuilder() { + return internalGetVadEnabledSetFieldBuilder().getBuilder(); + } + /** + *
+       * response to set_vad_enabled
+       * 
+ * + * .mentraos.ble.VadEnabledResponse vad_enabled_set = 21; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadEnabledResponseOrBuilder getVadEnabledSetOrBuilder() { + if ((payloadCase_ == 21) && (vadEnabledSetBuilder_ != null)) { + return vadEnabledSetBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 21) { + return (mentraos.ble.MentraosBle.VadEnabledResponse) payload_; + } + return mentraos.ble.MentraosBle.VadEnabledResponse.getDefaultInstance(); + } + } + /** + *
+       * response to set_vad_enabled
+       * 
+ * + * .mentraos.ble.VadEnabledResponse vad_enabled_set = 21; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadEnabledResponse, mentraos.ble.MentraosBle.VadEnabledResponse.Builder, mentraos.ble.MentraosBle.VadEnabledResponseOrBuilder> + internalGetVadEnabledSetFieldBuilder() { + if (vadEnabledSetBuilder_ == null) { + if (!(payloadCase_ == 21)) { + payload_ = mentraos.ble.MentraosBle.VadEnabledResponse.getDefaultInstance(); + } + vadEnabledSetBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadEnabledResponse, mentraos.ble.MentraosBle.VadEnabledResponse.Builder, mentraos.ble.MentraosBle.VadEnabledResponseOrBuilder>( + (mentraos.ble.MentraosBle.VadEnabledResponse) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 21; + onChanged(); + return vadEnabledSetBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadConfigResponse, mentraos.ble.MentraosBle.VadConfigResponse.Builder, mentraos.ble.MentraosBle.VadConfigResponseOrBuilder> vadConfiguredBuilder_; + /** + *
+       * response to set_vad_config
+       * 
+ * + * .mentraos.ble.VadConfigResponse vad_configured = 22; + * @return Whether the vadConfigured field is set. + */ + @java.lang.Override + public boolean hasVadConfigured() { + return payloadCase_ == 22; + } + /** + *
+       * response to set_vad_config
+       * 
+ * + * .mentraos.ble.VadConfigResponse vad_configured = 22; + * @return The vadConfigured. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadConfigResponse getVadConfigured() { + if (vadConfiguredBuilder_ == null) { + if (payloadCase_ == 22) { + return (mentraos.ble.MentraosBle.VadConfigResponse) payload_; + } + return mentraos.ble.MentraosBle.VadConfigResponse.getDefaultInstance(); + } else { + if (payloadCase_ == 22) { + return vadConfiguredBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.VadConfigResponse.getDefaultInstance(); + } + } + /** + *
+       * response to set_vad_config
+       * 
+ * + * .mentraos.ble.VadConfigResponse vad_configured = 22; + */ + public Builder setVadConfigured(mentraos.ble.MentraosBle.VadConfigResponse value) { + if (vadConfiguredBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + vadConfiguredBuilder_.setMessage(value); + } + payloadCase_ = 22; + return this; + } + /** + *
+       * response to set_vad_config
+       * 
+ * + * .mentraos.ble.VadConfigResponse vad_configured = 22; + */ + public Builder setVadConfigured( + mentraos.ble.MentraosBle.VadConfigResponse.Builder builderForValue) { + if (vadConfiguredBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + vadConfiguredBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 22; + return this; + } + /** + *
+       * response to set_vad_config
+       * 
+ * + * .mentraos.ble.VadConfigResponse vad_configured = 22; + */ + public Builder mergeVadConfigured(mentraos.ble.MentraosBle.VadConfigResponse value) { + if (vadConfiguredBuilder_ == null) { + if (payloadCase_ == 22 && + payload_ != mentraos.ble.MentraosBle.VadConfigResponse.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.VadConfigResponse.newBuilder((mentraos.ble.MentraosBle.VadConfigResponse) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 22) { + vadConfiguredBuilder_.mergeFrom(value); + } else { + vadConfiguredBuilder_.setMessage(value); + } + } + payloadCase_ = 22; + return this; + } + /** + *
+       * response to set_vad_config
+       * 
+ * + * .mentraos.ble.VadConfigResponse vad_configured = 22; + */ + public Builder clearVadConfigured() { + if (vadConfiguredBuilder_ == null) { + if (payloadCase_ == 22) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 22) { + payloadCase_ = 0; + payload_ = null; + } + vadConfiguredBuilder_.clear(); + } + return this; + } + /** + *
+       * response to set_vad_config
+       * 
+ * + * .mentraos.ble.VadConfigResponse vad_configured = 22; + */ + public mentraos.ble.MentraosBle.VadConfigResponse.Builder getVadConfiguredBuilder() { + return internalGetVadConfiguredFieldBuilder().getBuilder(); + } + /** + *
+       * response to set_vad_config
+       * 
+ * + * .mentraos.ble.VadConfigResponse vad_configured = 22; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadConfigResponseOrBuilder getVadConfiguredOrBuilder() { + if ((payloadCase_ == 22) && (vadConfiguredBuilder_ != null)) { + return vadConfiguredBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 22) { + return (mentraos.ble.MentraosBle.VadConfigResponse) payload_; + } + return mentraos.ble.MentraosBle.VadConfigResponse.getDefaultInstance(); + } + } + /** + *
+       * response to set_vad_config
+       * 
+ * + * .mentraos.ble.VadConfigResponse vad_configured = 22; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadConfigResponse, mentraos.ble.MentraosBle.VadConfigResponse.Builder, mentraos.ble.MentraosBle.VadConfigResponseOrBuilder> + internalGetVadConfiguredFieldBuilder() { + if (vadConfiguredBuilder_ == null) { + if (!(payloadCase_ == 22)) { + payload_ = mentraos.ble.MentraosBle.VadConfigResponse.getDefaultInstance(); + } + vadConfiguredBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadConfigResponse, mentraos.ble.MentraosBle.VadConfigResponse.Builder, mentraos.ble.MentraosBle.VadConfigResponseOrBuilder>( + (mentraos.ble.MentraosBle.VadConfigResponse) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 22; + onChanged(); + return vadConfiguredBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadStatus, mentraos.ble.MentraosBle.VadStatus.Builder, mentraos.ble.MentraosBle.VadStatusOrBuilder> vadStatusBuilder_; + /** + *
+       * response to request_vad_status
+       * 
+ * + * .mentraos.ble.VadStatus vad_status = 23; + * @return Whether the vadStatus field is set. + */ + @java.lang.Override + public boolean hasVadStatus() { + return payloadCase_ == 23; + } + /** + *
+       * response to request_vad_status
+       * 
+ * + * .mentraos.ble.VadStatus vad_status = 23; + * @return The vadStatus. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadStatus getVadStatus() { + if (vadStatusBuilder_ == null) { + if (payloadCase_ == 23) { + return (mentraos.ble.MentraosBle.VadStatus) payload_; + } + return mentraos.ble.MentraosBle.VadStatus.getDefaultInstance(); + } else { + if (payloadCase_ == 23) { + return vadStatusBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.VadStatus.getDefaultInstance(); + } + } + /** + *
+       * response to request_vad_status
+       * 
+ * + * .mentraos.ble.VadStatus vad_status = 23; + */ + public Builder setVadStatus(mentraos.ble.MentraosBle.VadStatus value) { + if (vadStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + vadStatusBuilder_.setMessage(value); + } + payloadCase_ = 23; + return this; + } + /** + *
+       * response to request_vad_status
+       * 
+ * + * .mentraos.ble.VadStatus vad_status = 23; + */ + public Builder setVadStatus( + mentraos.ble.MentraosBle.VadStatus.Builder builderForValue) { + if (vadStatusBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + vadStatusBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 23; + return this; + } + /** + *
+       * response to request_vad_status
+       * 
+ * + * .mentraos.ble.VadStatus vad_status = 23; + */ + public Builder mergeVadStatus(mentraos.ble.MentraosBle.VadStatus value) { + if (vadStatusBuilder_ == null) { + if (payloadCase_ == 23 && + payload_ != mentraos.ble.MentraosBle.VadStatus.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.VadStatus.newBuilder((mentraos.ble.MentraosBle.VadStatus) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 23) { + vadStatusBuilder_.mergeFrom(value); + } else { + vadStatusBuilder_.setMessage(value); + } + } + payloadCase_ = 23; + return this; + } + /** + *
+       * response to request_vad_status
+       * 
+ * + * .mentraos.ble.VadStatus vad_status = 23; + */ + public Builder clearVadStatus() { + if (vadStatusBuilder_ == null) { + if (payloadCase_ == 23) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 23) { + payloadCase_ = 0; + payload_ = null; + } + vadStatusBuilder_.clear(); + } + return this; + } + /** + *
+       * response to request_vad_status
+       * 
+ * + * .mentraos.ble.VadStatus vad_status = 23; + */ + public mentraos.ble.MentraosBle.VadStatus.Builder getVadStatusBuilder() { + return internalGetVadStatusFieldBuilder().getBuilder(); + } + /** + *
+       * response to request_vad_status
+       * 
+ * + * .mentraos.ble.VadStatus vad_status = 23; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadStatusOrBuilder getVadStatusOrBuilder() { + if ((payloadCase_ == 23) && (vadStatusBuilder_ != null)) { + return vadStatusBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 23) { + return (mentraos.ble.MentraosBle.VadStatus) payload_; + } + return mentraos.ble.MentraosBle.VadStatus.getDefaultInstance(); + } + } + /** + *
+       * response to request_vad_status
+       * 
+ * + * .mentraos.ble.VadStatus vad_status = 23; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadStatus, mentraos.ble.MentraosBle.VadStatus.Builder, mentraos.ble.MentraosBle.VadStatusOrBuilder> + internalGetVadStatusFieldBuilder() { + if (vadStatusBuilder_ == null) { + if (!(payloadCase_ == 23)) { + payload_ = mentraos.ble.MentraosBle.VadStatus.getDefaultInstance(); + } + vadStatusBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VadStatus, mentraos.ble.MentraosBle.VadStatus.Builder, mentraos.ble.MentraosBle.VadStatusOrBuilder>( + (mentraos.ble.MentraosBle.VadStatus) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 23; + onChanged(); + return vadStatusBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ImageTransferComplete, mentraos.ble.MentraosBle.ImageTransferComplete.Builder, mentraos.ble.MentraosBle.ImageTransferCompleteOrBuilder> imageTransferCompleteBuilder_; + /** + *
+       * Display System
+       * 
+ * + * .mentraos.ble.ImageTransferComplete image_transfer_complete = 30; + * @return Whether the imageTransferComplete field is set. + */ + @java.lang.Override + public boolean hasImageTransferComplete() { + return payloadCase_ == 30; + } + /** + *
+       * Display System
+       * 
+ * + * .mentraos.ble.ImageTransferComplete image_transfer_complete = 30; + * @return The imageTransferComplete. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImageTransferComplete getImageTransferComplete() { + if (imageTransferCompleteBuilder_ == null) { + if (payloadCase_ == 30) { + return (mentraos.ble.MentraosBle.ImageTransferComplete) payload_; + } + return mentraos.ble.MentraosBle.ImageTransferComplete.getDefaultInstance(); + } else { + if (payloadCase_ == 30) { + return imageTransferCompleteBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.ImageTransferComplete.getDefaultInstance(); + } + } + /** + *
+       * Display System
+       * 
+ * + * .mentraos.ble.ImageTransferComplete image_transfer_complete = 30; + */ + public Builder setImageTransferComplete(mentraos.ble.MentraosBle.ImageTransferComplete value) { + if (imageTransferCompleteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + imageTransferCompleteBuilder_.setMessage(value); + } + payloadCase_ = 30; + return this; + } + /** + *
+       * Display System
+       * 
+ * + * .mentraos.ble.ImageTransferComplete image_transfer_complete = 30; + */ + public Builder setImageTransferComplete( + mentraos.ble.MentraosBle.ImageTransferComplete.Builder builderForValue) { + if (imageTransferCompleteBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + imageTransferCompleteBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 30; + return this; + } + /** + *
+       * Display System
+       * 
+ * + * .mentraos.ble.ImageTransferComplete image_transfer_complete = 30; + */ + public Builder mergeImageTransferComplete(mentraos.ble.MentraosBle.ImageTransferComplete value) { + if (imageTransferCompleteBuilder_ == null) { + if (payloadCase_ == 30 && + payload_ != mentraos.ble.MentraosBle.ImageTransferComplete.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.ImageTransferComplete.newBuilder((mentraos.ble.MentraosBle.ImageTransferComplete) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 30) { + imageTransferCompleteBuilder_.mergeFrom(value); + } else { + imageTransferCompleteBuilder_.setMessage(value); + } + } + payloadCase_ = 30; + return this; + } + /** + *
+       * Display System
+       * 
+ * + * .mentraos.ble.ImageTransferComplete image_transfer_complete = 30; + */ + public Builder clearImageTransferComplete() { + if (imageTransferCompleteBuilder_ == null) { + if (payloadCase_ == 30) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 30) { + payloadCase_ = 0; + payload_ = null; + } + imageTransferCompleteBuilder_.clear(); + } + return this; + } + /** + *
+       * Display System
+       * 
+ * + * .mentraos.ble.ImageTransferComplete image_transfer_complete = 30; + */ + public mentraos.ble.MentraosBle.ImageTransferComplete.Builder getImageTransferCompleteBuilder() { + return internalGetImageTransferCompleteFieldBuilder().getBuilder(); + } + /** + *
+       * Display System
+       * 
+ * + * .mentraos.ble.ImageTransferComplete image_transfer_complete = 30; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImageTransferCompleteOrBuilder getImageTransferCompleteOrBuilder() { + if ((payloadCase_ == 30) && (imageTransferCompleteBuilder_ != null)) { + return imageTransferCompleteBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 30) { + return (mentraos.ble.MentraosBle.ImageTransferComplete) payload_; + } + return mentraos.ble.MentraosBle.ImageTransferComplete.getDefaultInstance(); + } + } + /** + *
+       * Display System
+       * 
+ * + * .mentraos.ble.ImageTransferComplete image_transfer_complete = 30; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ImageTransferComplete, mentraos.ble.MentraosBle.ImageTransferComplete.Builder, mentraos.ble.MentraosBle.ImageTransferCompleteOrBuilder> + internalGetImageTransferCompleteFieldBuilder() { + if (imageTransferCompleteBuilder_ == null) { + if (!(payloadCase_ == 30)) { + payload_ = mentraos.ble.MentraosBle.ImageTransferComplete.getDefaultInstance(); + } + imageTransferCompleteBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ImageTransferComplete, mentraos.ble.MentraosBle.ImageTransferComplete.Builder, mentraos.ble.MentraosBle.ImageTransferCompleteOrBuilder>( + (mentraos.ble.MentraosBle.ImageTransferComplete) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 30; + onChanged(); + return imageTransferCompleteBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayQueueInfo, mentraos.ble.MentraosBle.DisplayQueueInfo.Builder, mentraos.ble.MentraosBle.DisplayQueueInfoOrBuilder> displayQueueInfoBuilder_; + /** + * .mentraos.ble.DisplayQueueInfo display_queue_info = 31; + * @return Whether the displayQueueInfo field is set. + */ + @java.lang.Override + public boolean hasDisplayQueueInfo() { + return payloadCase_ == 31; + } + /** + * .mentraos.ble.DisplayQueueInfo display_queue_info = 31; + * @return The displayQueueInfo. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayQueueInfo getDisplayQueueInfo() { + if (displayQueueInfoBuilder_ == null) { + if (payloadCase_ == 31) { + return (mentraos.ble.MentraosBle.DisplayQueueInfo) payload_; + } + return mentraos.ble.MentraosBle.DisplayQueueInfo.getDefaultInstance(); + } else { + if (payloadCase_ == 31) { + return displayQueueInfoBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DisplayQueueInfo.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DisplayQueueInfo display_queue_info = 31; + */ + public Builder setDisplayQueueInfo(mentraos.ble.MentraosBle.DisplayQueueInfo value) { + if (displayQueueInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + displayQueueInfoBuilder_.setMessage(value); + } + payloadCase_ = 31; + return this; + } + /** + * .mentraos.ble.DisplayQueueInfo display_queue_info = 31; + */ + public Builder setDisplayQueueInfo( + mentraos.ble.MentraosBle.DisplayQueueInfo.Builder builderForValue) { + if (displayQueueInfoBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + displayQueueInfoBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 31; + return this; + } + /** + * .mentraos.ble.DisplayQueueInfo display_queue_info = 31; + */ + public Builder mergeDisplayQueueInfo(mentraos.ble.MentraosBle.DisplayQueueInfo value) { + if (displayQueueInfoBuilder_ == null) { + if (payloadCase_ == 31 && + payload_ != mentraos.ble.MentraosBle.DisplayQueueInfo.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.DisplayQueueInfo.newBuilder((mentraos.ble.MentraosBle.DisplayQueueInfo) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 31) { + displayQueueInfoBuilder_.mergeFrom(value); + } else { + displayQueueInfoBuilder_.setMessage(value); + } + } + payloadCase_ = 31; + return this; + } + /** + * .mentraos.ble.DisplayQueueInfo display_queue_info = 31; + */ + public Builder clearDisplayQueueInfo() { + if (displayQueueInfoBuilder_ == null) { + if (payloadCase_ == 31) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 31) { + payloadCase_ = 0; + payload_ = null; + } + displayQueueInfoBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.DisplayQueueInfo display_queue_info = 31; + */ + public mentraos.ble.MentraosBle.DisplayQueueInfo.Builder getDisplayQueueInfoBuilder() { + return internalGetDisplayQueueInfoFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.DisplayQueueInfo display_queue_info = 31; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayQueueInfoOrBuilder getDisplayQueueInfoOrBuilder() { + if ((payloadCase_ == 31) && (displayQueueInfoBuilder_ != null)) { + return displayQueueInfoBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 31) { + return (mentraos.ble.MentraosBle.DisplayQueueInfo) payload_; + } + return mentraos.ble.MentraosBle.DisplayQueueInfo.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DisplayQueueInfo display_queue_info = 31; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayQueueInfo, mentraos.ble.MentraosBle.DisplayQueueInfo.Builder, mentraos.ble.MentraosBle.DisplayQueueInfoOrBuilder> + internalGetDisplayQueueInfoFieldBuilder() { + if (displayQueueInfoBuilder_ == null) { + if (!(payloadCase_ == 31)) { + payload_ = mentraos.ble.MentraosBle.DisplayQueueInfo.getDefaultInstance(); + } + displayQueueInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayQueueInfo, mentraos.ble.MentraosBle.DisplayQueueInfo.Builder, mentraos.ble.MentraosBle.DisplayQueueInfoOrBuilder>( + (mentraos.ble.MentraosBle.DisplayQueueInfo) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 31; + onChanged(); + return displayQueueInfoBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ImuData, mentraos.ble.MentraosBle.ImuData.Builder, mentraos.ble.MentraosBle.ImuDataOrBuilder> imuDataBuilder_; + /** + *
+       * User Input
+       * 
+ * + * .mentraos.ble.ImuData imu_data = 40; + * @return Whether the imuData field is set. + */ + @java.lang.Override + public boolean hasImuData() { + return payloadCase_ == 40; + } + /** + *
+       * User Input
+       * 
+ * + * .mentraos.ble.ImuData imu_data = 40; + * @return The imuData. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImuData getImuData() { + if (imuDataBuilder_ == null) { + if (payloadCase_ == 40) { + return (mentraos.ble.MentraosBle.ImuData) payload_; + } + return mentraos.ble.MentraosBle.ImuData.getDefaultInstance(); + } else { + if (payloadCase_ == 40) { + return imuDataBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.ImuData.getDefaultInstance(); + } + } + /** + *
+       * User Input
+       * 
+ * + * .mentraos.ble.ImuData imu_data = 40; + */ + public Builder setImuData(mentraos.ble.MentraosBle.ImuData value) { + if (imuDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + imuDataBuilder_.setMessage(value); + } + payloadCase_ = 40; + return this; + } + /** + *
+       * User Input
+       * 
+ * + * .mentraos.ble.ImuData imu_data = 40; + */ + public Builder setImuData( + mentraos.ble.MentraosBle.ImuData.Builder builderForValue) { + if (imuDataBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + imuDataBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 40; + return this; + } + /** + *
+       * User Input
+       * 
+ * + * .mentraos.ble.ImuData imu_data = 40; + */ + public Builder mergeImuData(mentraos.ble.MentraosBle.ImuData value) { + if (imuDataBuilder_ == null) { + if (payloadCase_ == 40 && + payload_ != mentraos.ble.MentraosBle.ImuData.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.ImuData.newBuilder((mentraos.ble.MentraosBle.ImuData) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 40) { + imuDataBuilder_.mergeFrom(value); + } else { + imuDataBuilder_.setMessage(value); + } + } + payloadCase_ = 40; + return this; + } + /** + *
+       * User Input
+       * 
+ * + * .mentraos.ble.ImuData imu_data = 40; + */ + public Builder clearImuData() { + if (imuDataBuilder_ == null) { + if (payloadCase_ == 40) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 40) { + payloadCase_ = 0; + payload_ = null; + } + imuDataBuilder_.clear(); + } + return this; + } + /** + *
+       * User Input
+       * 
+ * + * .mentraos.ble.ImuData imu_data = 40; + */ + public mentraos.ble.MentraosBle.ImuData.Builder getImuDataBuilder() { + return internalGetImuDataFieldBuilder().getBuilder(); + } + /** + *
+       * User Input
+       * 
+ * + * .mentraos.ble.ImuData imu_data = 40; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImuDataOrBuilder getImuDataOrBuilder() { + if ((payloadCase_ == 40) && (imuDataBuilder_ != null)) { + return imuDataBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 40) { + return (mentraos.ble.MentraosBle.ImuData) payload_; + } + return mentraos.ble.MentraosBle.ImuData.getDefaultInstance(); + } + } + /** + *
+       * User Input
+       * 
+ * + * .mentraos.ble.ImuData imu_data = 40; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ImuData, mentraos.ble.MentraosBle.ImuData.Builder, mentraos.ble.MentraosBle.ImuDataOrBuilder> + internalGetImuDataFieldBuilder() { + if (imuDataBuilder_ == null) { + if (!(payloadCase_ == 40)) { + payload_ = mentraos.ble.MentraosBle.ImuData.getDefaultInstance(); + } + imuDataBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ImuData, mentraos.ble.MentraosBle.ImuData.Builder, mentraos.ble.MentraosBle.ImuDataOrBuilder>( + (mentraos.ble.MentraosBle.ImuData) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 40; + onChanged(); + return imuDataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ButtonEvent, mentraos.ble.MentraosBle.ButtonEvent.Builder, mentraos.ble.MentraosBle.ButtonEventOrBuilder> buttonEventBuilder_; + /** + * .mentraos.ble.ButtonEvent button_event = 41; + * @return Whether the buttonEvent field is set. + */ + @java.lang.Override + public boolean hasButtonEvent() { + return payloadCase_ == 41; + } + /** + * .mentraos.ble.ButtonEvent button_event = 41; + * @return The buttonEvent. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ButtonEvent getButtonEvent() { + if (buttonEventBuilder_ == null) { + if (payloadCase_ == 41) { + return (mentraos.ble.MentraosBle.ButtonEvent) payload_; + } + return mentraos.ble.MentraosBle.ButtonEvent.getDefaultInstance(); + } else { + if (payloadCase_ == 41) { + return buttonEventBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.ButtonEvent.getDefaultInstance(); + } + } + /** + * .mentraos.ble.ButtonEvent button_event = 41; + */ + public Builder setButtonEvent(mentraos.ble.MentraosBle.ButtonEvent value) { + if (buttonEventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + buttonEventBuilder_.setMessage(value); + } + payloadCase_ = 41; + return this; + } + /** + * .mentraos.ble.ButtonEvent button_event = 41; + */ + public Builder setButtonEvent( + mentraos.ble.MentraosBle.ButtonEvent.Builder builderForValue) { + if (buttonEventBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + buttonEventBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 41; + return this; + } + /** + * .mentraos.ble.ButtonEvent button_event = 41; + */ + public Builder mergeButtonEvent(mentraos.ble.MentraosBle.ButtonEvent value) { + if (buttonEventBuilder_ == null) { + if (payloadCase_ == 41 && + payload_ != mentraos.ble.MentraosBle.ButtonEvent.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.ButtonEvent.newBuilder((mentraos.ble.MentraosBle.ButtonEvent) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 41) { + buttonEventBuilder_.mergeFrom(value); + } else { + buttonEventBuilder_.setMessage(value); + } + } + payloadCase_ = 41; + return this; + } + /** + * .mentraos.ble.ButtonEvent button_event = 41; + */ + public Builder clearButtonEvent() { + if (buttonEventBuilder_ == null) { + if (payloadCase_ == 41) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 41) { + payloadCase_ = 0; + payload_ = null; + } + buttonEventBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.ButtonEvent button_event = 41; + */ + public mentraos.ble.MentraosBle.ButtonEvent.Builder getButtonEventBuilder() { + return internalGetButtonEventFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.ButtonEvent button_event = 41; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ButtonEventOrBuilder getButtonEventOrBuilder() { + if ((payloadCase_ == 41) && (buttonEventBuilder_ != null)) { + return buttonEventBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 41) { + return (mentraos.ble.MentraosBle.ButtonEvent) payload_; + } + return mentraos.ble.MentraosBle.ButtonEvent.getDefaultInstance(); + } + } + /** + * .mentraos.ble.ButtonEvent button_event = 41; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ButtonEvent, mentraos.ble.MentraosBle.ButtonEvent.Builder, mentraos.ble.MentraosBle.ButtonEventOrBuilder> + internalGetButtonEventFieldBuilder() { + if (buttonEventBuilder_ == null) { + if (!(payloadCase_ == 41)) { + payload_ = mentraos.ble.MentraosBle.ButtonEvent.getDefaultInstance(); + } + buttonEventBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.ButtonEvent, mentraos.ble.MentraosBle.ButtonEvent.Builder, mentraos.ble.MentraosBle.ButtonEventOrBuilder>( + (mentraos.ble.MentraosBle.ButtonEvent) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 41; + onChanged(); + return buttonEventBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.HeadGesture, mentraos.ble.MentraosBle.HeadGesture.Builder, mentraos.ble.MentraosBle.HeadGestureOrBuilder> headGestureBuilder_; + /** + * .mentraos.ble.HeadGesture head_gesture = 42; + * @return Whether the headGesture field is set. + */ + @java.lang.Override + public boolean hasHeadGesture() { + return payloadCase_ == 42; + } + /** + * .mentraos.ble.HeadGesture head_gesture = 42; + * @return The headGesture. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadGesture getHeadGesture() { + if (headGestureBuilder_ == null) { + if (payloadCase_ == 42) { + return (mentraos.ble.MentraosBle.HeadGesture) payload_; + } + return mentraos.ble.MentraosBle.HeadGesture.getDefaultInstance(); + } else { + if (payloadCase_ == 42) { + return headGestureBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.HeadGesture.getDefaultInstance(); + } + } + /** + * .mentraos.ble.HeadGesture head_gesture = 42; + */ + public Builder setHeadGesture(mentraos.ble.MentraosBle.HeadGesture value) { + if (headGestureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + headGestureBuilder_.setMessage(value); + } + payloadCase_ = 42; + return this; + } + /** + * .mentraos.ble.HeadGesture head_gesture = 42; + */ + public Builder setHeadGesture( + mentraos.ble.MentraosBle.HeadGesture.Builder builderForValue) { + if (headGestureBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + headGestureBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 42; + return this; + } + /** + * .mentraos.ble.HeadGesture head_gesture = 42; + */ + public Builder mergeHeadGesture(mentraos.ble.MentraosBle.HeadGesture value) { + if (headGestureBuilder_ == null) { + if (payloadCase_ == 42 && + payload_ != mentraos.ble.MentraosBle.HeadGesture.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.HeadGesture.newBuilder((mentraos.ble.MentraosBle.HeadGesture) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 42) { + headGestureBuilder_.mergeFrom(value); + } else { + headGestureBuilder_.setMessage(value); + } + } + payloadCase_ = 42; + return this; + } + /** + * .mentraos.ble.HeadGesture head_gesture = 42; + */ + public Builder clearHeadGesture() { + if (headGestureBuilder_ == null) { + if (payloadCase_ == 42) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 42) { + payloadCase_ = 0; + payload_ = null; + } + headGestureBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.HeadGesture head_gesture = 42; + */ + public mentraos.ble.MentraosBle.HeadGesture.Builder getHeadGestureBuilder() { + return internalGetHeadGestureFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.HeadGesture head_gesture = 42; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.HeadGestureOrBuilder getHeadGestureOrBuilder() { + if ((payloadCase_ == 42) && (headGestureBuilder_ != null)) { + return headGestureBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 42) { + return (mentraos.ble.MentraosBle.HeadGesture) payload_; + } + return mentraos.ble.MentraosBle.HeadGesture.getDefaultInstance(); + } + } + /** + * .mentraos.ble.HeadGesture head_gesture = 42; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.HeadGesture, mentraos.ble.MentraosBle.HeadGesture.Builder, mentraos.ble.MentraosBle.HeadGestureOrBuilder> + internalGetHeadGestureFieldBuilder() { + if (headGestureBuilder_ == null) { + if (!(payloadCase_ == 42)) { + payload_ = mentraos.ble.MentraosBle.HeadGesture.getDefaultInstance(); + } + headGestureBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.HeadGesture, mentraos.ble.MentraosBle.HeadGesture.Builder, mentraos.ble.MentraosBle.HeadGestureOrBuilder>( + (mentraos.ble.MentraosBle.HeadGesture) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 42; + onChanged(); + return headGestureBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DashboardShown, mentraos.ble.MentraosBle.DashboardShown.Builder, mentraos.ble.MentraosBle.DashboardShownOrBuilder> dashboardShownBuilder_; + /** + *
+       * Dashboard System
+       * 
+ * + * .mentraos.ble.DashboardShown dashboard_shown = 43; + * @return Whether the dashboardShown field is set. + */ + @java.lang.Override + public boolean hasDashboardShown() { + return payloadCase_ == 43; + } + /** + *
+       * Dashboard System
+       * 
+ * + * .mentraos.ble.DashboardShown dashboard_shown = 43; + * @return The dashboardShown. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DashboardShown getDashboardShown() { + if (dashboardShownBuilder_ == null) { + if (payloadCase_ == 43) { + return (mentraos.ble.MentraosBle.DashboardShown) payload_; + } + return mentraos.ble.MentraosBle.DashboardShown.getDefaultInstance(); + } else { + if (payloadCase_ == 43) { + return dashboardShownBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DashboardShown.getDefaultInstance(); + } + } + /** + *
+       * Dashboard System
+       * 
+ * + * .mentraos.ble.DashboardShown dashboard_shown = 43; + */ + public Builder setDashboardShown(mentraos.ble.MentraosBle.DashboardShown value) { + if (dashboardShownBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + dashboardShownBuilder_.setMessage(value); + } + payloadCase_ = 43; + return this; + } + /** + *
+       * Dashboard System
+       * 
+ * + * .mentraos.ble.DashboardShown dashboard_shown = 43; + */ + public Builder setDashboardShown( + mentraos.ble.MentraosBle.DashboardShown.Builder builderForValue) { + if (dashboardShownBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + dashboardShownBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 43; + return this; + } + /** + *
+       * Dashboard System
+       * 
+ * + * .mentraos.ble.DashboardShown dashboard_shown = 43; + */ + public Builder mergeDashboardShown(mentraos.ble.MentraosBle.DashboardShown value) { + if (dashboardShownBuilder_ == null) { + if (payloadCase_ == 43 && + payload_ != mentraos.ble.MentraosBle.DashboardShown.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.DashboardShown.newBuilder((mentraos.ble.MentraosBle.DashboardShown) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 43) { + dashboardShownBuilder_.mergeFrom(value); + } else { + dashboardShownBuilder_.setMessage(value); + } + } + payloadCase_ = 43; + return this; + } + /** + *
+       * Dashboard System
+       * 
+ * + * .mentraos.ble.DashboardShown dashboard_shown = 43; + */ + public Builder clearDashboardShown() { + if (dashboardShownBuilder_ == null) { + if (payloadCase_ == 43) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 43) { + payloadCase_ = 0; + payload_ = null; + } + dashboardShownBuilder_.clear(); + } + return this; + } + /** + *
+       * Dashboard System
+       * 
+ * + * .mentraos.ble.DashboardShown dashboard_shown = 43; + */ + public mentraos.ble.MentraosBle.DashboardShown.Builder getDashboardShownBuilder() { + return internalGetDashboardShownFieldBuilder().getBuilder(); + } + /** + *
+       * Dashboard System
+       * 
+ * + * .mentraos.ble.DashboardShown dashboard_shown = 43; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DashboardShownOrBuilder getDashboardShownOrBuilder() { + if ((payloadCase_ == 43) && (dashboardShownBuilder_ != null)) { + return dashboardShownBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 43) { + return (mentraos.ble.MentraosBle.DashboardShown) payload_; + } + return mentraos.ble.MentraosBle.DashboardShown.getDefaultInstance(); + } + } + /** + *
+       * Dashboard System
+       * 
+ * + * .mentraos.ble.DashboardShown dashboard_shown = 43; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DashboardShown, mentraos.ble.MentraosBle.DashboardShown.Builder, mentraos.ble.MentraosBle.DashboardShownOrBuilder> + internalGetDashboardShownFieldBuilder() { + if (dashboardShownBuilder_ == null) { + if (!(payloadCase_ == 43)) { + payload_ = mentraos.ble.MentraosBle.DashboardShown.getDefaultInstance(); + } + dashboardShownBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DashboardShown, mentraos.ble.MentraosBle.DashboardShown.Builder, mentraos.ble.MentraosBle.DashboardShownOrBuilder>( + (mentraos.ble.MentraosBle.DashboardShown) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 43; + onChanged(); + return dashboardShownBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VersionResponse, mentraos.ble.MentraosBle.VersionResponse.Builder, mentraos.ble.MentraosBle.VersionResponseOrBuilder> versionResponseBuilder_; + /** + *
+       * Runtime protocol version response
+       * 
+ * + * .mentraos.ble.VersionResponse version_response = 70; + * @return Whether the versionResponse field is set. + */ + @java.lang.Override + public boolean hasVersionResponse() { + return payloadCase_ == 70; + } + /** + *
+       * Runtime protocol version response
+       * 
+ * + * .mentraos.ble.VersionResponse version_response = 70; + * @return The versionResponse. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VersionResponse getVersionResponse() { + if (versionResponseBuilder_ == null) { + if (payloadCase_ == 70) { + return (mentraos.ble.MentraosBle.VersionResponse) payload_; + } + return mentraos.ble.MentraosBle.VersionResponse.getDefaultInstance(); + } else { + if (payloadCase_ == 70) { + return versionResponseBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.VersionResponse.getDefaultInstance(); + } + } + /** + *
+       * Runtime protocol version response
+       * 
+ * + * .mentraos.ble.VersionResponse version_response = 70; + */ + public Builder setVersionResponse(mentraos.ble.MentraosBle.VersionResponse value) { + if (versionResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + versionResponseBuilder_.setMessage(value); + } + payloadCase_ = 70; + return this; + } + /** + *
+       * Runtime protocol version response
+       * 
+ * + * .mentraos.ble.VersionResponse version_response = 70; + */ + public Builder setVersionResponse( + mentraos.ble.MentraosBle.VersionResponse.Builder builderForValue) { + if (versionResponseBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + versionResponseBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 70; + return this; + } + /** + *
+       * Runtime protocol version response
+       * 
+ * + * .mentraos.ble.VersionResponse version_response = 70; + */ + public Builder mergeVersionResponse(mentraos.ble.MentraosBle.VersionResponse value) { + if (versionResponseBuilder_ == null) { + if (payloadCase_ == 70 && + payload_ != mentraos.ble.MentraosBle.VersionResponse.getDefaultInstance()) { + payload_ = mentraos.ble.MentraosBle.VersionResponse.newBuilder((mentraos.ble.MentraosBle.VersionResponse) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 70) { + versionResponseBuilder_.mergeFrom(value); + } else { + versionResponseBuilder_.setMessage(value); + } + } + payloadCase_ = 70; + return this; + } + /** + *
+       * Runtime protocol version response
+       * 
+ * + * .mentraos.ble.VersionResponse version_response = 70; + */ + public Builder clearVersionResponse() { + if (versionResponseBuilder_ == null) { + if (payloadCase_ == 70) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 70) { + payloadCase_ = 0; + payload_ = null; + } + versionResponseBuilder_.clear(); + } + return this; + } + /** + *
+       * Runtime protocol version response
+       * 
+ * + * .mentraos.ble.VersionResponse version_response = 70; + */ + public mentraos.ble.MentraosBle.VersionResponse.Builder getVersionResponseBuilder() { + return internalGetVersionResponseFieldBuilder().getBuilder(); + } + /** + *
+       * Runtime protocol version response
+       * 
+ * + * .mentraos.ble.VersionResponse version_response = 70; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VersionResponseOrBuilder getVersionResponseOrBuilder() { + if ((payloadCase_ == 70) && (versionResponseBuilder_ != null)) { + return versionResponseBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 70) { + return (mentraos.ble.MentraosBle.VersionResponse) payload_; + } + return mentraos.ble.MentraosBle.VersionResponse.getDefaultInstance(); + } + } + /** + *
+       * Runtime protocol version response
+       * 
+ * + * .mentraos.ble.VersionResponse version_response = 70; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VersionResponse, mentraos.ble.MentraosBle.VersionResponse.Builder, mentraos.ble.MentraosBle.VersionResponseOrBuilder> + internalGetVersionResponseFieldBuilder() { + if (versionResponseBuilder_ == null) { + if (!(payloadCase_ == 70)) { + payload_ = mentraos.ble.MentraosBle.VersionResponse.getDefaultInstance(); + } + versionResponseBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.VersionResponse, mentraos.ble.MentraosBle.VersionResponse.Builder, mentraos.ble.MentraosBle.VersionResponseOrBuilder>( + (mentraos.ble.MentraosBle.VersionResponse) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 70; + onChanged(); + return versionResponseBuilder_; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.GlassesToPhone) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.GlassesToPhone) + private static final mentraos.ble.MentraosBle.GlassesToPhone DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.GlassesToPhone(); + } + + public static mentraos.ble.MentraosBle.GlassesToPhone getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GlassesToPhone parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.GlassesToPhone getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DisconnectRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.DisconnectRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code mentraos.ble.DisconnectRequest} + */ + public static final class DisconnectRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.DisconnectRequest) + DisconnectRequestOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + DisconnectRequest.class.getName()); + } + // Use DisconnectRequest.newBuilder() to construct. + private DisconnectRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DisconnectRequest() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisconnectRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisconnectRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisconnectRequest.class, mentraos.ble.MentraosBle.DisconnectRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.DisconnectRequest)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.DisconnectRequest other = (mentraos.ble.MentraosBle.DisconnectRequest) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.DisconnectRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisconnectRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisconnectRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisconnectRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisconnectRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisconnectRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisconnectRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisconnectRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.DisconnectRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.DisconnectRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisconnectRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisconnectRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.DisconnectRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.DisconnectRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.DisconnectRequest) + mentraos.ble.MentraosBle.DisconnectRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisconnectRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisconnectRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisconnectRequest.class, mentraos.ble.MentraosBle.DisconnectRequest.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.DisconnectRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisconnectRequest_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisconnectRequest getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.DisconnectRequest.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisconnectRequest build() { + mentraos.ble.MentraosBle.DisconnectRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisconnectRequest buildPartial() { + mentraos.ble.MentraosBle.DisconnectRequest result = new mentraos.ble.MentraosBle.DisconnectRequest(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.DisconnectRequest) { + return mergeFrom((mentraos.ble.MentraosBle.DisconnectRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.DisconnectRequest other) { + if (other == mentraos.ble.MentraosBle.DisconnectRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.DisconnectRequest) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.DisconnectRequest) + private static final mentraos.ble.MentraosBle.DisconnectRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.DisconnectRequest(); + } + + public static mentraos.ble.MentraosBle.DisconnectRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisconnectRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisconnectRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BatteryStateRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.BatteryStateRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code mentraos.ble.BatteryStateRequest} + */ + public static final class BatteryStateRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.BatteryStateRequest) + BatteryStateRequestOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + BatteryStateRequest.class.getName()); + } + // Use BatteryStateRequest.newBuilder() to construct. + private BatteryStateRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private BatteryStateRequest() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_BatteryStateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_BatteryStateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.BatteryStateRequest.class, mentraos.ble.MentraosBle.BatteryStateRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.BatteryStateRequest)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.BatteryStateRequest other = (mentraos.ble.MentraosBle.BatteryStateRequest) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.BatteryStateRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.BatteryStateRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.BatteryStateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.BatteryStateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.BatteryStateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.BatteryStateRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.BatteryStateRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.BatteryStateRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.BatteryStateRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.BatteryStateRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.BatteryStateRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.BatteryStateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.BatteryStateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.BatteryStateRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.BatteryStateRequest) + mentraos.ble.MentraosBle.BatteryStateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_BatteryStateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_BatteryStateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.BatteryStateRequest.class, mentraos.ble.MentraosBle.BatteryStateRequest.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.BatteryStateRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_BatteryStateRequest_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.BatteryStateRequest getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.BatteryStateRequest.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.BatteryStateRequest build() { + mentraos.ble.MentraosBle.BatteryStateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.BatteryStateRequest buildPartial() { + mentraos.ble.MentraosBle.BatteryStateRequest result = new mentraos.ble.MentraosBle.BatteryStateRequest(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.BatteryStateRequest) { + return mergeFrom((mentraos.ble.MentraosBle.BatteryStateRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.BatteryStateRequest other) { + if (other == mentraos.ble.MentraosBle.BatteryStateRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.BatteryStateRequest) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.BatteryStateRequest) + private static final mentraos.ble.MentraosBle.BatteryStateRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.BatteryStateRequest(); + } + + public static mentraos.ble.MentraosBle.BatteryStateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatteryStateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.BatteryStateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BatteryStatusOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.BatteryStatus) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 0-100 percentage
+     * 
+ * + * uint32 level = 1; + * @return The level. + */ + int getLevel(); + + /** + * bool charging = 2; + * @return The charging. + */ + boolean getCharging(); + } + /** + * Protobuf type {@code mentraos.ble.BatteryStatus} + */ + public static final class BatteryStatus extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.BatteryStatus) + BatteryStatusOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + BatteryStatus.class.getName()); + } + // Use BatteryStatus.newBuilder() to construct. + private BatteryStatus(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private BatteryStatus() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_BatteryStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_BatteryStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.BatteryStatus.class, mentraos.ble.MentraosBle.BatteryStatus.Builder.class); + } + + public static final int LEVEL_FIELD_NUMBER = 1; + private int level_ = 0; + /** + *
+     * 0-100 percentage
+     * 
+ * + * uint32 level = 1; + * @return The level. + */ + @java.lang.Override + public int getLevel() { + return level_; + } + + public static final int CHARGING_FIELD_NUMBER = 2; + private boolean charging_ = false; + /** + * bool charging = 2; + * @return The charging. + */ + @java.lang.Override + public boolean getCharging() { + return charging_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (level_ != 0) { + output.writeUInt32(1, level_); + } + if (charging_ != false) { + output.writeBool(2, charging_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (level_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, level_); + } + if (charging_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, charging_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.BatteryStatus)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.BatteryStatus other = (mentraos.ble.MentraosBle.BatteryStatus) obj; + + if (getLevel() + != other.getLevel()) return false; + if (getCharging() + != other.getCharging()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getLevel(); + hash = (37 * hash) + CHARGING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCharging()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.BatteryStatus parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.BatteryStatus parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.BatteryStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.BatteryStatus parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.BatteryStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.BatteryStatus parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.BatteryStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.BatteryStatus parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.BatteryStatus parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.BatteryStatus parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.BatteryStatus parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.BatteryStatus parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.BatteryStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.BatteryStatus} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.BatteryStatus) + mentraos.ble.MentraosBle.BatteryStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_BatteryStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_BatteryStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.BatteryStatus.class, mentraos.ble.MentraosBle.BatteryStatus.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.BatteryStatus.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + level_ = 0; + charging_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_BatteryStatus_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.BatteryStatus getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.BatteryStatus.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.BatteryStatus build() { + mentraos.ble.MentraosBle.BatteryStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.BatteryStatus buildPartial() { + mentraos.ble.MentraosBle.BatteryStatus result = new mentraos.ble.MentraosBle.BatteryStatus(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.BatteryStatus result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.level_ = level_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.charging_ = charging_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.BatteryStatus) { + return mergeFrom((mentraos.ble.MentraosBle.BatteryStatus)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.BatteryStatus other) { + if (other == mentraos.ble.MentraosBle.BatteryStatus.getDefaultInstance()) return this; + if (other.getLevel() != 0) { + setLevel(other.getLevel()); + } + if (other.getCharging() != false) { + setCharging(other.getCharging()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + level_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + charging_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int level_ ; + /** + *
+       * 0-100 percentage
+       * 
+ * + * uint32 level = 1; + * @return The level. + */ + @java.lang.Override + public int getLevel() { + return level_; + } + /** + *
+       * 0-100 percentage
+       * 
+ * + * uint32 level = 1; + * @param value The level to set. + * @return This builder for chaining. + */ + public Builder setLevel(int value) { + + level_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * 0-100 percentage
+       * 
+ * + * uint32 level = 1; + * @return This builder for chaining. + */ + public Builder clearLevel() { + bitField0_ = (bitField0_ & ~0x00000001); + level_ = 0; + onChanged(); + return this; + } + + private boolean charging_ ; + /** + * bool charging = 2; + * @return The charging. + */ + @java.lang.Override + public boolean getCharging() { + return charging_; + } + /** + * bool charging = 2; + * @param value The charging to set. + * @return This builder for chaining. + */ + public Builder setCharging(boolean value) { + + charging_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bool charging = 2; + * @return This builder for chaining. + */ + public Builder clearCharging() { + bitField0_ = (bitField0_ & ~0x00000002); + charging_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.BatteryStatus) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.BatteryStatus) + private static final mentraos.ble.MentraosBle.BatteryStatus DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.BatteryStatus(); + } + + public static mentraos.ble.MentraosBle.BatteryStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatteryStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.BatteryStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ChargingStateOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.ChargingState) + com.google.protobuf.MessageOrBuilder { + + /** + * .mentraos.ble.ChargingState.State state = 1; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * .mentraos.ble.ChargingState.State state = 1; + * @return The state. + */ + mentraos.ble.MentraosBle.ChargingState.State getState(); + } + /** + * Protobuf type {@code mentraos.ble.ChargingState} + */ + public static final class ChargingState extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.ChargingState) + ChargingStateOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + ChargingState.class.getName()); + } + // Use ChargingState.newBuilder() to construct. + private ChargingState(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ChargingState() { + state_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ChargingState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ChargingState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.ChargingState.class, mentraos.ble.MentraosBle.ChargingState.Builder.class); + } + + /** + * Protobuf enum {@code mentraos.ble.ChargingState.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + * NOT_CHARGING = 0; + */ + NOT_CHARGING(0), + /** + * CHARGING = 1; + */ + CHARGING(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + State.class.getName()); + } + /** + * NOT_CHARGING = 0; + */ + public static final int NOT_CHARGING_VALUE = 0; + /** + * CHARGING = 1; + */ + public static final int CHARGING_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return NOT_CHARGING; + case 1: return CHARGING; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return mentraos.ble.MentraosBle.ChargingState.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:mentraos.ble.ChargingState.State) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_ = 0; + /** + * .mentraos.ble.ChargingState.State state = 1; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + * .mentraos.ble.ChargingState.State state = 1; + * @return The state. + */ + @java.lang.Override public mentraos.ble.MentraosBle.ChargingState.State getState() { + mentraos.ble.MentraosBle.ChargingState.State result = mentraos.ble.MentraosBle.ChargingState.State.forNumber(state_); + return result == null ? mentraos.ble.MentraosBle.ChargingState.State.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (state_ != mentraos.ble.MentraosBle.ChargingState.State.NOT_CHARGING.getNumber()) { + output.writeEnum(1, state_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ != mentraos.ble.MentraosBle.ChargingState.State.NOT_CHARGING.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, state_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.ChargingState)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.ChargingState other = (mentraos.ble.MentraosBle.ChargingState) obj; + + if (state_ != other.state_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.ChargingState parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ChargingState parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ChargingState parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ChargingState parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ChargingState parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ChargingState parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ChargingState parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.ChargingState parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.ChargingState parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.ChargingState parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ChargingState parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.ChargingState parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.ChargingState prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.ChargingState} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.ChargingState) + mentraos.ble.MentraosBle.ChargingStateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ChargingState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ChargingState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.ChargingState.class, mentraos.ble.MentraosBle.ChargingState.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.ChargingState.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + state_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ChargingState_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ChargingState getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.ChargingState.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ChargingState build() { + mentraos.ble.MentraosBle.ChargingState result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ChargingState buildPartial() { + mentraos.ble.MentraosBle.ChargingState result = new mentraos.ble.MentraosBle.ChargingState(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.ChargingState result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.state_ = state_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.ChargingState) { + return mergeFrom((mentraos.ble.MentraosBle.ChargingState)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.ChargingState other) { + if (other == mentraos.ble.MentraosBle.ChargingState.getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + state_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int state_ = 0; + /** + * .mentraos.ble.ChargingState.State state = 1; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + * .mentraos.ble.ChargingState.State state = 1; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .mentraos.ble.ChargingState.State state = 1; + * @return The state. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ChargingState.State getState() { + mentraos.ble.MentraosBle.ChargingState.State result = mentraos.ble.MentraosBle.ChargingState.State.forNumber(state_); + return result == null ? mentraos.ble.MentraosBle.ChargingState.State.UNRECOGNIZED : result; + } + /** + * .mentraos.ble.ChargingState.State state = 1; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(mentraos.ble.MentraosBle.ChargingState.State value) { + if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000001; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .mentraos.ble.ChargingState.State state = 1; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000001); + state_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.ChargingState) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.ChargingState) + private static final mentraos.ble.MentraosBle.ChargingState DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.ChargingState(); + } + + public static mentraos.ble.MentraosBle.ChargingState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChargingState parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ChargingState getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GlassesInfoRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.GlassesInfoRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code mentraos.ble.GlassesInfoRequest} + */ + public static final class GlassesInfoRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.GlassesInfoRequest) + GlassesInfoRequestOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + GlassesInfoRequest.class.getName()); + } + // Use GlassesInfoRequest.newBuilder() to construct. + private GlassesInfoRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private GlassesInfoRequest() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_GlassesInfoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_GlassesInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.GlassesInfoRequest.class, mentraos.ble.MentraosBle.GlassesInfoRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.GlassesInfoRequest)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.GlassesInfoRequest other = (mentraos.ble.MentraosBle.GlassesInfoRequest) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.GlassesInfoRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.GlassesInfoRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.GlassesInfoRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.GlassesInfoRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.GlassesInfoRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.GlassesInfoRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.GlassesInfoRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.GlassesInfoRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.GlassesInfoRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.GlassesInfoRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.GlassesInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.GlassesInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.GlassesInfoRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.GlassesInfoRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.GlassesInfoRequest) + mentraos.ble.MentraosBle.GlassesInfoRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_GlassesInfoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_GlassesInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.GlassesInfoRequest.class, mentraos.ble.MentraosBle.GlassesInfoRequest.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.GlassesInfoRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_GlassesInfoRequest_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.GlassesInfoRequest getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.GlassesInfoRequest.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.GlassesInfoRequest build() { + mentraos.ble.MentraosBle.GlassesInfoRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.GlassesInfoRequest buildPartial() { + mentraos.ble.MentraosBle.GlassesInfoRequest result = new mentraos.ble.MentraosBle.GlassesInfoRequest(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.GlassesInfoRequest) { + return mergeFrom((mentraos.ble.MentraosBle.GlassesInfoRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.GlassesInfoRequest other) { + if (other == mentraos.ble.MentraosBle.GlassesInfoRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.GlassesInfoRequest) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.GlassesInfoRequest) + private static final mentraos.ble.MentraosBle.GlassesInfoRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.GlassesInfoRequest(); + } + + public static mentraos.ble.MentraosBle.GlassesInfoRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GlassesInfoRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.GlassesInfoRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DeviceInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.DeviceInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * string fw_version = 1; + * @return The fwVersion. + */ + java.lang.String getFwVersion(); + /** + * string fw_version = 1; + * @return The bytes for fwVersion. + */ + com.google.protobuf.ByteString + getFwVersionBytes(); + + /** + * string hw_model = 2; + * @return The hwModel. + */ + java.lang.String getHwModel(); + /** + * string hw_model = 2; + * @return The bytes for hwModel. + */ + com.google.protobuf.ByteString + getHwModelBytes(); + + /** + * .mentraos.ble.DeviceFeatures features = 3; + * @return Whether the features field is set. + */ + boolean hasFeatures(); + /** + * .mentraos.ble.DeviceFeatures features = 3; + * @return The features. + */ + mentraos.ble.MentraosBle.DeviceFeatures getFeatures(); + /** + * .mentraos.ble.DeviceFeatures features = 3; + */ + mentraos.ble.MentraosBle.DeviceFeaturesOrBuilder getFeaturesOrBuilder(); + } + /** + * Protobuf type {@code mentraos.ble.DeviceInfo} + */ + public static final class DeviceInfo extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.DeviceInfo) + DeviceInfoOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + DeviceInfo.class.getName()); + } + // Use DeviceInfo.newBuilder() to construct. + private DeviceInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DeviceInfo() { + fwVersion_ = ""; + hwModel_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DeviceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DeviceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DeviceInfo.class, mentraos.ble.MentraosBle.DeviceInfo.Builder.class); + } + + private int bitField0_; + public static final int FW_VERSION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object fwVersion_ = ""; + /** + * string fw_version = 1; + * @return The fwVersion. + */ + @java.lang.Override + public java.lang.String getFwVersion() { + java.lang.Object ref = fwVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fwVersion_ = s; + return s; + } + } + /** + * string fw_version = 1; + * @return The bytes for fwVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFwVersionBytes() { + java.lang.Object ref = fwVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fwVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HW_MODEL_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object hwModel_ = ""; + /** + * string hw_model = 2; + * @return The hwModel. + */ + @java.lang.Override + public java.lang.String getHwModel() { + java.lang.Object ref = hwModel_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hwModel_ = s; + return s; + } + } + /** + * string hw_model = 2; + * @return The bytes for hwModel. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHwModelBytes() { + java.lang.Object ref = hwModel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hwModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEATURES_FIELD_NUMBER = 3; + private mentraos.ble.MentraosBle.DeviceFeatures features_; + /** + * .mentraos.ble.DeviceFeatures features = 3; + * @return Whether the features field is set. + */ + @java.lang.Override + public boolean hasFeatures() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .mentraos.ble.DeviceFeatures features = 3; + * @return The features. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DeviceFeatures getFeatures() { + return features_ == null ? mentraos.ble.MentraosBle.DeviceFeatures.getDefaultInstance() : features_; + } + /** + * .mentraos.ble.DeviceFeatures features = 3; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DeviceFeaturesOrBuilder getFeaturesOrBuilder() { + return features_ == null ? mentraos.ble.MentraosBle.DeviceFeatures.getDefaultInstance() : features_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fwVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, fwVersion_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hwModel_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, hwModel_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getFeatures()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fwVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, fwVersion_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hwModel_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, hwModel_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getFeatures()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.DeviceInfo)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.DeviceInfo other = (mentraos.ble.MentraosBle.DeviceInfo) obj; + + if (!getFwVersion() + .equals(other.getFwVersion())) return false; + if (!getHwModel() + .equals(other.getHwModel())) return false; + if (hasFeatures() != other.hasFeatures()) return false; + if (hasFeatures()) { + if (!getFeatures() + .equals(other.getFeatures())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FW_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getFwVersion().hashCode(); + hash = (37 * hash) + HW_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getHwModel().hashCode(); + if (hasFeatures()) { + hash = (37 * hash) + FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getFeatures().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.DeviceInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DeviceInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DeviceInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DeviceInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DeviceInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DeviceInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DeviceInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DeviceInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.DeviceInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.DeviceInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DeviceInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DeviceInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.DeviceInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.DeviceInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.DeviceInfo) + mentraos.ble.MentraosBle.DeviceInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DeviceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DeviceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DeviceInfo.class, mentraos.ble.MentraosBle.DeviceInfo.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.DeviceInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + internalGetFeaturesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fwVersion_ = ""; + hwModel_ = ""; + features_ = null; + if (featuresBuilder_ != null) { + featuresBuilder_.dispose(); + featuresBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DeviceInfo_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DeviceInfo getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.DeviceInfo.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DeviceInfo build() { + mentraos.ble.MentraosBle.DeviceInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DeviceInfo buildPartial() { + mentraos.ble.MentraosBle.DeviceInfo result = new mentraos.ble.MentraosBle.DeviceInfo(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.DeviceInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fwVersion_ = fwVersion_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.hwModel_ = hwModel_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.features_ = featuresBuilder_ == null + ? features_ + : featuresBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.DeviceInfo) { + return mergeFrom((mentraos.ble.MentraosBle.DeviceInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.DeviceInfo other) { + if (other == mentraos.ble.MentraosBle.DeviceInfo.getDefaultInstance()) return this; + if (!other.getFwVersion().isEmpty()) { + fwVersion_ = other.fwVersion_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getHwModel().isEmpty()) { + hwModel_ = other.hwModel_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasFeatures()) { + mergeFeatures(other.getFeatures()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + fwVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + hwModel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + internalGetFeaturesFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object fwVersion_ = ""; + /** + * string fw_version = 1; + * @return The fwVersion. + */ + public java.lang.String getFwVersion() { + java.lang.Object ref = fwVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fwVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string fw_version = 1; + * @return The bytes for fwVersion. + */ + public com.google.protobuf.ByteString + getFwVersionBytes() { + java.lang.Object ref = fwVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fwVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string fw_version = 1; + * @param value The fwVersion to set. + * @return This builder for chaining. + */ + public Builder setFwVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + fwVersion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string fw_version = 1; + * @return This builder for chaining. + */ + public Builder clearFwVersion() { + fwVersion_ = getDefaultInstance().getFwVersion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string fw_version = 1; + * @param value The bytes for fwVersion to set. + * @return This builder for chaining. + */ + public Builder setFwVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fwVersion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object hwModel_ = ""; + /** + * string hw_model = 2; + * @return The hwModel. + */ + public java.lang.String getHwModel() { + java.lang.Object ref = hwModel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hwModel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string hw_model = 2; + * @return The bytes for hwModel. + */ + public com.google.protobuf.ByteString + getHwModelBytes() { + java.lang.Object ref = hwModel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hwModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string hw_model = 2; + * @param value The hwModel to set. + * @return This builder for chaining. + */ + public Builder setHwModel( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + hwModel_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string hw_model = 2; + * @return This builder for chaining. + */ + public Builder clearHwModel() { + hwModel_ = getDefaultInstance().getHwModel(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string hw_model = 2; + * @param value The bytes for hwModel to set. + * @return This builder for chaining. + */ + public Builder setHwModelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + hwModel_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private mentraos.ble.MentraosBle.DeviceFeatures features_; + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DeviceFeatures, mentraos.ble.MentraosBle.DeviceFeatures.Builder, mentraos.ble.MentraosBle.DeviceFeaturesOrBuilder> featuresBuilder_; + /** + * .mentraos.ble.DeviceFeatures features = 3; + * @return Whether the features field is set. + */ + public boolean hasFeatures() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .mentraos.ble.DeviceFeatures features = 3; + * @return The features. + */ + public mentraos.ble.MentraosBle.DeviceFeatures getFeatures() { + if (featuresBuilder_ == null) { + return features_ == null ? mentraos.ble.MentraosBle.DeviceFeatures.getDefaultInstance() : features_; + } else { + return featuresBuilder_.getMessage(); + } + } + /** + * .mentraos.ble.DeviceFeatures features = 3; + */ + public Builder setFeatures(mentraos.ble.MentraosBle.DeviceFeatures value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + features_ = value; + } else { + featuresBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .mentraos.ble.DeviceFeatures features = 3; + */ + public Builder setFeatures( + mentraos.ble.MentraosBle.DeviceFeatures.Builder builderForValue) { + if (featuresBuilder_ == null) { + features_ = builderForValue.build(); + } else { + featuresBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .mentraos.ble.DeviceFeatures features = 3; + */ + public Builder mergeFeatures(mentraos.ble.MentraosBle.DeviceFeatures value) { + if (featuresBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + features_ != null && + features_ != mentraos.ble.MentraosBle.DeviceFeatures.getDefaultInstance()) { + getFeaturesBuilder().mergeFrom(value); + } else { + features_ = value; + } + } else { + featuresBuilder_.mergeFrom(value); + } + if (features_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * .mentraos.ble.DeviceFeatures features = 3; + */ + public Builder clearFeatures() { + bitField0_ = (bitField0_ & ~0x00000004); + features_ = null; + if (featuresBuilder_ != null) { + featuresBuilder_.dispose(); + featuresBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .mentraos.ble.DeviceFeatures features = 3; + */ + public mentraos.ble.MentraosBle.DeviceFeatures.Builder getFeaturesBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetFeaturesFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.DeviceFeatures features = 3; + */ + public mentraos.ble.MentraosBle.DeviceFeaturesOrBuilder getFeaturesOrBuilder() { + if (featuresBuilder_ != null) { + return featuresBuilder_.getMessageOrBuilder(); + } else { + return features_ == null ? + mentraos.ble.MentraosBle.DeviceFeatures.getDefaultInstance() : features_; + } + } + /** + * .mentraos.ble.DeviceFeatures features = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DeviceFeatures, mentraos.ble.MentraosBle.DeviceFeatures.Builder, mentraos.ble.MentraosBle.DeviceFeaturesOrBuilder> + internalGetFeaturesFieldBuilder() { + if (featuresBuilder_ == null) { + featuresBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DeviceFeatures, mentraos.ble.MentraosBle.DeviceFeatures.Builder, mentraos.ble.MentraosBle.DeviceFeaturesOrBuilder>( + getFeatures(), + getParentForChildren(), + isClean()); + features_ = null; + } + return featuresBuilder_; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.DeviceInfo) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.DeviceInfo) + private static final mentraos.ble.MentraosBle.DeviceInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.DeviceInfo(); + } + + public static mentraos.ble.MentraosBle.DeviceInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeviceInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DeviceInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DeviceFeaturesOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.DeviceFeatures) + com.google.protobuf.MessageOrBuilder { + + /** + * bool camera = 1; + * @return The camera. + */ + boolean getCamera(); + + /** + * bool display = 2; + * @return The display. + */ + boolean getDisplay(); + + /** + * bool audio_tx = 3; + * @return The audioTx. + */ + boolean getAudioTx(); + + /** + * bool audio_rx = 4; + * @return The audioRx. + */ + boolean getAudioRx(); + + /** + * bool imu = 5; + * @return The imu. + */ + boolean getImu(); + + /** + * bool vad = 6; + * @return The vad. + */ + boolean getVad(); + + /** + * bool mic_switching = 7; + * @return The micSwitching. + */ + boolean getMicSwitching(); + + /** + *
+     * Max chunks that can be buffered
+     * 
+ * + * uint32 image_chunk_buffer = 8; + * @return The imageChunkBuffer. + */ + int getImageChunkBuffer(); + } + /** + * Protobuf type {@code mentraos.ble.DeviceFeatures} + */ + public static final class DeviceFeatures extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.DeviceFeatures) + DeviceFeaturesOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + DeviceFeatures.class.getName()); + } + // Use DeviceFeatures.newBuilder() to construct. + private DeviceFeatures(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DeviceFeatures() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DeviceFeatures_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DeviceFeatures_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DeviceFeatures.class, mentraos.ble.MentraosBle.DeviceFeatures.Builder.class); + } + + public static final int CAMERA_FIELD_NUMBER = 1; + private boolean camera_ = false; + /** + * bool camera = 1; + * @return The camera. + */ + @java.lang.Override + public boolean getCamera() { + return camera_; + } + + public static final int DISPLAY_FIELD_NUMBER = 2; + private boolean display_ = false; + /** + * bool display = 2; + * @return The display. + */ + @java.lang.Override + public boolean getDisplay() { + return display_; + } + + public static final int AUDIO_TX_FIELD_NUMBER = 3; + private boolean audioTx_ = false; + /** + * bool audio_tx = 3; + * @return The audioTx. + */ + @java.lang.Override + public boolean getAudioTx() { + return audioTx_; + } + + public static final int AUDIO_RX_FIELD_NUMBER = 4; + private boolean audioRx_ = false; + /** + * bool audio_rx = 4; + * @return The audioRx. + */ + @java.lang.Override + public boolean getAudioRx() { + return audioRx_; + } + + public static final int IMU_FIELD_NUMBER = 5; + private boolean imu_ = false; + /** + * bool imu = 5; + * @return The imu. + */ + @java.lang.Override + public boolean getImu() { + return imu_; + } + + public static final int VAD_FIELD_NUMBER = 6; + private boolean vad_ = false; + /** + * bool vad = 6; + * @return The vad. + */ + @java.lang.Override + public boolean getVad() { + return vad_; + } + + public static final int MIC_SWITCHING_FIELD_NUMBER = 7; + private boolean micSwitching_ = false; + /** + * bool mic_switching = 7; + * @return The micSwitching. + */ + @java.lang.Override + public boolean getMicSwitching() { + return micSwitching_; + } + + public static final int IMAGE_CHUNK_BUFFER_FIELD_NUMBER = 8; + private int imageChunkBuffer_ = 0; + /** + *
+     * Max chunks that can be buffered
+     * 
+ * + * uint32 image_chunk_buffer = 8; + * @return The imageChunkBuffer. + */ + @java.lang.Override + public int getImageChunkBuffer() { + return imageChunkBuffer_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (camera_ != false) { + output.writeBool(1, camera_); + } + if (display_ != false) { + output.writeBool(2, display_); + } + if (audioTx_ != false) { + output.writeBool(3, audioTx_); + } + if (audioRx_ != false) { + output.writeBool(4, audioRx_); + } + if (imu_ != false) { + output.writeBool(5, imu_); + } + if (vad_ != false) { + output.writeBool(6, vad_); + } + if (micSwitching_ != false) { + output.writeBool(7, micSwitching_); + } + if (imageChunkBuffer_ != 0) { + output.writeUInt32(8, imageChunkBuffer_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (camera_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, camera_); + } + if (display_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, display_); + } + if (audioTx_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, audioTx_); + } + if (audioRx_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, audioRx_); + } + if (imu_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, imu_); + } + if (vad_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, vad_); + } + if (micSwitching_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, micSwitching_); + } + if (imageChunkBuffer_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(8, imageChunkBuffer_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.DeviceFeatures)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.DeviceFeatures other = (mentraos.ble.MentraosBle.DeviceFeatures) obj; + + if (getCamera() + != other.getCamera()) return false; + if (getDisplay() + != other.getDisplay()) return false; + if (getAudioTx() + != other.getAudioTx()) return false; + if (getAudioRx() + != other.getAudioRx()) return false; + if (getImu() + != other.getImu()) return false; + if (getVad() + != other.getVad()) return false; + if (getMicSwitching() + != other.getMicSwitching()) return false; + if (getImageChunkBuffer() + != other.getImageChunkBuffer()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CAMERA_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCamera()); + hash = (37 * hash) + DISPLAY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDisplay()); + hash = (37 * hash) + AUDIO_TX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAudioTx()); + hash = (37 * hash) + AUDIO_RX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAudioRx()); + hash = (37 * hash) + IMU_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getImu()); + hash = (37 * hash) + VAD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getVad()); + hash = (37 * hash) + MIC_SWITCHING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getMicSwitching()); + hash = (37 * hash) + IMAGE_CHUNK_BUFFER_FIELD_NUMBER; + hash = (53 * hash) + getImageChunkBuffer(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.DeviceFeatures parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DeviceFeatures parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DeviceFeatures parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DeviceFeatures parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DeviceFeatures parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DeviceFeatures parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DeviceFeatures parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DeviceFeatures parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.DeviceFeatures parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.DeviceFeatures parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DeviceFeatures parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DeviceFeatures parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.DeviceFeatures prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.DeviceFeatures} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.DeviceFeatures) + mentraos.ble.MentraosBle.DeviceFeaturesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DeviceFeatures_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DeviceFeatures_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DeviceFeatures.class, mentraos.ble.MentraosBle.DeviceFeatures.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.DeviceFeatures.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + camera_ = false; + display_ = false; + audioTx_ = false; + audioRx_ = false; + imu_ = false; + vad_ = false; + micSwitching_ = false; + imageChunkBuffer_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DeviceFeatures_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DeviceFeatures getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.DeviceFeatures.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DeviceFeatures build() { + mentraos.ble.MentraosBle.DeviceFeatures result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DeviceFeatures buildPartial() { + mentraos.ble.MentraosBle.DeviceFeatures result = new mentraos.ble.MentraosBle.DeviceFeatures(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.DeviceFeatures result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.camera_ = camera_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.display_ = display_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.audioTx_ = audioTx_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.audioRx_ = audioRx_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.imu_ = imu_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.vad_ = vad_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.micSwitching_ = micSwitching_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.imageChunkBuffer_ = imageChunkBuffer_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.DeviceFeatures) { + return mergeFrom((mentraos.ble.MentraosBle.DeviceFeatures)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.DeviceFeatures other) { + if (other == mentraos.ble.MentraosBle.DeviceFeatures.getDefaultInstance()) return this; + if (other.getCamera() != false) { + setCamera(other.getCamera()); + } + if (other.getDisplay() != false) { + setDisplay(other.getDisplay()); + } + if (other.getAudioTx() != false) { + setAudioTx(other.getAudioTx()); + } + if (other.getAudioRx() != false) { + setAudioRx(other.getAudioRx()); + } + if (other.getImu() != false) { + setImu(other.getImu()); + } + if (other.getVad() != false) { + setVad(other.getVad()); + } + if (other.getMicSwitching() != false) { + setMicSwitching(other.getMicSwitching()); + } + if (other.getImageChunkBuffer() != 0) { + setImageChunkBuffer(other.getImageChunkBuffer()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + camera_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + display_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + audioTx_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + audioRx_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + imu_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + vad_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + micSwitching_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + imageChunkBuffer_ = input.readUInt32(); + bitField0_ |= 0x00000080; + break; + } // case 64 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean camera_ ; + /** + * bool camera = 1; + * @return The camera. + */ + @java.lang.Override + public boolean getCamera() { + return camera_; + } + /** + * bool camera = 1; + * @param value The camera to set. + * @return This builder for chaining. + */ + public Builder setCamera(boolean value) { + + camera_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool camera = 1; + * @return This builder for chaining. + */ + public Builder clearCamera() { + bitField0_ = (bitField0_ & ~0x00000001); + camera_ = false; + onChanged(); + return this; + } + + private boolean display_ ; + /** + * bool display = 2; + * @return The display. + */ + @java.lang.Override + public boolean getDisplay() { + return display_; + } + /** + * bool display = 2; + * @param value The display to set. + * @return This builder for chaining. + */ + public Builder setDisplay(boolean value) { + + display_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bool display = 2; + * @return This builder for chaining. + */ + public Builder clearDisplay() { + bitField0_ = (bitField0_ & ~0x00000002); + display_ = false; + onChanged(); + return this; + } + + private boolean audioTx_ ; + /** + * bool audio_tx = 3; + * @return The audioTx. + */ + @java.lang.Override + public boolean getAudioTx() { + return audioTx_; + } + /** + * bool audio_tx = 3; + * @param value The audioTx to set. + * @return This builder for chaining. + */ + public Builder setAudioTx(boolean value) { + + audioTx_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * bool audio_tx = 3; + * @return This builder for chaining. + */ + public Builder clearAudioTx() { + bitField0_ = (bitField0_ & ~0x00000004); + audioTx_ = false; + onChanged(); + return this; + } + + private boolean audioRx_ ; + /** + * bool audio_rx = 4; + * @return The audioRx. + */ + @java.lang.Override + public boolean getAudioRx() { + return audioRx_; + } + /** + * bool audio_rx = 4; + * @param value The audioRx to set. + * @return This builder for chaining. + */ + public Builder setAudioRx(boolean value) { + + audioRx_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * bool audio_rx = 4; + * @return This builder for chaining. + */ + public Builder clearAudioRx() { + bitField0_ = (bitField0_ & ~0x00000008); + audioRx_ = false; + onChanged(); + return this; + } + + private boolean imu_ ; + /** + * bool imu = 5; + * @return The imu. + */ + @java.lang.Override + public boolean getImu() { + return imu_; + } + /** + * bool imu = 5; + * @param value The imu to set. + * @return This builder for chaining. + */ + public Builder setImu(boolean value) { + + imu_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * bool imu = 5; + * @return This builder for chaining. + */ + public Builder clearImu() { + bitField0_ = (bitField0_ & ~0x00000010); + imu_ = false; + onChanged(); + return this; + } + + private boolean vad_ ; + /** + * bool vad = 6; + * @return The vad. + */ + @java.lang.Override + public boolean getVad() { + return vad_; + } + /** + * bool vad = 6; + * @param value The vad to set. + * @return This builder for chaining. + */ + public Builder setVad(boolean value) { + + vad_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * bool vad = 6; + * @return This builder for chaining. + */ + public Builder clearVad() { + bitField0_ = (bitField0_ & ~0x00000020); + vad_ = false; + onChanged(); + return this; + } + + private boolean micSwitching_ ; + /** + * bool mic_switching = 7; + * @return The micSwitching. + */ + @java.lang.Override + public boolean getMicSwitching() { + return micSwitching_; + } + /** + * bool mic_switching = 7; + * @param value The micSwitching to set. + * @return This builder for chaining. + */ + public Builder setMicSwitching(boolean value) { + + micSwitching_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * bool mic_switching = 7; + * @return This builder for chaining. + */ + public Builder clearMicSwitching() { + bitField0_ = (bitField0_ & ~0x00000040); + micSwitching_ = false; + onChanged(); + return this; + } + + private int imageChunkBuffer_ ; + /** + *
+       * Max chunks that can be buffered
+       * 
+ * + * uint32 image_chunk_buffer = 8; + * @return The imageChunkBuffer. + */ + @java.lang.Override + public int getImageChunkBuffer() { + return imageChunkBuffer_; + } + /** + *
+       * Max chunks that can be buffered
+       * 
+ * + * uint32 image_chunk_buffer = 8; + * @param value The imageChunkBuffer to set. + * @return This builder for chaining. + */ + public Builder setImageChunkBuffer(int value) { + + imageChunkBuffer_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+       * Max chunks that can be buffered
+       * 
+ * + * uint32 image_chunk_buffer = 8; + * @return This builder for chaining. + */ + public Builder clearImageChunkBuffer() { + bitField0_ = (bitField0_ & ~0x00000080); + imageChunkBuffer_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.DeviceFeatures) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.DeviceFeatures) + private static final mentraos.ble.MentraosBle.DeviceFeatures DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.DeviceFeatures(); + } + + public static mentraos.ble.MentraosBle.DeviceFeatures getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeviceFeatures parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DeviceFeatures getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PairingModeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.PairingModeRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code mentraos.ble.PairingModeRequest} + */ + public static final class PairingModeRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.PairingModeRequest) + PairingModeRequestOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + PairingModeRequest.class.getName()); + } + // Use PairingModeRequest.newBuilder() to construct. + private PairingModeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PairingModeRequest() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_PairingModeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_PairingModeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.PairingModeRequest.class, mentraos.ble.MentraosBle.PairingModeRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.PairingModeRequest)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.PairingModeRequest other = (mentraos.ble.MentraosBle.PairingModeRequest) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.PairingModeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.PairingModeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.PairingModeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.PairingModeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.PairingModeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.PairingModeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.PairingModeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.PairingModeRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.PairingModeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.PairingModeRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.PairingModeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.PairingModeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.PairingModeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.PairingModeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.PairingModeRequest) + mentraos.ble.MentraosBle.PairingModeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_PairingModeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_PairingModeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.PairingModeRequest.class, mentraos.ble.MentraosBle.PairingModeRequest.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.PairingModeRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_PairingModeRequest_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.PairingModeRequest getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.PairingModeRequest.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.PairingModeRequest build() { + mentraos.ble.MentraosBle.PairingModeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.PairingModeRequest buildPartial() { + mentraos.ble.MentraosBle.PairingModeRequest result = new mentraos.ble.MentraosBle.PairingModeRequest(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.PairingModeRequest) { + return mergeFrom((mentraos.ble.MentraosBle.PairingModeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.PairingModeRequest other) { + if (other == mentraos.ble.MentraosBle.PairingModeRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.PairingModeRequest) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.PairingModeRequest) + private static final mentraos.ble.MentraosBle.PairingModeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.PairingModeRequest(); + } + + public static mentraos.ble.MentraosBle.PairingModeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PairingModeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.PairingModeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HeadPositionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.HeadPositionRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code mentraos.ble.HeadPositionRequest} + */ + public static final class HeadPositionRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.HeadPositionRequest) + HeadPositionRequestOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + HeadPositionRequest.class.getName()); + } + // Use HeadPositionRequest.newBuilder() to construct. + private HeadPositionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private HeadPositionRequest() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_HeadPositionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_HeadPositionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.HeadPositionRequest.class, mentraos.ble.MentraosBle.HeadPositionRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.HeadPositionRequest)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.HeadPositionRequest other = (mentraos.ble.MentraosBle.HeadPositionRequest) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.HeadPositionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.HeadPositionRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.HeadPositionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.HeadPositionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.HeadPositionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.HeadPositionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.HeadPositionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.HeadPositionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.HeadPositionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.HeadPositionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.HeadPositionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.HeadPositionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.HeadPositionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.HeadPositionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.HeadPositionRequest) + mentraos.ble.MentraosBle.HeadPositionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_HeadPositionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_HeadPositionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.HeadPositionRequest.class, mentraos.ble.MentraosBle.HeadPositionRequest.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.HeadPositionRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_HeadPositionRequest_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.HeadPositionRequest getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.HeadPositionRequest.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.HeadPositionRequest build() { + mentraos.ble.MentraosBle.HeadPositionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.HeadPositionRequest buildPartial() { + mentraos.ble.MentraosBle.HeadPositionRequest result = new mentraos.ble.MentraosBle.HeadPositionRequest(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.HeadPositionRequest) { + return mergeFrom((mentraos.ble.MentraosBle.HeadPositionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.HeadPositionRequest other) { + if (other == mentraos.ble.MentraosBle.HeadPositionRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.HeadPositionRequest) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.HeadPositionRequest) + private static final mentraos.ble.MentraosBle.HeadPositionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.HeadPositionRequest(); + } + + public static mentraos.ble.MentraosBle.HeadPositionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HeadPositionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.HeadPositionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HeadPositionOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.HeadPosition) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * degrees
+     * 
+ * + * int32 angle = 1; + * @return The angle. + */ + int getAngle(); + } + /** + * Protobuf type {@code mentraos.ble.HeadPosition} + */ + public static final class HeadPosition extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.HeadPosition) + HeadPositionOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + HeadPosition.class.getName()); + } + // Use HeadPosition.newBuilder() to construct. + private HeadPosition(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private HeadPosition() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_HeadPosition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_HeadPosition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.HeadPosition.class, mentraos.ble.MentraosBle.HeadPosition.Builder.class); + } + + public static final int ANGLE_FIELD_NUMBER = 1; + private int angle_ = 0; + /** + *
+     * degrees
+     * 
+ * + * int32 angle = 1; + * @return The angle. + */ + @java.lang.Override + public int getAngle() { + return angle_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (angle_ != 0) { + output.writeInt32(1, angle_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (angle_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, angle_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.HeadPosition)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.HeadPosition other = (mentraos.ble.MentraosBle.HeadPosition) obj; + + if (getAngle() + != other.getAngle()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ANGLE_FIELD_NUMBER; + hash = (53 * hash) + getAngle(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.HeadPosition parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.HeadPosition parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.HeadPosition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.HeadPosition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.HeadPosition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.HeadPosition parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.HeadPosition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.HeadPosition parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.HeadPosition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.HeadPosition parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.HeadPosition parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.HeadPosition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.HeadPosition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.HeadPosition} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.HeadPosition) + mentraos.ble.MentraosBle.HeadPositionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_HeadPosition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_HeadPosition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.HeadPosition.class, mentraos.ble.MentraosBle.HeadPosition.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.HeadPosition.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + angle_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_HeadPosition_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.HeadPosition getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.HeadPosition.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.HeadPosition build() { + mentraos.ble.MentraosBle.HeadPosition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.HeadPosition buildPartial() { + mentraos.ble.MentraosBle.HeadPosition result = new mentraos.ble.MentraosBle.HeadPosition(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.HeadPosition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.angle_ = angle_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.HeadPosition) { + return mergeFrom((mentraos.ble.MentraosBle.HeadPosition)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.HeadPosition other) { + if (other == mentraos.ble.MentraosBle.HeadPosition.getDefaultInstance()) return this; + if (other.getAngle() != 0) { + setAngle(other.getAngle()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + angle_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int angle_ ; + /** + *
+       * degrees
+       * 
+ * + * int32 angle = 1; + * @return The angle. + */ + @java.lang.Override + public int getAngle() { + return angle_; + } + /** + *
+       * degrees
+       * 
+ * + * int32 angle = 1; + * @param value The angle to set. + * @return This builder for chaining. + */ + public Builder setAngle(int value) { + + angle_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * degrees
+       * 
+ * + * int32 angle = 1; + * @return This builder for chaining. + */ + public Builder clearAngle() { + bitField0_ = (bitField0_ & ~0x00000001); + angle_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.HeadPosition) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.HeadPosition) + private static final mentraos.ble.MentraosBle.HeadPosition DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.HeadPosition(); + } + + public static mentraos.ble.MentraosBle.HeadPosition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HeadPosition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.HeadPosition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HeadUpAngleConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.HeadUpAngleConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * degrees
+     * 
+ * + * uint32 angle = 1; + * @return The angle. + */ + int getAngle(); + } + /** + * Protobuf type {@code mentraos.ble.HeadUpAngleConfig} + */ + public static final class HeadUpAngleConfig extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.HeadUpAngleConfig) + HeadUpAngleConfigOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + HeadUpAngleConfig.class.getName()); + } + // Use HeadUpAngleConfig.newBuilder() to construct. + private HeadUpAngleConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private HeadUpAngleConfig() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_HeadUpAngleConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_HeadUpAngleConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.HeadUpAngleConfig.class, mentraos.ble.MentraosBle.HeadUpAngleConfig.Builder.class); + } + + public static final int ANGLE_FIELD_NUMBER = 1; + private int angle_ = 0; + /** + *
+     * degrees
+     * 
+ * + * uint32 angle = 1; + * @return The angle. + */ + @java.lang.Override + public int getAngle() { + return angle_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (angle_ != 0) { + output.writeUInt32(1, angle_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (angle_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, angle_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.HeadUpAngleConfig)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.HeadUpAngleConfig other = (mentraos.ble.MentraosBle.HeadUpAngleConfig) obj; + + if (getAngle() + != other.getAngle()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ANGLE_FIELD_NUMBER; + hash = (53 * hash) + getAngle(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.HeadUpAngleConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.HeadUpAngleConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.HeadUpAngleConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.HeadUpAngleConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.HeadUpAngleConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.HeadUpAngleConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.HeadUpAngleConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.HeadUpAngleConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.HeadUpAngleConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.HeadUpAngleConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.HeadUpAngleConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.HeadUpAngleConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.HeadUpAngleConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.HeadUpAngleConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.HeadUpAngleConfig) + mentraos.ble.MentraosBle.HeadUpAngleConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_HeadUpAngleConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_HeadUpAngleConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.HeadUpAngleConfig.class, mentraos.ble.MentraosBle.HeadUpAngleConfig.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.HeadUpAngleConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + angle_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_HeadUpAngleConfig_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.HeadUpAngleConfig getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.HeadUpAngleConfig.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.HeadUpAngleConfig build() { + mentraos.ble.MentraosBle.HeadUpAngleConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.HeadUpAngleConfig buildPartial() { + mentraos.ble.MentraosBle.HeadUpAngleConfig result = new mentraos.ble.MentraosBle.HeadUpAngleConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.HeadUpAngleConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.angle_ = angle_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.HeadUpAngleConfig) { + return mergeFrom((mentraos.ble.MentraosBle.HeadUpAngleConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.HeadUpAngleConfig other) { + if (other == mentraos.ble.MentraosBle.HeadUpAngleConfig.getDefaultInstance()) return this; + if (other.getAngle() != 0) { + setAngle(other.getAngle()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + angle_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int angle_ ; + /** + *
+       * degrees
+       * 
+ * + * uint32 angle = 1; + * @return The angle. + */ + @java.lang.Override + public int getAngle() { + return angle_; + } + /** + *
+       * degrees
+       * 
+ * + * uint32 angle = 1; + * @param value The angle to set. + * @return This builder for chaining. + */ + public Builder setAngle(int value) { + + angle_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * degrees
+       * 
+ * + * uint32 angle = 1; + * @return This builder for chaining. + */ + public Builder clearAngle() { + bitField0_ = (bitField0_ & ~0x00000001); + angle_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.HeadUpAngleConfig) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.HeadUpAngleConfig) + private static final mentraos.ble.MentraosBle.HeadUpAngleConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.HeadUpAngleConfig(); + } + + public static mentraos.ble.MentraosBle.HeadUpAngleConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HeadUpAngleConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.HeadUpAngleConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HeadUpAngleResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.HeadUpAngleResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * bool success = 1; + * @return The success. + */ + boolean getSuccess(); + } + /** + * Protobuf type {@code mentraos.ble.HeadUpAngleResponse} + */ + public static final class HeadUpAngleResponse extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.HeadUpAngleResponse) + HeadUpAngleResponseOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + HeadUpAngleResponse.class.getName()); + } + // Use HeadUpAngleResponse.newBuilder() to construct. + private HeadUpAngleResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private HeadUpAngleResponse() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_HeadUpAngleResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_HeadUpAngleResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.HeadUpAngleResponse.class, mentraos.ble.MentraosBle.HeadUpAngleResponse.Builder.class); + } + + public static final int SUCCESS_FIELD_NUMBER = 1; + private boolean success_ = false; + /** + * bool success = 1; + * @return The success. + */ + @java.lang.Override + public boolean getSuccess() { + return success_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (success_ != false) { + output.writeBool(1, success_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (success_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, success_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.HeadUpAngleResponse)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.HeadUpAngleResponse other = (mentraos.ble.MentraosBle.HeadUpAngleResponse) obj; + + if (getSuccess() + != other.getSuccess()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SUCCESS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSuccess()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.HeadUpAngleResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.HeadUpAngleResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.HeadUpAngleResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.HeadUpAngleResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.HeadUpAngleResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.HeadUpAngleResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.HeadUpAngleResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.HeadUpAngleResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.HeadUpAngleResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.HeadUpAngleResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.HeadUpAngleResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.HeadUpAngleResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.HeadUpAngleResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.HeadUpAngleResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.HeadUpAngleResponse) + mentraos.ble.MentraosBle.HeadUpAngleResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_HeadUpAngleResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_HeadUpAngleResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.HeadUpAngleResponse.class, mentraos.ble.MentraosBle.HeadUpAngleResponse.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.HeadUpAngleResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + success_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_HeadUpAngleResponse_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.HeadUpAngleResponse getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.HeadUpAngleResponse.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.HeadUpAngleResponse build() { + mentraos.ble.MentraosBle.HeadUpAngleResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.HeadUpAngleResponse buildPartial() { + mentraos.ble.MentraosBle.HeadUpAngleResponse result = new mentraos.ble.MentraosBle.HeadUpAngleResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.HeadUpAngleResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.success_ = success_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.HeadUpAngleResponse) { + return mergeFrom((mentraos.ble.MentraosBle.HeadUpAngleResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.HeadUpAngleResponse other) { + if (other == mentraos.ble.MentraosBle.HeadUpAngleResponse.getDefaultInstance()) return this; + if (other.getSuccess() != false) { + setSuccess(other.getSuccess()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + success_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean success_ ; + /** + * bool success = 1; + * @return The success. + */ + @java.lang.Override + public boolean getSuccess() { + return success_; + } + /** + * bool success = 1; + * @param value The success to set. + * @return This builder for chaining. + */ + public Builder setSuccess(boolean value) { + + success_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool success = 1; + * @return This builder for chaining. + */ + public Builder clearSuccess() { + bitField0_ = (bitField0_ & ~0x00000001); + success_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.HeadUpAngleResponse) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.HeadUpAngleResponse) + private static final mentraos.ble.MentraosBle.HeadUpAngleResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.HeadUpAngleResponse(); + } + + public static mentraos.ble.MentraosBle.HeadUpAngleResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HeadUpAngleResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.HeadUpAngleResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PingRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.PingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string msg_id = 1; + * @return The msgId. + */ + java.lang.String getMsgId(); + /** + * string msg_id = 1; + * @return The bytes for msgId. + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + } + /** + * Protobuf type {@code mentraos.ble.PingRequest} + */ + public static final class PingRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.PingRequest) + PingRequestOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + PingRequest.class.getName()); + } + // Use PingRequest.newBuilder() to construct. + private PingRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PingRequest() { + msgId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_PingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_PingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.PingRequest.class, mentraos.ble.MentraosBle.PingRequest.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + * @return The msgId. + */ + @java.lang.Override + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + * string msg_id = 1; + * @return The bytes for msgId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(msgId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, msgId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(msgId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, msgId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.PingRequest)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.PingRequest other = (mentraos.ble.MentraosBle.PingRequest) obj; + + if (!getMsgId() + .equals(other.getMsgId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.PingRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.PingRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.PingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.PingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.PingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.PingRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.PingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.PingRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.PingRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.PingRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.PingRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.PingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.PingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.PingRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.PingRequest) + mentraos.ble.MentraosBle.PingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_PingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_PingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.PingRequest.class, mentraos.ble.MentraosBle.PingRequest.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.PingRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + msgId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_PingRequest_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.PingRequest getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.PingRequest.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.PingRequest build() { + mentraos.ble.MentraosBle.PingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.PingRequest buildPartial() { + mentraos.ble.MentraosBle.PingRequest result = new mentraos.ble.MentraosBle.PingRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.PingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.msgId_ = msgId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.PingRequest) { + return mergeFrom((mentraos.ble.MentraosBle.PingRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.PingRequest other) { + if (other == mentraos.ble.MentraosBle.PingRequest.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + msgId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + * @return The msgId. + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg_id = 1; + * @return The bytes for msgId. + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg_id = 1; + * @param value The msgId to set. + * @return This builder for chaining. + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msgId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string msg_id = 1; + * @return This builder for chaining. + */ + public Builder clearMsgId() { + msgId_ = getDefaultInstance().getMsgId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string msg_id = 1; + * @param value The bytes for msgId to set. + * @return This builder for chaining. + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msgId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.PingRequest) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.PingRequest) + private static final mentraos.ble.MentraosBle.PingRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.PingRequest(); + } + + public static mentraos.ble.MentraosBle.PingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.PingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PongResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.PongResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code mentraos.ble.PongResponse} + */ + public static final class PongResponse extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.PongResponse) + PongResponseOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + PongResponse.class.getName()); + } + // Use PongResponse.newBuilder() to construct. + private PongResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PongResponse() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_PongResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_PongResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.PongResponse.class, mentraos.ble.MentraosBle.PongResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.PongResponse)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.PongResponse other = (mentraos.ble.MentraosBle.PongResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.PongResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.PongResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.PongResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.PongResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.PongResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.PongResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.PongResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.PongResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.PongResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.PongResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.PongResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.PongResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.PongResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.PongResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.PongResponse) + mentraos.ble.MentraosBle.PongResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_PongResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_PongResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.PongResponse.class, mentraos.ble.MentraosBle.PongResponse.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.PongResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_PongResponse_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.PongResponse getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.PongResponse.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.PongResponse build() { + mentraos.ble.MentraosBle.PongResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.PongResponse buildPartial() { + mentraos.ble.MentraosBle.PongResponse result = new mentraos.ble.MentraosBle.PongResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.PongResponse) { + return mergeFrom((mentraos.ble.MentraosBle.PongResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.PongResponse other) { + if (other == mentraos.ble.MentraosBle.PongResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.PongResponse) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.PongResponse) + private static final mentraos.ble.MentraosBle.PongResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.PongResponse(); + } + + public static mentraos.ble.MentraosBle.PongResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PongResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.PongResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface MicStateConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.MicStateConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * bool enabled = 1; + * @return The enabled. + */ + boolean getEnabled(); + } + /** + * Protobuf type {@code mentraos.ble.MicStateConfig} + */ + public static final class MicStateConfig extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.MicStateConfig) + MicStateConfigOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + MicStateConfig.class.getName()); + } + // Use MicStateConfig.newBuilder() to construct. + private MicStateConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MicStateConfig() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_MicStateConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_MicStateConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.MicStateConfig.class, mentraos.ble.MentraosBle.MicStateConfig.Builder.class); + } + + public static final int ENABLED_FIELD_NUMBER = 1; + private boolean enabled_ = false; + /** + * bool enabled = 1; + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (enabled_ != false) { + output.writeBool(1, enabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, enabled_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.MicStateConfig)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.MicStateConfig other = (mentraos.ble.MentraosBle.MicStateConfig) obj; + + if (getEnabled() + != other.getEnabled()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnabled()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.MicStateConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.MicStateConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.MicStateConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.MicStateConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.MicStateConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.MicStateConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.MicStateConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.MicStateConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.MicStateConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.MicStateConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.MicStateConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.MicStateConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.MicStateConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.MicStateConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.MicStateConfig) + mentraos.ble.MentraosBle.MicStateConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_MicStateConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_MicStateConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.MicStateConfig.class, mentraos.ble.MentraosBle.MicStateConfig.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.MicStateConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_MicStateConfig_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.MicStateConfig getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.MicStateConfig.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.MicStateConfig build() { + mentraos.ble.MentraosBle.MicStateConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.MicStateConfig buildPartial() { + mentraos.ble.MentraosBle.MicStateConfig result = new mentraos.ble.MentraosBle.MicStateConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.MicStateConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enabled_ = enabled_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.MicStateConfig) { + return mergeFrom((mentraos.ble.MentraosBle.MicStateConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.MicStateConfig other) { + if (other == mentraos.ble.MentraosBle.MicStateConfig.getDefaultInstance()) return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + enabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean enabled_ ; + /** + * bool enabled = 1; + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + /** + * bool enabled = 1; + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool enabled = 1; + * @return This builder for chaining. + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000001); + enabled_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.MicStateConfig) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.MicStateConfig) + private static final mentraos.ble.MentraosBle.MicStateConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.MicStateConfig(); + } + + public static mentraos.ble.MentraosBle.MicStateConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MicStateConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.MicStateConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface VadEventOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.VadEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * .mentraos.ble.VadEvent.State state = 1; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * .mentraos.ble.VadEvent.State state = 1; + * @return The state. + */ + mentraos.ble.MentraosBle.VadEvent.State getState(); + } + /** + *
+   * Events: emitted when voice activity starts/stops
+   * 
+ * + * Protobuf type {@code mentraos.ble.VadEvent} + */ + public static final class VadEvent extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.VadEvent) + VadEventOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + VadEvent.class.getName()); + } + // Use VadEvent.newBuilder() to construct. + private VadEvent(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private VadEvent() { + state_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.VadEvent.class, mentraos.ble.MentraosBle.VadEvent.Builder.class); + } + + /** + * Protobuf enum {@code mentraos.ble.VadEvent.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + * INACTIVE = 0; + */ + INACTIVE(0), + /** + * ACTIVE = 1; + */ + ACTIVE(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + State.class.getName()); + } + /** + * INACTIVE = 0; + */ + public static final int INACTIVE_VALUE = 0; + /** + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return INACTIVE; + case 1: return ACTIVE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return mentraos.ble.MentraosBle.VadEvent.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:mentraos.ble.VadEvent.State) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_ = 0; + /** + * .mentraos.ble.VadEvent.State state = 1; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + * .mentraos.ble.VadEvent.State state = 1; + * @return The state. + */ + @java.lang.Override public mentraos.ble.MentraosBle.VadEvent.State getState() { + mentraos.ble.MentraosBle.VadEvent.State result = mentraos.ble.MentraosBle.VadEvent.State.forNumber(state_); + return result == null ? mentraos.ble.MentraosBle.VadEvent.State.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (state_ != mentraos.ble.MentraosBle.VadEvent.State.INACTIVE.getNumber()) { + output.writeEnum(1, state_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ != mentraos.ble.MentraosBle.VadEvent.State.INACTIVE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, state_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.VadEvent)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.VadEvent other = (mentraos.ble.MentraosBle.VadEvent) obj; + + if (state_ != other.state_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.VadEvent parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadEvent parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadEvent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadEvent parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.VadEvent parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.VadEvent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.VadEvent parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadEvent parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.VadEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.VadEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Events: emitted when voice activity starts/stops
+     * 
+ * + * Protobuf type {@code mentraos.ble.VadEvent} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.VadEvent) + mentraos.ble.MentraosBle.VadEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.VadEvent.class, mentraos.ble.MentraosBle.VadEvent.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.VadEvent.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + state_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadEvent_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadEvent getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.VadEvent.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadEvent build() { + mentraos.ble.MentraosBle.VadEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadEvent buildPartial() { + mentraos.ble.MentraosBle.VadEvent result = new mentraos.ble.MentraosBle.VadEvent(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.VadEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.state_ = state_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.VadEvent) { + return mergeFrom((mentraos.ble.MentraosBle.VadEvent)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.VadEvent other) { + if (other == mentraos.ble.MentraosBle.VadEvent.getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + state_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int state_ = 0; + /** + * .mentraos.ble.VadEvent.State state = 1; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + * .mentraos.ble.VadEvent.State state = 1; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .mentraos.ble.VadEvent.State state = 1; + * @return The state. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.VadEvent.State getState() { + mentraos.ble.MentraosBle.VadEvent.State result = mentraos.ble.MentraosBle.VadEvent.State.forNumber(state_); + return result == null ? mentraos.ble.MentraosBle.VadEvent.State.UNRECOGNIZED : result; + } + /** + * .mentraos.ble.VadEvent.State state = 1; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(mentraos.ble.MentraosBle.VadEvent.State value) { + if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000001; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .mentraos.ble.VadEvent.State state = 1; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000001); + state_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.VadEvent) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.VadEvent) + private static final mentraos.ble.MentraosBle.VadEvent DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.VadEvent(); + } + + public static mentraos.ble.MentraosBle.VadEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VadEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface VadEnabledRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.VadEnabledRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string msg_id = 1; + * @return The msgId. + */ + java.lang.String getMsgId(); + /** + * string msg_id = 1; + * @return The bytes for msgId. + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + * bool enabled = 2; + * @return The enabled. + */ + boolean getEnabled(); + } + /** + *
+   * Enable/disable VAD (request)
+   * 
+ * + * Protobuf type {@code mentraos.ble.VadEnabledRequest} + */ + public static final class VadEnabledRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.VadEnabledRequest) + VadEnabledRequestOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + VadEnabledRequest.class.getName()); + } + // Use VadEnabledRequest.newBuilder() to construct. + private VadEnabledRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private VadEnabledRequest() { + msgId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadEnabledRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadEnabledRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.VadEnabledRequest.class, mentraos.ble.MentraosBle.VadEnabledRequest.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + * @return The msgId. + */ + @java.lang.Override + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + * string msg_id = 1; + * @return The bytes for msgId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENABLED_FIELD_NUMBER = 2; + private boolean enabled_ = false; + /** + * bool enabled = 2; + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(msgId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, msgId_); + } + if (enabled_ != false) { + output.writeBool(2, enabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(msgId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, msgId_); + } + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, enabled_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.VadEnabledRequest)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.VadEnabledRequest other = (mentraos.ble.MentraosBle.VadEnabledRequest) obj; + + if (!getMsgId() + .equals(other.getMsgId())) return false; + if (getEnabled() + != other.getEnabled()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnabled()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.VadEnabledRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadEnabledRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadEnabledRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadEnabledRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadEnabledRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadEnabledRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadEnabledRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.VadEnabledRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.VadEnabledRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.VadEnabledRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadEnabledRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.VadEnabledRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.VadEnabledRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Enable/disable VAD (request)
+     * 
+ * + * Protobuf type {@code mentraos.ble.VadEnabledRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.VadEnabledRequest) + mentraos.ble.MentraosBle.VadEnabledRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadEnabledRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadEnabledRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.VadEnabledRequest.class, mentraos.ble.MentraosBle.VadEnabledRequest.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.VadEnabledRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + msgId_ = ""; + enabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadEnabledRequest_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadEnabledRequest getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.VadEnabledRequest.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadEnabledRequest build() { + mentraos.ble.MentraosBle.VadEnabledRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadEnabledRequest buildPartial() { + mentraos.ble.MentraosBle.VadEnabledRequest result = new mentraos.ble.MentraosBle.VadEnabledRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.VadEnabledRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.msgId_ = msgId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enabled_ = enabled_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.VadEnabledRequest) { + return mergeFrom((mentraos.ble.MentraosBle.VadEnabledRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.VadEnabledRequest other) { + if (other == mentraos.ble.MentraosBle.VadEnabledRequest.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + msgId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + enabled_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + * @return The msgId. + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg_id = 1; + * @return The bytes for msgId. + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg_id = 1; + * @param value The msgId to set. + * @return This builder for chaining. + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msgId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string msg_id = 1; + * @return This builder for chaining. + */ + public Builder clearMsgId() { + msgId_ = getDefaultInstance().getMsgId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string msg_id = 1; + * @param value The bytes for msgId to set. + * @return This builder for chaining. + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msgId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean enabled_ ; + /** + * bool enabled = 2; + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + /** + * bool enabled = 2; + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bool enabled = 2; + * @return This builder for chaining. + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000002); + enabled_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.VadEnabledRequest) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.VadEnabledRequest) + private static final mentraos.ble.MentraosBle.VadEnabledRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.VadEnabledRequest(); + } + + public static mentraos.ble.MentraosBle.VadEnabledRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VadEnabledRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadEnabledRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface VadEnabledResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.VadEnabledResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * echoes request
+     * 
+ * + * string msg_id = 1; + * @return The msgId. + */ + java.lang.String getMsgId(); + /** + *
+     * echoes request
+     * 
+ * + * string msg_id = 1; + * @return The bytes for msgId. + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + * bool success = 2; + * @return The success. + */ + boolean getSuccess(); + + /** + *
+     * optional diagnostics
+     * 
+ * + * string error = 3; + * @return The error. + */ + java.lang.String getError(); + /** + *
+     * optional diagnostics
+     * 
+ * + * string error = 3; + * @return The bytes for error. + */ + com.google.protobuf.ByteString + getErrorBytes(); + } + /** + *
+   * Response to enable/disable VAD
+   * 
+ * + * Protobuf type {@code mentraos.ble.VadEnabledResponse} + */ + public static final class VadEnabledResponse extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.VadEnabledResponse) + VadEnabledResponseOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + VadEnabledResponse.class.getName()); + } + // Use VadEnabledResponse.newBuilder() to construct. + private VadEnabledResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private VadEnabledResponse() { + msgId_ = ""; + error_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadEnabledResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadEnabledResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.VadEnabledResponse.class, mentraos.ble.MentraosBle.VadEnabledResponse.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object msgId_ = ""; + /** + *
+     * echoes request
+     * 
+ * + * string msg_id = 1; + * @return The msgId. + */ + @java.lang.Override + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + *
+     * echoes request
+     * 
+ * + * string msg_id = 1; + * @return The bytes for msgId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUCCESS_FIELD_NUMBER = 2; + private boolean success_ = false; + /** + * bool success = 2; + * @return The success. + */ + @java.lang.Override + public boolean getSuccess() { + return success_; + } + + public static final int ERROR_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object error_ = ""; + /** + *
+     * optional diagnostics
+     * 
+ * + * string error = 3; + * @return The error. + */ + @java.lang.Override + public java.lang.String getError() { + java.lang.Object ref = error_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + error_ = s; + return s; + } + } + /** + *
+     * optional diagnostics
+     * 
+ * + * string error = 3; + * @return The bytes for error. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getErrorBytes() { + java.lang.Object ref = error_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + error_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(msgId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, msgId_); + } + if (success_ != false) { + output.writeBool(2, success_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(error_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, error_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(msgId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, msgId_); + } + if (success_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, success_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(error_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, error_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.VadEnabledResponse)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.VadEnabledResponse other = (mentraos.ble.MentraosBle.VadEnabledResponse) obj; + + if (!getMsgId() + .equals(other.getMsgId())) return false; + if (getSuccess() + != other.getSuccess()) return false; + if (!getError() + .equals(other.getError())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SUCCESS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSuccess()); + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.VadEnabledResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadEnabledResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadEnabledResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadEnabledResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadEnabledResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadEnabledResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadEnabledResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.VadEnabledResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.VadEnabledResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.VadEnabledResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadEnabledResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.VadEnabledResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.VadEnabledResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response to enable/disable VAD
+     * 
+ * + * Protobuf type {@code mentraos.ble.VadEnabledResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.VadEnabledResponse) + mentraos.ble.MentraosBle.VadEnabledResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadEnabledResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadEnabledResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.VadEnabledResponse.class, mentraos.ble.MentraosBle.VadEnabledResponse.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.VadEnabledResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + msgId_ = ""; + success_ = false; + error_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadEnabledResponse_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadEnabledResponse getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.VadEnabledResponse.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadEnabledResponse build() { + mentraos.ble.MentraosBle.VadEnabledResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadEnabledResponse buildPartial() { + mentraos.ble.MentraosBle.VadEnabledResponse result = new mentraos.ble.MentraosBle.VadEnabledResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.VadEnabledResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.msgId_ = msgId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.success_ = success_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.error_ = error_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.VadEnabledResponse) { + return mergeFrom((mentraos.ble.MentraosBle.VadEnabledResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.VadEnabledResponse other) { + if (other == mentraos.ble.MentraosBle.VadEnabledResponse.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getSuccess() != false) { + setSuccess(other.getSuccess()); + } + if (!other.getError().isEmpty()) { + error_ = other.error_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + msgId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + success_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + error_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object msgId_ = ""; + /** + *
+       * echoes request
+       * 
+ * + * string msg_id = 1; + * @return The msgId. + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * echoes request
+       * 
+ * + * string msg_id = 1; + * @return The bytes for msgId. + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * echoes request
+       * 
+ * + * string msg_id = 1; + * @param value The msgId to set. + * @return This builder for chaining. + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msgId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * echoes request
+       * 
+ * + * string msg_id = 1; + * @return This builder for chaining. + */ + public Builder clearMsgId() { + msgId_ = getDefaultInstance().getMsgId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * echoes request
+       * 
+ * + * string msg_id = 1; + * @param value The bytes for msgId to set. + * @return This builder for chaining. + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msgId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean success_ ; + /** + * bool success = 2; + * @return The success. + */ + @java.lang.Override + public boolean getSuccess() { + return success_; + } + /** + * bool success = 2; + * @param value The success to set. + * @return This builder for chaining. + */ + public Builder setSuccess(boolean value) { + + success_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bool success = 2; + * @return This builder for chaining. + */ + public Builder clearSuccess() { + bitField0_ = (bitField0_ & ~0x00000002); + success_ = false; + onChanged(); + return this; + } + + private java.lang.Object error_ = ""; + /** + *
+       * optional diagnostics
+       * 
+ * + * string error = 3; + * @return The error. + */ + public java.lang.String getError() { + java.lang.Object ref = error_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + error_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * optional diagnostics
+       * 
+ * + * string error = 3; + * @return The bytes for error. + */ + public com.google.protobuf.ByteString + getErrorBytes() { + java.lang.Object ref = error_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + error_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * optional diagnostics
+       * 
+ * + * string error = 3; + * @param value The error to set. + * @return This builder for chaining. + */ + public Builder setError( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + error_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * optional diagnostics
+       * 
+ * + * string error = 3; + * @return This builder for chaining. + */ + public Builder clearError() { + error_ = getDefaultInstance().getError(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+       * optional diagnostics
+       * 
+ * + * string error = 3; + * @param value The bytes for error to set. + * @return This builder for chaining. + */ + public Builder setErrorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + error_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.VadEnabledResponse) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.VadEnabledResponse) + private static final mentraos.ble.MentraosBle.VadEnabledResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.VadEnabledResponse(); + } + + public static mentraos.ble.MentraosBle.VadEnabledResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VadEnabledResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadEnabledResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface VadConfigRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.VadConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string msg_id = 1; + * @return The msgId. + */ + java.lang.String getMsgId(); + /** + * string msg_id = 1; + * @return The bytes for msgId. + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + *
+     * 0-100
+     * 
+ * + * uint32 sensitivity = 2; + * @return The sensitivity. + */ + int getSensitivity(); + } + /** + *
+   * Configure VAD sensitivity (request)
+   * 
+ * + * Protobuf type {@code mentraos.ble.VadConfigRequest} + */ + public static final class VadConfigRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.VadConfigRequest) + VadConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + VadConfigRequest.class.getName()); + } + // Use VadConfigRequest.newBuilder() to construct. + private VadConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private VadConfigRequest() { + msgId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.VadConfigRequest.class, mentraos.ble.MentraosBle.VadConfigRequest.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + * @return The msgId. + */ + @java.lang.Override + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + * string msg_id = 1; + * @return The bytes for msgId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SENSITIVITY_FIELD_NUMBER = 2; + private int sensitivity_ = 0; + /** + *
+     * 0-100
+     * 
+ * + * uint32 sensitivity = 2; + * @return The sensitivity. + */ + @java.lang.Override + public int getSensitivity() { + return sensitivity_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(msgId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, msgId_); + } + if (sensitivity_ != 0) { + output.writeUInt32(2, sensitivity_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(msgId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, msgId_); + } + if (sensitivity_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, sensitivity_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.VadConfigRequest)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.VadConfigRequest other = (mentraos.ble.MentraosBle.VadConfigRequest) obj; + + if (!getMsgId() + .equals(other.getMsgId())) return false; + if (getSensitivity() + != other.getSensitivity()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SENSITIVITY_FIELD_NUMBER; + hash = (53 * hash) + getSensitivity(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.VadConfigRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadConfigRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadConfigRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadConfigRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.VadConfigRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.VadConfigRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.VadConfigRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.VadConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.VadConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Configure VAD sensitivity (request)
+     * 
+ * + * Protobuf type {@code mentraos.ble.VadConfigRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.VadConfigRequest) + mentraos.ble.MentraosBle.VadConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.VadConfigRequest.class, mentraos.ble.MentraosBle.VadConfigRequest.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.VadConfigRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + msgId_ = ""; + sensitivity_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadConfigRequest_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadConfigRequest getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.VadConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadConfigRequest build() { + mentraos.ble.MentraosBle.VadConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadConfigRequest buildPartial() { + mentraos.ble.MentraosBle.VadConfigRequest result = new mentraos.ble.MentraosBle.VadConfigRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.VadConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.msgId_ = msgId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sensitivity_ = sensitivity_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.VadConfigRequest) { + return mergeFrom((mentraos.ble.MentraosBle.VadConfigRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.VadConfigRequest other) { + if (other == mentraos.ble.MentraosBle.VadConfigRequest.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getSensitivity() != 0) { + setSensitivity(other.getSensitivity()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + msgId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + sensitivity_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + * @return The msgId. + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg_id = 1; + * @return The bytes for msgId. + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg_id = 1; + * @param value The msgId to set. + * @return This builder for chaining. + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msgId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string msg_id = 1; + * @return This builder for chaining. + */ + public Builder clearMsgId() { + msgId_ = getDefaultInstance().getMsgId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string msg_id = 1; + * @param value The bytes for msgId to set. + * @return This builder for chaining. + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msgId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int sensitivity_ ; + /** + *
+       * 0-100
+       * 
+ * + * uint32 sensitivity = 2; + * @return The sensitivity. + */ + @java.lang.Override + public int getSensitivity() { + return sensitivity_; + } + /** + *
+       * 0-100
+       * 
+ * + * uint32 sensitivity = 2; + * @param value The sensitivity to set. + * @return This builder for chaining. + */ + public Builder setSensitivity(int value) { + + sensitivity_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * 0-100
+       * 
+ * + * uint32 sensitivity = 2; + * @return This builder for chaining. + */ + public Builder clearSensitivity() { + bitField0_ = (bitField0_ & ~0x00000002); + sensitivity_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.VadConfigRequest) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.VadConfigRequest) + private static final mentraos.ble.MentraosBle.VadConfigRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.VadConfigRequest(); + } + + public static mentraos.ble.MentraosBle.VadConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VadConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface VadConfigResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.VadConfigResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * echoes request
+     * 
+ * + * string msg_id = 1; + * @return The msgId. + */ + java.lang.String getMsgId(); + /** + *
+     * echoes request
+     * 
+ * + * string msg_id = 1; + * @return The bytes for msgId. + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + * bool success = 2; + * @return The success. + */ + boolean getSuccess(); + + /** + *
+     * optional diagnostics
+     * 
+ * + * string error = 3; + * @return The error. + */ + java.lang.String getError(); + /** + *
+     * optional diagnostics
+     * 
+ * + * string error = 3; + * @return The bytes for error. + */ + com.google.protobuf.ByteString + getErrorBytes(); + } + /** + *
+   * Response to VAD config
+   * 
+ * + * Protobuf type {@code mentraos.ble.VadConfigResponse} + */ + public static final class VadConfigResponse extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.VadConfigResponse) + VadConfigResponseOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + VadConfigResponse.class.getName()); + } + // Use VadConfigResponse.newBuilder() to construct. + private VadConfigResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private VadConfigResponse() { + msgId_ = ""; + error_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadConfigResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadConfigResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.VadConfigResponse.class, mentraos.ble.MentraosBle.VadConfigResponse.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object msgId_ = ""; + /** + *
+     * echoes request
+     * 
+ * + * string msg_id = 1; + * @return The msgId. + */ + @java.lang.Override + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + *
+     * echoes request
+     * 
+ * + * string msg_id = 1; + * @return The bytes for msgId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUCCESS_FIELD_NUMBER = 2; + private boolean success_ = false; + /** + * bool success = 2; + * @return The success. + */ + @java.lang.Override + public boolean getSuccess() { + return success_; + } + + public static final int ERROR_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object error_ = ""; + /** + *
+     * optional diagnostics
+     * 
+ * + * string error = 3; + * @return The error. + */ + @java.lang.Override + public java.lang.String getError() { + java.lang.Object ref = error_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + error_ = s; + return s; + } + } + /** + *
+     * optional diagnostics
+     * 
+ * + * string error = 3; + * @return The bytes for error. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getErrorBytes() { + java.lang.Object ref = error_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + error_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(msgId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, msgId_); + } + if (success_ != false) { + output.writeBool(2, success_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(error_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, error_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(msgId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, msgId_); + } + if (success_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, success_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(error_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, error_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.VadConfigResponse)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.VadConfigResponse other = (mentraos.ble.MentraosBle.VadConfigResponse) obj; + + if (!getMsgId() + .equals(other.getMsgId())) return false; + if (getSuccess() + != other.getSuccess()) return false; + if (!getError() + .equals(other.getError())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SUCCESS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSuccess()); + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.VadConfigResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadConfigResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadConfigResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadConfigResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadConfigResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadConfigResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadConfigResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.VadConfigResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.VadConfigResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.VadConfigResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadConfigResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.VadConfigResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.VadConfigResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response to VAD config
+     * 
+ * + * Protobuf type {@code mentraos.ble.VadConfigResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.VadConfigResponse) + mentraos.ble.MentraosBle.VadConfigResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadConfigResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadConfigResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.VadConfigResponse.class, mentraos.ble.MentraosBle.VadConfigResponse.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.VadConfigResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + msgId_ = ""; + success_ = false; + error_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadConfigResponse_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadConfigResponse getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.VadConfigResponse.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadConfigResponse build() { + mentraos.ble.MentraosBle.VadConfigResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadConfigResponse buildPartial() { + mentraos.ble.MentraosBle.VadConfigResponse result = new mentraos.ble.MentraosBle.VadConfigResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.VadConfigResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.msgId_ = msgId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.success_ = success_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.error_ = error_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.VadConfigResponse) { + return mergeFrom((mentraos.ble.MentraosBle.VadConfigResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.VadConfigResponse other) { + if (other == mentraos.ble.MentraosBle.VadConfigResponse.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getSuccess() != false) { + setSuccess(other.getSuccess()); + } + if (!other.getError().isEmpty()) { + error_ = other.error_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + msgId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + success_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + error_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object msgId_ = ""; + /** + *
+       * echoes request
+       * 
+ * + * string msg_id = 1; + * @return The msgId. + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * echoes request
+       * 
+ * + * string msg_id = 1; + * @return The bytes for msgId. + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * echoes request
+       * 
+ * + * string msg_id = 1; + * @param value The msgId to set. + * @return This builder for chaining. + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msgId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * echoes request
+       * 
+ * + * string msg_id = 1; + * @return This builder for chaining. + */ + public Builder clearMsgId() { + msgId_ = getDefaultInstance().getMsgId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * echoes request
+       * 
+ * + * string msg_id = 1; + * @param value The bytes for msgId to set. + * @return This builder for chaining. + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msgId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean success_ ; + /** + * bool success = 2; + * @return The success. + */ + @java.lang.Override + public boolean getSuccess() { + return success_; + } + /** + * bool success = 2; + * @param value The success to set. + * @return This builder for chaining. + */ + public Builder setSuccess(boolean value) { + + success_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bool success = 2; + * @return This builder for chaining. + */ + public Builder clearSuccess() { + bitField0_ = (bitField0_ & ~0x00000002); + success_ = false; + onChanged(); + return this; + } + + private java.lang.Object error_ = ""; + /** + *
+       * optional diagnostics
+       * 
+ * + * string error = 3; + * @return The error. + */ + public java.lang.String getError() { + java.lang.Object ref = error_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + error_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * optional diagnostics
+       * 
+ * + * string error = 3; + * @return The bytes for error. + */ + public com.google.protobuf.ByteString + getErrorBytes() { + java.lang.Object ref = error_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + error_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * optional diagnostics
+       * 
+ * + * string error = 3; + * @param value The error to set. + * @return This builder for chaining. + */ + public Builder setError( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + error_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * optional diagnostics
+       * 
+ * + * string error = 3; + * @return This builder for chaining. + */ + public Builder clearError() { + error_ = getDefaultInstance().getError(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+       * optional diagnostics
+       * 
+ * + * string error = 3; + * @param value The bytes for error to set. + * @return This builder for chaining. + */ + public Builder setErrorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + error_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.VadConfigResponse) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.VadConfigResponse) + private static final mentraos.ble.MentraosBle.VadConfigResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.VadConfigResponse(); + } + + public static mentraos.ble.MentraosBle.VadConfigResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VadConfigResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadConfigResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface VadStatusRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.VadStatusRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string msg_id = 1; + * @return The msgId. + */ + java.lang.String getMsgId(); + /** + * string msg_id = 1; + * @return The bytes for msgId. + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + } + /** + *
+   * Query current VAD state (request)
+   * 
+ * + * Protobuf type {@code mentraos.ble.VadStatusRequest} + */ + public static final class VadStatusRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.VadStatusRequest) + VadStatusRequestOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + VadStatusRequest.class.getName()); + } + // Use VadStatusRequest.newBuilder() to construct. + private VadStatusRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private VadStatusRequest() { + msgId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadStatusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadStatusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.VadStatusRequest.class, mentraos.ble.MentraosBle.VadStatusRequest.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + * @return The msgId. + */ + @java.lang.Override + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + * string msg_id = 1; + * @return The bytes for msgId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(msgId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, msgId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(msgId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, msgId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.VadStatusRequest)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.VadStatusRequest other = (mentraos.ble.MentraosBle.VadStatusRequest) obj; + + if (!getMsgId() + .equals(other.getMsgId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.VadStatusRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadStatusRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadStatusRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadStatusRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadStatusRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadStatusRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadStatusRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.VadStatusRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.VadStatusRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.VadStatusRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadStatusRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.VadStatusRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.VadStatusRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Query current VAD state (request)
+     * 
+ * + * Protobuf type {@code mentraos.ble.VadStatusRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.VadStatusRequest) + mentraos.ble.MentraosBle.VadStatusRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadStatusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadStatusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.VadStatusRequest.class, mentraos.ble.MentraosBle.VadStatusRequest.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.VadStatusRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + msgId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadStatusRequest_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadStatusRequest getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.VadStatusRequest.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadStatusRequest build() { + mentraos.ble.MentraosBle.VadStatusRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadStatusRequest buildPartial() { + mentraos.ble.MentraosBle.VadStatusRequest result = new mentraos.ble.MentraosBle.VadStatusRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.VadStatusRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.msgId_ = msgId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.VadStatusRequest) { + return mergeFrom((mentraos.ble.MentraosBle.VadStatusRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.VadStatusRequest other) { + if (other == mentraos.ble.MentraosBle.VadStatusRequest.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + msgId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + * @return The msgId. + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg_id = 1; + * @return The bytes for msgId. + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg_id = 1; + * @param value The msgId to set. + * @return This builder for chaining. + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msgId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string msg_id = 1; + * @return This builder for chaining. + */ + public Builder clearMsgId() { + msgId_ = getDefaultInstance().getMsgId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string msg_id = 1; + * @param value The bytes for msgId to set. + * @return This builder for chaining. + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msgId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.VadStatusRequest) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.VadStatusRequest) + private static final mentraos.ble.MentraosBle.VadStatusRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.VadStatusRequest(); + } + + public static mentraos.ble.MentraosBle.VadStatusRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VadStatusRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadStatusRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface VadStatusOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.VadStatus) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * echoes request
+     * 
+ * + * string msg_id = 1; + * @return The msgId. + */ + java.lang.String getMsgId(); + /** + *
+     * echoes request
+     * 
+ * + * string msg_id = 1; + * @return The bytes for msgId. + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + * bool enabled = 2; + * @return The enabled. + */ + boolean getEnabled(); + + /** + *
+     * 0-100
+     * 
+ * + * uint32 sensitivity = 3; + * @return The sensitivity. + */ + int getSensitivity(); + } + /** + *
+   * Current VAD state (response)
+   * 
+ * + * Protobuf type {@code mentraos.ble.VadStatus} + */ + public static final class VadStatus extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.VadStatus) + VadStatusOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + VadStatus.class.getName()); + } + // Use VadStatus.newBuilder() to construct. + private VadStatus(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private VadStatus() { + msgId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.VadStatus.class, mentraos.ble.MentraosBle.VadStatus.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object msgId_ = ""; + /** + *
+     * echoes request
+     * 
+ * + * string msg_id = 1; + * @return The msgId. + */ + @java.lang.Override + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + *
+     * echoes request
+     * 
+ * + * string msg_id = 1; + * @return The bytes for msgId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENABLED_FIELD_NUMBER = 2; + private boolean enabled_ = false; + /** + * bool enabled = 2; + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + public static final int SENSITIVITY_FIELD_NUMBER = 3; + private int sensitivity_ = 0; + /** + *
+     * 0-100
+     * 
+ * + * uint32 sensitivity = 3; + * @return The sensitivity. + */ + @java.lang.Override + public int getSensitivity() { + return sensitivity_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(msgId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, msgId_); + } + if (enabled_ != false) { + output.writeBool(2, enabled_); + } + if (sensitivity_ != 0) { + output.writeUInt32(3, sensitivity_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(msgId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, msgId_); + } + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, enabled_); + } + if (sensitivity_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, sensitivity_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.VadStatus)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.VadStatus other = (mentraos.ble.MentraosBle.VadStatus) obj; + + if (!getMsgId() + .equals(other.getMsgId())) return false; + if (getEnabled() + != other.getEnabled()) return false; + if (getSensitivity() + != other.getSensitivity()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnabled()); + hash = (37 * hash) + SENSITIVITY_FIELD_NUMBER; + hash = (53 * hash) + getSensitivity(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.VadStatus parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadStatus parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadStatus parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.VadStatus parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.VadStatus parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.VadStatus parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.VadStatus parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.VadStatus parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.VadStatus parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.VadStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Current VAD state (response)
+     * 
+ * + * Protobuf type {@code mentraos.ble.VadStatus} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.VadStatus) + mentraos.ble.MentraosBle.VadStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.VadStatus.class, mentraos.ble.MentraosBle.VadStatus.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.VadStatus.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + msgId_ = ""; + enabled_ = false; + sensitivity_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_VadStatus_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadStatus getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.VadStatus.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadStatus build() { + mentraos.ble.MentraosBle.VadStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadStatus buildPartial() { + mentraos.ble.MentraosBle.VadStatus result = new mentraos.ble.MentraosBle.VadStatus(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.VadStatus result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.msgId_ = msgId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enabled_ = enabled_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sensitivity_ = sensitivity_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.VadStatus) { + return mergeFrom((mentraos.ble.MentraosBle.VadStatus)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.VadStatus other) { + if (other == mentraos.ble.MentraosBle.VadStatus.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + if (other.getSensitivity() != 0) { + setSensitivity(other.getSensitivity()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + msgId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + enabled_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + sensitivity_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object msgId_ = ""; + /** + *
+       * echoes request
+       * 
+ * + * string msg_id = 1; + * @return The msgId. + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * echoes request
+       * 
+ * + * string msg_id = 1; + * @return The bytes for msgId. + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * echoes request
+       * 
+ * + * string msg_id = 1; + * @param value The msgId to set. + * @return This builder for chaining. + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msgId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * echoes request
+       * 
+ * + * string msg_id = 1; + * @return This builder for chaining. + */ + public Builder clearMsgId() { + msgId_ = getDefaultInstance().getMsgId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * echoes request
+       * 
+ * + * string msg_id = 1; + * @param value The bytes for msgId to set. + * @return This builder for chaining. + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msgId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean enabled_ ; + /** + * bool enabled = 2; + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + /** + * bool enabled = 2; + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bool enabled = 2; + * @return This builder for chaining. + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000002); + enabled_ = false; + onChanged(); + return this; + } + + private int sensitivity_ ; + /** + *
+       * 0-100
+       * 
+ * + * uint32 sensitivity = 3; + * @return The sensitivity. + */ + @java.lang.Override + public int getSensitivity() { + return sensitivity_; + } + /** + *
+       * 0-100
+       * 
+ * + * uint32 sensitivity = 3; + * @param value The sensitivity to set. + * @return This builder for chaining. + */ + public Builder setSensitivity(int value) { + + sensitivity_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * 0-100
+       * 
+ * + * uint32 sensitivity = 3; + * @return This builder for chaining. + */ + public Builder clearSensitivity() { + bitField0_ = (bitField0_ & ~0x00000004); + sensitivity_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.VadStatus) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.VadStatus) + private static final mentraos.ble.MentraosBle.VadStatus DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.VadStatus(); + } + + public static mentraos.ble.MentraosBle.VadStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VadStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.VadStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DisplayTextOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.DisplayText) + com.google.protobuf.MessageOrBuilder { + + /** + * string text = 1; + * @return The text. + */ + java.lang.String getText(); + /** + * string text = 1; + * @return The bytes for text. + */ + com.google.protobuf.ByteString + getTextBytes(); + + /** + *
+     * RGB565 format (e.g., 0xF800 for red)
+     * 
+ * + * uint32 color = 2; + * @return The color. + */ + int getColor(); + + /** + * uint32 x = 3; + * @return The x. + */ + int getX(); + + /** + * uint32 y = 4; + * @return The y. + */ + int getY(); + + /** + *
+     * Font size as integer
+     * 
+ * + * uint32 size = 5; + * @return The size. + */ + int getSize(); + } + /** + * Protobuf type {@code mentraos.ble.DisplayText} + */ + public static final class DisplayText extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.DisplayText) + DisplayTextOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + DisplayText.class.getName()); + } + // Use DisplayText.newBuilder() to construct. + private DisplayText(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DisplayText() { + text_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayText_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayText_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayText.class, mentraos.ble.MentraosBle.DisplayText.Builder.class); + } + + public static final int TEXT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; + /** + * string text = 1; + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + * string text = 1; + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COLOR_FIELD_NUMBER = 2; + private int color_ = 0; + /** + *
+     * RGB565 format (e.g., 0xF800 for red)
+     * 
+ * + * uint32 color = 2; + * @return The color. + */ + @java.lang.Override + public int getColor() { + return color_; + } + + public static final int X_FIELD_NUMBER = 3; + private int x_ = 0; + /** + * uint32 x = 3; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 4; + private int y_ = 0; + /** + * uint32 y = 4; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + + public static final int SIZE_FIELD_NUMBER = 5; + private int size_ = 0; + /** + *
+     * Font size as integer
+     * 
+ * + * uint32 size = 5; + * @return The size. + */ + @java.lang.Override + public int getSize() { + return size_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, text_); + } + if (color_ != 0) { + output.writeUInt32(2, color_); + } + if (x_ != 0) { + output.writeUInt32(3, x_); + } + if (y_ != 0) { + output.writeUInt32(4, y_); + } + if (size_ != 0) { + output.writeUInt32(5, size_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, text_); + } + if (color_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, color_); + } + if (x_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, x_); + } + if (y_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, y_); + } + if (size_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, size_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.DisplayText)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.DisplayText other = (mentraos.ble.MentraosBle.DisplayText) obj; + + if (!getText() + .equals(other.getText())) return false; + if (getColor() + != other.getColor()) return false; + if (getX() + != other.getX()) return false; + if (getY() + != other.getY()) return false; + if (getSize() + != other.getSize()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (37 * hash) + COLOR_FIELD_NUMBER; + hash = (53 * hash) + getColor(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + getX(); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + getY(); + hash = (37 * hash) + SIZE_FIELD_NUMBER; + hash = (53 * hash) + getSize(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.DisplayText parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayText parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayText parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayText parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayText parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayText parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayText parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayText parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.DisplayText parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.DisplayText parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayText parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayText parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.DisplayText prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.DisplayText} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.DisplayText) + mentraos.ble.MentraosBle.DisplayTextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayText_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayText_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayText.class, mentraos.ble.MentraosBle.DisplayText.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.DisplayText.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + text_ = ""; + color_ = 0; + x_ = 0; + y_ = 0; + size_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayText_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayText getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.DisplayText.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayText build() { + mentraos.ble.MentraosBle.DisplayText result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayText buildPartial() { + mentraos.ble.MentraosBle.DisplayText result = new mentraos.ble.MentraosBle.DisplayText(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.DisplayText result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.text_ = text_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.color_ = color_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.x_ = x_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.y_ = y_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.size_ = size_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.DisplayText) { + return mergeFrom((mentraos.ble.MentraosBle.DisplayText)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.DisplayText other) { + if (other == mentraos.ble.MentraosBle.DisplayText.getDefaultInstance()) return this; + if (!other.getText().isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getColor() != 0) { + setColor(other.getColor()); + } + if (other.getX() != 0) { + setX(other.getX()); + } + if (other.getY() != 0) { + setY(other.getY()); + } + if (other.getSize() != 0) { + setSize(other.getSize()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + color_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + x_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + y_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + size_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object text_ = ""; + /** + * string text = 1; + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string text = 1; + * @return The bytes for text. + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string text = 1; + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + text_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string text = 1; + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string text = 1; + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + text_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int color_ ; + /** + *
+       * RGB565 format (e.g., 0xF800 for red)
+       * 
+ * + * uint32 color = 2; + * @return The color. + */ + @java.lang.Override + public int getColor() { + return color_; + } + /** + *
+       * RGB565 format (e.g., 0xF800 for red)
+       * 
+ * + * uint32 color = 2; + * @param value The color to set. + * @return This builder for chaining. + */ + public Builder setColor(int value) { + + color_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * RGB565 format (e.g., 0xF800 for red)
+       * 
+ * + * uint32 color = 2; + * @return This builder for chaining. + */ + public Builder clearColor() { + bitField0_ = (bitField0_ & ~0x00000002); + color_ = 0; + onChanged(); + return this; + } + + private int x_ ; + /** + * uint32 x = 3; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + /** + * uint32 x = 3; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(int value) { + + x_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint32 x = 3; + * @return This builder for chaining. + */ + public Builder clearX() { + bitField0_ = (bitField0_ & ~0x00000004); + x_ = 0; + onChanged(); + return this; + } + + private int y_ ; + /** + * uint32 y = 4; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + /** + * uint32 y = 4; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(int value) { + + y_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint32 y = 4; + * @return This builder for chaining. + */ + public Builder clearY() { + bitField0_ = (bitField0_ & ~0x00000008); + y_ = 0; + onChanged(); + return this; + } + + private int size_ ; + /** + *
+       * Font size as integer
+       * 
+ * + * uint32 size = 5; + * @return The size. + */ + @java.lang.Override + public int getSize() { + return size_; + } + /** + *
+       * Font size as integer
+       * 
+ * + * uint32 size = 5; + * @param value The size to set. + * @return This builder for chaining. + */ + public Builder setSize(int value) { + + size_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * Font size as integer
+       * 
+ * + * uint32 size = 5; + * @return This builder for chaining. + */ + public Builder clearSize() { + bitField0_ = (bitField0_ & ~0x00000010); + size_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.DisplayText) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.DisplayText) + private static final mentraos.ble.MentraosBle.DisplayText DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.DisplayText(); + } + + public static mentraos.ble.MentraosBle.DisplayText getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisplayText parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayText getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DisplayImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.DisplayImage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 2-byte hex string like "002A"
+     * 
+ * + * string stream_id = 1; + * @return The streamId. + */ + java.lang.String getStreamId(); + /** + *
+     * 2-byte hex string like "002A"
+     * 
+ * + * string stream_id = 1; + * @return The bytes for streamId. + */ + com.google.protobuf.ByteString + getStreamIdBytes(); + + /** + * uint32 x = 2; + * @return The x. + */ + int getX(); + + /** + * uint32 y = 3; + * @return The y. + */ + int getY(); + + /** + * uint32 width = 4; + * @return The width. + */ + int getWidth(); + + /** + * uint32 height = 5; + * @return The height. + */ + int getHeight(); + + /** + *
+     * "rle", "webp", etc.
+     * 
+ * + * string encoding = 6; + * @return The encoding. + */ + java.lang.String getEncoding(); + /** + *
+     * "rle", "webp", etc.
+     * 
+ * + * string encoding = 6; + * @return The bytes for encoding. + */ + com.google.protobuf.ByteString + getEncodingBytes(); + + /** + * uint32 total_chunks = 7; + * @return The totalChunks. + */ + int getTotalChunks(); + } + /** + *
+   * Initiates bitmap transfer - actual data comes via binary protocol
+   * 
+ * + * Protobuf type {@code mentraos.ble.DisplayImage} + */ + public static final class DisplayImage extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.DisplayImage) + DisplayImageOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + DisplayImage.class.getName()); + } + // Use DisplayImage.newBuilder() to construct. + private DisplayImage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DisplayImage() { + streamId_ = ""; + encoding_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayImage.class, mentraos.ble.MentraosBle.DisplayImage.Builder.class); + } + + public static final int STREAM_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object streamId_ = ""; + /** + *
+     * 2-byte hex string like "002A"
+     * 
+ * + * string stream_id = 1; + * @return The streamId. + */ + @java.lang.Override + public java.lang.String getStreamId() { + java.lang.Object ref = streamId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + streamId_ = s; + return s; + } + } + /** + *
+     * 2-byte hex string like "002A"
+     * 
+ * + * string stream_id = 1; + * @return The bytes for streamId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStreamIdBytes() { + java.lang.Object ref = streamId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + streamId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int X_FIELD_NUMBER = 2; + private int x_ = 0; + /** + * uint32 x = 2; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 3; + private int y_ = 0; + /** + * uint32 y = 3; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + + public static final int WIDTH_FIELD_NUMBER = 4; + private int width_ = 0; + /** + * uint32 width = 4; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + + public static final int HEIGHT_FIELD_NUMBER = 5; + private int height_ = 0; + /** + * uint32 height = 5; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + public static final int ENCODING_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object encoding_ = ""; + /** + *
+     * "rle", "webp", etc.
+     * 
+ * + * string encoding = 6; + * @return The encoding. + */ + @java.lang.Override + public java.lang.String getEncoding() { + java.lang.Object ref = encoding_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + encoding_ = s; + return s; + } + } + /** + *
+     * "rle", "webp", etc.
+     * 
+ * + * string encoding = 6; + * @return The bytes for encoding. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEncodingBytes() { + java.lang.Object ref = encoding_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + encoding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOTAL_CHUNKS_FIELD_NUMBER = 7; + private int totalChunks_ = 0; + /** + * uint32 total_chunks = 7; + * @return The totalChunks. + */ + @java.lang.Override + public int getTotalChunks() { + return totalChunks_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(streamId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, streamId_); + } + if (x_ != 0) { + output.writeUInt32(2, x_); + } + if (y_ != 0) { + output.writeUInt32(3, y_); + } + if (width_ != 0) { + output.writeUInt32(4, width_); + } + if (height_ != 0) { + output.writeUInt32(5, height_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(encoding_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, encoding_); + } + if (totalChunks_ != 0) { + output.writeUInt32(7, totalChunks_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(streamId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, streamId_); + } + if (x_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, x_); + } + if (y_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, y_); + } + if (width_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, width_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, height_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(encoding_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, encoding_); + } + if (totalChunks_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(7, totalChunks_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.DisplayImage)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.DisplayImage other = (mentraos.ble.MentraosBle.DisplayImage) obj; + + if (!getStreamId() + .equals(other.getStreamId())) return false; + if (getX() + != other.getX()) return false; + if (getY() + != other.getY()) return false; + if (getWidth() + != other.getWidth()) return false; + if (getHeight() + != other.getHeight()) return false; + if (!getEncoding() + .equals(other.getEncoding())) return false; + if (getTotalChunks() + != other.getTotalChunks()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STREAM_ID_FIELD_NUMBER; + hash = (53 * hash) + getStreamId().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + getX(); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + getY(); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getWidth(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (37 * hash) + ENCODING_FIELD_NUMBER; + hash = (53 * hash) + getEncoding().hashCode(); + hash = (37 * hash) + TOTAL_CHUNKS_FIELD_NUMBER; + hash = (53 * hash) + getTotalChunks(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.DisplayImage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayImage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayImage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayImage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.DisplayImage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.DisplayImage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayImage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.DisplayImage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Initiates bitmap transfer - actual data comes via binary protocol
+     * 
+ * + * Protobuf type {@code mentraos.ble.DisplayImage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.DisplayImage) + mentraos.ble.MentraosBle.DisplayImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayImage.class, mentraos.ble.MentraosBle.DisplayImage.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.DisplayImage.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + streamId_ = ""; + x_ = 0; + y_ = 0; + width_ = 0; + height_ = 0; + encoding_ = ""; + totalChunks_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayImage_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayImage getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.DisplayImage.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayImage build() { + mentraos.ble.MentraosBle.DisplayImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayImage buildPartial() { + mentraos.ble.MentraosBle.DisplayImage result = new mentraos.ble.MentraosBle.DisplayImage(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.DisplayImage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.streamId_ = streamId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.x_ = x_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.y_ = y_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.width_ = width_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.height_ = height_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.encoding_ = encoding_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.totalChunks_ = totalChunks_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.DisplayImage) { + return mergeFrom((mentraos.ble.MentraosBle.DisplayImage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.DisplayImage other) { + if (other == mentraos.ble.MentraosBle.DisplayImage.getDefaultInstance()) return this; + if (!other.getStreamId().isEmpty()) { + streamId_ = other.streamId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getX() != 0) { + setX(other.getX()); + } + if (other.getY() != 0) { + setY(other.getY()); + } + if (other.getWidth() != 0) { + setWidth(other.getWidth()); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (!other.getEncoding().isEmpty()) { + encoding_ = other.encoding_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.getTotalChunks() != 0) { + setTotalChunks(other.getTotalChunks()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + streamId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + x_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + y_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + width_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + height_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: { + encoding_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: { + totalChunks_ = input.readUInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object streamId_ = ""; + /** + *
+       * 2-byte hex string like "002A"
+       * 
+ * + * string stream_id = 1; + * @return The streamId. + */ + public java.lang.String getStreamId() { + java.lang.Object ref = streamId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + streamId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * 2-byte hex string like "002A"
+       * 
+ * + * string stream_id = 1; + * @return The bytes for streamId. + */ + public com.google.protobuf.ByteString + getStreamIdBytes() { + java.lang.Object ref = streamId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + streamId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * 2-byte hex string like "002A"
+       * 
+ * + * string stream_id = 1; + * @param value The streamId to set. + * @return This builder for chaining. + */ + public Builder setStreamId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + streamId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * 2-byte hex string like "002A"
+       * 
+ * + * string stream_id = 1; + * @return This builder for chaining. + */ + public Builder clearStreamId() { + streamId_ = getDefaultInstance().getStreamId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * 2-byte hex string like "002A"
+       * 
+ * + * string stream_id = 1; + * @param value The bytes for streamId to set. + * @return This builder for chaining. + */ + public Builder setStreamIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + streamId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int x_ ; + /** + * uint32 x = 2; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + /** + * uint32 x = 2; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(int value) { + + x_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint32 x = 2; + * @return This builder for chaining. + */ + public Builder clearX() { + bitField0_ = (bitField0_ & ~0x00000002); + x_ = 0; + onChanged(); + return this; + } + + private int y_ ; + /** + * uint32 y = 3; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + /** + * uint32 y = 3; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(int value) { + + y_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint32 y = 3; + * @return This builder for chaining. + */ + public Builder clearY() { + bitField0_ = (bitField0_ & ~0x00000004); + y_ = 0; + onChanged(); + return this; + } + + private int width_ ; + /** + * uint32 width = 4; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + /** + * uint32 width = 4; + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(int value) { + + width_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint32 width = 4; + * @return This builder for chaining. + */ + public Builder clearWidth() { + bitField0_ = (bitField0_ & ~0x00000008); + width_ = 0; + onChanged(); + return this; + } + + private int height_ ; + /** + * uint32 height = 5; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + * uint32 height = 5; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * uint32 height = 5; + * @return This builder for chaining. + */ + public Builder clearHeight() { + bitField0_ = (bitField0_ & ~0x00000010); + height_ = 0; + onChanged(); + return this; + } + + private java.lang.Object encoding_ = ""; + /** + *
+       * "rle", "webp", etc.
+       * 
+ * + * string encoding = 6; + * @return The encoding. + */ + public java.lang.String getEncoding() { + java.lang.Object ref = encoding_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + encoding_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * "rle", "webp", etc.
+       * 
+ * + * string encoding = 6; + * @return The bytes for encoding. + */ + public com.google.protobuf.ByteString + getEncodingBytes() { + java.lang.Object ref = encoding_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + encoding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * "rle", "webp", etc.
+       * 
+ * + * string encoding = 6; + * @param value The encoding to set. + * @return This builder for chaining. + */ + public Builder setEncoding( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + encoding_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+       * "rle", "webp", etc.
+       * 
+ * + * string encoding = 6; + * @return This builder for chaining. + */ + public Builder clearEncoding() { + encoding_ = getDefaultInstance().getEncoding(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+       * "rle", "webp", etc.
+       * 
+ * + * string encoding = 6; + * @param value The bytes for encoding to set. + * @return This builder for chaining. + */ + public Builder setEncodingBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + encoding_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int totalChunks_ ; + /** + * uint32 total_chunks = 7; + * @return The totalChunks. + */ + @java.lang.Override + public int getTotalChunks() { + return totalChunks_; + } + /** + * uint32 total_chunks = 7; + * @param value The totalChunks to set. + * @return This builder for chaining. + */ + public Builder setTotalChunks(int value) { + + totalChunks_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * uint32 total_chunks = 7; + * @return This builder for chaining. + */ + public Builder clearTotalChunks() { + bitField0_ = (bitField0_ & ~0x00000040); + totalChunks_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.DisplayImage) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.DisplayImage) + private static final mentraos.ble.MentraosBle.DisplayImage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.DisplayImage(); + } + + public static mentraos.ble.MentraosBle.DisplayImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisplayImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface CacheImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.CacheImage) + com.google.protobuf.MessageOrBuilder { + + /** + * string stream_id = 1; + * @return The streamId. + */ + java.lang.String getStreamId(); + /** + * string stream_id = 1; + * @return The bytes for streamId. + */ + com.google.protobuf.ByteString + getStreamIdBytes(); + + /** + *
+     * ID for later reference
+     * 
+ * + * uint32 image_id = 2; + * @return The imageId. + */ + int getImageId(); + + /** + * uint32 width = 3; + * @return The width. + */ + int getWidth(); + + /** + * uint32 height = 4; + * @return The height. + */ + int getHeight(); + + /** + * string encoding = 5; + * @return The encoding. + */ + java.lang.String getEncoding(); + /** + * string encoding = 5; + * @return The bytes for encoding. + */ + com.google.protobuf.ByteString + getEncodingBytes(); + + /** + * uint32 total_chunks = 6; + * @return The totalChunks. + */ + int getTotalChunks(); + } + /** + * Protobuf type {@code mentraos.ble.CacheImage} + */ + public static final class CacheImage extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.CacheImage) + CacheImageOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + CacheImage.class.getName()); + } + // Use CacheImage.newBuilder() to construct. + private CacheImage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private CacheImage() { + streamId_ = ""; + encoding_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_CacheImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_CacheImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.CacheImage.class, mentraos.ble.MentraosBle.CacheImage.Builder.class); + } + + public static final int STREAM_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object streamId_ = ""; + /** + * string stream_id = 1; + * @return The streamId. + */ + @java.lang.Override + public java.lang.String getStreamId() { + java.lang.Object ref = streamId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + streamId_ = s; + return s; + } + } + /** + * string stream_id = 1; + * @return The bytes for streamId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStreamIdBytes() { + java.lang.Object ref = streamId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + streamId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_ID_FIELD_NUMBER = 2; + private int imageId_ = 0; + /** + *
+     * ID for later reference
+     * 
+ * + * uint32 image_id = 2; + * @return The imageId. + */ + @java.lang.Override + public int getImageId() { + return imageId_; + } + + public static final int WIDTH_FIELD_NUMBER = 3; + private int width_ = 0; + /** + * uint32 width = 3; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + + public static final int HEIGHT_FIELD_NUMBER = 4; + private int height_ = 0; + /** + * uint32 height = 4; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + public static final int ENCODING_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object encoding_ = ""; + /** + * string encoding = 5; + * @return The encoding. + */ + @java.lang.Override + public java.lang.String getEncoding() { + java.lang.Object ref = encoding_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + encoding_ = s; + return s; + } + } + /** + * string encoding = 5; + * @return The bytes for encoding. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEncodingBytes() { + java.lang.Object ref = encoding_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + encoding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOTAL_CHUNKS_FIELD_NUMBER = 6; + private int totalChunks_ = 0; + /** + * uint32 total_chunks = 6; + * @return The totalChunks. + */ + @java.lang.Override + public int getTotalChunks() { + return totalChunks_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(streamId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, streamId_); + } + if (imageId_ != 0) { + output.writeUInt32(2, imageId_); + } + if (width_ != 0) { + output.writeUInt32(3, width_); + } + if (height_ != 0) { + output.writeUInt32(4, height_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(encoding_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, encoding_); + } + if (totalChunks_ != 0) { + output.writeUInt32(6, totalChunks_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(streamId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, streamId_); + } + if (imageId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, imageId_); + } + if (width_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, width_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, height_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(encoding_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, encoding_); + } + if (totalChunks_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, totalChunks_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.CacheImage)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.CacheImage other = (mentraos.ble.MentraosBle.CacheImage) obj; + + if (!getStreamId() + .equals(other.getStreamId())) return false; + if (getImageId() + != other.getImageId()) return false; + if (getWidth() + != other.getWidth()) return false; + if (getHeight() + != other.getHeight()) return false; + if (!getEncoding() + .equals(other.getEncoding())) return false; + if (getTotalChunks() + != other.getTotalChunks()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STREAM_ID_FIELD_NUMBER; + hash = (53 * hash) + getStreamId().hashCode(); + hash = (37 * hash) + IMAGE_ID_FIELD_NUMBER; + hash = (53 * hash) + getImageId(); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getWidth(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (37 * hash) + ENCODING_FIELD_NUMBER; + hash = (53 * hash) + getEncoding().hashCode(); + hash = (37 * hash) + TOTAL_CHUNKS_FIELD_NUMBER; + hash = (53 * hash) + getTotalChunks(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.CacheImage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.CacheImage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.CacheImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.CacheImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.CacheImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.CacheImage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.CacheImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.CacheImage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.CacheImage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.CacheImage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.CacheImage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.CacheImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.CacheImage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.CacheImage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.CacheImage) + mentraos.ble.MentraosBle.CacheImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_CacheImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_CacheImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.CacheImage.class, mentraos.ble.MentraosBle.CacheImage.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.CacheImage.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + streamId_ = ""; + imageId_ = 0; + width_ = 0; + height_ = 0; + encoding_ = ""; + totalChunks_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_CacheImage_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.CacheImage getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.CacheImage.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.CacheImage build() { + mentraos.ble.MentraosBle.CacheImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.CacheImage buildPartial() { + mentraos.ble.MentraosBle.CacheImage result = new mentraos.ble.MentraosBle.CacheImage(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.CacheImage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.streamId_ = streamId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.imageId_ = imageId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.width_ = width_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.height_ = height_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.encoding_ = encoding_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.totalChunks_ = totalChunks_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.CacheImage) { + return mergeFrom((mentraos.ble.MentraosBle.CacheImage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.CacheImage other) { + if (other == mentraos.ble.MentraosBle.CacheImage.getDefaultInstance()) return this; + if (!other.getStreamId().isEmpty()) { + streamId_ = other.streamId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getImageId() != 0) { + setImageId(other.getImageId()); + } + if (other.getWidth() != 0) { + setWidth(other.getWidth()); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (!other.getEncoding().isEmpty()) { + encoding_ = other.encoding_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getTotalChunks() != 0) { + setTotalChunks(other.getTotalChunks()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + streamId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + imageId_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + width_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + height_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + encoding_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: { + totalChunks_ = input.readUInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object streamId_ = ""; + /** + * string stream_id = 1; + * @return The streamId. + */ + public java.lang.String getStreamId() { + java.lang.Object ref = streamId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + streamId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string stream_id = 1; + * @return The bytes for streamId. + */ + public com.google.protobuf.ByteString + getStreamIdBytes() { + java.lang.Object ref = streamId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + streamId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string stream_id = 1; + * @param value The streamId to set. + * @return This builder for chaining. + */ + public Builder setStreamId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + streamId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string stream_id = 1; + * @return This builder for chaining. + */ + public Builder clearStreamId() { + streamId_ = getDefaultInstance().getStreamId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string stream_id = 1; + * @param value The bytes for streamId to set. + * @return This builder for chaining. + */ + public Builder setStreamIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + streamId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int imageId_ ; + /** + *
+       * ID for later reference
+       * 
+ * + * uint32 image_id = 2; + * @return The imageId. + */ + @java.lang.Override + public int getImageId() { + return imageId_; + } + /** + *
+       * ID for later reference
+       * 
+ * + * uint32 image_id = 2; + * @param value The imageId to set. + * @return This builder for chaining. + */ + public Builder setImageId(int value) { + + imageId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * ID for later reference
+       * 
+ * + * uint32 image_id = 2; + * @return This builder for chaining. + */ + public Builder clearImageId() { + bitField0_ = (bitField0_ & ~0x00000002); + imageId_ = 0; + onChanged(); + return this; + } + + private int width_ ; + /** + * uint32 width = 3; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + /** + * uint32 width = 3; + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(int value) { + + width_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint32 width = 3; + * @return This builder for chaining. + */ + public Builder clearWidth() { + bitField0_ = (bitField0_ & ~0x00000004); + width_ = 0; + onChanged(); + return this; + } + + private int height_ ; + /** + * uint32 height = 4; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + * uint32 height = 4; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint32 height = 4; + * @return This builder for chaining. + */ + public Builder clearHeight() { + bitField0_ = (bitField0_ & ~0x00000008); + height_ = 0; + onChanged(); + return this; + } + + private java.lang.Object encoding_ = ""; + /** + * string encoding = 5; + * @return The encoding. + */ + public java.lang.String getEncoding() { + java.lang.Object ref = encoding_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + encoding_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string encoding = 5; + * @return The bytes for encoding. + */ + public com.google.protobuf.ByteString + getEncodingBytes() { + java.lang.Object ref = encoding_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + encoding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string encoding = 5; + * @param value The encoding to set. + * @return This builder for chaining. + */ + public Builder setEncoding( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + encoding_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * string encoding = 5; + * @return This builder for chaining. + */ + public Builder clearEncoding() { + encoding_ = getDefaultInstance().getEncoding(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * string encoding = 5; + * @param value The bytes for encoding to set. + * @return This builder for chaining. + */ + public Builder setEncodingBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + encoding_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int totalChunks_ ; + /** + * uint32 total_chunks = 6; + * @return The totalChunks. + */ + @java.lang.Override + public int getTotalChunks() { + return totalChunks_; + } + /** + * uint32 total_chunks = 6; + * @param value The totalChunks to set. + * @return This builder for chaining. + */ + public Builder setTotalChunks(int value) { + + totalChunks_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * uint32 total_chunks = 6; + * @return This builder for chaining. + */ + public Builder clearTotalChunks() { + bitField0_ = (bitField0_ & ~0x00000020); + totalChunks_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.CacheImage) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.CacheImage) + private static final mentraos.ble.MentraosBle.CacheImage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.CacheImage(); + } + + public static mentraos.ble.MentraosBle.CacheImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CacheImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.CacheImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DisplayCachedImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.DisplayCachedImage) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 image_id = 1; + * @return The imageId. + */ + int getImageId(); + + /** + * uint32 x = 2; + * @return The x. + */ + int getX(); + + /** + * uint32 y = 3; + * @return The y. + */ + int getY(); + + /** + * uint32 width = 4; + * @return The width. + */ + int getWidth(); + + /** + * uint32 height = 5; + * @return The height. + */ + int getHeight(); + } + /** + * Protobuf type {@code mentraos.ble.DisplayCachedImage} + */ + public static final class DisplayCachedImage extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.DisplayCachedImage) + DisplayCachedImageOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + DisplayCachedImage.class.getName()); + } + // Use DisplayCachedImage.newBuilder() to construct. + private DisplayCachedImage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DisplayCachedImage() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayCachedImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayCachedImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayCachedImage.class, mentraos.ble.MentraosBle.DisplayCachedImage.Builder.class); + } + + public static final int IMAGE_ID_FIELD_NUMBER = 1; + private int imageId_ = 0; + /** + * uint32 image_id = 1; + * @return The imageId. + */ + @java.lang.Override + public int getImageId() { + return imageId_; + } + + public static final int X_FIELD_NUMBER = 2; + private int x_ = 0; + /** + * uint32 x = 2; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 3; + private int y_ = 0; + /** + * uint32 y = 3; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + + public static final int WIDTH_FIELD_NUMBER = 4; + private int width_ = 0; + /** + * uint32 width = 4; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + + public static final int HEIGHT_FIELD_NUMBER = 5; + private int height_ = 0; + /** + * uint32 height = 5; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (imageId_ != 0) { + output.writeUInt32(1, imageId_); + } + if (x_ != 0) { + output.writeUInt32(2, x_); + } + if (y_ != 0) { + output.writeUInt32(3, y_); + } + if (width_ != 0) { + output.writeUInt32(4, width_); + } + if (height_ != 0) { + output.writeUInt32(5, height_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (imageId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, imageId_); + } + if (x_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, x_); + } + if (y_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, y_); + } + if (width_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, width_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, height_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.DisplayCachedImage)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.DisplayCachedImage other = (mentraos.ble.MentraosBle.DisplayCachedImage) obj; + + if (getImageId() + != other.getImageId()) return false; + if (getX() + != other.getX()) return false; + if (getY() + != other.getY()) return false; + if (getWidth() + != other.getWidth()) return false; + if (getHeight() + != other.getHeight()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IMAGE_ID_FIELD_NUMBER; + hash = (53 * hash) + getImageId(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + getX(); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + getY(); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getWidth(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.DisplayCachedImage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayCachedImage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayCachedImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayCachedImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayCachedImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayCachedImage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayCachedImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayCachedImage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.DisplayCachedImage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.DisplayCachedImage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayCachedImage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayCachedImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.DisplayCachedImage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.DisplayCachedImage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.DisplayCachedImage) + mentraos.ble.MentraosBle.DisplayCachedImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayCachedImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayCachedImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayCachedImage.class, mentraos.ble.MentraosBle.DisplayCachedImage.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.DisplayCachedImage.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + imageId_ = 0; + x_ = 0; + y_ = 0; + width_ = 0; + height_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayCachedImage_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayCachedImage getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.DisplayCachedImage.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayCachedImage build() { + mentraos.ble.MentraosBle.DisplayCachedImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayCachedImage buildPartial() { + mentraos.ble.MentraosBle.DisplayCachedImage result = new mentraos.ble.MentraosBle.DisplayCachedImage(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.DisplayCachedImage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.imageId_ = imageId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.x_ = x_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.y_ = y_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.width_ = width_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.height_ = height_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.DisplayCachedImage) { + return mergeFrom((mentraos.ble.MentraosBle.DisplayCachedImage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.DisplayCachedImage other) { + if (other == mentraos.ble.MentraosBle.DisplayCachedImage.getDefaultInstance()) return this; + if (other.getImageId() != 0) { + setImageId(other.getImageId()); + } + if (other.getX() != 0) { + setX(other.getX()); + } + if (other.getY() != 0) { + setY(other.getY()); + } + if (other.getWidth() != 0) { + setWidth(other.getWidth()); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + imageId_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + x_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + y_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + width_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + height_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int imageId_ ; + /** + * uint32 image_id = 1; + * @return The imageId. + */ + @java.lang.Override + public int getImageId() { + return imageId_; + } + /** + * uint32 image_id = 1; + * @param value The imageId to set. + * @return This builder for chaining. + */ + public Builder setImageId(int value) { + + imageId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint32 image_id = 1; + * @return This builder for chaining. + */ + public Builder clearImageId() { + bitField0_ = (bitField0_ & ~0x00000001); + imageId_ = 0; + onChanged(); + return this; + } + + private int x_ ; + /** + * uint32 x = 2; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + /** + * uint32 x = 2; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(int value) { + + x_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint32 x = 2; + * @return This builder for chaining. + */ + public Builder clearX() { + bitField0_ = (bitField0_ & ~0x00000002); + x_ = 0; + onChanged(); + return this; + } + + private int y_ ; + /** + * uint32 y = 3; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + /** + * uint32 y = 3; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(int value) { + + y_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint32 y = 3; + * @return This builder for chaining. + */ + public Builder clearY() { + bitField0_ = (bitField0_ & ~0x00000004); + y_ = 0; + onChanged(); + return this; + } + + private int width_ ; + /** + * uint32 width = 4; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + /** + * uint32 width = 4; + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(int value) { + + width_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint32 width = 4; + * @return This builder for chaining. + */ + public Builder clearWidth() { + bitField0_ = (bitField0_ & ~0x00000008); + width_ = 0; + onChanged(); + return this; + } + + private int height_ ; + /** + * uint32 height = 5; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + * uint32 height = 5; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * uint32 height = 5; + * @return This builder for chaining. + */ + public Builder clearHeight() { + bitField0_ = (bitField0_ & ~0x00000010); + height_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.DisplayCachedImage) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.DisplayCachedImage) + private static final mentraos.ble.MentraosBle.DisplayCachedImage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.DisplayCachedImage(); + } + + public static mentraos.ble.MentraosBle.DisplayCachedImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisplayCachedImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayCachedImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ClearCachedImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.ClearCachedImage) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 image_id = 1; + * @return The imageId. + */ + int getImageId(); + } + /** + * Protobuf type {@code mentraos.ble.ClearCachedImage} + */ + public static final class ClearCachedImage extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.ClearCachedImage) + ClearCachedImageOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + ClearCachedImage.class.getName()); + } + // Use ClearCachedImage.newBuilder() to construct. + private ClearCachedImage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ClearCachedImage() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ClearCachedImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ClearCachedImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.ClearCachedImage.class, mentraos.ble.MentraosBle.ClearCachedImage.Builder.class); + } + + public static final int IMAGE_ID_FIELD_NUMBER = 1; + private int imageId_ = 0; + /** + * uint32 image_id = 1; + * @return The imageId. + */ + @java.lang.Override + public int getImageId() { + return imageId_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (imageId_ != 0) { + output.writeUInt32(1, imageId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (imageId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, imageId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.ClearCachedImage)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.ClearCachedImage other = (mentraos.ble.MentraosBle.ClearCachedImage) obj; + + if (getImageId() + != other.getImageId()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IMAGE_ID_FIELD_NUMBER; + hash = (53 * hash) + getImageId(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.ClearCachedImage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ClearCachedImage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ClearCachedImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ClearCachedImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ClearCachedImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ClearCachedImage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ClearCachedImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.ClearCachedImage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.ClearCachedImage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.ClearCachedImage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ClearCachedImage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.ClearCachedImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.ClearCachedImage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.ClearCachedImage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.ClearCachedImage) + mentraos.ble.MentraosBle.ClearCachedImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ClearCachedImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ClearCachedImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.ClearCachedImage.class, mentraos.ble.MentraosBle.ClearCachedImage.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.ClearCachedImage.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + imageId_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ClearCachedImage_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ClearCachedImage getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.ClearCachedImage.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ClearCachedImage build() { + mentraos.ble.MentraosBle.ClearCachedImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ClearCachedImage buildPartial() { + mentraos.ble.MentraosBle.ClearCachedImage result = new mentraos.ble.MentraosBle.ClearCachedImage(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.ClearCachedImage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.imageId_ = imageId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.ClearCachedImage) { + return mergeFrom((mentraos.ble.MentraosBle.ClearCachedImage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.ClearCachedImage other) { + if (other == mentraos.ble.MentraosBle.ClearCachedImage.getDefaultInstance()) return this; + if (other.getImageId() != 0) { + setImageId(other.getImageId()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + imageId_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int imageId_ ; + /** + * uint32 image_id = 1; + * @return The imageId. + */ + @java.lang.Override + public int getImageId() { + return imageId_; + } + /** + * uint32 image_id = 1; + * @param value The imageId to set. + * @return This builder for chaining. + */ + public Builder setImageId(int value) { + + imageId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint32 image_id = 1; + * @return This builder for chaining. + */ + public Builder clearImageId() { + bitField0_ = (bitField0_ & ~0x00000001); + imageId_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.ClearCachedImage) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.ClearCachedImage) + private static final mentraos.ble.MentraosBle.ClearCachedImage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.ClearCachedImage(); + } + + public static mentraos.ble.MentraosBle.ClearCachedImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClearCachedImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ClearCachedImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DisplayScrollingTextOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.DisplayScrollingText) + com.google.protobuf.MessageOrBuilder { + + /** + * string text = 1; + * @return The text. + */ + java.lang.String getText(); + /** + * string text = 1; + * @return The bytes for text. + */ + com.google.protobuf.ByteString + getTextBytes(); + + /** + * uint32 color = 2; + * @return The color. + */ + int getColor(); + + /** + *
+     * Text box X position
+     * 
+ * + * uint32 x = 3; + * @return The x. + */ + int getX(); + + /** + *
+     * Text box Y position
+     * 
+ * + * uint32 y = 4; + * @return The y. + */ + int getY(); + + /** + *
+     * Text box width (for LVGL wrapping)
+     * 
+ * + * uint32 width = 5; + * @return The width. + */ + int getWidth(); + + /** + *
+     * Text box height (truncate with ellipses if exceeded)
+     * 
+ * + * uint32 height = 6; + * @return The height. + */ + int getHeight(); + + /** + * .mentraos.ble.DisplayScrollingText.Alignment align = 7; + * @return The enum numeric value on the wire for align. + */ + int getAlignValue(); + /** + * .mentraos.ble.DisplayScrollingText.Alignment align = 7; + * @return The align. + */ + mentraos.ble.MentraosBle.DisplayScrollingText.Alignment getAlign(); + + /** + *
+     * pixels between lines
+     * 
+ * + * uint32 line_spacing = 8; + * @return The lineSpacing. + */ + int getLineSpacing(); + + /** + *
+     * pixels/sec scrolling up
+     * 
+ * + * uint32 speed = 9; + * @return The speed. + */ + int getSpeed(); + + /** + *
+     * Font size as integer
+     * 
+ * + * uint32 size = 10; + * @return The size. + */ + int getSize(); + + /** + *
+     * wrap to top when finished
+     * 
+ * + * bool loop = 11; + * @return The loop. + */ + boolean getLoop(); + + /** + *
+     * delay before restart (if looping)
+     * 
+ * + * uint32 pause_ms = 12; + * @return The pauseMs. + */ + int getPauseMs(); + } + /** + * Protobuf type {@code mentraos.ble.DisplayScrollingText} + */ + public static final class DisplayScrollingText extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.DisplayScrollingText) + DisplayScrollingTextOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + DisplayScrollingText.class.getName()); + } + // Use DisplayScrollingText.newBuilder() to construct. + private DisplayScrollingText(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DisplayScrollingText() { + text_ = ""; + align_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayScrollingText_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayScrollingText_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayScrollingText.class, mentraos.ble.MentraosBle.DisplayScrollingText.Builder.class); + } + + /** + * Protobuf enum {@code mentraos.ble.DisplayScrollingText.Alignment} + */ + public enum Alignment + implements com.google.protobuf.ProtocolMessageEnum { + /** + * LEFT = 0; + */ + LEFT(0), + /** + * CENTER = 1; + */ + CENTER(1), + /** + * RIGHT = 2; + */ + RIGHT(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + Alignment.class.getName()); + } + /** + * LEFT = 0; + */ + public static final int LEFT_VALUE = 0; + /** + * CENTER = 1; + */ + public static final int CENTER_VALUE = 1; + /** + * RIGHT = 2; + */ + public static final int RIGHT_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Alignment valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Alignment forNumber(int value) { + switch (value) { + case 0: return LEFT; + case 1: return CENTER; + case 2: return RIGHT; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Alignment> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Alignment findValueByNumber(int number) { + return Alignment.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return mentraos.ble.MentraosBle.DisplayScrollingText.getDescriptor().getEnumTypes().get(0); + } + + private static final Alignment[] VALUES = values(); + + public static Alignment valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Alignment(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:mentraos.ble.DisplayScrollingText.Alignment) + } + + public static final int TEXT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; + /** + * string text = 1; + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + * string text = 1; + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COLOR_FIELD_NUMBER = 2; + private int color_ = 0; + /** + * uint32 color = 2; + * @return The color. + */ + @java.lang.Override + public int getColor() { + return color_; + } + + public static final int X_FIELD_NUMBER = 3; + private int x_ = 0; + /** + *
+     * Text box X position
+     * 
+ * + * uint32 x = 3; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 4; + private int y_ = 0; + /** + *
+     * Text box Y position
+     * 
+ * + * uint32 y = 4; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + + public static final int WIDTH_FIELD_NUMBER = 5; + private int width_ = 0; + /** + *
+     * Text box width (for LVGL wrapping)
+     * 
+ * + * uint32 width = 5; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + + public static final int HEIGHT_FIELD_NUMBER = 6; + private int height_ = 0; + /** + *
+     * Text box height (truncate with ellipses if exceeded)
+     * 
+ * + * uint32 height = 6; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + public static final int ALIGN_FIELD_NUMBER = 7; + private int align_ = 0; + /** + * .mentraos.ble.DisplayScrollingText.Alignment align = 7; + * @return The enum numeric value on the wire for align. + */ + @java.lang.Override public int getAlignValue() { + return align_; + } + /** + * .mentraos.ble.DisplayScrollingText.Alignment align = 7; + * @return The align. + */ + @java.lang.Override public mentraos.ble.MentraosBle.DisplayScrollingText.Alignment getAlign() { + mentraos.ble.MentraosBle.DisplayScrollingText.Alignment result = mentraos.ble.MentraosBle.DisplayScrollingText.Alignment.forNumber(align_); + return result == null ? mentraos.ble.MentraosBle.DisplayScrollingText.Alignment.UNRECOGNIZED : result; + } + + public static final int LINE_SPACING_FIELD_NUMBER = 8; + private int lineSpacing_ = 0; + /** + *
+     * pixels between lines
+     * 
+ * + * uint32 line_spacing = 8; + * @return The lineSpacing. + */ + @java.lang.Override + public int getLineSpacing() { + return lineSpacing_; + } + + public static final int SPEED_FIELD_NUMBER = 9; + private int speed_ = 0; + /** + *
+     * pixels/sec scrolling up
+     * 
+ * + * uint32 speed = 9; + * @return The speed. + */ + @java.lang.Override + public int getSpeed() { + return speed_; + } + + public static final int SIZE_FIELD_NUMBER = 10; + private int size_ = 0; + /** + *
+     * Font size as integer
+     * 
+ * + * uint32 size = 10; + * @return The size. + */ + @java.lang.Override + public int getSize() { + return size_; + } + + public static final int LOOP_FIELD_NUMBER = 11; + private boolean loop_ = false; + /** + *
+     * wrap to top when finished
+     * 
+ * + * bool loop = 11; + * @return The loop. + */ + @java.lang.Override + public boolean getLoop() { + return loop_; + } + + public static final int PAUSE_MS_FIELD_NUMBER = 12; + private int pauseMs_ = 0; + /** + *
+     * delay before restart (if looping)
+     * 
+ * + * uint32 pause_ms = 12; + * @return The pauseMs. + */ + @java.lang.Override + public int getPauseMs() { + return pauseMs_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, text_); + } + if (color_ != 0) { + output.writeUInt32(2, color_); + } + if (x_ != 0) { + output.writeUInt32(3, x_); + } + if (y_ != 0) { + output.writeUInt32(4, y_); + } + if (width_ != 0) { + output.writeUInt32(5, width_); + } + if (height_ != 0) { + output.writeUInt32(6, height_); + } + if (align_ != mentraos.ble.MentraosBle.DisplayScrollingText.Alignment.LEFT.getNumber()) { + output.writeEnum(7, align_); + } + if (lineSpacing_ != 0) { + output.writeUInt32(8, lineSpacing_); + } + if (speed_ != 0) { + output.writeUInt32(9, speed_); + } + if (size_ != 0) { + output.writeUInt32(10, size_); + } + if (loop_ != false) { + output.writeBool(11, loop_); + } + if (pauseMs_ != 0) { + output.writeUInt32(12, pauseMs_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, text_); + } + if (color_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, color_); + } + if (x_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, x_); + } + if (y_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, y_); + } + if (width_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, width_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, height_); + } + if (align_ != mentraos.ble.MentraosBle.DisplayScrollingText.Alignment.LEFT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, align_); + } + if (lineSpacing_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(8, lineSpacing_); + } + if (speed_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(9, speed_); + } + if (size_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(10, size_); + } + if (loop_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(11, loop_); + } + if (pauseMs_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(12, pauseMs_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.DisplayScrollingText)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.DisplayScrollingText other = (mentraos.ble.MentraosBle.DisplayScrollingText) obj; + + if (!getText() + .equals(other.getText())) return false; + if (getColor() + != other.getColor()) return false; + if (getX() + != other.getX()) return false; + if (getY() + != other.getY()) return false; + if (getWidth() + != other.getWidth()) return false; + if (getHeight() + != other.getHeight()) return false; + if (align_ != other.align_) return false; + if (getLineSpacing() + != other.getLineSpacing()) return false; + if (getSpeed() + != other.getSpeed()) return false; + if (getSize() + != other.getSize()) return false; + if (getLoop() + != other.getLoop()) return false; + if (getPauseMs() + != other.getPauseMs()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (37 * hash) + COLOR_FIELD_NUMBER; + hash = (53 * hash) + getColor(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + getX(); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + getY(); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getWidth(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (37 * hash) + ALIGN_FIELD_NUMBER; + hash = (53 * hash) + align_; + hash = (37 * hash) + LINE_SPACING_FIELD_NUMBER; + hash = (53 * hash) + getLineSpacing(); + hash = (37 * hash) + SPEED_FIELD_NUMBER; + hash = (53 * hash) + getSpeed(); + hash = (37 * hash) + SIZE_FIELD_NUMBER; + hash = (53 * hash) + getSize(); + hash = (37 * hash) + LOOP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getLoop()); + hash = (37 * hash) + PAUSE_MS_FIELD_NUMBER; + hash = (53 * hash) + getPauseMs(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.DisplayScrollingText parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayScrollingText parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayScrollingText parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayScrollingText parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayScrollingText parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayScrollingText parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayScrollingText parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayScrollingText parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.DisplayScrollingText parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.DisplayScrollingText parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayScrollingText parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayScrollingText parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.DisplayScrollingText prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.DisplayScrollingText} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.DisplayScrollingText) + mentraos.ble.MentraosBle.DisplayScrollingTextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayScrollingText_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayScrollingText_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayScrollingText.class, mentraos.ble.MentraosBle.DisplayScrollingText.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.DisplayScrollingText.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + text_ = ""; + color_ = 0; + x_ = 0; + y_ = 0; + width_ = 0; + height_ = 0; + align_ = 0; + lineSpacing_ = 0; + speed_ = 0; + size_ = 0; + loop_ = false; + pauseMs_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayScrollingText_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayScrollingText getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.DisplayScrollingText.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayScrollingText build() { + mentraos.ble.MentraosBle.DisplayScrollingText result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayScrollingText buildPartial() { + mentraos.ble.MentraosBle.DisplayScrollingText result = new mentraos.ble.MentraosBle.DisplayScrollingText(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.DisplayScrollingText result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.text_ = text_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.color_ = color_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.x_ = x_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.y_ = y_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.width_ = width_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.height_ = height_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.align_ = align_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.lineSpacing_ = lineSpacing_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.speed_ = speed_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.size_ = size_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.loop_ = loop_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.pauseMs_ = pauseMs_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.DisplayScrollingText) { + return mergeFrom((mentraos.ble.MentraosBle.DisplayScrollingText)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.DisplayScrollingText other) { + if (other == mentraos.ble.MentraosBle.DisplayScrollingText.getDefaultInstance()) return this; + if (!other.getText().isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getColor() != 0) { + setColor(other.getColor()); + } + if (other.getX() != 0) { + setX(other.getX()); + } + if (other.getY() != 0) { + setY(other.getY()); + } + if (other.getWidth() != 0) { + setWidth(other.getWidth()); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (other.align_ != 0) { + setAlignValue(other.getAlignValue()); + } + if (other.getLineSpacing() != 0) { + setLineSpacing(other.getLineSpacing()); + } + if (other.getSpeed() != 0) { + setSpeed(other.getSpeed()); + } + if (other.getSize() != 0) { + setSize(other.getSize()); + } + if (other.getLoop() != false) { + setLoop(other.getLoop()); + } + if (other.getPauseMs() != 0) { + setPauseMs(other.getPauseMs()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + color_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + x_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + y_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + width_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + height_ = input.readUInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + align_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + lineSpacing_ = input.readUInt32(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + speed_ = input.readUInt32(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: { + size_ = input.readUInt32(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: { + loop_ = input.readBool(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 96: { + pauseMs_ = input.readUInt32(); + bitField0_ |= 0x00000800; + break; + } // case 96 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object text_ = ""; + /** + * string text = 1; + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string text = 1; + * @return The bytes for text. + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string text = 1; + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + text_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string text = 1; + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string text = 1; + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + text_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int color_ ; + /** + * uint32 color = 2; + * @return The color. + */ + @java.lang.Override + public int getColor() { + return color_; + } + /** + * uint32 color = 2; + * @param value The color to set. + * @return This builder for chaining. + */ + public Builder setColor(int value) { + + color_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint32 color = 2; + * @return This builder for chaining. + */ + public Builder clearColor() { + bitField0_ = (bitField0_ & ~0x00000002); + color_ = 0; + onChanged(); + return this; + } + + private int x_ ; + /** + *
+       * Text box X position
+       * 
+ * + * uint32 x = 3; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + /** + *
+       * Text box X position
+       * 
+ * + * uint32 x = 3; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(int value) { + + x_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * Text box X position
+       * 
+ * + * uint32 x = 3; + * @return This builder for chaining. + */ + public Builder clearX() { + bitField0_ = (bitField0_ & ~0x00000004); + x_ = 0; + onChanged(); + return this; + } + + private int y_ ; + /** + *
+       * Text box Y position
+       * 
+ * + * uint32 y = 4; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + /** + *
+       * Text box Y position
+       * 
+ * + * uint32 y = 4; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(int value) { + + y_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Text box Y position
+       * 
+ * + * uint32 y = 4; + * @return This builder for chaining. + */ + public Builder clearY() { + bitField0_ = (bitField0_ & ~0x00000008); + y_ = 0; + onChanged(); + return this; + } + + private int width_ ; + /** + *
+       * Text box width (for LVGL wrapping)
+       * 
+ * + * uint32 width = 5; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + /** + *
+       * Text box width (for LVGL wrapping)
+       * 
+ * + * uint32 width = 5; + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(int value) { + + width_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * Text box width (for LVGL wrapping)
+       * 
+ * + * uint32 width = 5; + * @return This builder for chaining. + */ + public Builder clearWidth() { + bitField0_ = (bitField0_ & ~0x00000010); + width_ = 0; + onChanged(); + return this; + } + + private int height_ ; + /** + *
+       * Text box height (truncate with ellipses if exceeded)
+       * 
+ * + * uint32 height = 6; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + *
+       * Text box height (truncate with ellipses if exceeded)
+       * 
+ * + * uint32 height = 6; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+       * Text box height (truncate with ellipses if exceeded)
+       * 
+ * + * uint32 height = 6; + * @return This builder for chaining. + */ + public Builder clearHeight() { + bitField0_ = (bitField0_ & ~0x00000020); + height_ = 0; + onChanged(); + return this; + } + + private int align_ = 0; + /** + * .mentraos.ble.DisplayScrollingText.Alignment align = 7; + * @return The enum numeric value on the wire for align. + */ + @java.lang.Override public int getAlignValue() { + return align_; + } + /** + * .mentraos.ble.DisplayScrollingText.Alignment align = 7; + * @param value The enum numeric value on the wire for align to set. + * @return This builder for chaining. + */ + public Builder setAlignValue(int value) { + align_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * .mentraos.ble.DisplayScrollingText.Alignment align = 7; + * @return The align. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayScrollingText.Alignment getAlign() { + mentraos.ble.MentraosBle.DisplayScrollingText.Alignment result = mentraos.ble.MentraosBle.DisplayScrollingText.Alignment.forNumber(align_); + return result == null ? mentraos.ble.MentraosBle.DisplayScrollingText.Alignment.UNRECOGNIZED : result; + } + /** + * .mentraos.ble.DisplayScrollingText.Alignment align = 7; + * @param value The align to set. + * @return This builder for chaining. + */ + public Builder setAlign(mentraos.ble.MentraosBle.DisplayScrollingText.Alignment value) { + if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000040; + align_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .mentraos.ble.DisplayScrollingText.Alignment align = 7; + * @return This builder for chaining. + */ + public Builder clearAlign() { + bitField0_ = (bitField0_ & ~0x00000040); + align_ = 0; + onChanged(); + return this; + } + + private int lineSpacing_ ; + /** + *
+       * pixels between lines
+       * 
+ * + * uint32 line_spacing = 8; + * @return The lineSpacing. + */ + @java.lang.Override + public int getLineSpacing() { + return lineSpacing_; + } + /** + *
+       * pixels between lines
+       * 
+ * + * uint32 line_spacing = 8; + * @param value The lineSpacing to set. + * @return This builder for chaining. + */ + public Builder setLineSpacing(int value) { + + lineSpacing_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+       * pixels between lines
+       * 
+ * + * uint32 line_spacing = 8; + * @return This builder for chaining. + */ + public Builder clearLineSpacing() { + bitField0_ = (bitField0_ & ~0x00000080); + lineSpacing_ = 0; + onChanged(); + return this; + } + + private int speed_ ; + /** + *
+       * pixels/sec scrolling up
+       * 
+ * + * uint32 speed = 9; + * @return The speed. + */ + @java.lang.Override + public int getSpeed() { + return speed_; + } + /** + *
+       * pixels/sec scrolling up
+       * 
+ * + * uint32 speed = 9; + * @param value The speed to set. + * @return This builder for chaining. + */ + public Builder setSpeed(int value) { + + speed_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+       * pixels/sec scrolling up
+       * 
+ * + * uint32 speed = 9; + * @return This builder for chaining. + */ + public Builder clearSpeed() { + bitField0_ = (bitField0_ & ~0x00000100); + speed_ = 0; + onChanged(); + return this; + } + + private int size_ ; + /** + *
+       * Font size as integer
+       * 
+ * + * uint32 size = 10; + * @return The size. + */ + @java.lang.Override + public int getSize() { + return size_; + } + /** + *
+       * Font size as integer
+       * 
+ * + * uint32 size = 10; + * @param value The size to set. + * @return This builder for chaining. + */ + public Builder setSize(int value) { + + size_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+       * Font size as integer
+       * 
+ * + * uint32 size = 10; + * @return This builder for chaining. + */ + public Builder clearSize() { + bitField0_ = (bitField0_ & ~0x00000200); + size_ = 0; + onChanged(); + return this; + } + + private boolean loop_ ; + /** + *
+       * wrap to top when finished
+       * 
+ * + * bool loop = 11; + * @return The loop. + */ + @java.lang.Override + public boolean getLoop() { + return loop_; + } + /** + *
+       * wrap to top when finished
+       * 
+ * + * bool loop = 11; + * @param value The loop to set. + * @return This builder for chaining. + */ + public Builder setLoop(boolean value) { + + loop_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+       * wrap to top when finished
+       * 
+ * + * bool loop = 11; + * @return This builder for chaining. + */ + public Builder clearLoop() { + bitField0_ = (bitField0_ & ~0x00000400); + loop_ = false; + onChanged(); + return this; + } + + private int pauseMs_ ; + /** + *
+       * delay before restart (if looping)
+       * 
+ * + * uint32 pause_ms = 12; + * @return The pauseMs. + */ + @java.lang.Override + public int getPauseMs() { + return pauseMs_; + } + /** + *
+       * delay before restart (if looping)
+       * 
+ * + * uint32 pause_ms = 12; + * @param value The pauseMs to set. + * @return This builder for chaining. + */ + public Builder setPauseMs(int value) { + + pauseMs_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+       * delay before restart (if looping)
+       * 
+ * + * uint32 pause_ms = 12; + * @return This builder for chaining. + */ + public Builder clearPauseMs() { + bitField0_ = (bitField0_ & ~0x00000800); + pauseMs_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.DisplayScrollingText) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.DisplayScrollingText) + private static final mentraos.ble.MentraosBle.DisplayScrollingText DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.DisplayScrollingText(); + } + + public static mentraos.ble.MentraosBle.DisplayScrollingText getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisplayScrollingText parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayScrollingText getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DisplayPowerConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.DisplayPowerConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * true = turn on, false = turn off
+     * 
+ * + * bool on = 1; + * @return The on. + */ + boolean getOn(); + } + /** + * Protobuf type {@code mentraos.ble.DisplayPowerConfig} + */ + public static final class DisplayPowerConfig extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.DisplayPowerConfig) + DisplayPowerConfigOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + DisplayPowerConfig.class.getName()); + } + // Use DisplayPowerConfig.newBuilder() to construct. + private DisplayPowerConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DisplayPowerConfig() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayPowerConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayPowerConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayPowerConfig.class, mentraos.ble.MentraosBle.DisplayPowerConfig.Builder.class); + } + + public static final int ON_FIELD_NUMBER = 1; + private boolean on_ = false; + /** + *
+     * true = turn on, false = turn off
+     * 
+ * + * bool on = 1; + * @return The on. + */ + @java.lang.Override + public boolean getOn() { + return on_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (on_ != false) { + output.writeBool(1, on_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (on_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, on_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.DisplayPowerConfig)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.DisplayPowerConfig other = (mentraos.ble.MentraosBle.DisplayPowerConfig) obj; + + if (getOn() + != other.getOn()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ON_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getOn()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.DisplayPowerConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayPowerConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayPowerConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayPowerConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayPowerConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayPowerConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayPowerConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayPowerConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.DisplayPowerConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.DisplayPowerConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayPowerConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayPowerConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.DisplayPowerConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.DisplayPowerConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.DisplayPowerConfig) + mentraos.ble.MentraosBle.DisplayPowerConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayPowerConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayPowerConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayPowerConfig.class, mentraos.ble.MentraosBle.DisplayPowerConfig.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.DisplayPowerConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + on_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayPowerConfig_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayPowerConfig getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.DisplayPowerConfig.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayPowerConfig build() { + mentraos.ble.MentraosBle.DisplayPowerConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayPowerConfig buildPartial() { + mentraos.ble.MentraosBle.DisplayPowerConfig result = new mentraos.ble.MentraosBle.DisplayPowerConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.DisplayPowerConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.on_ = on_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.DisplayPowerConfig) { + return mergeFrom((mentraos.ble.MentraosBle.DisplayPowerConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.DisplayPowerConfig other) { + if (other == mentraos.ble.MentraosBle.DisplayPowerConfig.getDefaultInstance()) return this; + if (other.getOn() != false) { + setOn(other.getOn()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + on_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean on_ ; + /** + *
+       * true = turn on, false = turn off
+       * 
+ * + * bool on = 1; + * @return The on. + */ + @java.lang.Override + public boolean getOn() { + return on_; + } + /** + *
+       * true = turn on, false = turn off
+       * 
+ * + * bool on = 1; + * @param value The on to set. + * @return This builder for chaining. + */ + public Builder setOn(boolean value) { + + on_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * true = turn on, false = turn off
+       * 
+ * + * bool on = 1; + * @return This builder for chaining. + */ + public Builder clearOn() { + bitField0_ = (bitField0_ & ~0x00000001); + on_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.DisplayPowerConfig) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.DisplayPowerConfig) + private static final mentraos.ble.MentraosBle.DisplayPowerConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.DisplayPowerConfig(); + } + + public static mentraos.ble.MentraosBle.DisplayPowerConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisplayPowerConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayPowerConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BrightnessConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.BrightnessConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 0-100
+     * 
+ * + * uint32 value = 1; + * @return The value. + */ + int getValue(); + } + /** + * Protobuf type {@code mentraos.ble.BrightnessConfig} + */ + public static final class BrightnessConfig extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.BrightnessConfig) + BrightnessConfigOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + BrightnessConfig.class.getName()); + } + // Use BrightnessConfig.newBuilder() to construct. + private BrightnessConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private BrightnessConfig() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_BrightnessConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_BrightnessConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.BrightnessConfig.class, mentraos.ble.MentraosBle.BrightnessConfig.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private int value_ = 0; + /** + *
+     * 0-100
+     * 
+ * + * uint32 value = 1; + * @return The value. + */ + @java.lang.Override + public int getValue() { + return value_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (value_ != 0) { + output.writeUInt32(1, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (value_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.BrightnessConfig)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.BrightnessConfig other = (mentraos.ble.MentraosBle.BrightnessConfig) obj; + + if (getValue() + != other.getValue()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.BrightnessConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.BrightnessConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.BrightnessConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.BrightnessConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.BrightnessConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.BrightnessConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.BrightnessConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.BrightnessConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.BrightnessConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.BrightnessConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.BrightnessConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.BrightnessConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.BrightnessConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.BrightnessConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.BrightnessConfig) + mentraos.ble.MentraosBle.BrightnessConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_BrightnessConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_BrightnessConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.BrightnessConfig.class, mentraos.ble.MentraosBle.BrightnessConfig.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.BrightnessConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + value_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_BrightnessConfig_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.BrightnessConfig getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.BrightnessConfig.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.BrightnessConfig build() { + mentraos.ble.MentraosBle.BrightnessConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.BrightnessConfig buildPartial() { + mentraos.ble.MentraosBle.BrightnessConfig result = new mentraos.ble.MentraosBle.BrightnessConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.BrightnessConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.value_ = value_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.BrightnessConfig) { + return mergeFrom((mentraos.ble.MentraosBle.BrightnessConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.BrightnessConfig other) { + if (other == mentraos.ble.MentraosBle.BrightnessConfig.getDefaultInstance()) return this; + if (other.getValue() != 0) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + value_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int value_ ; + /** + *
+       * 0-100
+       * 
+ * + * uint32 value = 1; + * @return The value. + */ + @java.lang.Override + public int getValue() { + return value_; + } + /** + *
+       * 0-100
+       * 
+ * + * uint32 value = 1; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(int value) { + + value_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * 0-100
+       * 
+ * + * uint32 value = 1; + * @return This builder for chaining. + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000001); + value_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.BrightnessConfig) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.BrightnessConfig) + private static final mentraos.ble.MentraosBle.BrightnessConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.BrightnessConfig(); + } + + public static mentraos.ble.MentraosBle.BrightnessConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BrightnessConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.BrightnessConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AutoBrightnessConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.AutoBrightnessConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * bool enabled = 1; + * @return The enabled. + */ + boolean getEnabled(); + } + /** + * Protobuf type {@code mentraos.ble.AutoBrightnessConfig} + */ + public static final class AutoBrightnessConfig extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.AutoBrightnessConfig) + AutoBrightnessConfigOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + AutoBrightnessConfig.class.getName()); + } + // Use AutoBrightnessConfig.newBuilder() to construct. + private AutoBrightnessConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AutoBrightnessConfig() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_AutoBrightnessConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_AutoBrightnessConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.AutoBrightnessConfig.class, mentraos.ble.MentraosBle.AutoBrightnessConfig.Builder.class); + } + + public static final int ENABLED_FIELD_NUMBER = 1; + private boolean enabled_ = false; + /** + * bool enabled = 1; + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (enabled_ != false) { + output.writeBool(1, enabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, enabled_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.AutoBrightnessConfig)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.AutoBrightnessConfig other = (mentraos.ble.MentraosBle.AutoBrightnessConfig) obj; + + if (getEnabled() + != other.getEnabled()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnabled()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.AutoBrightnessConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.AutoBrightnessConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.AutoBrightnessConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.AutoBrightnessConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.AutoBrightnessConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.AutoBrightnessConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.AutoBrightnessConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.AutoBrightnessConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.AutoBrightnessConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.AutoBrightnessConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.AutoBrightnessConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.AutoBrightnessConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.AutoBrightnessConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.AutoBrightnessConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.AutoBrightnessConfig) + mentraos.ble.MentraosBle.AutoBrightnessConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_AutoBrightnessConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_AutoBrightnessConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.AutoBrightnessConfig.class, mentraos.ble.MentraosBle.AutoBrightnessConfig.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.AutoBrightnessConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_AutoBrightnessConfig_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.AutoBrightnessConfig getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.AutoBrightnessConfig.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.AutoBrightnessConfig build() { + mentraos.ble.MentraosBle.AutoBrightnessConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.AutoBrightnessConfig buildPartial() { + mentraos.ble.MentraosBle.AutoBrightnessConfig result = new mentraos.ble.MentraosBle.AutoBrightnessConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.AutoBrightnessConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enabled_ = enabled_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.AutoBrightnessConfig) { + return mergeFrom((mentraos.ble.MentraosBle.AutoBrightnessConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.AutoBrightnessConfig other) { + if (other == mentraos.ble.MentraosBle.AutoBrightnessConfig.getDefaultInstance()) return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + enabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean enabled_ ; + /** + * bool enabled = 1; + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + /** + * bool enabled = 1; + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool enabled = 1; + * @return This builder for chaining. + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000001); + enabled_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.AutoBrightnessConfig) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.AutoBrightnessConfig) + private static final mentraos.ble.MentraosBle.AutoBrightnessConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.AutoBrightnessConfig(); + } + + public static mentraos.ble.MentraosBle.AutoBrightnessConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoBrightnessConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.AutoBrightnessConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AutoBrightnessMultiplierOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.AutoBrightnessMultiplier) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * e.g., 0.8 = 80%
+     * 
+ * + * float multiplier = 1; + * @return The multiplier. + */ + float getMultiplier(); + } + /** + * Protobuf type {@code mentraos.ble.AutoBrightnessMultiplier} + */ + public static final class AutoBrightnessMultiplier extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.AutoBrightnessMultiplier) + AutoBrightnessMultiplierOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + AutoBrightnessMultiplier.class.getName()); + } + // Use AutoBrightnessMultiplier.newBuilder() to construct. + private AutoBrightnessMultiplier(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AutoBrightnessMultiplier() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_AutoBrightnessMultiplier_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_AutoBrightnessMultiplier_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.AutoBrightnessMultiplier.class, mentraos.ble.MentraosBle.AutoBrightnessMultiplier.Builder.class); + } + + public static final int MULTIPLIER_FIELD_NUMBER = 1; + private float multiplier_ = 0F; + /** + *
+     * e.g., 0.8 = 80%
+     * 
+ * + * float multiplier = 1; + * @return The multiplier. + */ + @java.lang.Override + public float getMultiplier() { + return multiplier_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(multiplier_) != 0) { + output.writeFloat(1, multiplier_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(multiplier_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, multiplier_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.AutoBrightnessMultiplier)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.AutoBrightnessMultiplier other = (mentraos.ble.MentraosBle.AutoBrightnessMultiplier) obj; + + if (java.lang.Float.floatToIntBits(getMultiplier()) + != java.lang.Float.floatToIntBits( + other.getMultiplier())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MULTIPLIER_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getMultiplier()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.AutoBrightnessMultiplier parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.AutoBrightnessMultiplier parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.AutoBrightnessMultiplier parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.AutoBrightnessMultiplier parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.AutoBrightnessMultiplier parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.AutoBrightnessMultiplier parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.AutoBrightnessMultiplier parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.AutoBrightnessMultiplier parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.AutoBrightnessMultiplier parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.AutoBrightnessMultiplier parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.AutoBrightnessMultiplier parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.AutoBrightnessMultiplier parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.AutoBrightnessMultiplier prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.AutoBrightnessMultiplier} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.AutoBrightnessMultiplier) + mentraos.ble.MentraosBle.AutoBrightnessMultiplierOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_AutoBrightnessMultiplier_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_AutoBrightnessMultiplier_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.AutoBrightnessMultiplier.class, mentraos.ble.MentraosBle.AutoBrightnessMultiplier.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.AutoBrightnessMultiplier.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + multiplier_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_AutoBrightnessMultiplier_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.AutoBrightnessMultiplier getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.AutoBrightnessMultiplier.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.AutoBrightnessMultiplier build() { + mentraos.ble.MentraosBle.AutoBrightnessMultiplier result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.AutoBrightnessMultiplier buildPartial() { + mentraos.ble.MentraosBle.AutoBrightnessMultiplier result = new mentraos.ble.MentraosBle.AutoBrightnessMultiplier(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.AutoBrightnessMultiplier result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.multiplier_ = multiplier_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.AutoBrightnessMultiplier) { + return mergeFrom((mentraos.ble.MentraosBle.AutoBrightnessMultiplier)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.AutoBrightnessMultiplier other) { + if (other == mentraos.ble.MentraosBle.AutoBrightnessMultiplier.getDefaultInstance()) return this; + if (java.lang.Float.floatToRawIntBits(other.getMultiplier()) != 0) { + setMultiplier(other.getMultiplier()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + multiplier_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private float multiplier_ ; + /** + *
+       * e.g., 0.8 = 80%
+       * 
+ * + * float multiplier = 1; + * @return The multiplier. + */ + @java.lang.Override + public float getMultiplier() { + return multiplier_; + } + /** + *
+       * e.g., 0.8 = 80%
+       * 
+ * + * float multiplier = 1; + * @param value The multiplier to set. + * @return This builder for chaining. + */ + public Builder setMultiplier(float value) { + + multiplier_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * e.g., 0.8 = 80%
+       * 
+ * + * float multiplier = 1; + * @return This builder for chaining. + */ + public Builder clearMultiplier() { + bitField0_ = (bitField0_ & ~0x00000001); + multiplier_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.AutoBrightnessMultiplier) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.AutoBrightnessMultiplier) + private static final mentraos.ble.MentraosBle.AutoBrightnessMultiplier DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.AutoBrightnessMultiplier(); + } + + public static mentraos.ble.MentraosBle.AutoBrightnessMultiplier getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoBrightnessMultiplier parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.AutoBrightnessMultiplier getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DrawLineOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.DrawLine) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 color = 1; + * @return The color. + */ + int getColor(); + + /** + * uint32 stroke = 2; + * @return The stroke. + */ + int getStroke(); + + /** + * uint32 x1 = 3; + * @return The x1. + */ + int getX1(); + + /** + * uint32 y1 = 4; + * @return The y1. + */ + int getY1(); + + /** + * uint32 x2 = 5; + * @return The x2. + */ + int getX2(); + + /** + * uint32 y2 = 6; + * @return The y2. + */ + int getY2(); + } + /** + * Protobuf type {@code mentraos.ble.DrawLine} + */ + public static final class DrawLine extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.DrawLine) + DrawLineOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + DrawLine.class.getName()); + } + // Use DrawLine.newBuilder() to construct. + private DrawLine(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DrawLine() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DrawLine_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DrawLine_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DrawLine.class, mentraos.ble.MentraosBle.DrawLine.Builder.class); + } + + public static final int COLOR_FIELD_NUMBER = 1; + private int color_ = 0; + /** + * uint32 color = 1; + * @return The color. + */ + @java.lang.Override + public int getColor() { + return color_; + } + + public static final int STROKE_FIELD_NUMBER = 2; + private int stroke_ = 0; + /** + * uint32 stroke = 2; + * @return The stroke. + */ + @java.lang.Override + public int getStroke() { + return stroke_; + } + + public static final int X1_FIELD_NUMBER = 3; + private int x1_ = 0; + /** + * uint32 x1 = 3; + * @return The x1. + */ + @java.lang.Override + public int getX1() { + return x1_; + } + + public static final int Y1_FIELD_NUMBER = 4; + private int y1_ = 0; + /** + * uint32 y1 = 4; + * @return The y1. + */ + @java.lang.Override + public int getY1() { + return y1_; + } + + public static final int X2_FIELD_NUMBER = 5; + private int x2_ = 0; + /** + * uint32 x2 = 5; + * @return The x2. + */ + @java.lang.Override + public int getX2() { + return x2_; + } + + public static final int Y2_FIELD_NUMBER = 6; + private int y2_ = 0; + /** + * uint32 y2 = 6; + * @return The y2. + */ + @java.lang.Override + public int getY2() { + return y2_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (color_ != 0) { + output.writeUInt32(1, color_); + } + if (stroke_ != 0) { + output.writeUInt32(2, stroke_); + } + if (x1_ != 0) { + output.writeUInt32(3, x1_); + } + if (y1_ != 0) { + output.writeUInt32(4, y1_); + } + if (x2_ != 0) { + output.writeUInt32(5, x2_); + } + if (y2_ != 0) { + output.writeUInt32(6, y2_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (color_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, color_); + } + if (stroke_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, stroke_); + } + if (x1_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, x1_); + } + if (y1_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, y1_); + } + if (x2_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, x2_); + } + if (y2_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, y2_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.DrawLine)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.DrawLine other = (mentraos.ble.MentraosBle.DrawLine) obj; + + if (getColor() + != other.getColor()) return false; + if (getStroke() + != other.getStroke()) return false; + if (getX1() + != other.getX1()) return false; + if (getY1() + != other.getY1()) return false; + if (getX2() + != other.getX2()) return false; + if (getY2() + != other.getY2()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COLOR_FIELD_NUMBER; + hash = (53 * hash) + getColor(); + hash = (37 * hash) + STROKE_FIELD_NUMBER; + hash = (53 * hash) + getStroke(); + hash = (37 * hash) + X1_FIELD_NUMBER; + hash = (53 * hash) + getX1(); + hash = (37 * hash) + Y1_FIELD_NUMBER; + hash = (53 * hash) + getY1(); + hash = (37 * hash) + X2_FIELD_NUMBER; + hash = (53 * hash) + getX2(); + hash = (37 * hash) + Y2_FIELD_NUMBER; + hash = (53 * hash) + getY2(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.DrawLine parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DrawLine parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DrawLine parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DrawLine parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DrawLine parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DrawLine parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DrawLine parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DrawLine parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.DrawLine parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.DrawLine parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DrawLine parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DrawLine parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.DrawLine prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.DrawLine} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.DrawLine) + mentraos.ble.MentraosBle.DrawLineOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DrawLine_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DrawLine_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DrawLine.class, mentraos.ble.MentraosBle.DrawLine.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.DrawLine.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + color_ = 0; + stroke_ = 0; + x1_ = 0; + y1_ = 0; + x2_ = 0; + y2_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DrawLine_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DrawLine getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.DrawLine.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DrawLine build() { + mentraos.ble.MentraosBle.DrawLine result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DrawLine buildPartial() { + mentraos.ble.MentraosBle.DrawLine result = new mentraos.ble.MentraosBle.DrawLine(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.DrawLine result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.color_ = color_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.stroke_ = stroke_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.x1_ = x1_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.y1_ = y1_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.x2_ = x2_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.y2_ = y2_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.DrawLine) { + return mergeFrom((mentraos.ble.MentraosBle.DrawLine)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.DrawLine other) { + if (other == mentraos.ble.MentraosBle.DrawLine.getDefaultInstance()) return this; + if (other.getColor() != 0) { + setColor(other.getColor()); + } + if (other.getStroke() != 0) { + setStroke(other.getStroke()); + } + if (other.getX1() != 0) { + setX1(other.getX1()); + } + if (other.getY1() != 0) { + setY1(other.getY1()); + } + if (other.getX2() != 0) { + setX2(other.getX2()); + } + if (other.getY2() != 0) { + setY2(other.getY2()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + color_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + stroke_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + x1_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + y1_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + x2_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + y2_ = input.readUInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int color_ ; + /** + * uint32 color = 1; + * @return The color. + */ + @java.lang.Override + public int getColor() { + return color_; + } + /** + * uint32 color = 1; + * @param value The color to set. + * @return This builder for chaining. + */ + public Builder setColor(int value) { + + color_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint32 color = 1; + * @return This builder for chaining. + */ + public Builder clearColor() { + bitField0_ = (bitField0_ & ~0x00000001); + color_ = 0; + onChanged(); + return this; + } + + private int stroke_ ; + /** + * uint32 stroke = 2; + * @return The stroke. + */ + @java.lang.Override + public int getStroke() { + return stroke_; + } + /** + * uint32 stroke = 2; + * @param value The stroke to set. + * @return This builder for chaining. + */ + public Builder setStroke(int value) { + + stroke_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint32 stroke = 2; + * @return This builder for chaining. + */ + public Builder clearStroke() { + bitField0_ = (bitField0_ & ~0x00000002); + stroke_ = 0; + onChanged(); + return this; + } + + private int x1_ ; + /** + * uint32 x1 = 3; + * @return The x1. + */ + @java.lang.Override + public int getX1() { + return x1_; + } + /** + * uint32 x1 = 3; + * @param value The x1 to set. + * @return This builder for chaining. + */ + public Builder setX1(int value) { + + x1_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint32 x1 = 3; + * @return This builder for chaining. + */ + public Builder clearX1() { + bitField0_ = (bitField0_ & ~0x00000004); + x1_ = 0; + onChanged(); + return this; + } + + private int y1_ ; + /** + * uint32 y1 = 4; + * @return The y1. + */ + @java.lang.Override + public int getY1() { + return y1_; + } + /** + * uint32 y1 = 4; + * @param value The y1 to set. + * @return This builder for chaining. + */ + public Builder setY1(int value) { + + y1_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint32 y1 = 4; + * @return This builder for chaining. + */ + public Builder clearY1() { + bitField0_ = (bitField0_ & ~0x00000008); + y1_ = 0; + onChanged(); + return this; + } + + private int x2_ ; + /** + * uint32 x2 = 5; + * @return The x2. + */ + @java.lang.Override + public int getX2() { + return x2_; + } + /** + * uint32 x2 = 5; + * @param value The x2 to set. + * @return This builder for chaining. + */ + public Builder setX2(int value) { + + x2_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * uint32 x2 = 5; + * @return This builder for chaining. + */ + public Builder clearX2() { + bitField0_ = (bitField0_ & ~0x00000010); + x2_ = 0; + onChanged(); + return this; + } + + private int y2_ ; + /** + * uint32 y2 = 6; + * @return The y2. + */ + @java.lang.Override + public int getY2() { + return y2_; + } + /** + * uint32 y2 = 6; + * @param value The y2 to set. + * @return This builder for chaining. + */ + public Builder setY2(int value) { + + y2_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * uint32 y2 = 6; + * @return This builder for chaining. + */ + public Builder clearY2() { + bitField0_ = (bitField0_ & ~0x00000020); + y2_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.DrawLine) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.DrawLine) + private static final mentraos.ble.MentraosBle.DrawLine DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.DrawLine(); + } + + public static mentraos.ble.MentraosBle.DrawLine getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DrawLine parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DrawLine getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DrawRectOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.DrawRect) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 color = 1; + * @return The color. + */ + int getColor(); + + /** + * uint32 stroke = 2; + * @return The stroke. + */ + int getStroke(); + + /** + * uint32 x = 3; + * @return The x. + */ + int getX(); + + /** + * uint32 y = 4; + * @return The y. + */ + int getY(); + + /** + * uint32 width = 5; + * @return The width. + */ + int getWidth(); + + /** + * uint32 height = 6; + * @return The height. + */ + int getHeight(); + } + /** + * Protobuf type {@code mentraos.ble.DrawRect} + */ + public static final class DrawRect extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.DrawRect) + DrawRectOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + DrawRect.class.getName()); + } + // Use DrawRect.newBuilder() to construct. + private DrawRect(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DrawRect() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DrawRect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DrawRect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DrawRect.class, mentraos.ble.MentraosBle.DrawRect.Builder.class); + } + + public static final int COLOR_FIELD_NUMBER = 1; + private int color_ = 0; + /** + * uint32 color = 1; + * @return The color. + */ + @java.lang.Override + public int getColor() { + return color_; + } + + public static final int STROKE_FIELD_NUMBER = 2; + private int stroke_ = 0; + /** + * uint32 stroke = 2; + * @return The stroke. + */ + @java.lang.Override + public int getStroke() { + return stroke_; + } + + public static final int X_FIELD_NUMBER = 3; + private int x_ = 0; + /** + * uint32 x = 3; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 4; + private int y_ = 0; + /** + * uint32 y = 4; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + + public static final int WIDTH_FIELD_NUMBER = 5; + private int width_ = 0; + /** + * uint32 width = 5; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + + public static final int HEIGHT_FIELD_NUMBER = 6; + private int height_ = 0; + /** + * uint32 height = 6; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (color_ != 0) { + output.writeUInt32(1, color_); + } + if (stroke_ != 0) { + output.writeUInt32(2, stroke_); + } + if (x_ != 0) { + output.writeUInt32(3, x_); + } + if (y_ != 0) { + output.writeUInt32(4, y_); + } + if (width_ != 0) { + output.writeUInt32(5, width_); + } + if (height_ != 0) { + output.writeUInt32(6, height_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (color_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, color_); + } + if (stroke_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, stroke_); + } + if (x_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, x_); + } + if (y_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, y_); + } + if (width_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, width_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, height_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.DrawRect)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.DrawRect other = (mentraos.ble.MentraosBle.DrawRect) obj; + + if (getColor() + != other.getColor()) return false; + if (getStroke() + != other.getStroke()) return false; + if (getX() + != other.getX()) return false; + if (getY() + != other.getY()) return false; + if (getWidth() + != other.getWidth()) return false; + if (getHeight() + != other.getHeight()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COLOR_FIELD_NUMBER; + hash = (53 * hash) + getColor(); + hash = (37 * hash) + STROKE_FIELD_NUMBER; + hash = (53 * hash) + getStroke(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + getX(); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + getY(); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getWidth(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.DrawRect parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DrawRect parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DrawRect parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DrawRect parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DrawRect parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DrawRect parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DrawRect parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DrawRect parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.DrawRect parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.DrawRect parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DrawRect parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DrawRect parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.DrawRect prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.DrawRect} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.DrawRect) + mentraos.ble.MentraosBle.DrawRectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DrawRect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DrawRect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DrawRect.class, mentraos.ble.MentraosBle.DrawRect.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.DrawRect.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + color_ = 0; + stroke_ = 0; + x_ = 0; + y_ = 0; + width_ = 0; + height_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DrawRect_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DrawRect getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.DrawRect.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DrawRect build() { + mentraos.ble.MentraosBle.DrawRect result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DrawRect buildPartial() { + mentraos.ble.MentraosBle.DrawRect result = new mentraos.ble.MentraosBle.DrawRect(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.DrawRect result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.color_ = color_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.stroke_ = stroke_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.x_ = x_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.y_ = y_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.width_ = width_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.height_ = height_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.DrawRect) { + return mergeFrom((mentraos.ble.MentraosBle.DrawRect)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.DrawRect other) { + if (other == mentraos.ble.MentraosBle.DrawRect.getDefaultInstance()) return this; + if (other.getColor() != 0) { + setColor(other.getColor()); + } + if (other.getStroke() != 0) { + setStroke(other.getStroke()); + } + if (other.getX() != 0) { + setX(other.getX()); + } + if (other.getY() != 0) { + setY(other.getY()); + } + if (other.getWidth() != 0) { + setWidth(other.getWidth()); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + color_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + stroke_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + x_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + y_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + width_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + height_ = input.readUInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int color_ ; + /** + * uint32 color = 1; + * @return The color. + */ + @java.lang.Override + public int getColor() { + return color_; + } + /** + * uint32 color = 1; + * @param value The color to set. + * @return This builder for chaining. + */ + public Builder setColor(int value) { + + color_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint32 color = 1; + * @return This builder for chaining. + */ + public Builder clearColor() { + bitField0_ = (bitField0_ & ~0x00000001); + color_ = 0; + onChanged(); + return this; + } + + private int stroke_ ; + /** + * uint32 stroke = 2; + * @return The stroke. + */ + @java.lang.Override + public int getStroke() { + return stroke_; + } + /** + * uint32 stroke = 2; + * @param value The stroke to set. + * @return This builder for chaining. + */ + public Builder setStroke(int value) { + + stroke_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint32 stroke = 2; + * @return This builder for chaining. + */ + public Builder clearStroke() { + bitField0_ = (bitField0_ & ~0x00000002); + stroke_ = 0; + onChanged(); + return this; + } + + private int x_ ; + /** + * uint32 x = 3; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + /** + * uint32 x = 3; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(int value) { + + x_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint32 x = 3; + * @return This builder for chaining. + */ + public Builder clearX() { + bitField0_ = (bitField0_ & ~0x00000004); + x_ = 0; + onChanged(); + return this; + } + + private int y_ ; + /** + * uint32 y = 4; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + /** + * uint32 y = 4; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(int value) { + + y_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint32 y = 4; + * @return This builder for chaining. + */ + public Builder clearY() { + bitField0_ = (bitField0_ & ~0x00000008); + y_ = 0; + onChanged(); + return this; + } + + private int width_ ; + /** + * uint32 width = 5; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + /** + * uint32 width = 5; + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(int value) { + + width_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * uint32 width = 5; + * @return This builder for chaining. + */ + public Builder clearWidth() { + bitField0_ = (bitField0_ & ~0x00000010); + width_ = 0; + onChanged(); + return this; + } + + private int height_ ; + /** + * uint32 height = 6; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + * uint32 height = 6; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * uint32 height = 6; + * @return This builder for chaining. + */ + public Builder clearHeight() { + bitField0_ = (bitField0_ & ~0x00000020); + height_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.DrawRect) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.DrawRect) + private static final mentraos.ble.MentraosBle.DrawRect DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.DrawRect(); + } + + public static mentraos.ble.MentraosBle.DrawRect getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DrawRect parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DrawRect getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DrawCircleOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.DrawCircle) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 color = 1; + * @return The color. + */ + int getColor(); + + /** + * uint32 stroke = 2; + * @return The stroke. + */ + int getStroke(); + + /** + * uint32 x = 3; + * @return The x. + */ + int getX(); + + /** + * uint32 y = 4; + * @return The y. + */ + int getY(); + + /** + * uint32 radius = 5; + * @return The radius. + */ + int getRadius(); + } + /** + * Protobuf type {@code mentraos.ble.DrawCircle} + */ + public static final class DrawCircle extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.DrawCircle) + DrawCircleOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + DrawCircle.class.getName()); + } + // Use DrawCircle.newBuilder() to construct. + private DrawCircle(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DrawCircle() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DrawCircle_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DrawCircle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DrawCircle.class, mentraos.ble.MentraosBle.DrawCircle.Builder.class); + } + + public static final int COLOR_FIELD_NUMBER = 1; + private int color_ = 0; + /** + * uint32 color = 1; + * @return The color. + */ + @java.lang.Override + public int getColor() { + return color_; + } + + public static final int STROKE_FIELD_NUMBER = 2; + private int stroke_ = 0; + /** + * uint32 stroke = 2; + * @return The stroke. + */ + @java.lang.Override + public int getStroke() { + return stroke_; + } + + public static final int X_FIELD_NUMBER = 3; + private int x_ = 0; + /** + * uint32 x = 3; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 4; + private int y_ = 0; + /** + * uint32 y = 4; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + + public static final int RADIUS_FIELD_NUMBER = 5; + private int radius_ = 0; + /** + * uint32 radius = 5; + * @return The radius. + */ + @java.lang.Override + public int getRadius() { + return radius_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (color_ != 0) { + output.writeUInt32(1, color_); + } + if (stroke_ != 0) { + output.writeUInt32(2, stroke_); + } + if (x_ != 0) { + output.writeUInt32(3, x_); + } + if (y_ != 0) { + output.writeUInt32(4, y_); + } + if (radius_ != 0) { + output.writeUInt32(5, radius_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (color_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, color_); + } + if (stroke_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, stroke_); + } + if (x_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, x_); + } + if (y_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, y_); + } + if (radius_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, radius_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.DrawCircle)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.DrawCircle other = (mentraos.ble.MentraosBle.DrawCircle) obj; + + if (getColor() + != other.getColor()) return false; + if (getStroke() + != other.getStroke()) return false; + if (getX() + != other.getX()) return false; + if (getY() + != other.getY()) return false; + if (getRadius() + != other.getRadius()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COLOR_FIELD_NUMBER; + hash = (53 * hash) + getColor(); + hash = (37 * hash) + STROKE_FIELD_NUMBER; + hash = (53 * hash) + getStroke(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + getX(); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + getY(); + hash = (37 * hash) + RADIUS_FIELD_NUMBER; + hash = (53 * hash) + getRadius(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.DrawCircle parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DrawCircle parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DrawCircle parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DrawCircle parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DrawCircle parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DrawCircle parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DrawCircle parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DrawCircle parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.DrawCircle parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.DrawCircle parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DrawCircle parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DrawCircle parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.DrawCircle prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.DrawCircle} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.DrawCircle) + mentraos.ble.MentraosBle.DrawCircleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DrawCircle_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DrawCircle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DrawCircle.class, mentraos.ble.MentraosBle.DrawCircle.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.DrawCircle.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + color_ = 0; + stroke_ = 0; + x_ = 0; + y_ = 0; + radius_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DrawCircle_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DrawCircle getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.DrawCircle.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DrawCircle build() { + mentraos.ble.MentraosBle.DrawCircle result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DrawCircle buildPartial() { + mentraos.ble.MentraosBle.DrawCircle result = new mentraos.ble.MentraosBle.DrawCircle(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.DrawCircle result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.color_ = color_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.stroke_ = stroke_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.x_ = x_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.y_ = y_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.radius_ = radius_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.DrawCircle) { + return mergeFrom((mentraos.ble.MentraosBle.DrawCircle)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.DrawCircle other) { + if (other == mentraos.ble.MentraosBle.DrawCircle.getDefaultInstance()) return this; + if (other.getColor() != 0) { + setColor(other.getColor()); + } + if (other.getStroke() != 0) { + setStroke(other.getStroke()); + } + if (other.getX() != 0) { + setX(other.getX()); + } + if (other.getY() != 0) { + setY(other.getY()); + } + if (other.getRadius() != 0) { + setRadius(other.getRadius()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + color_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + stroke_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + x_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + y_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + radius_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int color_ ; + /** + * uint32 color = 1; + * @return The color. + */ + @java.lang.Override + public int getColor() { + return color_; + } + /** + * uint32 color = 1; + * @param value The color to set. + * @return This builder for chaining. + */ + public Builder setColor(int value) { + + color_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint32 color = 1; + * @return This builder for chaining. + */ + public Builder clearColor() { + bitField0_ = (bitField0_ & ~0x00000001); + color_ = 0; + onChanged(); + return this; + } + + private int stroke_ ; + /** + * uint32 stroke = 2; + * @return The stroke. + */ + @java.lang.Override + public int getStroke() { + return stroke_; + } + /** + * uint32 stroke = 2; + * @param value The stroke to set. + * @return This builder for chaining. + */ + public Builder setStroke(int value) { + + stroke_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint32 stroke = 2; + * @return This builder for chaining. + */ + public Builder clearStroke() { + bitField0_ = (bitField0_ & ~0x00000002); + stroke_ = 0; + onChanged(); + return this; + } + + private int x_ ; + /** + * uint32 x = 3; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + /** + * uint32 x = 3; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(int value) { + + x_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint32 x = 3; + * @return This builder for chaining. + */ + public Builder clearX() { + bitField0_ = (bitField0_ & ~0x00000004); + x_ = 0; + onChanged(); + return this; + } + + private int y_ ; + /** + * uint32 y = 4; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + /** + * uint32 y = 4; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(int value) { + + y_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint32 y = 4; + * @return This builder for chaining. + */ + public Builder clearY() { + bitField0_ = (bitField0_ & ~0x00000008); + y_ = 0; + onChanged(); + return this; + } + + private int radius_ ; + /** + * uint32 radius = 5; + * @return The radius. + */ + @java.lang.Override + public int getRadius() { + return radius_; + } + /** + * uint32 radius = 5; + * @param value The radius to set. + * @return This builder for chaining. + */ + public Builder setRadius(int value) { + + radius_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * uint32 radius = 5; + * @return This builder for chaining. + */ + public Builder clearRadius() { + bitField0_ = (bitField0_ & ~0x00000010); + radius_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.DrawCircle) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.DrawCircle) + private static final mentraos.ble.MentraosBle.DrawCircle DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.DrawCircle(); + } + + public static mentraos.ble.MentraosBle.DrawCircle getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DrawCircle parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DrawCircle getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DisplayBatchOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.DisplayBatch) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + java.util.List + getCommandsList(); + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand getCommands(int index); + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + int getCommandsCount(); + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + java.util.List + getCommandsOrBuilderList(); + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + mentraos.ble.MentraosBle.DisplayBatch.DisplayCommandOrBuilder getCommandsOrBuilder( + int index); + } + /** + *
+   * Send multiple display commands in a single message (more efficient)
+   * 
+ * + * Protobuf type {@code mentraos.ble.DisplayBatch} + */ + public static final class DisplayBatch extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.DisplayBatch) + DisplayBatchOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + DisplayBatch.class.getName()); + } + // Use DisplayBatch.newBuilder() to construct. + private DisplayBatch(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DisplayBatch() { + commands_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayBatch_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayBatch_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayBatch.class, mentraos.ble.MentraosBle.DisplayBatch.Builder.class); + } + + public interface DisplayCommandOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.DisplayBatch.DisplayCommand) + com.google.protobuf.MessageOrBuilder { + + /** + * .mentraos.ble.DisplayText text = 1; + * @return Whether the text field is set. + */ + boolean hasText(); + /** + * .mentraos.ble.DisplayText text = 1; + * @return The text. + */ + mentraos.ble.MentraosBle.DisplayText getText(); + /** + * .mentraos.ble.DisplayText text = 1; + */ + mentraos.ble.MentraosBle.DisplayTextOrBuilder getTextOrBuilder(); + + /** + * .mentraos.ble.DisplayCachedImage cached_image = 2; + * @return Whether the cachedImage field is set. + */ + boolean hasCachedImage(); + /** + * .mentraos.ble.DisplayCachedImage cached_image = 2; + * @return The cachedImage. + */ + mentraos.ble.MentraosBle.DisplayCachedImage getCachedImage(); + /** + * .mentraos.ble.DisplayCachedImage cached_image = 2; + */ + mentraos.ble.MentraosBle.DisplayCachedImageOrBuilder getCachedImageOrBuilder(); + + /** + * .mentraos.ble.DrawLine line = 3; + * @return Whether the line field is set. + */ + boolean hasLine(); + /** + * .mentraos.ble.DrawLine line = 3; + * @return The line. + */ + mentraos.ble.MentraosBle.DrawLine getLine(); + /** + * .mentraos.ble.DrawLine line = 3; + */ + mentraos.ble.MentraosBle.DrawLineOrBuilder getLineOrBuilder(); + + /** + * .mentraos.ble.DrawRect rect = 4; + * @return Whether the rect field is set. + */ + boolean hasRect(); + /** + * .mentraos.ble.DrawRect rect = 4; + * @return The rect. + */ + mentraos.ble.MentraosBle.DrawRect getRect(); + /** + * .mentraos.ble.DrawRect rect = 4; + */ + mentraos.ble.MentraosBle.DrawRectOrBuilder getRectOrBuilder(); + + /** + * .mentraos.ble.DrawCircle circle = 5; + * @return Whether the circle field is set. + */ + boolean hasCircle(); + /** + * .mentraos.ble.DrawCircle circle = 5; + * @return The circle. + */ + mentraos.ble.MentraosBle.DrawCircle getCircle(); + /** + * .mentraos.ble.DrawCircle circle = 5; + */ + mentraos.ble.MentraosBle.DrawCircleOrBuilder getCircleOrBuilder(); + + /** + * .mentraos.ble.DisplayScrollingText scrolling_text = 6; + * @return Whether the scrollingText field is set. + */ + boolean hasScrollingText(); + /** + * .mentraos.ble.DisplayScrollingText scrolling_text = 6; + * @return The scrollingText. + */ + mentraos.ble.MentraosBle.DisplayScrollingText getScrollingText(); + /** + * .mentraos.ble.DisplayScrollingText scrolling_text = 6; + */ + mentraos.ble.MentraosBle.DisplayScrollingTextOrBuilder getScrollingTextOrBuilder(); + + mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand.CommandCase getCommandCase(); + } + /** + * Protobuf type {@code mentraos.ble.DisplayBatch.DisplayCommand} + */ + public static final class DisplayCommand extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.DisplayBatch.DisplayCommand) + DisplayCommandOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + DisplayCommand.class.getName()); + } + // Use DisplayCommand.newBuilder() to construct. + private DisplayCommand(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DisplayCommand() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayBatch_DisplayCommand_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayBatch_DisplayCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand.class, mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand.Builder.class); + } + + private int commandCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object command_; + public enum CommandCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TEXT(1), + CACHED_IMAGE(2), + LINE(3), + RECT(4), + CIRCLE(5), + SCROLLING_TEXT(6), + COMMAND_NOT_SET(0); + private final int value; + private CommandCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CommandCase valueOf(int value) { + return forNumber(value); + } + + public static CommandCase forNumber(int value) { + switch (value) { + case 1: return TEXT; + case 2: return CACHED_IMAGE; + case 3: return LINE; + case 4: return RECT; + case 5: return CIRCLE; + case 6: return SCROLLING_TEXT; + case 0: return COMMAND_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public CommandCase + getCommandCase() { + return CommandCase.forNumber( + commandCase_); + } + + public static final int TEXT_FIELD_NUMBER = 1; + /** + * .mentraos.ble.DisplayText text = 1; + * @return Whether the text field is set. + */ + @java.lang.Override + public boolean hasText() { + return commandCase_ == 1; + } + /** + * .mentraos.ble.DisplayText text = 1; + * @return The text. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayText getText() { + if (commandCase_ == 1) { + return (mentraos.ble.MentraosBle.DisplayText) command_; + } + return mentraos.ble.MentraosBle.DisplayText.getDefaultInstance(); + } + /** + * .mentraos.ble.DisplayText text = 1; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayTextOrBuilder getTextOrBuilder() { + if (commandCase_ == 1) { + return (mentraos.ble.MentraosBle.DisplayText) command_; + } + return mentraos.ble.MentraosBle.DisplayText.getDefaultInstance(); + } + + public static final int CACHED_IMAGE_FIELD_NUMBER = 2; + /** + * .mentraos.ble.DisplayCachedImage cached_image = 2; + * @return Whether the cachedImage field is set. + */ + @java.lang.Override + public boolean hasCachedImage() { + return commandCase_ == 2; + } + /** + * .mentraos.ble.DisplayCachedImage cached_image = 2; + * @return The cachedImage. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayCachedImage getCachedImage() { + if (commandCase_ == 2) { + return (mentraos.ble.MentraosBle.DisplayCachedImage) command_; + } + return mentraos.ble.MentraosBle.DisplayCachedImage.getDefaultInstance(); + } + /** + * .mentraos.ble.DisplayCachedImage cached_image = 2; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayCachedImageOrBuilder getCachedImageOrBuilder() { + if (commandCase_ == 2) { + return (mentraos.ble.MentraosBle.DisplayCachedImage) command_; + } + return mentraos.ble.MentraosBle.DisplayCachedImage.getDefaultInstance(); + } + + public static final int LINE_FIELD_NUMBER = 3; + /** + * .mentraos.ble.DrawLine line = 3; + * @return Whether the line field is set. + */ + @java.lang.Override + public boolean hasLine() { + return commandCase_ == 3; + } + /** + * .mentraos.ble.DrawLine line = 3; + * @return The line. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawLine getLine() { + if (commandCase_ == 3) { + return (mentraos.ble.MentraosBle.DrawLine) command_; + } + return mentraos.ble.MentraosBle.DrawLine.getDefaultInstance(); + } + /** + * .mentraos.ble.DrawLine line = 3; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawLineOrBuilder getLineOrBuilder() { + if (commandCase_ == 3) { + return (mentraos.ble.MentraosBle.DrawLine) command_; + } + return mentraos.ble.MentraosBle.DrawLine.getDefaultInstance(); + } + + public static final int RECT_FIELD_NUMBER = 4; + /** + * .mentraos.ble.DrawRect rect = 4; + * @return Whether the rect field is set. + */ + @java.lang.Override + public boolean hasRect() { + return commandCase_ == 4; + } + /** + * .mentraos.ble.DrawRect rect = 4; + * @return The rect. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawRect getRect() { + if (commandCase_ == 4) { + return (mentraos.ble.MentraosBle.DrawRect) command_; + } + return mentraos.ble.MentraosBle.DrawRect.getDefaultInstance(); + } + /** + * .mentraos.ble.DrawRect rect = 4; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawRectOrBuilder getRectOrBuilder() { + if (commandCase_ == 4) { + return (mentraos.ble.MentraosBle.DrawRect) command_; + } + return mentraos.ble.MentraosBle.DrawRect.getDefaultInstance(); + } + + public static final int CIRCLE_FIELD_NUMBER = 5; + /** + * .mentraos.ble.DrawCircle circle = 5; + * @return Whether the circle field is set. + */ + @java.lang.Override + public boolean hasCircle() { + return commandCase_ == 5; + } + /** + * .mentraos.ble.DrawCircle circle = 5; + * @return The circle. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawCircle getCircle() { + if (commandCase_ == 5) { + return (mentraos.ble.MentraosBle.DrawCircle) command_; + } + return mentraos.ble.MentraosBle.DrawCircle.getDefaultInstance(); + } + /** + * .mentraos.ble.DrawCircle circle = 5; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawCircleOrBuilder getCircleOrBuilder() { + if (commandCase_ == 5) { + return (mentraos.ble.MentraosBle.DrawCircle) command_; + } + return mentraos.ble.MentraosBle.DrawCircle.getDefaultInstance(); + } + + public static final int SCROLLING_TEXT_FIELD_NUMBER = 6; + /** + * .mentraos.ble.DisplayScrollingText scrolling_text = 6; + * @return Whether the scrollingText field is set. + */ + @java.lang.Override + public boolean hasScrollingText() { + return commandCase_ == 6; + } + /** + * .mentraos.ble.DisplayScrollingText scrolling_text = 6; + * @return The scrollingText. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayScrollingText getScrollingText() { + if (commandCase_ == 6) { + return (mentraos.ble.MentraosBle.DisplayScrollingText) command_; + } + return mentraos.ble.MentraosBle.DisplayScrollingText.getDefaultInstance(); + } + /** + * .mentraos.ble.DisplayScrollingText scrolling_text = 6; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayScrollingTextOrBuilder getScrollingTextOrBuilder() { + if (commandCase_ == 6) { + return (mentraos.ble.MentraosBle.DisplayScrollingText) command_; + } + return mentraos.ble.MentraosBle.DisplayScrollingText.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (commandCase_ == 1) { + output.writeMessage(1, (mentraos.ble.MentraosBle.DisplayText) command_); + } + if (commandCase_ == 2) { + output.writeMessage(2, (mentraos.ble.MentraosBle.DisplayCachedImage) command_); + } + if (commandCase_ == 3) { + output.writeMessage(3, (mentraos.ble.MentraosBle.DrawLine) command_); + } + if (commandCase_ == 4) { + output.writeMessage(4, (mentraos.ble.MentraosBle.DrawRect) command_); + } + if (commandCase_ == 5) { + output.writeMessage(5, (mentraos.ble.MentraosBle.DrawCircle) command_); + } + if (commandCase_ == 6) { + output.writeMessage(6, (mentraos.ble.MentraosBle.DisplayScrollingText) command_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (commandCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (mentraos.ble.MentraosBle.DisplayText) command_); + } + if (commandCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (mentraos.ble.MentraosBle.DisplayCachedImage) command_); + } + if (commandCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (mentraos.ble.MentraosBle.DrawLine) command_); + } + if (commandCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (mentraos.ble.MentraosBle.DrawRect) command_); + } + if (commandCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (mentraos.ble.MentraosBle.DrawCircle) command_); + } + if (commandCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (mentraos.ble.MentraosBle.DisplayScrollingText) command_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand other = (mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand) obj; + + if (!getCommandCase().equals(other.getCommandCase())) return false; + switch (commandCase_) { + case 1: + if (!getText() + .equals(other.getText())) return false; + break; + case 2: + if (!getCachedImage() + .equals(other.getCachedImage())) return false; + break; + case 3: + if (!getLine() + .equals(other.getLine())) return false; + break; + case 4: + if (!getRect() + .equals(other.getRect())) return false; + break; + case 5: + if (!getCircle() + .equals(other.getCircle())) return false; + break; + case 6: + if (!getScrollingText() + .equals(other.getScrollingText())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (commandCase_) { + case 1: + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + break; + case 2: + hash = (37 * hash) + CACHED_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getCachedImage().hashCode(); + break; + case 3: + hash = (37 * hash) + LINE_FIELD_NUMBER; + hash = (53 * hash) + getLine().hashCode(); + break; + case 4: + hash = (37 * hash) + RECT_FIELD_NUMBER; + hash = (53 * hash) + getRect().hashCode(); + break; + case 5: + hash = (37 * hash) + CIRCLE_FIELD_NUMBER; + hash = (53 * hash) + getCircle().hashCode(); + break; + case 6: + hash = (37 * hash) + SCROLLING_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getScrollingText().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.DisplayBatch.DisplayCommand} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.DisplayBatch.DisplayCommand) + mentraos.ble.MentraosBle.DisplayBatch.DisplayCommandOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayBatch_DisplayCommand_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayBatch_DisplayCommand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand.class, mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (textBuilder_ != null) { + textBuilder_.clear(); + } + if (cachedImageBuilder_ != null) { + cachedImageBuilder_.clear(); + } + if (lineBuilder_ != null) { + lineBuilder_.clear(); + } + if (rectBuilder_ != null) { + rectBuilder_.clear(); + } + if (circleBuilder_ != null) { + circleBuilder_.clear(); + } + if (scrollingTextBuilder_ != null) { + scrollingTextBuilder_.clear(); + } + commandCase_ = 0; + command_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayBatch_DisplayCommand_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand build() { + mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand buildPartial() { + mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand result = new mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand result) { + result.commandCase_ = commandCase_; + result.command_ = this.command_; + if (commandCase_ == 1 && + textBuilder_ != null) { + result.command_ = textBuilder_.build(); + } + if (commandCase_ == 2 && + cachedImageBuilder_ != null) { + result.command_ = cachedImageBuilder_.build(); + } + if (commandCase_ == 3 && + lineBuilder_ != null) { + result.command_ = lineBuilder_.build(); + } + if (commandCase_ == 4 && + rectBuilder_ != null) { + result.command_ = rectBuilder_.build(); + } + if (commandCase_ == 5 && + circleBuilder_ != null) { + result.command_ = circleBuilder_.build(); + } + if (commandCase_ == 6 && + scrollingTextBuilder_ != null) { + result.command_ = scrollingTextBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand) { + return mergeFrom((mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand other) { + if (other == mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand.getDefaultInstance()) return this; + switch (other.getCommandCase()) { + case TEXT: { + mergeText(other.getText()); + break; + } + case CACHED_IMAGE: { + mergeCachedImage(other.getCachedImage()); + break; + } + case LINE: { + mergeLine(other.getLine()); + break; + } + case RECT: { + mergeRect(other.getRect()); + break; + } + case CIRCLE: { + mergeCircle(other.getCircle()); + break; + } + case SCROLLING_TEXT: { + mergeScrollingText(other.getScrollingText()); + break; + } + case COMMAND_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + internalGetTextFieldBuilder().getBuilder(), + extensionRegistry); + commandCase_ = 1; + break; + } // case 10 + case 18: { + input.readMessage( + internalGetCachedImageFieldBuilder().getBuilder(), + extensionRegistry); + commandCase_ = 2; + break; + } // case 18 + case 26: { + input.readMessage( + internalGetLineFieldBuilder().getBuilder(), + extensionRegistry); + commandCase_ = 3; + break; + } // case 26 + case 34: { + input.readMessage( + internalGetRectFieldBuilder().getBuilder(), + extensionRegistry); + commandCase_ = 4; + break; + } // case 34 + case 42: { + input.readMessage( + internalGetCircleFieldBuilder().getBuilder(), + extensionRegistry); + commandCase_ = 5; + break; + } // case 42 + case 50: { + input.readMessage( + internalGetScrollingTextFieldBuilder().getBuilder(), + extensionRegistry); + commandCase_ = 6; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int commandCase_ = 0; + private java.lang.Object command_; + public CommandCase + getCommandCase() { + return CommandCase.forNumber( + commandCase_); + } + + public Builder clearCommand() { + commandCase_ = 0; + command_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayText, mentraos.ble.MentraosBle.DisplayText.Builder, mentraos.ble.MentraosBle.DisplayTextOrBuilder> textBuilder_; + /** + * .mentraos.ble.DisplayText text = 1; + * @return Whether the text field is set. + */ + @java.lang.Override + public boolean hasText() { + return commandCase_ == 1; + } + /** + * .mentraos.ble.DisplayText text = 1; + * @return The text. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayText getText() { + if (textBuilder_ == null) { + if (commandCase_ == 1) { + return (mentraos.ble.MentraosBle.DisplayText) command_; + } + return mentraos.ble.MentraosBle.DisplayText.getDefaultInstance(); + } else { + if (commandCase_ == 1) { + return textBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DisplayText.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DisplayText text = 1; + */ + public Builder setText(mentraos.ble.MentraosBle.DisplayText value) { + if (textBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + command_ = value; + onChanged(); + } else { + textBuilder_.setMessage(value); + } + commandCase_ = 1; + return this; + } + /** + * .mentraos.ble.DisplayText text = 1; + */ + public Builder setText( + mentraos.ble.MentraosBle.DisplayText.Builder builderForValue) { + if (textBuilder_ == null) { + command_ = builderForValue.build(); + onChanged(); + } else { + textBuilder_.setMessage(builderForValue.build()); + } + commandCase_ = 1; + return this; + } + /** + * .mentraos.ble.DisplayText text = 1; + */ + public Builder mergeText(mentraos.ble.MentraosBle.DisplayText value) { + if (textBuilder_ == null) { + if (commandCase_ == 1 && + command_ != mentraos.ble.MentraosBle.DisplayText.getDefaultInstance()) { + command_ = mentraos.ble.MentraosBle.DisplayText.newBuilder((mentraos.ble.MentraosBle.DisplayText) command_) + .mergeFrom(value).buildPartial(); + } else { + command_ = value; + } + onChanged(); + } else { + if (commandCase_ == 1) { + textBuilder_.mergeFrom(value); + } else { + textBuilder_.setMessage(value); + } + } + commandCase_ = 1; + return this; + } + /** + * .mentraos.ble.DisplayText text = 1; + */ + public Builder clearText() { + if (textBuilder_ == null) { + if (commandCase_ == 1) { + commandCase_ = 0; + command_ = null; + onChanged(); + } + } else { + if (commandCase_ == 1) { + commandCase_ = 0; + command_ = null; + } + textBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.DisplayText text = 1; + */ + public mentraos.ble.MentraosBle.DisplayText.Builder getTextBuilder() { + return internalGetTextFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.DisplayText text = 1; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayTextOrBuilder getTextOrBuilder() { + if ((commandCase_ == 1) && (textBuilder_ != null)) { + return textBuilder_.getMessageOrBuilder(); + } else { + if (commandCase_ == 1) { + return (mentraos.ble.MentraosBle.DisplayText) command_; + } + return mentraos.ble.MentraosBle.DisplayText.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DisplayText text = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayText, mentraos.ble.MentraosBle.DisplayText.Builder, mentraos.ble.MentraosBle.DisplayTextOrBuilder> + internalGetTextFieldBuilder() { + if (textBuilder_ == null) { + if (!(commandCase_ == 1)) { + command_ = mentraos.ble.MentraosBle.DisplayText.getDefaultInstance(); + } + textBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayText, mentraos.ble.MentraosBle.DisplayText.Builder, mentraos.ble.MentraosBle.DisplayTextOrBuilder>( + (mentraos.ble.MentraosBle.DisplayText) command_, + getParentForChildren(), + isClean()); + command_ = null; + } + commandCase_ = 1; + onChanged(); + return textBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayCachedImage, mentraos.ble.MentraosBle.DisplayCachedImage.Builder, mentraos.ble.MentraosBle.DisplayCachedImageOrBuilder> cachedImageBuilder_; + /** + * .mentraos.ble.DisplayCachedImage cached_image = 2; + * @return Whether the cachedImage field is set. + */ + @java.lang.Override + public boolean hasCachedImage() { + return commandCase_ == 2; + } + /** + * .mentraos.ble.DisplayCachedImage cached_image = 2; + * @return The cachedImage. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayCachedImage getCachedImage() { + if (cachedImageBuilder_ == null) { + if (commandCase_ == 2) { + return (mentraos.ble.MentraosBle.DisplayCachedImage) command_; + } + return mentraos.ble.MentraosBle.DisplayCachedImage.getDefaultInstance(); + } else { + if (commandCase_ == 2) { + return cachedImageBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DisplayCachedImage.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DisplayCachedImage cached_image = 2; + */ + public Builder setCachedImage(mentraos.ble.MentraosBle.DisplayCachedImage value) { + if (cachedImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + command_ = value; + onChanged(); + } else { + cachedImageBuilder_.setMessage(value); + } + commandCase_ = 2; + return this; + } + /** + * .mentraos.ble.DisplayCachedImage cached_image = 2; + */ + public Builder setCachedImage( + mentraos.ble.MentraosBle.DisplayCachedImage.Builder builderForValue) { + if (cachedImageBuilder_ == null) { + command_ = builderForValue.build(); + onChanged(); + } else { + cachedImageBuilder_.setMessage(builderForValue.build()); + } + commandCase_ = 2; + return this; + } + /** + * .mentraos.ble.DisplayCachedImage cached_image = 2; + */ + public Builder mergeCachedImage(mentraos.ble.MentraosBle.DisplayCachedImage value) { + if (cachedImageBuilder_ == null) { + if (commandCase_ == 2 && + command_ != mentraos.ble.MentraosBle.DisplayCachedImage.getDefaultInstance()) { + command_ = mentraos.ble.MentraosBle.DisplayCachedImage.newBuilder((mentraos.ble.MentraosBle.DisplayCachedImage) command_) + .mergeFrom(value).buildPartial(); + } else { + command_ = value; + } + onChanged(); + } else { + if (commandCase_ == 2) { + cachedImageBuilder_.mergeFrom(value); + } else { + cachedImageBuilder_.setMessage(value); + } + } + commandCase_ = 2; + return this; + } + /** + * .mentraos.ble.DisplayCachedImage cached_image = 2; + */ + public Builder clearCachedImage() { + if (cachedImageBuilder_ == null) { + if (commandCase_ == 2) { + commandCase_ = 0; + command_ = null; + onChanged(); + } + } else { + if (commandCase_ == 2) { + commandCase_ = 0; + command_ = null; + } + cachedImageBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.DisplayCachedImage cached_image = 2; + */ + public mentraos.ble.MentraosBle.DisplayCachedImage.Builder getCachedImageBuilder() { + return internalGetCachedImageFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.DisplayCachedImage cached_image = 2; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayCachedImageOrBuilder getCachedImageOrBuilder() { + if ((commandCase_ == 2) && (cachedImageBuilder_ != null)) { + return cachedImageBuilder_.getMessageOrBuilder(); + } else { + if (commandCase_ == 2) { + return (mentraos.ble.MentraosBle.DisplayCachedImage) command_; + } + return mentraos.ble.MentraosBle.DisplayCachedImage.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DisplayCachedImage cached_image = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayCachedImage, mentraos.ble.MentraosBle.DisplayCachedImage.Builder, mentraos.ble.MentraosBle.DisplayCachedImageOrBuilder> + internalGetCachedImageFieldBuilder() { + if (cachedImageBuilder_ == null) { + if (!(commandCase_ == 2)) { + command_ = mentraos.ble.MentraosBle.DisplayCachedImage.getDefaultInstance(); + } + cachedImageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayCachedImage, mentraos.ble.MentraosBle.DisplayCachedImage.Builder, mentraos.ble.MentraosBle.DisplayCachedImageOrBuilder>( + (mentraos.ble.MentraosBle.DisplayCachedImage) command_, + getParentForChildren(), + isClean()); + command_ = null; + } + commandCase_ = 2; + onChanged(); + return cachedImageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DrawLine, mentraos.ble.MentraosBle.DrawLine.Builder, mentraos.ble.MentraosBle.DrawLineOrBuilder> lineBuilder_; + /** + * .mentraos.ble.DrawLine line = 3; + * @return Whether the line field is set. + */ + @java.lang.Override + public boolean hasLine() { + return commandCase_ == 3; + } + /** + * .mentraos.ble.DrawLine line = 3; + * @return The line. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawLine getLine() { + if (lineBuilder_ == null) { + if (commandCase_ == 3) { + return (mentraos.ble.MentraosBle.DrawLine) command_; + } + return mentraos.ble.MentraosBle.DrawLine.getDefaultInstance(); + } else { + if (commandCase_ == 3) { + return lineBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DrawLine.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DrawLine line = 3; + */ + public Builder setLine(mentraos.ble.MentraosBle.DrawLine value) { + if (lineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + command_ = value; + onChanged(); + } else { + lineBuilder_.setMessage(value); + } + commandCase_ = 3; + return this; + } + /** + * .mentraos.ble.DrawLine line = 3; + */ + public Builder setLine( + mentraos.ble.MentraosBle.DrawLine.Builder builderForValue) { + if (lineBuilder_ == null) { + command_ = builderForValue.build(); + onChanged(); + } else { + lineBuilder_.setMessage(builderForValue.build()); + } + commandCase_ = 3; + return this; + } + /** + * .mentraos.ble.DrawLine line = 3; + */ + public Builder mergeLine(mentraos.ble.MentraosBle.DrawLine value) { + if (lineBuilder_ == null) { + if (commandCase_ == 3 && + command_ != mentraos.ble.MentraosBle.DrawLine.getDefaultInstance()) { + command_ = mentraos.ble.MentraosBle.DrawLine.newBuilder((mentraos.ble.MentraosBle.DrawLine) command_) + .mergeFrom(value).buildPartial(); + } else { + command_ = value; + } + onChanged(); + } else { + if (commandCase_ == 3) { + lineBuilder_.mergeFrom(value); + } else { + lineBuilder_.setMessage(value); + } + } + commandCase_ = 3; + return this; + } + /** + * .mentraos.ble.DrawLine line = 3; + */ + public Builder clearLine() { + if (lineBuilder_ == null) { + if (commandCase_ == 3) { + commandCase_ = 0; + command_ = null; + onChanged(); + } + } else { + if (commandCase_ == 3) { + commandCase_ = 0; + command_ = null; + } + lineBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.DrawLine line = 3; + */ + public mentraos.ble.MentraosBle.DrawLine.Builder getLineBuilder() { + return internalGetLineFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.DrawLine line = 3; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawLineOrBuilder getLineOrBuilder() { + if ((commandCase_ == 3) && (lineBuilder_ != null)) { + return lineBuilder_.getMessageOrBuilder(); + } else { + if (commandCase_ == 3) { + return (mentraos.ble.MentraosBle.DrawLine) command_; + } + return mentraos.ble.MentraosBle.DrawLine.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DrawLine line = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DrawLine, mentraos.ble.MentraosBle.DrawLine.Builder, mentraos.ble.MentraosBle.DrawLineOrBuilder> + internalGetLineFieldBuilder() { + if (lineBuilder_ == null) { + if (!(commandCase_ == 3)) { + command_ = mentraos.ble.MentraosBle.DrawLine.getDefaultInstance(); + } + lineBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DrawLine, mentraos.ble.MentraosBle.DrawLine.Builder, mentraos.ble.MentraosBle.DrawLineOrBuilder>( + (mentraos.ble.MentraosBle.DrawLine) command_, + getParentForChildren(), + isClean()); + command_ = null; + } + commandCase_ = 3; + onChanged(); + return lineBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DrawRect, mentraos.ble.MentraosBle.DrawRect.Builder, mentraos.ble.MentraosBle.DrawRectOrBuilder> rectBuilder_; + /** + * .mentraos.ble.DrawRect rect = 4; + * @return Whether the rect field is set. + */ + @java.lang.Override + public boolean hasRect() { + return commandCase_ == 4; + } + /** + * .mentraos.ble.DrawRect rect = 4; + * @return The rect. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawRect getRect() { + if (rectBuilder_ == null) { + if (commandCase_ == 4) { + return (mentraos.ble.MentraosBle.DrawRect) command_; + } + return mentraos.ble.MentraosBle.DrawRect.getDefaultInstance(); + } else { + if (commandCase_ == 4) { + return rectBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DrawRect.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DrawRect rect = 4; + */ + public Builder setRect(mentraos.ble.MentraosBle.DrawRect value) { + if (rectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + command_ = value; + onChanged(); + } else { + rectBuilder_.setMessage(value); + } + commandCase_ = 4; + return this; + } + /** + * .mentraos.ble.DrawRect rect = 4; + */ + public Builder setRect( + mentraos.ble.MentraosBle.DrawRect.Builder builderForValue) { + if (rectBuilder_ == null) { + command_ = builderForValue.build(); + onChanged(); + } else { + rectBuilder_.setMessage(builderForValue.build()); + } + commandCase_ = 4; + return this; + } + /** + * .mentraos.ble.DrawRect rect = 4; + */ + public Builder mergeRect(mentraos.ble.MentraosBle.DrawRect value) { + if (rectBuilder_ == null) { + if (commandCase_ == 4 && + command_ != mentraos.ble.MentraosBle.DrawRect.getDefaultInstance()) { + command_ = mentraos.ble.MentraosBle.DrawRect.newBuilder((mentraos.ble.MentraosBle.DrawRect) command_) + .mergeFrom(value).buildPartial(); + } else { + command_ = value; + } + onChanged(); + } else { + if (commandCase_ == 4) { + rectBuilder_.mergeFrom(value); + } else { + rectBuilder_.setMessage(value); + } + } + commandCase_ = 4; + return this; + } + /** + * .mentraos.ble.DrawRect rect = 4; + */ + public Builder clearRect() { + if (rectBuilder_ == null) { + if (commandCase_ == 4) { + commandCase_ = 0; + command_ = null; + onChanged(); + } + } else { + if (commandCase_ == 4) { + commandCase_ = 0; + command_ = null; + } + rectBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.DrawRect rect = 4; + */ + public mentraos.ble.MentraosBle.DrawRect.Builder getRectBuilder() { + return internalGetRectFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.DrawRect rect = 4; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawRectOrBuilder getRectOrBuilder() { + if ((commandCase_ == 4) && (rectBuilder_ != null)) { + return rectBuilder_.getMessageOrBuilder(); + } else { + if (commandCase_ == 4) { + return (mentraos.ble.MentraosBle.DrawRect) command_; + } + return mentraos.ble.MentraosBle.DrawRect.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DrawRect rect = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DrawRect, mentraos.ble.MentraosBle.DrawRect.Builder, mentraos.ble.MentraosBle.DrawRectOrBuilder> + internalGetRectFieldBuilder() { + if (rectBuilder_ == null) { + if (!(commandCase_ == 4)) { + command_ = mentraos.ble.MentraosBle.DrawRect.getDefaultInstance(); + } + rectBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DrawRect, mentraos.ble.MentraosBle.DrawRect.Builder, mentraos.ble.MentraosBle.DrawRectOrBuilder>( + (mentraos.ble.MentraosBle.DrawRect) command_, + getParentForChildren(), + isClean()); + command_ = null; + } + commandCase_ = 4; + onChanged(); + return rectBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DrawCircle, mentraos.ble.MentraosBle.DrawCircle.Builder, mentraos.ble.MentraosBle.DrawCircleOrBuilder> circleBuilder_; + /** + * .mentraos.ble.DrawCircle circle = 5; + * @return Whether the circle field is set. + */ + @java.lang.Override + public boolean hasCircle() { + return commandCase_ == 5; + } + /** + * .mentraos.ble.DrawCircle circle = 5; + * @return The circle. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawCircle getCircle() { + if (circleBuilder_ == null) { + if (commandCase_ == 5) { + return (mentraos.ble.MentraosBle.DrawCircle) command_; + } + return mentraos.ble.MentraosBle.DrawCircle.getDefaultInstance(); + } else { + if (commandCase_ == 5) { + return circleBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DrawCircle.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DrawCircle circle = 5; + */ + public Builder setCircle(mentraos.ble.MentraosBle.DrawCircle value) { + if (circleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + command_ = value; + onChanged(); + } else { + circleBuilder_.setMessage(value); + } + commandCase_ = 5; + return this; + } + /** + * .mentraos.ble.DrawCircle circle = 5; + */ + public Builder setCircle( + mentraos.ble.MentraosBle.DrawCircle.Builder builderForValue) { + if (circleBuilder_ == null) { + command_ = builderForValue.build(); + onChanged(); + } else { + circleBuilder_.setMessage(builderForValue.build()); + } + commandCase_ = 5; + return this; + } + /** + * .mentraos.ble.DrawCircle circle = 5; + */ + public Builder mergeCircle(mentraos.ble.MentraosBle.DrawCircle value) { + if (circleBuilder_ == null) { + if (commandCase_ == 5 && + command_ != mentraos.ble.MentraosBle.DrawCircle.getDefaultInstance()) { + command_ = mentraos.ble.MentraosBle.DrawCircle.newBuilder((mentraos.ble.MentraosBle.DrawCircle) command_) + .mergeFrom(value).buildPartial(); + } else { + command_ = value; + } + onChanged(); + } else { + if (commandCase_ == 5) { + circleBuilder_.mergeFrom(value); + } else { + circleBuilder_.setMessage(value); + } + } + commandCase_ = 5; + return this; + } + /** + * .mentraos.ble.DrawCircle circle = 5; + */ + public Builder clearCircle() { + if (circleBuilder_ == null) { + if (commandCase_ == 5) { + commandCase_ = 0; + command_ = null; + onChanged(); + } + } else { + if (commandCase_ == 5) { + commandCase_ = 0; + command_ = null; + } + circleBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.DrawCircle circle = 5; + */ + public mentraos.ble.MentraosBle.DrawCircle.Builder getCircleBuilder() { + return internalGetCircleFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.DrawCircle circle = 5; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DrawCircleOrBuilder getCircleOrBuilder() { + if ((commandCase_ == 5) && (circleBuilder_ != null)) { + return circleBuilder_.getMessageOrBuilder(); + } else { + if (commandCase_ == 5) { + return (mentraos.ble.MentraosBle.DrawCircle) command_; + } + return mentraos.ble.MentraosBle.DrawCircle.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DrawCircle circle = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DrawCircle, mentraos.ble.MentraosBle.DrawCircle.Builder, mentraos.ble.MentraosBle.DrawCircleOrBuilder> + internalGetCircleFieldBuilder() { + if (circleBuilder_ == null) { + if (!(commandCase_ == 5)) { + command_ = mentraos.ble.MentraosBle.DrawCircle.getDefaultInstance(); + } + circleBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DrawCircle, mentraos.ble.MentraosBle.DrawCircle.Builder, mentraos.ble.MentraosBle.DrawCircleOrBuilder>( + (mentraos.ble.MentraosBle.DrawCircle) command_, + getParentForChildren(), + isClean()); + command_ = null; + } + commandCase_ = 5; + onChanged(); + return circleBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayScrollingText, mentraos.ble.MentraosBle.DisplayScrollingText.Builder, mentraos.ble.MentraosBle.DisplayScrollingTextOrBuilder> scrollingTextBuilder_; + /** + * .mentraos.ble.DisplayScrollingText scrolling_text = 6; + * @return Whether the scrollingText field is set. + */ + @java.lang.Override + public boolean hasScrollingText() { + return commandCase_ == 6; + } + /** + * .mentraos.ble.DisplayScrollingText scrolling_text = 6; + * @return The scrollingText. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayScrollingText getScrollingText() { + if (scrollingTextBuilder_ == null) { + if (commandCase_ == 6) { + return (mentraos.ble.MentraosBle.DisplayScrollingText) command_; + } + return mentraos.ble.MentraosBle.DisplayScrollingText.getDefaultInstance(); + } else { + if (commandCase_ == 6) { + return scrollingTextBuilder_.getMessage(); + } + return mentraos.ble.MentraosBle.DisplayScrollingText.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DisplayScrollingText scrolling_text = 6; + */ + public Builder setScrollingText(mentraos.ble.MentraosBle.DisplayScrollingText value) { + if (scrollingTextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + command_ = value; + onChanged(); + } else { + scrollingTextBuilder_.setMessage(value); + } + commandCase_ = 6; + return this; + } + /** + * .mentraos.ble.DisplayScrollingText scrolling_text = 6; + */ + public Builder setScrollingText( + mentraos.ble.MentraosBle.DisplayScrollingText.Builder builderForValue) { + if (scrollingTextBuilder_ == null) { + command_ = builderForValue.build(); + onChanged(); + } else { + scrollingTextBuilder_.setMessage(builderForValue.build()); + } + commandCase_ = 6; + return this; + } + /** + * .mentraos.ble.DisplayScrollingText scrolling_text = 6; + */ + public Builder mergeScrollingText(mentraos.ble.MentraosBle.DisplayScrollingText value) { + if (scrollingTextBuilder_ == null) { + if (commandCase_ == 6 && + command_ != mentraos.ble.MentraosBle.DisplayScrollingText.getDefaultInstance()) { + command_ = mentraos.ble.MentraosBle.DisplayScrollingText.newBuilder((mentraos.ble.MentraosBle.DisplayScrollingText) command_) + .mergeFrom(value).buildPartial(); + } else { + command_ = value; + } + onChanged(); + } else { + if (commandCase_ == 6) { + scrollingTextBuilder_.mergeFrom(value); + } else { + scrollingTextBuilder_.setMessage(value); + } + } + commandCase_ = 6; + return this; + } + /** + * .mentraos.ble.DisplayScrollingText scrolling_text = 6; + */ + public Builder clearScrollingText() { + if (scrollingTextBuilder_ == null) { + if (commandCase_ == 6) { + commandCase_ = 0; + command_ = null; + onChanged(); + } + } else { + if (commandCase_ == 6) { + commandCase_ = 0; + command_ = null; + } + scrollingTextBuilder_.clear(); + } + return this; + } + /** + * .mentraos.ble.DisplayScrollingText scrolling_text = 6; + */ + public mentraos.ble.MentraosBle.DisplayScrollingText.Builder getScrollingTextBuilder() { + return internalGetScrollingTextFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.DisplayScrollingText scrolling_text = 6; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayScrollingTextOrBuilder getScrollingTextOrBuilder() { + if ((commandCase_ == 6) && (scrollingTextBuilder_ != null)) { + return scrollingTextBuilder_.getMessageOrBuilder(); + } else { + if (commandCase_ == 6) { + return (mentraos.ble.MentraosBle.DisplayScrollingText) command_; + } + return mentraos.ble.MentraosBle.DisplayScrollingText.getDefaultInstance(); + } + } + /** + * .mentraos.ble.DisplayScrollingText scrolling_text = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayScrollingText, mentraos.ble.MentraosBle.DisplayScrollingText.Builder, mentraos.ble.MentraosBle.DisplayScrollingTextOrBuilder> + internalGetScrollingTextFieldBuilder() { + if (scrollingTextBuilder_ == null) { + if (!(commandCase_ == 6)) { + command_ = mentraos.ble.MentraosBle.DisplayScrollingText.getDefaultInstance(); + } + scrollingTextBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.DisplayScrollingText, mentraos.ble.MentraosBle.DisplayScrollingText.Builder, mentraos.ble.MentraosBle.DisplayScrollingTextOrBuilder>( + (mentraos.ble.MentraosBle.DisplayScrollingText) command_, + getParentForChildren(), + isClean()); + command_ = null; + } + commandCase_ = 6; + onChanged(); + return scrollingTextBuilder_; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.DisplayBatch.DisplayCommand) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.DisplayBatch.DisplayCommand) + private static final mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand(); + } + + public static mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisplayCommand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int COMMANDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List commands_; + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + @java.lang.Override + public java.util.List getCommandsList() { + return commands_; + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + @java.lang.Override + public java.util.List + getCommandsOrBuilderList() { + return commands_; + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + @java.lang.Override + public int getCommandsCount() { + return commands_.size(); + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand getCommands(int index) { + return commands_.get(index); + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayBatch.DisplayCommandOrBuilder getCommandsOrBuilder( + int index) { + return commands_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < commands_.size(); i++) { + output.writeMessage(1, commands_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < commands_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, commands_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.DisplayBatch)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.DisplayBatch other = (mentraos.ble.MentraosBle.DisplayBatch) obj; + + if (!getCommandsList() + .equals(other.getCommandsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCommandsCount() > 0) { + hash = (37 * hash) + COMMANDS_FIELD_NUMBER; + hash = (53 * hash) + getCommandsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.DisplayBatch parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayBatch parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayBatch parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayBatch parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayBatch parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayBatch parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayBatch parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayBatch parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.DisplayBatch parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.DisplayBatch parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayBatch parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayBatch parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.DisplayBatch prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Send multiple display commands in a single message (more efficient)
+     * 
+ * + * Protobuf type {@code mentraos.ble.DisplayBatch} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.DisplayBatch) + mentraos.ble.MentraosBle.DisplayBatchOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayBatch_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayBatch_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayBatch.class, mentraos.ble.MentraosBle.DisplayBatch.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.DisplayBatch.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (commandsBuilder_ == null) { + commands_ = java.util.Collections.emptyList(); + } else { + commands_ = null; + commandsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayBatch_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayBatch getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.DisplayBatch.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayBatch build() { + mentraos.ble.MentraosBle.DisplayBatch result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayBatch buildPartial() { + mentraos.ble.MentraosBle.DisplayBatch result = new mentraos.ble.MentraosBle.DisplayBatch(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(mentraos.ble.MentraosBle.DisplayBatch result) { + if (commandsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + commands_ = java.util.Collections.unmodifiableList(commands_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.commands_ = commands_; + } else { + result.commands_ = commandsBuilder_.build(); + } + } + + private void buildPartial0(mentraos.ble.MentraosBle.DisplayBatch result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.DisplayBatch) { + return mergeFrom((mentraos.ble.MentraosBle.DisplayBatch)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.DisplayBatch other) { + if (other == mentraos.ble.MentraosBle.DisplayBatch.getDefaultInstance()) return this; + if (commandsBuilder_ == null) { + if (!other.commands_.isEmpty()) { + if (commands_.isEmpty()) { + commands_ = other.commands_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCommandsIsMutable(); + commands_.addAll(other.commands_); + } + onChanged(); + } + } else { + if (!other.commands_.isEmpty()) { + if (commandsBuilder_.isEmpty()) { + commandsBuilder_.dispose(); + commandsBuilder_ = null; + commands_ = other.commands_; + bitField0_ = (bitField0_ & ~0x00000001); + commandsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + internalGetCommandsFieldBuilder() : null; + } else { + commandsBuilder_.addAllMessages(other.commands_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand m = + input.readMessage( + mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand.parser(), + extensionRegistry); + if (commandsBuilder_ == null) { + ensureCommandsIsMutable(); + commands_.add(m); + } else { + commandsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List commands_ = + java.util.Collections.emptyList(); + private void ensureCommandsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + commands_ = new java.util.ArrayList(commands_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand, mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand.Builder, mentraos.ble.MentraosBle.DisplayBatch.DisplayCommandOrBuilder> commandsBuilder_; + + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + public java.util.List getCommandsList() { + if (commandsBuilder_ == null) { + return java.util.Collections.unmodifiableList(commands_); + } else { + return commandsBuilder_.getMessageList(); + } + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + public int getCommandsCount() { + if (commandsBuilder_ == null) { + return commands_.size(); + } else { + return commandsBuilder_.getCount(); + } + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + public mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand getCommands(int index) { + if (commandsBuilder_ == null) { + return commands_.get(index); + } else { + return commandsBuilder_.getMessage(index); + } + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + public Builder setCommands( + int index, mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand value) { + if (commandsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommandsIsMutable(); + commands_.set(index, value); + onChanged(); + } else { + commandsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + public Builder setCommands( + int index, mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand.Builder builderForValue) { + if (commandsBuilder_ == null) { + ensureCommandsIsMutable(); + commands_.set(index, builderForValue.build()); + onChanged(); + } else { + commandsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + public Builder addCommands(mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand value) { + if (commandsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommandsIsMutable(); + commands_.add(value); + onChanged(); + } else { + commandsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + public Builder addCommands( + int index, mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand value) { + if (commandsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommandsIsMutable(); + commands_.add(index, value); + onChanged(); + } else { + commandsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + public Builder addCommands( + mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand.Builder builderForValue) { + if (commandsBuilder_ == null) { + ensureCommandsIsMutable(); + commands_.add(builderForValue.build()); + onChanged(); + } else { + commandsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + public Builder addCommands( + int index, mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand.Builder builderForValue) { + if (commandsBuilder_ == null) { + ensureCommandsIsMutable(); + commands_.add(index, builderForValue.build()); + onChanged(); + } else { + commandsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + public Builder addAllCommands( + java.lang.Iterable values) { + if (commandsBuilder_ == null) { + ensureCommandsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, commands_); + onChanged(); + } else { + commandsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + public Builder clearCommands() { + if (commandsBuilder_ == null) { + commands_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + commandsBuilder_.clear(); + } + return this; + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + public Builder removeCommands(int index) { + if (commandsBuilder_ == null) { + ensureCommandsIsMutable(); + commands_.remove(index); + onChanged(); + } else { + commandsBuilder_.remove(index); + } + return this; + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + public mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand.Builder getCommandsBuilder( + int index) { + return internalGetCommandsFieldBuilder().getBuilder(index); + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + public mentraos.ble.MentraosBle.DisplayBatch.DisplayCommandOrBuilder getCommandsOrBuilder( + int index) { + if (commandsBuilder_ == null) { + return commands_.get(index); } else { + return commandsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + public java.util.List + getCommandsOrBuilderList() { + if (commandsBuilder_ != null) { + return commandsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(commands_); + } + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + public mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand.Builder addCommandsBuilder() { + return internalGetCommandsFieldBuilder().addBuilder( + mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand.getDefaultInstance()); + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + public mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand.Builder addCommandsBuilder( + int index) { + return internalGetCommandsFieldBuilder().addBuilder( + index, mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand.getDefaultInstance()); + } + /** + * repeated .mentraos.ble.DisplayBatch.DisplayCommand commands = 1; + */ + public java.util.List + getCommandsBuilderList() { + return internalGetCommandsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand, mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand.Builder, mentraos.ble.MentraosBle.DisplayBatch.DisplayCommandOrBuilder> + internalGetCommandsFieldBuilder() { + if (commandsBuilder_ == null) { + commandsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand, mentraos.ble.MentraosBle.DisplayBatch.DisplayCommand.Builder, mentraos.ble.MentraosBle.DisplayBatch.DisplayCommandOrBuilder>( + commands_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + commands_ = null; + } + return commandsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.DisplayBatch) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.DisplayBatch) + private static final mentraos.ble.MentraosBle.DisplayBatch DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.DisplayBatch(); + } + + public static mentraos.ble.MentraosBle.DisplayBatch getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisplayBatch parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayBatch getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface CommitDisplayOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.CommitDisplay) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Optional: clear screen before applying commands
+     * 
+ * + * bool clear_before = 1; + * @return The clearBefore. + */ + boolean getClearBefore(); + } + /** + *
+   * Commits all queued display commands to screen atomically
+   * All display commands since last commit are rendered together
+   * 
+ * + * Protobuf type {@code mentraos.ble.CommitDisplay} + */ + public static final class CommitDisplay extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.CommitDisplay) + CommitDisplayOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + CommitDisplay.class.getName()); + } + // Use CommitDisplay.newBuilder() to construct. + private CommitDisplay(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private CommitDisplay() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_CommitDisplay_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_CommitDisplay_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.CommitDisplay.class, mentraos.ble.MentraosBle.CommitDisplay.Builder.class); + } + + public static final int CLEAR_BEFORE_FIELD_NUMBER = 1; + private boolean clearBefore_ = false; + /** + *
+     * Optional: clear screen before applying commands
+     * 
+ * + * bool clear_before = 1; + * @return The clearBefore. + */ + @java.lang.Override + public boolean getClearBefore() { + return clearBefore_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (clearBefore_ != false) { + output.writeBool(1, clearBefore_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (clearBefore_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, clearBefore_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.CommitDisplay)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.CommitDisplay other = (mentraos.ble.MentraosBle.CommitDisplay) obj; + + if (getClearBefore() + != other.getClearBefore()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CLEAR_BEFORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getClearBefore()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.CommitDisplay parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.CommitDisplay parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.CommitDisplay parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.CommitDisplay parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.CommitDisplay parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.CommitDisplay parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.CommitDisplay parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.CommitDisplay parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.CommitDisplay parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.CommitDisplay parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.CommitDisplay parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.CommitDisplay parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.CommitDisplay prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Commits all queued display commands to screen atomically
+     * All display commands since last commit are rendered together
+     * 
+ * + * Protobuf type {@code mentraos.ble.CommitDisplay} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.CommitDisplay) + mentraos.ble.MentraosBle.CommitDisplayOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_CommitDisplay_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_CommitDisplay_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.CommitDisplay.class, mentraos.ble.MentraosBle.CommitDisplay.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.CommitDisplay.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + clearBefore_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_CommitDisplay_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.CommitDisplay getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.CommitDisplay.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.CommitDisplay build() { + mentraos.ble.MentraosBle.CommitDisplay result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.CommitDisplay buildPartial() { + mentraos.ble.MentraosBle.CommitDisplay result = new mentraos.ble.MentraosBle.CommitDisplay(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.CommitDisplay result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.clearBefore_ = clearBefore_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.CommitDisplay) { + return mergeFrom((mentraos.ble.MentraosBle.CommitDisplay)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.CommitDisplay other) { + if (other == mentraos.ble.MentraosBle.CommitDisplay.getDefaultInstance()) return this; + if (other.getClearBefore() != false) { + setClearBefore(other.getClearBefore()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + clearBefore_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean clearBefore_ ; + /** + *
+       * Optional: clear screen before applying commands
+       * 
+ * + * bool clear_before = 1; + * @return The clearBefore. + */ + @java.lang.Override + public boolean getClearBefore() { + return clearBefore_; + } + /** + *
+       * Optional: clear screen before applying commands
+       * 
+ * + * bool clear_before = 1; + * @param value The clearBefore to set. + * @return This builder for chaining. + */ + public Builder setClearBefore(boolean value) { + + clearBefore_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Optional: clear screen before applying commands
+       * 
+ * + * bool clear_before = 1; + * @return This builder for chaining. + */ + public Builder clearClearBefore() { + bitField0_ = (bitField0_ & ~0x00000001); + clearBefore_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.CommitDisplay) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.CommitDisplay) + private static final mentraos.ble.MentraosBle.CommitDisplay DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.CommitDisplay(); + } + + public static mentraos.ble.MentraosBle.CommitDisplay getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CommitDisplay parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.CommitDisplay getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ClearDisplayOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.ClearDisplay) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Clears display immediately (NOT queued, happens right away)
+   * 
+ * + * Protobuf type {@code mentraos.ble.ClearDisplay} + */ + public static final class ClearDisplay extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.ClearDisplay) + ClearDisplayOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + ClearDisplay.class.getName()); + } + // Use ClearDisplay.newBuilder() to construct. + private ClearDisplay(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ClearDisplay() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ClearDisplay_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ClearDisplay_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.ClearDisplay.class, mentraos.ble.MentraosBle.ClearDisplay.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.ClearDisplay)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.ClearDisplay other = (mentraos.ble.MentraosBle.ClearDisplay) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.ClearDisplay parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ClearDisplay parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ClearDisplay parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ClearDisplay parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ClearDisplay parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ClearDisplay parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ClearDisplay parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.ClearDisplay parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.ClearDisplay parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.ClearDisplay parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ClearDisplay parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.ClearDisplay parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.ClearDisplay prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Clears display immediately (NOT queued, happens right away)
+     * 
+ * + * Protobuf type {@code mentraos.ble.ClearDisplay} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.ClearDisplay) + mentraos.ble.MentraosBle.ClearDisplayOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ClearDisplay_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ClearDisplay_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.ClearDisplay.class, mentraos.ble.MentraosBle.ClearDisplay.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.ClearDisplay.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ClearDisplay_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ClearDisplay getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.ClearDisplay.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ClearDisplay build() { + mentraos.ble.MentraosBle.ClearDisplay result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ClearDisplay buildPartial() { + mentraos.ble.MentraosBle.ClearDisplay result = new mentraos.ble.MentraosBle.ClearDisplay(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.ClearDisplay) { + return mergeFrom((mentraos.ble.MentraosBle.ClearDisplay)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.ClearDisplay other) { + if (other == mentraos.ble.MentraosBle.ClearDisplay.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.ClearDisplay) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.ClearDisplay) + private static final mentraos.ble.MentraosBle.ClearDisplay DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.ClearDisplay(); + } + + public static mentraos.ble.MentraosBle.ClearDisplay getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClearDisplay parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ClearDisplay getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DisplayQueueStatusOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.DisplayQueueStatus) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Request status of display queue
+   * 
+ * + * Protobuf type {@code mentraos.ble.DisplayQueueStatus} + */ + public static final class DisplayQueueStatus extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.DisplayQueueStatus) + DisplayQueueStatusOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + DisplayQueueStatus.class.getName()); + } + // Use DisplayQueueStatus.newBuilder() to construct. + private DisplayQueueStatus(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DisplayQueueStatus() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayQueueStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayQueueStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayQueueStatus.class, mentraos.ble.MentraosBle.DisplayQueueStatus.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.DisplayQueueStatus)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.DisplayQueueStatus other = (mentraos.ble.MentraosBle.DisplayQueueStatus) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.DisplayQueueStatus parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayQueueStatus parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayQueueStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayQueueStatus parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayQueueStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayQueueStatus parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayQueueStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayQueueStatus parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.DisplayQueueStatus parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.DisplayQueueStatus parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayQueueStatus parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayQueueStatus parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.DisplayQueueStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request status of display queue
+     * 
+ * + * Protobuf type {@code mentraos.ble.DisplayQueueStatus} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.DisplayQueueStatus) + mentraos.ble.MentraosBle.DisplayQueueStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayQueueStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayQueueStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayQueueStatus.class, mentraos.ble.MentraosBle.DisplayQueueStatus.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.DisplayQueueStatus.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayQueueStatus_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayQueueStatus getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.DisplayQueueStatus.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayQueueStatus build() { + mentraos.ble.MentraosBle.DisplayQueueStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayQueueStatus buildPartial() { + mentraos.ble.MentraosBle.DisplayQueueStatus result = new mentraos.ble.MentraosBle.DisplayQueueStatus(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.DisplayQueueStatus) { + return mergeFrom((mentraos.ble.MentraosBle.DisplayQueueStatus)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.DisplayQueueStatus other) { + if (other == mentraos.ble.MentraosBle.DisplayQueueStatus.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.DisplayQueueStatus) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.DisplayQueueStatus) + private static final mentraos.ble.MentraosBle.DisplayQueueStatus DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.DisplayQueueStatus(); + } + + public static mentraos.ble.MentraosBle.DisplayQueueStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisplayQueueStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayQueueStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DisplayQueueInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.DisplayQueueInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Number of commands waiting for commit
+     * 
+ * + * uint32 queued_commands = 1; + * @return The queuedCommands. + */ + int getQueuedCommands(); + + /** + *
+     * Memory used by queue
+     * 
+ * + * uint32 queue_bytes = 2; + * @return The queueBytes. + */ + int getQueueBytes(); + + /** + *
+     * Maximum queue size in bytes
+     * 
+ * + * uint32 max_queue_size = 3; + * @return The maxQueueSize. + */ + int getMaxQueueSize(); + + /** + *
+     * Status of last commit operation
+     * 
+ * + * bool last_commit_success = 4; + * @return The lastCommitSuccess. + */ + boolean getLastCommitSuccess(); + } + /** + *
+   * Response with queue information
+   * 
+ * + * Protobuf type {@code mentraos.ble.DisplayQueueInfo} + */ + public static final class DisplayQueueInfo extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.DisplayQueueInfo) + DisplayQueueInfoOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + DisplayQueueInfo.class.getName()); + } + // Use DisplayQueueInfo.newBuilder() to construct. + private DisplayQueueInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DisplayQueueInfo() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayQueueInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayQueueInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayQueueInfo.class, mentraos.ble.MentraosBle.DisplayQueueInfo.Builder.class); + } + + public static final int QUEUED_COMMANDS_FIELD_NUMBER = 1; + private int queuedCommands_ = 0; + /** + *
+     * Number of commands waiting for commit
+     * 
+ * + * uint32 queued_commands = 1; + * @return The queuedCommands. + */ + @java.lang.Override + public int getQueuedCommands() { + return queuedCommands_; + } + + public static final int QUEUE_BYTES_FIELD_NUMBER = 2; + private int queueBytes_ = 0; + /** + *
+     * Memory used by queue
+     * 
+ * + * uint32 queue_bytes = 2; + * @return The queueBytes. + */ + @java.lang.Override + public int getQueueBytes() { + return queueBytes_; + } + + public static final int MAX_QUEUE_SIZE_FIELD_NUMBER = 3; + private int maxQueueSize_ = 0; + /** + *
+     * Maximum queue size in bytes
+     * 
+ * + * uint32 max_queue_size = 3; + * @return The maxQueueSize. + */ + @java.lang.Override + public int getMaxQueueSize() { + return maxQueueSize_; + } + + public static final int LAST_COMMIT_SUCCESS_FIELD_NUMBER = 4; + private boolean lastCommitSuccess_ = false; + /** + *
+     * Status of last commit operation
+     * 
+ * + * bool last_commit_success = 4; + * @return The lastCommitSuccess. + */ + @java.lang.Override + public boolean getLastCommitSuccess() { + return lastCommitSuccess_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (queuedCommands_ != 0) { + output.writeUInt32(1, queuedCommands_); + } + if (queueBytes_ != 0) { + output.writeUInt32(2, queueBytes_); + } + if (maxQueueSize_ != 0) { + output.writeUInt32(3, maxQueueSize_); + } + if (lastCommitSuccess_ != false) { + output.writeBool(4, lastCommitSuccess_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (queuedCommands_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, queuedCommands_); + } + if (queueBytes_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, queueBytes_); + } + if (maxQueueSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, maxQueueSize_); + } + if (lastCommitSuccess_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, lastCommitSuccess_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.DisplayQueueInfo)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.DisplayQueueInfo other = (mentraos.ble.MentraosBle.DisplayQueueInfo) obj; + + if (getQueuedCommands() + != other.getQueuedCommands()) return false; + if (getQueueBytes() + != other.getQueueBytes()) return false; + if (getMaxQueueSize() + != other.getMaxQueueSize()) return false; + if (getLastCommitSuccess() + != other.getLastCommitSuccess()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + QUEUED_COMMANDS_FIELD_NUMBER; + hash = (53 * hash) + getQueuedCommands(); + hash = (37 * hash) + QUEUE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getQueueBytes(); + hash = (37 * hash) + MAX_QUEUE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getMaxQueueSize(); + hash = (37 * hash) + LAST_COMMIT_SUCCESS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getLastCommitSuccess()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.DisplayQueueInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayQueueInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayQueueInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayQueueInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayQueueInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayQueueInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayQueueInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayQueueInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.DisplayQueueInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.DisplayQueueInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayQueueInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayQueueInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.DisplayQueueInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response with queue information
+     * 
+ * + * Protobuf type {@code mentraos.ble.DisplayQueueInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.DisplayQueueInfo) + mentraos.ble.MentraosBle.DisplayQueueInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayQueueInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayQueueInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayQueueInfo.class, mentraos.ble.MentraosBle.DisplayQueueInfo.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.DisplayQueueInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + queuedCommands_ = 0; + queueBytes_ = 0; + maxQueueSize_ = 0; + lastCommitSuccess_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayQueueInfo_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayQueueInfo getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.DisplayQueueInfo.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayQueueInfo build() { + mentraos.ble.MentraosBle.DisplayQueueInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayQueueInfo buildPartial() { + mentraos.ble.MentraosBle.DisplayQueueInfo result = new mentraos.ble.MentraosBle.DisplayQueueInfo(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.DisplayQueueInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.queuedCommands_ = queuedCommands_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.queueBytes_ = queueBytes_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.maxQueueSize_ = maxQueueSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.lastCommitSuccess_ = lastCommitSuccess_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.DisplayQueueInfo) { + return mergeFrom((mentraos.ble.MentraosBle.DisplayQueueInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.DisplayQueueInfo other) { + if (other == mentraos.ble.MentraosBle.DisplayQueueInfo.getDefaultInstance()) return this; + if (other.getQueuedCommands() != 0) { + setQueuedCommands(other.getQueuedCommands()); + } + if (other.getQueueBytes() != 0) { + setQueueBytes(other.getQueueBytes()); + } + if (other.getMaxQueueSize() != 0) { + setMaxQueueSize(other.getMaxQueueSize()); + } + if (other.getLastCommitSuccess() != false) { + setLastCommitSuccess(other.getLastCommitSuccess()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + queuedCommands_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + queueBytes_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + maxQueueSize_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + lastCommitSuccess_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int queuedCommands_ ; + /** + *
+       * Number of commands waiting for commit
+       * 
+ * + * uint32 queued_commands = 1; + * @return The queuedCommands. + */ + @java.lang.Override + public int getQueuedCommands() { + return queuedCommands_; + } + /** + *
+       * Number of commands waiting for commit
+       * 
+ * + * uint32 queued_commands = 1; + * @param value The queuedCommands to set. + * @return This builder for chaining. + */ + public Builder setQueuedCommands(int value) { + + queuedCommands_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Number of commands waiting for commit
+       * 
+ * + * uint32 queued_commands = 1; + * @return This builder for chaining. + */ + public Builder clearQueuedCommands() { + bitField0_ = (bitField0_ & ~0x00000001); + queuedCommands_ = 0; + onChanged(); + return this; + } + + private int queueBytes_ ; + /** + *
+       * Memory used by queue
+       * 
+ * + * uint32 queue_bytes = 2; + * @return The queueBytes. + */ + @java.lang.Override + public int getQueueBytes() { + return queueBytes_; + } + /** + *
+       * Memory used by queue
+       * 
+ * + * uint32 queue_bytes = 2; + * @param value The queueBytes to set. + * @return This builder for chaining. + */ + public Builder setQueueBytes(int value) { + + queueBytes_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Memory used by queue
+       * 
+ * + * uint32 queue_bytes = 2; + * @return This builder for chaining. + */ + public Builder clearQueueBytes() { + bitField0_ = (bitField0_ & ~0x00000002); + queueBytes_ = 0; + onChanged(); + return this; + } + + private int maxQueueSize_ ; + /** + *
+       * Maximum queue size in bytes
+       * 
+ * + * uint32 max_queue_size = 3; + * @return The maxQueueSize. + */ + @java.lang.Override + public int getMaxQueueSize() { + return maxQueueSize_; + } + /** + *
+       * Maximum queue size in bytes
+       * 
+ * + * uint32 max_queue_size = 3; + * @param value The maxQueueSize to set. + * @return This builder for chaining. + */ + public Builder setMaxQueueSize(int value) { + + maxQueueSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * Maximum queue size in bytes
+       * 
+ * + * uint32 max_queue_size = 3; + * @return This builder for chaining. + */ + public Builder clearMaxQueueSize() { + bitField0_ = (bitField0_ & ~0x00000004); + maxQueueSize_ = 0; + onChanged(); + return this; + } + + private boolean lastCommitSuccess_ ; + /** + *
+       * Status of last commit operation
+       * 
+ * + * bool last_commit_success = 4; + * @return The lastCommitSuccess. + */ + @java.lang.Override + public boolean getLastCommitSuccess() { + return lastCommitSuccess_; + } + /** + *
+       * Status of last commit operation
+       * 
+ * + * bool last_commit_success = 4; + * @param value The lastCommitSuccess to set. + * @return This builder for chaining. + */ + public Builder setLastCommitSuccess(boolean value) { + + lastCommitSuccess_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Status of last commit operation
+       * 
+ * + * bool last_commit_success = 4; + * @return This builder for chaining. + */ + public Builder clearLastCommitSuccess() { + bitField0_ = (bitField0_ & ~0x00000008); + lastCommitSuccess_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.DisplayQueueInfo) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.DisplayQueueInfo) + private static final mentraos.ble.MentraosBle.DisplayQueueInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.DisplayQueueInfo(); + } + + public static mentraos.ble.MentraosBle.DisplayQueueInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisplayQueueInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayQueueInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DisplayDistanceConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.DisplayDistanceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 distance_cm = 1; + * @return The distanceCm. + */ + int getDistanceCm(); + } + /** + * Protobuf type {@code mentraos.ble.DisplayDistanceConfig} + */ + public static final class DisplayDistanceConfig extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.DisplayDistanceConfig) + DisplayDistanceConfigOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + DisplayDistanceConfig.class.getName()); + } + // Use DisplayDistanceConfig.newBuilder() to construct. + private DisplayDistanceConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DisplayDistanceConfig() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayDistanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayDistanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayDistanceConfig.class, mentraos.ble.MentraosBle.DisplayDistanceConfig.Builder.class); + } + + public static final int DISTANCE_CM_FIELD_NUMBER = 1; + private int distanceCm_ = 0; + /** + * uint32 distance_cm = 1; + * @return The distanceCm. + */ + @java.lang.Override + public int getDistanceCm() { + return distanceCm_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (distanceCm_ != 0) { + output.writeUInt32(1, distanceCm_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (distanceCm_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, distanceCm_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.DisplayDistanceConfig)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.DisplayDistanceConfig other = (mentraos.ble.MentraosBle.DisplayDistanceConfig) obj; + + if (getDistanceCm() + != other.getDistanceCm()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISTANCE_CM_FIELD_NUMBER; + hash = (53 * hash) + getDistanceCm(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.DisplayDistanceConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayDistanceConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayDistanceConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayDistanceConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayDistanceConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayDistanceConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayDistanceConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayDistanceConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.DisplayDistanceConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.DisplayDistanceConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayDistanceConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayDistanceConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.DisplayDistanceConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.DisplayDistanceConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.DisplayDistanceConfig) + mentraos.ble.MentraosBle.DisplayDistanceConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayDistanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayDistanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayDistanceConfig.class, mentraos.ble.MentraosBle.DisplayDistanceConfig.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.DisplayDistanceConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + distanceCm_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayDistanceConfig_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayDistanceConfig getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.DisplayDistanceConfig.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayDistanceConfig build() { + mentraos.ble.MentraosBle.DisplayDistanceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayDistanceConfig buildPartial() { + mentraos.ble.MentraosBle.DisplayDistanceConfig result = new mentraos.ble.MentraosBle.DisplayDistanceConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.DisplayDistanceConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.distanceCm_ = distanceCm_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.DisplayDistanceConfig) { + return mergeFrom((mentraos.ble.MentraosBle.DisplayDistanceConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.DisplayDistanceConfig other) { + if (other == mentraos.ble.MentraosBle.DisplayDistanceConfig.getDefaultInstance()) return this; + if (other.getDistanceCm() != 0) { + setDistanceCm(other.getDistanceCm()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + distanceCm_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int distanceCm_ ; + /** + * uint32 distance_cm = 1; + * @return The distanceCm. + */ + @java.lang.Override + public int getDistanceCm() { + return distanceCm_; + } + /** + * uint32 distance_cm = 1; + * @param value The distanceCm to set. + * @return This builder for chaining. + */ + public Builder setDistanceCm(int value) { + + distanceCm_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint32 distance_cm = 1; + * @return This builder for chaining. + */ + public Builder clearDistanceCm() { + bitField0_ = (bitField0_ & ~0x00000001); + distanceCm_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.DisplayDistanceConfig) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.DisplayDistanceConfig) + private static final mentraos.ble.MentraosBle.DisplayDistanceConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.DisplayDistanceConfig(); + } + + public static mentraos.ble.MentraosBle.DisplayDistanceConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisplayDistanceConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayDistanceConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DisplayHeightConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.DisplayHeightConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 height = 1; + * @return The height. + */ + int getHeight(); + } + /** + * Protobuf type {@code mentraos.ble.DisplayHeightConfig} + */ + public static final class DisplayHeightConfig extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.DisplayHeightConfig) + DisplayHeightConfigOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + DisplayHeightConfig.class.getName()); + } + // Use DisplayHeightConfig.newBuilder() to construct. + private DisplayHeightConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DisplayHeightConfig() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayHeightConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayHeightConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayHeightConfig.class, mentraos.ble.MentraosBle.DisplayHeightConfig.Builder.class); + } + + public static final int HEIGHT_FIELD_NUMBER = 1; + private int height_ = 0; + /** + * uint32 height = 1; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (height_ != 0) { + output.writeUInt32(1, height_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, height_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.DisplayHeightConfig)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.DisplayHeightConfig other = (mentraos.ble.MentraosBle.DisplayHeightConfig) obj; + + if (getHeight() + != other.getHeight()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.DisplayHeightConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayHeightConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayHeightConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayHeightConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayHeightConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.DisplayHeightConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayHeightConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayHeightConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.DisplayHeightConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.DisplayHeightConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.DisplayHeightConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.DisplayHeightConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.DisplayHeightConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.DisplayHeightConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.DisplayHeightConfig) + mentraos.ble.MentraosBle.DisplayHeightConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayHeightConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayHeightConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.DisplayHeightConfig.class, mentraos.ble.MentraosBle.DisplayHeightConfig.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.DisplayHeightConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + height_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_DisplayHeightConfig_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayHeightConfig getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.DisplayHeightConfig.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayHeightConfig build() { + mentraos.ble.MentraosBle.DisplayHeightConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayHeightConfig buildPartial() { + mentraos.ble.MentraosBle.DisplayHeightConfig result = new mentraos.ble.MentraosBle.DisplayHeightConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.DisplayHeightConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.height_ = height_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.DisplayHeightConfig) { + return mergeFrom((mentraos.ble.MentraosBle.DisplayHeightConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.DisplayHeightConfig other) { + if (other == mentraos.ble.MentraosBle.DisplayHeightConfig.getDefaultInstance()) return this; + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + height_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int height_ ; + /** + * uint32 height = 1; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + * uint32 height = 1; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint32 height = 1; + * @return This builder for chaining. + */ + public Builder clearHeight() { + bitField0_ = (bitField0_ & ~0x00000001); + height_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.DisplayHeightConfig) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.DisplayHeightConfig) + private static final mentraos.ble.MentraosBle.DisplayHeightConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.DisplayHeightConfig(); + } + + public static mentraos.ble.MentraosBle.DisplayHeightConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisplayHeightConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.DisplayHeightConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ImageTransferCompleteOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.ImageTransferComplete) + com.google.protobuf.MessageOrBuilder { + + /** + * string stream_id = 1; + * @return The streamId. + */ + java.lang.String getStreamId(); + /** + * string stream_id = 1; + * @return The bytes for streamId. + */ + com.google.protobuf.ByteString + getStreamIdBytes(); + + /** + * .mentraos.ble.ImageTransferComplete.Status status = 2; + * @return The enum numeric value on the wire for status. + */ + int getStatusValue(); + /** + * .mentraos.ble.ImageTransferComplete.Status status = 2; + * @return The status. + */ + mentraos.ble.MentraosBle.ImageTransferComplete.Status getStatus(); + + /** + *
+     * List of missing chunk indices
+     * 
+ * + * repeated uint32 missing_chunks = 3; + * @return A list containing the missingChunks. + */ + java.util.List getMissingChunksList(); + /** + *
+     * List of missing chunk indices
+     * 
+ * + * repeated uint32 missing_chunks = 3; + * @return The count of missingChunks. + */ + int getMissingChunksCount(); + /** + *
+     * List of missing chunk indices
+     * 
+ * + * repeated uint32 missing_chunks = 3; + * @param index The index of the element to return. + * @return The missingChunks at the given index. + */ + int getMissingChunks(int index); + } + /** + * Protobuf type {@code mentraos.ble.ImageTransferComplete} + */ + public static final class ImageTransferComplete extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.ImageTransferComplete) + ImageTransferCompleteOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + ImageTransferComplete.class.getName()); + } + // Use ImageTransferComplete.newBuilder() to construct. + private ImageTransferComplete(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ImageTransferComplete() { + streamId_ = ""; + status_ = 0; + missingChunks_ = emptyIntList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImageTransferComplete_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImageTransferComplete_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.ImageTransferComplete.class, mentraos.ble.MentraosBle.ImageTransferComplete.Builder.class); + } + + /** + * Protobuf enum {@code mentraos.ble.ImageTransferComplete.Status} + */ + public enum Status + implements com.google.protobuf.ProtocolMessageEnum { + /** + * OK = 0; + */ + OK(0), + /** + * INCOMPLETE = 1; + */ + INCOMPLETE(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + Status.class.getName()); + } + /** + * OK = 0; + */ + public static final int OK_VALUE = 0; + /** + * INCOMPLETE = 1; + */ + public static final int INCOMPLETE_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Status valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Status forNumber(int value) { + switch (value) { + case 0: return OK; + case 1: return INCOMPLETE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Status> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Status findValueByNumber(int number) { + return Status.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return mentraos.ble.MentraosBle.ImageTransferComplete.getDescriptor().getEnumTypes().get(0); + } + + private static final Status[] VALUES = values(); + + public static Status valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Status(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:mentraos.ble.ImageTransferComplete.Status) + } + + public static final int STREAM_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object streamId_ = ""; + /** + * string stream_id = 1; + * @return The streamId. + */ + @java.lang.Override + public java.lang.String getStreamId() { + java.lang.Object ref = streamId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + streamId_ = s; + return s; + } + } + /** + * string stream_id = 1; + * @return The bytes for streamId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStreamIdBytes() { + java.lang.Object ref = streamId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + streamId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_FIELD_NUMBER = 2; + private int status_ = 0; + /** + * .mentraos.ble.ImageTransferComplete.Status status = 2; + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override public int getStatusValue() { + return status_; + } + /** + * .mentraos.ble.ImageTransferComplete.Status status = 2; + * @return The status. + */ + @java.lang.Override public mentraos.ble.MentraosBle.ImageTransferComplete.Status getStatus() { + mentraos.ble.MentraosBle.ImageTransferComplete.Status result = mentraos.ble.MentraosBle.ImageTransferComplete.Status.forNumber(status_); + return result == null ? mentraos.ble.MentraosBle.ImageTransferComplete.Status.UNRECOGNIZED : result; + } + + public static final int MISSING_CHUNKS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList missingChunks_ = + emptyIntList(); + /** + *
+     * List of missing chunk indices
+     * 
+ * + * repeated uint32 missing_chunks = 3; + * @return A list containing the missingChunks. + */ + @java.lang.Override + public java.util.List + getMissingChunksList() { + return missingChunks_; + } + /** + *
+     * List of missing chunk indices
+     * 
+ * + * repeated uint32 missing_chunks = 3; + * @return The count of missingChunks. + */ + public int getMissingChunksCount() { + return missingChunks_.size(); + } + /** + *
+     * List of missing chunk indices
+     * 
+ * + * repeated uint32 missing_chunks = 3; + * @param index The index of the element to return. + * @return The missingChunks at the given index. + */ + public int getMissingChunks(int index) { + return missingChunks_.getInt(index); + } + private int missingChunksMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(streamId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, streamId_); + } + if (status_ != mentraos.ble.MentraosBle.ImageTransferComplete.Status.OK.getNumber()) { + output.writeEnum(2, status_); + } + if (getMissingChunksList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(missingChunksMemoizedSerializedSize); + } + for (int i = 0; i < missingChunks_.size(); i++) { + output.writeUInt32NoTag(missingChunks_.getInt(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(streamId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, streamId_); + } + if (status_ != mentraos.ble.MentraosBle.ImageTransferComplete.Status.OK.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, status_); + } + { + int dataSize = 0; + for (int i = 0; i < missingChunks_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(missingChunks_.getInt(i)); + } + size += dataSize; + if (!getMissingChunksList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + missingChunksMemoizedSerializedSize = dataSize; + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.ImageTransferComplete)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.ImageTransferComplete other = (mentraos.ble.MentraosBle.ImageTransferComplete) obj; + + if (!getStreamId() + .equals(other.getStreamId())) return false; + if (status_ != other.status_) return false; + if (!getMissingChunksList() + .equals(other.getMissingChunksList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STREAM_ID_FIELD_NUMBER; + hash = (53 * hash) + getStreamId().hashCode(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + status_; + if (getMissingChunksCount() > 0) { + hash = (37 * hash) + MISSING_CHUNKS_FIELD_NUMBER; + hash = (53 * hash) + getMissingChunksList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.ImageTransferComplete parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ImageTransferComplete parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ImageTransferComplete parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ImageTransferComplete parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ImageTransferComplete parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ImageTransferComplete parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ImageTransferComplete parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.ImageTransferComplete parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.ImageTransferComplete parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.ImageTransferComplete parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ImageTransferComplete parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.ImageTransferComplete parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.ImageTransferComplete prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.ImageTransferComplete} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.ImageTransferComplete) + mentraos.ble.MentraosBle.ImageTransferCompleteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImageTransferComplete_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImageTransferComplete_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.ImageTransferComplete.class, mentraos.ble.MentraosBle.ImageTransferComplete.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.ImageTransferComplete.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + streamId_ = ""; + status_ = 0; + missingChunks_ = emptyIntList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImageTransferComplete_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ImageTransferComplete getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.ImageTransferComplete.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ImageTransferComplete build() { + mentraos.ble.MentraosBle.ImageTransferComplete result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ImageTransferComplete buildPartial() { + mentraos.ble.MentraosBle.ImageTransferComplete result = new mentraos.ble.MentraosBle.ImageTransferComplete(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.ImageTransferComplete result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.streamId_ = streamId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.status_ = status_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + missingChunks_.makeImmutable(); + result.missingChunks_ = missingChunks_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.ImageTransferComplete) { + return mergeFrom((mentraos.ble.MentraosBle.ImageTransferComplete)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.ImageTransferComplete other) { + if (other == mentraos.ble.MentraosBle.ImageTransferComplete.getDefaultInstance()) return this; + if (!other.getStreamId().isEmpty()) { + streamId_ = other.streamId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.status_ != 0) { + setStatusValue(other.getStatusValue()); + } + if (!other.missingChunks_.isEmpty()) { + if (missingChunks_.isEmpty()) { + missingChunks_ = other.missingChunks_; + missingChunks_.makeImmutable(); + bitField0_ |= 0x00000004; + } else { + ensureMissingChunksIsMutable(); + missingChunks_.addAll(other.missingChunks_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + streamId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + status_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + int v = input.readUInt32(); + ensureMissingChunksIsMutable(); + missingChunks_.addInt(v); + break; + } // case 24 + case 26: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureMissingChunksIsMutable(); + while (input.getBytesUntilLimit() > 0) { + missingChunks_.addInt(input.readUInt32()); + } + input.popLimit(limit); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object streamId_ = ""; + /** + * string stream_id = 1; + * @return The streamId. + */ + public java.lang.String getStreamId() { + java.lang.Object ref = streamId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + streamId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string stream_id = 1; + * @return The bytes for streamId. + */ + public com.google.protobuf.ByteString + getStreamIdBytes() { + java.lang.Object ref = streamId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + streamId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string stream_id = 1; + * @param value The streamId to set. + * @return This builder for chaining. + */ + public Builder setStreamId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + streamId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string stream_id = 1; + * @return This builder for chaining. + */ + public Builder clearStreamId() { + streamId_ = getDefaultInstance().getStreamId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string stream_id = 1; + * @param value The bytes for streamId to set. + * @return This builder for chaining. + */ + public Builder setStreamIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + streamId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int status_ = 0; + /** + * .mentraos.ble.ImageTransferComplete.Status status = 2; + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override public int getStatusValue() { + return status_; + } + /** + * .mentraos.ble.ImageTransferComplete.Status status = 2; + * @param value The enum numeric value on the wire for status to set. + * @return This builder for chaining. + */ + public Builder setStatusValue(int value) { + status_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .mentraos.ble.ImageTransferComplete.Status status = 2; + * @return The status. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.ImageTransferComplete.Status getStatus() { + mentraos.ble.MentraosBle.ImageTransferComplete.Status result = mentraos.ble.MentraosBle.ImageTransferComplete.Status.forNumber(status_); + return result == null ? mentraos.ble.MentraosBle.ImageTransferComplete.Status.UNRECOGNIZED : result; + } + /** + * .mentraos.ble.ImageTransferComplete.Status status = 2; + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(mentraos.ble.MentraosBle.ImageTransferComplete.Status value) { + if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000002; + status_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .mentraos.ble.ImageTransferComplete.Status status = 2; + * @return This builder for chaining. + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000002); + status_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList missingChunks_ = emptyIntList(); + private void ensureMissingChunksIsMutable() { + if (!missingChunks_.isModifiable()) { + missingChunks_ = makeMutableCopy(missingChunks_); + } + bitField0_ |= 0x00000004; + } + /** + *
+       * List of missing chunk indices
+       * 
+ * + * repeated uint32 missing_chunks = 3; + * @return A list containing the missingChunks. + */ + public java.util.List + getMissingChunksList() { + missingChunks_.makeImmutable(); + return missingChunks_; + } + /** + *
+       * List of missing chunk indices
+       * 
+ * + * repeated uint32 missing_chunks = 3; + * @return The count of missingChunks. + */ + public int getMissingChunksCount() { + return missingChunks_.size(); + } + /** + *
+       * List of missing chunk indices
+       * 
+ * + * repeated uint32 missing_chunks = 3; + * @param index The index of the element to return. + * @return The missingChunks at the given index. + */ + public int getMissingChunks(int index) { + return missingChunks_.getInt(index); + } + /** + *
+       * List of missing chunk indices
+       * 
+ * + * repeated uint32 missing_chunks = 3; + * @param index The index to set the value at. + * @param value The missingChunks to set. + * @return This builder for chaining. + */ + public Builder setMissingChunks( + int index, int value) { + + ensureMissingChunksIsMutable(); + missingChunks_.setInt(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * List of missing chunk indices
+       * 
+ * + * repeated uint32 missing_chunks = 3; + * @param value The missingChunks to add. + * @return This builder for chaining. + */ + public Builder addMissingChunks(int value) { + + ensureMissingChunksIsMutable(); + missingChunks_.addInt(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * List of missing chunk indices
+       * 
+ * + * repeated uint32 missing_chunks = 3; + * @param values The missingChunks to add. + * @return This builder for chaining. + */ + public Builder addAllMissingChunks( + java.lang.Iterable values) { + ensureMissingChunksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, missingChunks_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * List of missing chunk indices
+       * 
+ * + * repeated uint32 missing_chunks = 3; + * @return This builder for chaining. + */ + public Builder clearMissingChunks() { + missingChunks_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.ImageTransferComplete) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.ImageTransferComplete) + private static final mentraos.ble.MentraosBle.ImageTransferComplete DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.ImageTransferComplete(); + } + + public static mentraos.ble.MentraosBle.ImageTransferComplete getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageTransferComplete parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ImageTransferComplete getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ImuEnabledConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.ImuEnabledConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * bool enabled = 1; + * @return The enabled. + */ + boolean getEnabled(); + } + /** + * Protobuf type {@code mentraos.ble.ImuEnabledConfig} + */ + public static final class ImuEnabledConfig extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.ImuEnabledConfig) + ImuEnabledConfigOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + ImuEnabledConfig.class.getName()); + } + // Use ImuEnabledConfig.newBuilder() to construct. + private ImuEnabledConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ImuEnabledConfig() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImuEnabledConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImuEnabledConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.ImuEnabledConfig.class, mentraos.ble.MentraosBle.ImuEnabledConfig.Builder.class); + } + + public static final int ENABLED_FIELD_NUMBER = 1; + private boolean enabled_ = false; + /** + * bool enabled = 1; + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (enabled_ != false) { + output.writeBool(1, enabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, enabled_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.ImuEnabledConfig)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.ImuEnabledConfig other = (mentraos.ble.MentraosBle.ImuEnabledConfig) obj; + + if (getEnabled() + != other.getEnabled()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnabled()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.ImuEnabledConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ImuEnabledConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ImuEnabledConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ImuEnabledConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ImuEnabledConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ImuEnabledConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ImuEnabledConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.ImuEnabledConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.ImuEnabledConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.ImuEnabledConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ImuEnabledConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.ImuEnabledConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.ImuEnabledConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.ImuEnabledConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.ImuEnabledConfig) + mentraos.ble.MentraosBle.ImuEnabledConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImuEnabledConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImuEnabledConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.ImuEnabledConfig.class, mentraos.ble.MentraosBle.ImuEnabledConfig.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.ImuEnabledConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImuEnabledConfig_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ImuEnabledConfig getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.ImuEnabledConfig.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ImuEnabledConfig build() { + mentraos.ble.MentraosBle.ImuEnabledConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ImuEnabledConfig buildPartial() { + mentraos.ble.MentraosBle.ImuEnabledConfig result = new mentraos.ble.MentraosBle.ImuEnabledConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.ImuEnabledConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enabled_ = enabled_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.ImuEnabledConfig) { + return mergeFrom((mentraos.ble.MentraosBle.ImuEnabledConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.ImuEnabledConfig other) { + if (other == mentraos.ble.MentraosBle.ImuEnabledConfig.getDefaultInstance()) return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + enabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean enabled_ ; + /** + * bool enabled = 1; + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + /** + * bool enabled = 1; + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool enabled = 1; + * @return This builder for chaining. + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000001); + enabled_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.ImuEnabledConfig) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.ImuEnabledConfig) + private static final mentraos.ble.MentraosBle.ImuEnabledConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.ImuEnabledConfig(); + } + + public static mentraos.ble.MentraosBle.ImuEnabledConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImuEnabledConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ImuEnabledConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ImuSingleRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.ImuSingleRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code mentraos.ble.ImuSingleRequest} + */ + public static final class ImuSingleRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.ImuSingleRequest) + ImuSingleRequestOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + ImuSingleRequest.class.getName()); + } + // Use ImuSingleRequest.newBuilder() to construct. + private ImuSingleRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ImuSingleRequest() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImuSingleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImuSingleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.ImuSingleRequest.class, mentraos.ble.MentraosBle.ImuSingleRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.ImuSingleRequest)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.ImuSingleRequest other = (mentraos.ble.MentraosBle.ImuSingleRequest) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.ImuSingleRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ImuSingleRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ImuSingleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ImuSingleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ImuSingleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ImuSingleRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ImuSingleRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.ImuSingleRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.ImuSingleRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.ImuSingleRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ImuSingleRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.ImuSingleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.ImuSingleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.ImuSingleRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.ImuSingleRequest) + mentraos.ble.MentraosBle.ImuSingleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImuSingleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImuSingleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.ImuSingleRequest.class, mentraos.ble.MentraosBle.ImuSingleRequest.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.ImuSingleRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImuSingleRequest_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ImuSingleRequest getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.ImuSingleRequest.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ImuSingleRequest build() { + mentraos.ble.MentraosBle.ImuSingleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ImuSingleRequest buildPartial() { + mentraos.ble.MentraosBle.ImuSingleRequest result = new mentraos.ble.MentraosBle.ImuSingleRequest(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.ImuSingleRequest) { + return mergeFrom((mentraos.ble.MentraosBle.ImuSingleRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.ImuSingleRequest other) { + if (other == mentraos.ble.MentraosBle.ImuSingleRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.ImuSingleRequest) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.ImuSingleRequest) + private static final mentraos.ble.MentraosBle.ImuSingleRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.ImuSingleRequest(); + } + + public static mentraos.ble.MentraosBle.ImuSingleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImuSingleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ImuSingleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ImuStreamConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.ImuStreamConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * bool enabled = 1; + * @return The enabled. + */ + boolean getEnabled(); + } + /** + * Protobuf type {@code mentraos.ble.ImuStreamConfig} + */ + public static final class ImuStreamConfig extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.ImuStreamConfig) + ImuStreamConfigOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + ImuStreamConfig.class.getName()); + } + // Use ImuStreamConfig.newBuilder() to construct. + private ImuStreamConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ImuStreamConfig() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImuStreamConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImuStreamConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.ImuStreamConfig.class, mentraos.ble.MentraosBle.ImuStreamConfig.Builder.class); + } + + public static final int ENABLED_FIELD_NUMBER = 1; + private boolean enabled_ = false; + /** + * bool enabled = 1; + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (enabled_ != false) { + output.writeBool(1, enabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, enabled_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.ImuStreamConfig)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.ImuStreamConfig other = (mentraos.ble.MentraosBle.ImuStreamConfig) obj; + + if (getEnabled() + != other.getEnabled()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnabled()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.ImuStreamConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ImuStreamConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ImuStreamConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ImuStreamConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ImuStreamConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ImuStreamConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ImuStreamConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.ImuStreamConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.ImuStreamConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.ImuStreamConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ImuStreamConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.ImuStreamConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.ImuStreamConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.ImuStreamConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.ImuStreamConfig) + mentraos.ble.MentraosBle.ImuStreamConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImuStreamConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImuStreamConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.ImuStreamConfig.class, mentraos.ble.MentraosBle.ImuStreamConfig.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.ImuStreamConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImuStreamConfig_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ImuStreamConfig getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.ImuStreamConfig.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ImuStreamConfig build() { + mentraos.ble.MentraosBle.ImuStreamConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ImuStreamConfig buildPartial() { + mentraos.ble.MentraosBle.ImuStreamConfig result = new mentraos.ble.MentraosBle.ImuStreamConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.ImuStreamConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enabled_ = enabled_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.ImuStreamConfig) { + return mergeFrom((mentraos.ble.MentraosBle.ImuStreamConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.ImuStreamConfig other) { + if (other == mentraos.ble.MentraosBle.ImuStreamConfig.getDefaultInstance()) return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + enabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean enabled_ ; + /** + * bool enabled = 1; + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + /** + * bool enabled = 1; + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool enabled = 1; + * @return This builder for chaining. + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000001); + enabled_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.ImuStreamConfig) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.ImuStreamConfig) + private static final mentraos.ble.MentraosBle.ImuStreamConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.ImuStreamConfig(); + } + + public static mentraos.ble.MentraosBle.ImuStreamConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImuStreamConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ImuStreamConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ImuDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.ImuData) + com.google.protobuf.MessageOrBuilder { + + /** + * .mentraos.ble.Vector3 accel = 1; + * @return Whether the accel field is set. + */ + boolean hasAccel(); + /** + * .mentraos.ble.Vector3 accel = 1; + * @return The accel. + */ + mentraos.ble.MentraosBle.Vector3 getAccel(); + /** + * .mentraos.ble.Vector3 accel = 1; + */ + mentraos.ble.MentraosBle.Vector3OrBuilder getAccelOrBuilder(); + + /** + * .mentraos.ble.Vector3 gyro = 2; + * @return Whether the gyro field is set. + */ + boolean hasGyro(); + /** + * .mentraos.ble.Vector3 gyro = 2; + * @return The gyro. + */ + mentraos.ble.MentraosBle.Vector3 getGyro(); + /** + * .mentraos.ble.Vector3 gyro = 2; + */ + mentraos.ble.MentraosBle.Vector3OrBuilder getGyroOrBuilder(); + + /** + * .mentraos.ble.Vector3 mag = 3; + * @return Whether the mag field is set. + */ + boolean hasMag(); + /** + * .mentraos.ble.Vector3 mag = 3; + * @return The mag. + */ + mentraos.ble.MentraosBle.Vector3 getMag(); + /** + * .mentraos.ble.Vector3 mag = 3; + */ + mentraos.ble.MentraosBle.Vector3OrBuilder getMagOrBuilder(); + } + /** + * Protobuf type {@code mentraos.ble.ImuData} + */ + public static final class ImuData extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.ImuData) + ImuDataOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + ImuData.class.getName()); + } + // Use ImuData.newBuilder() to construct. + private ImuData(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ImuData() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImuData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImuData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.ImuData.class, mentraos.ble.MentraosBle.ImuData.Builder.class); + } + + private int bitField0_; + public static final int ACCEL_FIELD_NUMBER = 1; + private mentraos.ble.MentraosBle.Vector3 accel_; + /** + * .mentraos.ble.Vector3 accel = 1; + * @return Whether the accel field is set. + */ + @java.lang.Override + public boolean hasAccel() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .mentraos.ble.Vector3 accel = 1; + * @return The accel. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.Vector3 getAccel() { + return accel_ == null ? mentraos.ble.MentraosBle.Vector3.getDefaultInstance() : accel_; + } + /** + * .mentraos.ble.Vector3 accel = 1; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.Vector3OrBuilder getAccelOrBuilder() { + return accel_ == null ? mentraos.ble.MentraosBle.Vector3.getDefaultInstance() : accel_; + } + + public static final int GYRO_FIELD_NUMBER = 2; + private mentraos.ble.MentraosBle.Vector3 gyro_; + /** + * .mentraos.ble.Vector3 gyro = 2; + * @return Whether the gyro field is set. + */ + @java.lang.Override + public boolean hasGyro() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .mentraos.ble.Vector3 gyro = 2; + * @return The gyro. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.Vector3 getGyro() { + return gyro_ == null ? mentraos.ble.MentraosBle.Vector3.getDefaultInstance() : gyro_; + } + /** + * .mentraos.ble.Vector3 gyro = 2; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.Vector3OrBuilder getGyroOrBuilder() { + return gyro_ == null ? mentraos.ble.MentraosBle.Vector3.getDefaultInstance() : gyro_; + } + + public static final int MAG_FIELD_NUMBER = 3; + private mentraos.ble.MentraosBle.Vector3 mag_; + /** + * .mentraos.ble.Vector3 mag = 3; + * @return Whether the mag field is set. + */ + @java.lang.Override + public boolean hasMag() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .mentraos.ble.Vector3 mag = 3; + * @return The mag. + */ + @java.lang.Override + public mentraos.ble.MentraosBle.Vector3 getMag() { + return mag_ == null ? mentraos.ble.MentraosBle.Vector3.getDefaultInstance() : mag_; + } + /** + * .mentraos.ble.Vector3 mag = 3; + */ + @java.lang.Override + public mentraos.ble.MentraosBle.Vector3OrBuilder getMagOrBuilder() { + return mag_ == null ? mentraos.ble.MentraosBle.Vector3.getDefaultInstance() : mag_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAccel()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getGyro()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getMag()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAccel()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getGyro()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getMag()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.ImuData)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.ImuData other = (mentraos.ble.MentraosBle.ImuData) obj; + + if (hasAccel() != other.hasAccel()) return false; + if (hasAccel()) { + if (!getAccel() + .equals(other.getAccel())) return false; + } + if (hasGyro() != other.hasGyro()) return false; + if (hasGyro()) { + if (!getGyro() + .equals(other.getGyro())) return false; + } + if (hasMag() != other.hasMag()) return false; + if (hasMag()) { + if (!getMag() + .equals(other.getMag())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAccel()) { + hash = (37 * hash) + ACCEL_FIELD_NUMBER; + hash = (53 * hash) + getAccel().hashCode(); + } + if (hasGyro()) { + hash = (37 * hash) + GYRO_FIELD_NUMBER; + hash = (53 * hash) + getGyro().hashCode(); + } + if (hasMag()) { + hash = (37 * hash) + MAG_FIELD_NUMBER; + hash = (53 * hash) + getMag().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.ImuData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ImuData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ImuData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ImuData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ImuData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.ImuData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ImuData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.ImuData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.ImuData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.ImuData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.ImuData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.ImuData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.ImuData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.ImuData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.ImuData) + mentraos.ble.MentraosBle.ImuDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImuData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImuData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.ImuData.class, mentraos.ble.MentraosBle.ImuData.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.ImuData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + internalGetAccelFieldBuilder(); + internalGetGyroFieldBuilder(); + internalGetMagFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + accel_ = null; + if (accelBuilder_ != null) { + accelBuilder_.dispose(); + accelBuilder_ = null; + } + gyro_ = null; + if (gyroBuilder_ != null) { + gyroBuilder_.dispose(); + gyroBuilder_ = null; + } + mag_ = null; + if (magBuilder_ != null) { + magBuilder_.dispose(); + magBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ImuData_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ImuData getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.ImuData.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ImuData build() { + mentraos.ble.MentraosBle.ImuData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ImuData buildPartial() { + mentraos.ble.MentraosBle.ImuData result = new mentraos.ble.MentraosBle.ImuData(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.ImuData result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.accel_ = accelBuilder_ == null + ? accel_ + : accelBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.gyro_ = gyroBuilder_ == null + ? gyro_ + : gyroBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.mag_ = magBuilder_ == null + ? mag_ + : magBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.ImuData) { + return mergeFrom((mentraos.ble.MentraosBle.ImuData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.ImuData other) { + if (other == mentraos.ble.MentraosBle.ImuData.getDefaultInstance()) return this; + if (other.hasAccel()) { + mergeAccel(other.getAccel()); + } + if (other.hasGyro()) { + mergeGyro(other.getGyro()); + } + if (other.hasMag()) { + mergeMag(other.getMag()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + internalGetAccelFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + internalGetGyroFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + internalGetMagFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private mentraos.ble.MentraosBle.Vector3 accel_; + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.Vector3, mentraos.ble.MentraosBle.Vector3.Builder, mentraos.ble.MentraosBle.Vector3OrBuilder> accelBuilder_; + /** + * .mentraos.ble.Vector3 accel = 1; + * @return Whether the accel field is set. + */ + public boolean hasAccel() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .mentraos.ble.Vector3 accel = 1; + * @return The accel. + */ + public mentraos.ble.MentraosBle.Vector3 getAccel() { + if (accelBuilder_ == null) { + return accel_ == null ? mentraos.ble.MentraosBle.Vector3.getDefaultInstance() : accel_; + } else { + return accelBuilder_.getMessage(); + } + } + /** + * .mentraos.ble.Vector3 accel = 1; + */ + public Builder setAccel(mentraos.ble.MentraosBle.Vector3 value) { + if (accelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accel_ = value; + } else { + accelBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .mentraos.ble.Vector3 accel = 1; + */ + public Builder setAccel( + mentraos.ble.MentraosBle.Vector3.Builder builderForValue) { + if (accelBuilder_ == null) { + accel_ = builderForValue.build(); + } else { + accelBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .mentraos.ble.Vector3 accel = 1; + */ + public Builder mergeAccel(mentraos.ble.MentraosBle.Vector3 value) { + if (accelBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + accel_ != null && + accel_ != mentraos.ble.MentraosBle.Vector3.getDefaultInstance()) { + getAccelBuilder().mergeFrom(value); + } else { + accel_ = value; + } + } else { + accelBuilder_.mergeFrom(value); + } + if (accel_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .mentraos.ble.Vector3 accel = 1; + */ + public Builder clearAccel() { + bitField0_ = (bitField0_ & ~0x00000001); + accel_ = null; + if (accelBuilder_ != null) { + accelBuilder_.dispose(); + accelBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .mentraos.ble.Vector3 accel = 1; + */ + public mentraos.ble.MentraosBle.Vector3.Builder getAccelBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetAccelFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.Vector3 accel = 1; + */ + public mentraos.ble.MentraosBle.Vector3OrBuilder getAccelOrBuilder() { + if (accelBuilder_ != null) { + return accelBuilder_.getMessageOrBuilder(); + } else { + return accel_ == null ? + mentraos.ble.MentraosBle.Vector3.getDefaultInstance() : accel_; + } + } + /** + * .mentraos.ble.Vector3 accel = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.Vector3, mentraos.ble.MentraosBle.Vector3.Builder, mentraos.ble.MentraosBle.Vector3OrBuilder> + internalGetAccelFieldBuilder() { + if (accelBuilder_ == null) { + accelBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.Vector3, mentraos.ble.MentraosBle.Vector3.Builder, mentraos.ble.MentraosBle.Vector3OrBuilder>( + getAccel(), + getParentForChildren(), + isClean()); + accel_ = null; + } + return accelBuilder_; + } + + private mentraos.ble.MentraosBle.Vector3 gyro_; + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.Vector3, mentraos.ble.MentraosBle.Vector3.Builder, mentraos.ble.MentraosBle.Vector3OrBuilder> gyroBuilder_; + /** + * .mentraos.ble.Vector3 gyro = 2; + * @return Whether the gyro field is set. + */ + public boolean hasGyro() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .mentraos.ble.Vector3 gyro = 2; + * @return The gyro. + */ + public mentraos.ble.MentraosBle.Vector3 getGyro() { + if (gyroBuilder_ == null) { + return gyro_ == null ? mentraos.ble.MentraosBle.Vector3.getDefaultInstance() : gyro_; + } else { + return gyroBuilder_.getMessage(); + } + } + /** + * .mentraos.ble.Vector3 gyro = 2; + */ + public Builder setGyro(mentraos.ble.MentraosBle.Vector3 value) { + if (gyroBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gyro_ = value; + } else { + gyroBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .mentraos.ble.Vector3 gyro = 2; + */ + public Builder setGyro( + mentraos.ble.MentraosBle.Vector3.Builder builderForValue) { + if (gyroBuilder_ == null) { + gyro_ = builderForValue.build(); + } else { + gyroBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .mentraos.ble.Vector3 gyro = 2; + */ + public Builder mergeGyro(mentraos.ble.MentraosBle.Vector3 value) { + if (gyroBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + gyro_ != null && + gyro_ != mentraos.ble.MentraosBle.Vector3.getDefaultInstance()) { + getGyroBuilder().mergeFrom(value); + } else { + gyro_ = value; + } + } else { + gyroBuilder_.mergeFrom(value); + } + if (gyro_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .mentraos.ble.Vector3 gyro = 2; + */ + public Builder clearGyro() { + bitField0_ = (bitField0_ & ~0x00000002); + gyro_ = null; + if (gyroBuilder_ != null) { + gyroBuilder_.dispose(); + gyroBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .mentraos.ble.Vector3 gyro = 2; + */ + public mentraos.ble.MentraosBle.Vector3.Builder getGyroBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetGyroFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.Vector3 gyro = 2; + */ + public mentraos.ble.MentraosBle.Vector3OrBuilder getGyroOrBuilder() { + if (gyroBuilder_ != null) { + return gyroBuilder_.getMessageOrBuilder(); + } else { + return gyro_ == null ? + mentraos.ble.MentraosBle.Vector3.getDefaultInstance() : gyro_; + } + } + /** + * .mentraos.ble.Vector3 gyro = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.Vector3, mentraos.ble.MentraosBle.Vector3.Builder, mentraos.ble.MentraosBle.Vector3OrBuilder> + internalGetGyroFieldBuilder() { + if (gyroBuilder_ == null) { + gyroBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.Vector3, mentraos.ble.MentraosBle.Vector3.Builder, mentraos.ble.MentraosBle.Vector3OrBuilder>( + getGyro(), + getParentForChildren(), + isClean()); + gyro_ = null; + } + return gyroBuilder_; + } + + private mentraos.ble.MentraosBle.Vector3 mag_; + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.Vector3, mentraos.ble.MentraosBle.Vector3.Builder, mentraos.ble.MentraosBle.Vector3OrBuilder> magBuilder_; + /** + * .mentraos.ble.Vector3 mag = 3; + * @return Whether the mag field is set. + */ + public boolean hasMag() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .mentraos.ble.Vector3 mag = 3; + * @return The mag. + */ + public mentraos.ble.MentraosBle.Vector3 getMag() { + if (magBuilder_ == null) { + return mag_ == null ? mentraos.ble.MentraosBle.Vector3.getDefaultInstance() : mag_; + } else { + return magBuilder_.getMessage(); + } + } + /** + * .mentraos.ble.Vector3 mag = 3; + */ + public Builder setMag(mentraos.ble.MentraosBle.Vector3 value) { + if (magBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mag_ = value; + } else { + magBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .mentraos.ble.Vector3 mag = 3; + */ + public Builder setMag( + mentraos.ble.MentraosBle.Vector3.Builder builderForValue) { + if (magBuilder_ == null) { + mag_ = builderForValue.build(); + } else { + magBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .mentraos.ble.Vector3 mag = 3; + */ + public Builder mergeMag(mentraos.ble.MentraosBle.Vector3 value) { + if (magBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + mag_ != null && + mag_ != mentraos.ble.MentraosBle.Vector3.getDefaultInstance()) { + getMagBuilder().mergeFrom(value); + } else { + mag_ = value; + } + } else { + magBuilder_.mergeFrom(value); + } + if (mag_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * .mentraos.ble.Vector3 mag = 3; + */ + public Builder clearMag() { + bitField0_ = (bitField0_ & ~0x00000004); + mag_ = null; + if (magBuilder_ != null) { + magBuilder_.dispose(); + magBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .mentraos.ble.Vector3 mag = 3; + */ + public mentraos.ble.MentraosBle.Vector3.Builder getMagBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetMagFieldBuilder().getBuilder(); + } + /** + * .mentraos.ble.Vector3 mag = 3; + */ + public mentraos.ble.MentraosBle.Vector3OrBuilder getMagOrBuilder() { + if (magBuilder_ != null) { + return magBuilder_.getMessageOrBuilder(); + } else { + return mag_ == null ? + mentraos.ble.MentraosBle.Vector3.getDefaultInstance() : mag_; + } + } + /** + * .mentraos.ble.Vector3 mag = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.Vector3, mentraos.ble.MentraosBle.Vector3.Builder, mentraos.ble.MentraosBle.Vector3OrBuilder> + internalGetMagFieldBuilder() { + if (magBuilder_ == null) { + magBuilder_ = new com.google.protobuf.SingleFieldBuilder< + mentraos.ble.MentraosBle.Vector3, mentraos.ble.MentraosBle.Vector3.Builder, mentraos.ble.MentraosBle.Vector3OrBuilder>( + getMag(), + getParentForChildren(), + isClean()); + mag_ = null; + } + return magBuilder_; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.ImuData) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.ImuData) + private static final mentraos.ble.MentraosBle.ImuData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.ImuData(); + } + + public static mentraos.ble.MentraosBle.ImuData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImuData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.ImuData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface Vector3OrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.Vector3) + com.google.protobuf.MessageOrBuilder { + + /** + * float x = 1; + * @return The x. + */ + float getX(); + + /** + * float y = 2; + * @return The y. + */ + float getY(); + + /** + * float z = 3; + * @return The z. + */ + float getZ(); + } + /** + * Protobuf type {@code mentraos.ble.Vector3} + */ + public static final class Vector3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.Vector3) + Vector3OrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + Vector3.class.getName()); + } + // Use Vector3.newBuilder() to construct. + private Vector3(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Vector3() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_Vector3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_Vector3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.Vector3.class, mentraos.ble.MentraosBle.Vector3.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private float x_ = 0F; + /** + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private float y_ = 0F; + /** + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + + public static final int Z_FIELD_NUMBER = 3; + private float z_ = 0F; + /** + * float z = 3; + * @return The z. + */ + @java.lang.Override + public float getZ() { + return z_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + output.writeFloat(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + output.writeFloat(2, y_); + } + if (java.lang.Float.floatToRawIntBits(z_) != 0) { + output.writeFloat(3, z_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, y_); + } + if (java.lang.Float.floatToRawIntBits(z_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, z_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof mentraos.ble.MentraosBle.Vector3)) { + return super.equals(obj); + } + mentraos.ble.MentraosBle.Vector3 other = (mentraos.ble.MentraosBle.Vector3) obj; + + if (java.lang.Float.floatToIntBits(getX()) + != java.lang.Float.floatToIntBits( + other.getX())) return false; + if (java.lang.Float.floatToIntBits(getY()) + != java.lang.Float.floatToIntBits( + other.getY())) return false; + if (java.lang.Float.floatToIntBits(getZ()) + != java.lang.Float.floatToIntBits( + other.getZ())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getX()); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getY()); + hash = (37 * hash) + Z_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getZ()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static mentraos.ble.MentraosBle.Vector3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.Vector3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.Vector3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.Vector3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.Vector3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static mentraos.ble.MentraosBle.Vector3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static mentraos.ble.MentraosBle.Vector3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.Vector3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static mentraos.ble.MentraosBle.Vector3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static mentraos.ble.MentraosBle.Vector3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static mentraos.ble.MentraosBle.Vector3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static mentraos.ble.MentraosBle.Vector3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(mentraos.ble.MentraosBle.Vector3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mentraos.ble.Vector3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:mentraos.ble.Vector3) + mentraos.ble.MentraosBle.Vector3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_Vector3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_Vector3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.Vector3.class, mentraos.ble.MentraosBle.Vector3.Builder.class); + } + + // Construct using mentraos.ble.MentraosBle.Vector3.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + x_ = 0F; + y_ = 0F; + z_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_Vector3_descriptor; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.Vector3 getDefaultInstanceForType() { + return mentraos.ble.MentraosBle.Vector3.getDefaultInstance(); + } + + @java.lang.Override + public mentraos.ble.MentraosBle.Vector3 build() { + mentraos.ble.MentraosBle.Vector3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.Vector3 buildPartial() { + mentraos.ble.MentraosBle.Vector3 result = new mentraos.ble.MentraosBle.Vector3(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(mentraos.ble.MentraosBle.Vector3 result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.x_ = x_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.y_ = y_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.z_ = z_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof mentraos.ble.MentraosBle.Vector3) { + return mergeFrom((mentraos.ble.MentraosBle.Vector3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(mentraos.ble.MentraosBle.Vector3 other) { + if (other == mentraos.ble.MentraosBle.Vector3.getDefaultInstance()) return this; + if (java.lang.Float.floatToRawIntBits(other.getX()) != 0) { + setX(other.getX()); + } + if (java.lang.Float.floatToRawIntBits(other.getY()) != 0) { + setY(other.getY()); + } + if (java.lang.Float.floatToRawIntBits(other.getZ()) != 0) { + setZ(other.getZ()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + x_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 21: { + y_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 29: { + z_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private float x_ ; + /** + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + /** + * float x = 1; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(float value) { + + x_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * float x = 1; + * @return This builder for chaining. + */ + public Builder clearX() { + bitField0_ = (bitField0_ & ~0x00000001); + x_ = 0F; + onChanged(); + return this; + } + + private float y_ ; + /** + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + /** + * float y = 2; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(float value) { + + y_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * float y = 2; + * @return This builder for chaining. + */ + public Builder clearY() { + bitField0_ = (bitField0_ & ~0x00000002); + y_ = 0F; + onChanged(); + return this; + } + + private float z_ ; + /** + * float z = 3; + * @return The z. + */ + @java.lang.Override + public float getZ() { + return z_; + } + /** + * float z = 3; + * @param value The z to set. + * @return This builder for chaining. + */ + public Builder setZ(float value) { + + z_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * float z = 3; + * @return This builder for chaining. + */ + public Builder clearZ() { + bitField0_ = (bitField0_ & ~0x00000004); + z_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:mentraos.ble.Vector3) + } + + // @@protoc_insertion_point(class_scope:mentraos.ble.Vector3) + private static final mentraos.ble.MentraosBle.Vector3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new mentraos.ble.MentraosBle.Vector3(); + } + + public static mentraos.ble.MentraosBle.Vector3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Vector3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public mentraos.ble.MentraosBle.Vector3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ButtonEventOrBuilder extends + // @@protoc_insertion_point(interface_extends:mentraos.ble.ButtonEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * .mentraos.ble.ButtonEvent.Button button = 1; + * @return The enum numeric value on the wire for button. + */ + int getButtonValue(); + /** + * .mentraos.ble.ButtonEvent.Button button = 1; + * @return The button. + */ + mentraos.ble.MentraosBle.ButtonEvent.Button getButton(); + + /** + * .mentraos.ble.ButtonEvent.State state = 2; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * .mentraos.ble.ButtonEvent.State state = 2; + * @return The state. + */ + mentraos.ble.MentraosBle.ButtonEvent.State getState(); + } + /** + * Protobuf type {@code mentraos.ble.ButtonEvent} + */ + public static final class ButtonEvent extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:mentraos.ble.ButtonEvent) + ButtonEventOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + ButtonEvent.class.getName()); + } + // Use ButtonEvent.newBuilder() to construct. + private ButtonEvent(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ButtonEvent() { + button_ = 0; + state_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ButtonEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return mentraos.ble.MentraosBle.internal_static_mentraos_ble_ButtonEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + mentraos.ble.MentraosBle.ButtonEvent.class, mentraos.ble.MentraosBle.ButtonEvent.Builder.class); + } + + /** + * Protobuf enum {@code mentraos.ble.ButtonEvent.Button} + */ + public enum Button + implements com.google.protobuf.ProtocolMessageEnum { + /** + * CENTER = 0; + */ + CENTER(0), + /** + * LEFT = 1; + */ + LEFT(1), + /** + * RIGHT = 2; + */ + RIGHT(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + Button.class.getName()); + } + /** + * CENTER = 0; + */ + public static final int CENTER_VALUE = 0; + /** + * LEFT = 1; + */ + public static final int LEFT_VALUE = 1; + /** + * RIGHT = 2; + */ + public static final int RIGHT_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Button valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Button forNumber(int value) { + switch (value) { + case 0: return CENTER; + case 1: return LEFT; + case 2: return RIGHT; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap