Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into llelievr/firmware-tool
Browse files Browse the repository at this point in the history
  • Loading branch information
ImUrX committed Mar 22, 2024
2 parents a39f0b1 + a5fd6ae commit 0efac35
Show file tree
Hide file tree
Showing 61 changed files with 2,691 additions and 91 deletions.
477 changes: 444 additions & 33 deletions protocol/cpp/include/solarxr_protocol/generated/all_generated.h

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ private TrackerStatus() { }
public static final int BUSY = 3;
public static final int ERROR = 4;
public static final int OCCLUDED = 5;
public static final int TIMED_OUT = 6;

public static final String[] names = { "NONE", "DISCONNECTED", "OK", "BUSY", "ERROR", "OCCLUDED", };
public static final String[] names = { "NONE", "DISCONNECTED", "OK", "BUSY", "ERROR", "OCCLUDED", "TIMED_OUT", };

public static String name(int e) { return names[e]; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ private ImuType() { }
public static final int BNO086 = 7;
public static final int BMI160 = 8;
public static final int ICM20948 = 9;
public static final int ICM42688 = 10;

public static final String[] names = { "Other", "MPU9250", "MPU6500", "BNO080", "BNO085", "BNO055", "MPU6050", "BNO086", "BMI160", "ICM20948", };
public static final String[] names = { "Other", "MPU9250", "MPU6500", "BNO080", "BNO085", "BNO055", "MPU6050", "BNO086", "BMI160", "ICM20948", "ICM42688", };

public static String name(int e) { return names[e]; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ private McuType() { }
public static final int Other = 0;
public static final int ESP8266 = 1;
public static final int ESP32 = 2;

public static final String[] names = { "Other", "ESP8266", "ESP32", };

public static String name(int e) { return names[e]; }
public static final int OWOTRACK_ANDROID = 3;
public static final int WRANGLER = 4;
public static final int OWOTRACK_IOS = 5;
public static final int ESP32_C3 = 6;
public static final int MOCOPI = 7;
public static final int DEV_RESERVED = 250;
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// automatically generated by the FlatBuffers compiler, do not modify

package solarxr_protocol.rpc;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

@SuppressWarnings("unused")
public final class AddUnknownDeviceRequest extends Table {
public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); }
public static AddUnknownDeviceRequest getRootAsAddUnknownDeviceRequest(ByteBuffer _bb) { return getRootAsAddUnknownDeviceRequest(_bb, new AddUnknownDeviceRequest()); }
public static AddUnknownDeviceRequest getRootAsAddUnknownDeviceRequest(ByteBuffer _bb, AddUnknownDeviceRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
public AddUnknownDeviceRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public String macAddress() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; }
public ByteBuffer macAddressAsByteBuffer() { return __vector_as_bytebuffer(4, 1); }
public ByteBuffer macAddressInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); }

public static int createAddUnknownDeviceRequest(FlatBufferBuilder builder,
int macAddressOffset) {
builder.startTable(1);
AddUnknownDeviceRequest.addMacAddress(builder, macAddressOffset);
return AddUnknownDeviceRequest.endAddUnknownDeviceRequest(builder);
}

public static void startAddUnknownDeviceRequest(FlatBufferBuilder builder) { builder.startTable(1); }
public static void addMacAddress(FlatBufferBuilder builder, int macAddressOffset) { builder.addOffset(0, macAddressOffset, 0); }
public static int endAddUnknownDeviceRequest(FlatBufferBuilder builder) {
int o = builder.endTable();
return o;
}

public static final class Vector extends BaseVector {
public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }

