Skip to content

Commit

Permalink
Merge pull request #80 from meshtastic/wip
Browse files Browse the repository at this point in the history
Protobufs
  • Loading branch information
thebentern authored Jun 21, 2024
2 parents 90a5e47 + 23be71e commit 6a1efd6
Show file tree
Hide file tree
Showing 5 changed files with 1,674 additions and 136 deletions.
115 changes: 80 additions & 35 deletions Meshtastic/Generated/Admin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static AdminReflection() {
"ChZtZXNodGFzdGljL2FkbWluLnByb3RvEgptZXNodGFzdGljGhhtZXNodGFz",
"dGljL2NoYW5uZWwucHJvdG8aF21lc2h0YXN0aWMvY29uZmlnLnByb3RvGiJt",
"ZXNodGFzdGljL2Nvbm5lY3Rpb25fc3RhdHVzLnByb3RvGhVtZXNodGFzdGlj",
"L21lc2gucHJvdG8aHm1lc2h0YXN0aWMvbW9kdWxlX2NvbmZpZy5wcm90byLO",
"L21lc2gucHJvdG8aHm1lc2h0YXN0aWMvbW9kdWxlX2NvbmZpZy5wcm90byLj",
"EQoMQWRtaW5NZXNzYWdlEh0KE2dldF9jaGFubmVsX3JlcXVlc3QYASABKA1I",
"ABIzChRnZXRfY2hhbm5lbF9yZXNwb25zZRgCIAEoCzITLm1lc2h0YXN0aWMu",
"Q2hhbm5lbEgAEhsKEWdldF9vd25lcl9yZXF1ZXN0GAMgASgISAASLgoSZ2V0",
Expand All @@ -52,43 +52,44 @@ static AdminReflection() {
"EyABKAhIABJcCiZnZXRfbm9kZV9yZW1vdGVfaGFyZHdhcmVfcGluc19yZXNw",
"b25zZRgUIAEoCzIqLm1lc2h0YXN0aWMuTm9kZVJlbW90ZUhhcmR3YXJlUGlu",
"c1Jlc3BvbnNlSAASIAoWZW50ZXJfZGZ1X21vZGVfcmVxdWVzdBgVIAEoCEgA",
"Eh0KE2RlbGV0ZV9maWxlX3JlcXVlc3QYFiABKAlIABIlCglzZXRfb3duZXIY",
"ICABKAsyEC5tZXNodGFzdGljLlVzZXJIABIqCgtzZXRfY2hhbm5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WFROT1RJRl9DT05GSUcQAhIXChNTVE9S",
"RUZPUldBUkRfQ09ORklHEAMSFAoQUkFOR0VURVNUX0NPTkZJRxAEEhQKEFRF",
"TEVNRVRSWV9DT05GSUcQBRIUChBDQU5ORURNU0dfQ09ORklHEAYSEAoMQVVE",
"SU9fQ09ORklHEAcSGQoVUkVNT1RFSEFSRFdBUkVfQ09ORklHEAgSFwoTTkVJ",
"R0hCT1JJTkZPX0NPTkZJRxAJEhoKFkFNQklFTlRMSUdIVElOR19DT05GSUcQ",
"ChIaChZERVRFQ1RJT05TRU5TT1JfQ09ORklHEAsSFQoRUEFYQ09VTlRFUl9D",
"T05GSUcQDEIRCg9wYXlsb2FkX3ZhcmlhbnQiWwoNSGFtUGFyYW1ldGVycxIR",
"CgljYWxsX3NpZ24YASABKAkSEAoIdHhfcG93ZXIYAiABKAUSEQoJZnJlcXVl",
"bmN5GAMgASgCEhIKCnNob3J0X25hbWUYBCABKAkiZgoeTm9kZVJlbW90ZUhh",
"cmR3YXJlUGluc1Jlc3BvbnNlEkQKGW5vZGVfcmVtb3RlX2hhcmR3YXJlX3Bp",
"bnMYASADKAsyIS5tZXNodGFzdGljLk5vZGVSZW1vdGVIYXJkd2FyZVBpbkJg",
"ChNjb20uZ2Vla3N2aWxsZS5tZXNoQgtBZG1pblByb3Rvc1oiZ2l0aHViLmNv",
"bS9tZXNodGFzdGljL2dvL2dlbmVyYXRlZKoCFE1lc2h0YXN0aWMuUHJvdG9i",
"dWZzugIAYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Meshtastic.Protobufs.ChannelReflection.Descriptor, global::Meshtastic.Protobufs.ConfigReflection.Descriptor, global::Meshtastic.Protobufs.ConnectionStatusReflection.Descriptor, global::Meshtastic.Protobufs.MeshReflection.Descriptor, global::Meshtastic.Protobufs.ModuleConfigReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.AdminMessage), global::Meshtastic.Protobufs.AdminMessage.Parser, new[]{ "GetChannelRequest", "GetChannelResponse", "GetOwnerRequest", "GetOwnerResponse", "GetConfigRequest", "GetConfigResponse", "GetModuleConfigRequest", "GetModuleConfigResponse", "GetCannedMessageModuleMessagesRequest", "GetCannedMessageModuleMessagesResponse", "GetDeviceMetadataRequest", "GetDeviceMetadataResponse", "GetRingtoneRequest", "GetRingtoneResponse", "GetDeviceConnectionStatusRequest", "GetDeviceConnectionStatusResponse", "SetHamMode", "GetNodeRemoteHardwarePinsRequest", "GetNodeRemoteHardwarePinsResponse", "EnterDfuModeRequest", "DeleteFileRequest", "SetOwner", "SetChannel", "SetConfig", "SetModuleConfig", "SetCannedMessageModuleMessages", "SetRingtoneMessage", "RemoveByNodenum", "SetFavoriteNode", "RemoveFavoriteNode", "SetFixedPosition", "RemoveFixedPosition", "BeginEditSettings", "CommitEditSettings", "RebootOtaSeconds", "ExitSimulator", "RebootSeconds", "ShutdownSeconds", "FactoryReset", "NodedbReset" }, new[]{ "PayloadVariant" }, new[]{ typeof(global::Meshtastic.Protobufs.AdminMessage.Types.ConfigType), typeof(global::Meshtastic.Protobufs.AdminMessage.Types.ModuleConfigType) }, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.AdminMessage), global::Meshtastic.Protobufs.AdminMessage.Parser, new[]{ "GetChannelRequest", "GetChannelResponse", "GetOwnerRequest", "GetOwnerResponse", "GetConfigRequest", "GetConfigResponse", "GetModuleConfigRequest", "GetModuleConfigResponse", "GetCannedMessageModuleMessagesRequest", "GetCannedMessageModuleMessagesResponse", "GetDeviceMetadataRequest", "GetDeviceMetadataResponse", "GetRingtoneRequest", "GetRingtoneResponse", "GetDeviceConnectionStatusRequest", "GetDeviceConnectionStatusResponse", "SetHamMode", "GetNodeRemoteHardwarePinsRequest", "GetNodeRemoteHardwarePinsResponse", "EnterDfuModeRequest", "DeleteFileRequest", "SetScale", "SetOwner", "SetChannel", "SetConfig", "SetModuleConfig", "SetCannedMessageModuleMessages", "SetRingtoneMessage", "RemoveByNodenum", "SetFavoriteNode", "RemoveFavoriteNode", "SetFixedPosition", "RemoveFixedPosition", "BeginEditSettings", "CommitEditSettings", "RebootOtaSeconds", "ExitSimulator", "RebootSeconds", "ShutdownSeconds", "FactoryReset", "NodedbReset" }, new[]{ "PayloadVariant" }, new[]{ typeof(global::Meshtastic.Protobufs.AdminMessage.Types.ConfigType), typeof(global::Meshtastic.Protobufs.AdminMessage.Types.ModuleConfigType) }, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.HamParameters), global::Meshtastic.Protobufs.HamParameters.Parser, new[]{ "CallSign", "TxPower", "Frequency", "ShortName" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.NodeRemoteHardwarePinsResponse), global::Meshtastic.Protobufs.NodeRemoteHardwarePinsResponse.Parser, new[]{ "NodeRemoteHardwarePins" }, null, null, null, null)
}));
Expand Down Expand Up @@ -201,6 +202,9 @@ public AdminMessage(AdminMessage other) : this() {
case PayloadVariantOneofCase.DeleteFileRequest:
DeleteFileRequest = other.DeleteFileRequest;
break;
case PayloadVariantOneofCase.SetScale:
SetScale = other.SetScale;
break;
case PayloadVariantOneofCase.SetOwner:
SetOwner = other.SetOwner.Clone();
break;
Expand Down Expand Up @@ -607,6 +611,22 @@ public string DeleteFileRequest {
}
}