public AddUnknownDeviceRequest get(int j) { return get(new AddUnknownDeviceRequest(), j); }
public AddUnknownDeviceRequest get(AddUnknownDeviceRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }
}
public AddUnknownDeviceRequestT unpack() {
AddUnknownDeviceRequestT _o = new AddUnknownDeviceRequestT();
unpackTo(_o);
return _o;
}
public void unpackTo(AddUnknownDeviceRequestT _o) {
String _oMacAddress = macAddress();
_o.setMacAddress(_oMacAddress);
}
public static int pack(FlatBufferBuilder builder, AddUnknownDeviceRequestT _o) {
if (_o == null) return 0;
int _macAddress = _o.getMacAddress() == null ? 0 : builder.createString(_o.getMacAddress());
return createAddUnknownDeviceRequest(
builder,
_macAddress);
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// automatically generated by the FlatBuffers compiler, do not modify

package solarxr_protocol.rpc;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

public class AddUnknownDeviceRequestT {
private String macAddress;

public String getMacAddress() { return macAddress; }

public void setMacAddress(String macAddress) { this.macAddress = macAddress; }


public AddUnknownDeviceRequestT() {
this.macAddress = null;
}
}

59 changes: 59 additions & 0 deletions protocol/java/src/solarxr_protocol/rpc/ForgetDeviceRequest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// automatically generated by the FlatBuffers compiler, do not modify

package solarxr_protocol.rpc;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

@SuppressWarnings("unused")
public final class ForgetDeviceRequest extends Table {
public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); }
public static ForgetDeviceRequest getRootAsForgetDeviceRequest(ByteBuffer _bb) { return getRootAsForgetDeviceRequest(_bb, new ForgetDeviceRequest()); }
public static ForgetDeviceRequest getRootAsForgetDeviceRequest(ByteBuffer _bb, ForgetDeviceRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
public ForgetDeviceRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public String macAddress() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; }
public ByteBuffer macAddressAsByteBuffer() { return __vector_as_bytebuffer(4, 1); }
public ByteBuffer macAddressInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); }

public static int createForgetDeviceRequest(FlatBufferBuilder builder,
int macAddressOffset) {
builder.startTable(1);
ForgetDeviceRequest.addMacAddress(builder, macAddressOffset);
return ForgetDeviceRequest.endForgetDeviceRequest(builder);
}

public static void startForgetDeviceRequest(FlatBufferBuilder builder) { builder.startTable(1); }
public static void addMacAddress(FlatBufferBuilder builder, int macAddressOffset) { builder.addOffset(0, macAddressOffset, 0); }
public static int endForgetDeviceRequest(FlatBufferBuilder builder) {
int o = builder.endTable();
return o;
}

public static final class Vector extends BaseVector {
public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }

public ForgetDeviceRequest get(int j) { return get(new ForgetDeviceRequest(), j); }
public ForgetDeviceRequest get(ForgetDeviceRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }
}
public ForgetDeviceRequestT unpack() {
ForgetDeviceRequestT _o = new ForgetDeviceRequestT();
unpackTo(_o);
return _o;
}
public void unpackTo(ForgetDeviceRequestT _o) {
String _oMacAddress = macAddress();
_o.setMacAddress(_oMacAddress);
}
public static int pack(FlatBufferBuilder builder, ForgetDeviceRequestT _o) {
if (_o == null) return 0;
int _macAddress = _o.getMacAddress() == null ? 0 : builder.createString(_o.getMacAddress());
return createForgetDeviceRequest(
builder,
_macAddress);
}
}

22 changes: 22 additions & 0 deletions protocol/java/src/solarxr_protocol/rpc/ForgetDeviceRequestT.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// automatically generated by the FlatBuffers compiler, do not modify

package solarxr_protocol.rpc;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

public class ForgetDeviceRequestT {
private String macAddress;

public String getMacAddress() { return macAddress; }

public void setMacAddress(String macAddress) { this.macAddress = macAddress; }


public ForgetDeviceRequestT() {
this.macAddress = null;
}
}

14 changes: 10 additions & 4 deletions protocol/java/src/solarxr_protocol/rpc/RpcMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,17 @@ private RpcMessage() { }
public static final byte AutoBoneStopRecordingRequest = 49;
public static final byte AutoBoneCancelRecordingRequest = 50;
public static final byte SaveFileNotification = 51;
public static final byte FirmwareUpdateRequest = 52;
public static final byte FirmwareUpdateStatusResponse = 53;
public static final byte FirmwareUpdateStopQueuesRequest = 54;
public static final byte TrackingPauseStateRequest = 52;
public static final byte TrackingPauseStateResponse = 53;
public static final byte SerialTrackerGetWifiScanRequest = 54;
public static final byte UnknownDeviceHandshakeNotification = 55;
public static final byte AddUnknownDeviceRequest = 56;
public static final byte ForgetDeviceRequest = 57;
public static final byte FirmwareUpdateRequest = 58;
public static final byte FirmwareUpdateStatusResponse = 59;
public static final byte FirmwareUpdateStopQueuesRequest = 60;

public static final String[] names = { "NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", "FirmwareUpdateRequest", "FirmwareUpdateStatusResponse", "FirmwareUpdateStopQueuesRequest", };
public static final String[] names = { "NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", "TrackingPauseStateRequest", "TrackingPauseStateResponse", "SerialTrackerGetWifiScanRequest", "UnknownDeviceHandshakeNotification", "AddUnknownDeviceRequest", "ForgetDeviceRequest", "FirmwareUpdateRequest", "FirmwareUpdateStatusResponse", "FirmwareUpdateStopQueuesRequest", };

public static String name(int e) { return names[e]; }
}
Expand Down
24 changes: 24 additions & 0 deletions protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,30 @@ public void unpackTo(RpcMessageHeaderT _o) {
_oMessageValue = message(new solarxr_protocol.rpc.SaveFileNotification());
_oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SaveFileNotification) _oMessageValue).unpack() : null);
break;
case solarxr_protocol.rpc.RpcMessage.TrackingPauseStateRequest:
_oMessageValue = message(new solarxr_protocol.rpc.TrackingPauseStateRequest());
_oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.TrackingPauseStateRequest) _oMessageValue).unpack() : null);
break;
case solarxr_protocol.rpc.RpcMessage.TrackingPauseStateResponse:
_oMessageValue = message(new solarxr_protocol.rpc.TrackingPauseStateResponse());
_oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.TrackingPauseStateResponse) _oMessageValue).unpack() : null);
break;
case solarxr_protocol.rpc.RpcMessage.SerialTrackerGetWifiScanRequest:
_oMessageValue = message(new solarxr_protocol.rpc.SerialTrackerGetWifiScanRequest());
_oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SerialTrackerGetWifiScanRequest) _oMessageValue).unpack() : null);
break;
case solarxr_protocol.rpc.RpcMessage.UnknownDeviceHandshakeNotification:
_oMessageValue = message(new solarxr_protocol.rpc.UnknownDeviceHandshakeNotification());
_oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.UnknownDeviceHandshakeNotification) _oMessageValue).unpack() : null);
break;
case solarxr_protocol.rpc.RpcMessage.AddUnknownDeviceRequest:
_oMessageValue = message(new solarxr_protocol.rpc.AddUnknownDeviceRequest());
_oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.AddUnknownDeviceRequest) _oMessageValue).unpack() : null);
break;
case solarxr_protocol.rpc.RpcMessage.ForgetDeviceRequest:
_oMessageValue = message(new solarxr_protocol.rpc.ForgetDeviceRequest());
_oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ForgetDeviceRequest) _oMessageValue).unpack() : null);
break;
case solarxr_protocol.rpc.RpcMessage.FirmwareUpdateRequest:
_oMessageValue = message(new solarxr_protocol.rpc.FirmwareUpdateRequest());
_oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.FirmwareUpdateRequest) _oMessageValue).unpack() : null);
Expand Down
12 changes: 12 additions & 0 deletions protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ public RpcMessageUnion() {
public solarxr_protocol.rpc.AutoBoneStopRecordingRequestT asAutoBoneStopRecordingRequest() { return (solarxr_protocol.rpc.AutoBoneStopRecordingRequestT) value; }
public solarxr_protocol.rpc.AutoBoneCancelRecordingRequestT asAutoBoneCancelRecordingRequest() { return (solarxr_protocol.rpc.AutoBoneCancelRecordingRequestT) value; }
public solarxr_protocol.rpc.SaveFileNotificationT asSaveFileNotification() { return (solarxr_protocol.rpc.SaveFileNotificationT) value; }
public solarxr_protocol.rpc.TrackingPauseStateRequestT asTrackingPauseStateRequest() { return (solarxr_protocol.rpc.TrackingPauseStateRequestT) value; }
public solarxr_protocol.rpc.TrackingPauseStateResponseT asTrackingPauseStateResponse() { return (solarxr_protocol.rpc.TrackingPauseStateResponseT) value; }
public solarxr_protocol.rpc.SerialTrackerGetWifiScanRequestT asSerialTrackerGetWifiScanRequest() { return (solarxr_protocol.rpc.SerialTrackerGetWifiScanRequestT) value; }
public solarxr_protocol.rpc.UnknownDeviceHandshakeNotificationT asUnknownDeviceHandshakeNotification() { return (solarxr_protocol.rpc.UnknownDeviceHandshakeNotificationT) value; }
public solarxr_protocol.rpc.AddUnknownDeviceRequestT asAddUnknownDeviceRequest() { return (solarxr_protocol.rpc.AddUnknownDeviceRequestT) value; }
public solarxr_protocol.rpc.ForgetDeviceRequestT asForgetDeviceRequest() { return (solarxr_protocol.rpc.ForgetDeviceRequestT) value; }
public solarxr_protocol.rpc.FirmwareUpdateRequestT asFirmwareUpdateRequest() { return (solarxr_protocol.rpc.FirmwareUpdateRequestT) value; }
public solarxr_protocol.rpc.FirmwareUpdateStatusResponseT asFirmwareUpdateStatusResponse() { return (solarxr_protocol.rpc.FirmwareUpdateStatusResponseT) value; }
public solarxr_protocol.rpc.FirmwareUpdateStopQueuesRequestT asFirmwareUpdateStopQueuesRequest() { return (solarxr_protocol.rpc.FirmwareUpdateStopQueuesRequestT) value; }
Expand Down Expand Up @@ -129,6 +135,12 @@ public static int pack(FlatBufferBuilder builder, RpcMessageUnion _o) {
case RpcMessage.AutoBoneStopRecordingRequest: return solarxr_protocol.rpc.AutoBoneStopRecordingRequest.pack(builder, _o.asAutoBoneStopRecordingRequest());
case RpcMessage.AutoBoneCancelRecordingRequest: return solarxr_protocol.rpc.AutoBoneCancelRecordingRequest.pack(builder, _o.asAutoBoneCancelRecordingRequest());
case RpcMessage.SaveFileNotification: return solarxr_protocol.rpc.SaveFileNotification.pack(builder, _o.asSaveFileNotification());
case RpcMessage.TrackingPauseStateRequest: return solarxr_protocol.rpc.TrackingPauseStateRequest.pack(builder, _o.asTrackingPauseStateRequest());
case RpcMessage.TrackingPauseStateResponse: return solarxr_protocol.rpc.TrackingPauseStateResponse.pack(builder, _o.asTrackingPauseStateResponse());
case RpcMessage.SerialTrackerGetWifiScanRequest: return solarxr_protocol.rpc.SerialTrackerGetWifiScanRequest.pack(builder, _o.asSerialTrackerGetWifiScanRequest());
case RpcMessage.UnknownDeviceHandshakeNotification: return solarxr_protocol.rpc.UnknownDeviceHandshakeNotification.pack(builder, _o.asUnknownDeviceHandshakeNotification());
case RpcMessage.AddUnknownDeviceRequest: return solarxr_protocol.rpc.AddUnknownDeviceRequest.pack(builder, _o.asAddUnknownDeviceRequest());
case RpcMessage.ForgetDeviceRequest: return solarxr_protocol.rpc.ForgetDeviceRequest.pack(builder, _o.asForgetDeviceRequest());
case RpcMessage.FirmwareUpdateRequest: return solarxr_protocol.rpc.FirmwareUpdateRequest.pack(builder, _o.asFirmwareUpdateRequest());
case RpcMessage.FirmwareUpdateStatusResponse: return solarxr_protocol.rpc.FirmwareUpdateStatusResponse.pack(builder, _o.asFirmwareUpdateStatusResponse());
case RpcMessage.FirmwareUpdateStopQueuesRequest: return solarxr_protocol.rpc.FirmwareUpdateStopQueuesRequest.pack(builder, _o.asFirmwareUpdateStopQueuesRequest());
Expand Down
Loading

0 comments on commit 0efac35

Please sign in to comment.