/// <summary>Field number for the "set_scale" field.</summary>
public const int SetScaleFieldNumber = 23;
/// <summary>
///
/// Set zero and offset for scale chips
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public uint SetScale {
get { return payloadVariantCase_ == PayloadVariantOneofCase.SetScale ? (uint) payloadVariant_ : 0; }
set {
payloadVariant_ = value;
payloadVariantCase_ = PayloadVariantOneofCase.SetScale;
}
}

/// <summary>Field number for the "set_owner" field.</summary>
public const int SetOwnerFieldNumber = 32;
/// <summary>
Expand Down Expand Up @@ -943,6 +963,7 @@ public enum PayloadVariantOneofCase {
GetNodeRemoteHardwarePinsResponse = 20,
EnterDfuModeRequest = 21,
DeleteFileRequest = 22,
SetScale = 23,
SetOwner = 32,
SetChannel = 33,
SetConfig = 34,
Expand Down Expand Up @@ -1013,6 +1034,7 @@ public bool Equals(AdminMessage other) {
if (!object.Equals(GetNodeRemoteHardwarePinsResponse, other.GetNodeRemoteHardwarePinsResponse)) return false;
if (EnterDfuModeRequest != other.EnterDfuModeRequest) return false;
if (DeleteFileRequest != other.DeleteFileRequest) return false;
if (SetScale != other.SetScale) return false;
if (!object.Equals(SetOwner, other.SetOwner)) return false;
if (!object.Equals(SetChannel, other.SetChannel)) return false;
if (!object.Equals(SetConfig, other.SetConfig)) return false;
Expand Down Expand Up @@ -1061,6 +1083,7 @@ public override int GetHashCode() {
if (payloadVariantCase_ == PayloadVariantOneofCase.GetNodeRemoteHardwarePinsResponse) hash ^= GetNodeRemoteHardwarePinsResponse.GetHashCode();
if (payloadVariantCase_ == PayloadVariantOneofCase.EnterDfuModeRequest) hash ^= EnterDfuModeRequest.GetHashCode();
if (payloadVariantCase_ == PayloadVariantOneofCase.DeleteFileRequest) hash ^= DeleteFileRequest.GetHashCode();
if (payloadVariantCase_ == PayloadVariantOneofCase.SetScale) hash ^= SetScale.GetHashCode();
if (payloadVariantCase_ == PayloadVariantOneofCase.SetOwner) hash ^= SetOwner.GetHashCode();
if (payloadVariantCase_ == PayloadVariantOneofCase.SetChannel) hash ^= SetChannel.GetHashCode();
if (payloadVariantCase_ == PayloadVariantOneofCase.SetConfig) hash ^= SetConfig.GetHashCode();
Expand Down Expand Up @@ -1183,6 +1206,10 @@ public void WriteTo(pb::CodedOutputStream output) {
output.WriteRawTag(178, 1);
output.WriteString(DeleteFileRequest);
}
if (payloadVariantCase_ == PayloadVariantOneofCase.SetScale) {
output.WriteRawTag(184, 1);
output.WriteUInt32(SetScale);
}
if (payloadVariantCase_ == PayloadVariantOneofCase.SetOwner) {
output.WriteRawTag(130, 2);
output.WriteMessage(SetOwner);
Expand Down Expand Up @@ -1353,6 +1380,10 @@ public void WriteTo(pb::CodedOutputStream output) {
output.WriteRawTag(178, 1);
output.WriteString(DeleteFileRequest);
}
if (payloadVariantCase_ == PayloadVariantOneofCase.SetScale) {
output.WriteRawTag(184, 1);
output.WriteUInt32(SetScale);
}
if (payloadVariantCase_ == PayloadVariantOneofCase.SetOwner) {
output.WriteRawTag(130, 2);
output.WriteMessage(SetOwner);
Expand Down Expand Up @@ -1502,6 +1533,9 @@ public int CalculateSize() {
if (payloadVariantCase_ == PayloadVariantOneofCase.DeleteFileRequest) {
size += 2 + pb::CodedOutputStream.ComputeStringSize(DeleteFileRequest);
}
if (payloadVariantCase_ == PayloadVariantOneofCase.SetScale) {
size += 2 + pb::CodedOutputStream.ComputeUInt32Size(SetScale);
}
if (payloadVariantCase_ == PayloadVariantOneofCase.SetOwner) {
size += 2 + pb::CodedOutputStream.ComputeMessageSize(SetOwner);
}
Expand Down Expand Up @@ -1659,6 +1693,9 @@ public void MergeFrom(AdminMessage other) {
case PayloadVariantOneofCase.DeleteFileRequest:
DeleteFileRequest = other.DeleteFileRequest;
break;
case PayloadVariantOneofCase.SetScale:
SetScale = other.SetScale;
break;
case PayloadVariantOneofCase.SetOwner:
if (SetOwner == null) {
SetOwner = new global::Meshtastic.Protobufs.User();
Expand Down Expand Up @@ -1874,6 +1911,10 @@ public void MergeFrom(pb::CodedInputStream input) {
DeleteFileRequest = input.ReadString();
break;
}
case 184: {
SetScale = input.ReadUInt32();
break;
}
case 258: {
global::Meshtastic.Protobufs.User subBuilder = new global::Meshtastic.Protobufs.User();
if (payloadVariantCase_ == PayloadVariantOneofCase.SetOwner) {
Expand Down Expand Up @@ -2116,6 +2157,10 @@ public void MergeFrom(pb::CodedInputStream input) {
DeleteFileRequest = input.ReadString();
break;
}
case 184: {
SetScale = input.ReadUInt32();
break;
}
case 258: {
global::Meshtastic.Protobufs.User subBuilder = new global::Meshtastic.Protobufs.User();
if (payloadVariantCase_ == PayloadVariantOneofCase.SetOwner) {
Expand Down
Loading

0 comments on commit 6a1efd6

Please sign in to comment.