aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.PMR/EmbeddedParameters
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-11-23 15:05:29 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-11-23 15:05:29 +0200
commit65020c312f6f8b0792e2ab7c96341d6034ffc640 (patch)
tree393648349b3572cf2aa5baffe8492d9175f2da3f /Software/Visual_Studio/Tango.PMR/EmbeddedParameters
parent14b1b42a4dd14f0fbe44cdf4b5072e4d38ba6f63 (diff)
downloadTango-65020c312f6f8b0792e2ab7c96341d6034ffc640.tar.gz
Tango-65020c312f6f8b0792e2ab7c96341d6034ffc640.zip
Minimal support for light inks on MS.
Color to int generator util.
Diffstat (limited to 'Software/Visual_Studio/Tango.PMR/EmbeddedParameters')
-rw-r--r--Software/Visual_Studio/Tango.PMR/EmbeddedParameters/AlarmHandlingItem.cs132
1 files changed, 36 insertions, 96 deletions
diff --git a/Software/Visual_Studio/Tango.PMR/EmbeddedParameters/AlarmHandlingItem.cs b/Software/Visual_Studio/Tango.PMR/EmbeddedParameters/AlarmHandlingItem.cs
index 0d957f6be..25f40a731 100644
--- a/Software/Visual_Studio/Tango.PMR/EmbeddedParameters/AlarmHandlingItem.cs
+++ b/Software/Visual_Studio/Tango.PMR/EmbeddedParameters/AlarmHandlingItem.cs
@@ -24,21 +24,20 @@ namespace Tango.PMR.EmbeddedParameters {
string.Concat(
"ChdBbGFybUhhbmRsaW5nSXRlbS5wcm90bxIcVGFuZ28uUE1SLkVtYmVkZGVk",
"UGFyYW1ldGVycxoVQWxhcm1Tb3VyY2VUeXBlLnByb3RvGhZEZWJ1Z0xvZ0Nh",
- "dGVnb3J5LnByb3RvGg9FdmVudFR5cGUucHJvdG8igwMKEUFsYXJtSGFuZGxp",
+ "dGVnb3J5LnByb3RvGg9FdmVudFR5cGUucHJvdG8i2wIKEUFsYXJtSGFuZGxp",
"bmdJdGVtEkIKC0FsYXJtU291cm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c2IGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Tango.PMR.EmbeddedParameters.AlarmSourceTypeReflection.Descriptor, global::Tango.PMR.Debugging.DebugLogCategoryReflection.Descriptor, global::Tango.PMR.Diagnostics.EventTypeReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.EmbeddedParameters.AlarmHandlingItem), global::Tango.PMR.EmbeddedParameters.AlarmHandlingItem.Parser, new[]{ "AlarmSource", "Frequency", "DeviceId", "ModuleDeviceId", "AlarmValue", "AlarmDirection", "Severity", "Predecessor", "DebounceValue", "EventType", "EventName", "IsPersistent" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.EmbeddedParameters.AlarmHandlingItem), global::Tango.PMR.EmbeddedParameters.AlarmHandlingItem.Parser, new[]{ "AlarmSource", "DeviceId", "ModuleDeviceId", "AlarmValue", "AlarmDirection", "Severity", "DebounceValue", "EventType", "EventName", "IsPersistent" }, null, null, null)
}));
}
#endregion
@@ -70,13 +69,11 @@ namespace Tango.PMR.EmbeddedParameters {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public AlarmHandlingItem(AlarmHandlingItem other) : this() {
alarmSource_ = other.alarmSource_;
- frequency_ = other.frequency_;
deviceId_ = other.deviceId_;
moduleDeviceId_ = other.moduleDeviceId_;
alarmValue_ = other.alarmValue_;
alarmDirection_ = other.alarmDirection_;
severity_ = other.severity_;
- predecessor_ = other.predecessor_;
debounceValue_ = other.debounceValue_;
eventType_ = other.eventType_;
eventName_ = other.eventName_;
@@ -99,22 +96,8 @@ namespace Tango.PMR.EmbeddedParameters {
}
}
- /// <summary>Field number for the "Frequency" field.</summary>
- public const int FrequencyFieldNumber = 2;
- private uint frequency_;
- /// <summary>
- ///1/10/100/1000
- /// </summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint Frequency {
- get { return frequency_; }
- set {
- frequency_ = value;
- }
- }
-
/// <summary>Field number for the "DeviceId" field.</summary>
- public const int DeviceIdFieldNumber = 3;
+ public const int DeviceIdFieldNumber = 2;
private uint deviceId_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public uint DeviceId {
@@ -125,7 +108,7 @@ namespace Tango.PMR.EmbeddedParameters {
}
/// <summary>Field number for the "ModuleDeviceId" field.</summary>
- public const int ModuleDeviceIdFieldNumber = 4;
+ public const int ModuleDeviceIdFieldNumber = 3;
private uint moduleDeviceId_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public uint ModuleDeviceId {
@@ -136,7 +119,7 @@ namespace Tango.PMR.EmbeddedParameters {
}
/// <summary>Field number for the "AlarmValue" field.</summary>
- public const int AlarmValueFieldNumber = 5;
+ public const int AlarmValueFieldNumber = 4;
private uint alarmValue_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public uint AlarmValue {
@@ -147,7 +130,7 @@ namespace Tango.PMR.EmbeddedParameters {
}
/// <summary>Field number for the "AlarmDirection" field.</summary>
- public const int AlarmDirectionFieldNumber = 6;
+ public const int AlarmDirectionFieldNumber = 5;
private bool alarmDirection_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool AlarmDirection {
@@ -158,7 +141,7 @@ namespace Tango.PMR.EmbeddedParameters {
}
/// <summary>Field number for the "Severity" field.</summary>
- public const int SeverityFieldNumber = 7;
+ public const int SeverityFieldNumber = 6;
private global::Tango.PMR.Debugging.DebugLogCategory severity_ = 0;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Tango.PMR.Debugging.DebugLogCategory Severity {
@@ -168,19 +151,8 @@ namespace Tango.PMR.EmbeddedParameters {
}
}
- /// <summary>Field number for the "Predecessor" field.</summary>
- public const int PredecessorFieldNumber = 8;
- private uint predecessor_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint Predecessor {
- get { return predecessor_; }
- set {
- predecessor_ = value;
- }
- }
-
/// <summary>Field number for the "DebounceValue" field.</summary>
- public const int DebounceValueFieldNumber = 9;
+ public const int DebounceValueFieldNumber = 7;
private uint debounceValue_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public uint DebounceValue {
@@ -191,7 +163,7 @@ namespace Tango.PMR.EmbeddedParameters {
}
/// <summary>Field number for the "EventType" field.</summary>
- public const int EventTypeFieldNumber = 10;
+ public const int EventTypeFieldNumber = 8;
private global::Tango.PMR.Diagnostics.EventType eventType_ = 0;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Tango.PMR.Diagnostics.EventType EventType {
@@ -202,7 +174,7 @@ namespace Tango.PMR.EmbeddedParameters {
}
/// <summary>Field number for the "EventName" field.</summary>
- public const int EventNameFieldNumber = 11;
+ public const int EventNameFieldNumber = 9;
private string eventName_ = "";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string EventName {
@@ -213,7 +185,7 @@ namespace Tango.PMR.EmbeddedParameters {
}
/// <summary>Field number for the "IsPersistent" field.</summary>
- public const int IsPersistentFieldNumber = 12;
+ public const int IsPersistentFieldNumber = 10;
private bool isPersistent_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool IsPersistent {
@@ -237,13 +209,11 @@ namespace Tango.PMR.EmbeddedParameters {
return true;
}
if (AlarmSource != other.AlarmSource) return false;
- if (Frequency != other.Frequency) return false;
if (DeviceId != other.DeviceId) return false;
if (ModuleDeviceId != other.ModuleDeviceId) return false;
if (AlarmValue != other.AlarmValue) return false;
if (AlarmDirection != other.AlarmDirection) return false;
if (Severity != other.Severity) return false;
- if (Predecessor != other.Predecessor) return false;
if (DebounceValue != other.DebounceValue) return false;
if (EventType != other.EventType) return false;
if (EventName != other.EventName) return false;
@@ -255,13 +225,11 @@ namespace Tango.PMR.EmbeddedParameters {
public override int GetHashCode() {
int hash = 1;
if (AlarmSource != 0) hash ^= AlarmSource.GetHashCode();
- if (Frequency != 0) hash ^= Frequency.GetHashCode();
if (DeviceId != 0) hash ^= DeviceId.GetHashCode();
if (ModuleDeviceId != 0) hash ^= ModuleDeviceId.GetHashCode();
if (AlarmValue != 0) hash ^= AlarmValue.GetHashCode();
if (AlarmDirection != false) hash ^= AlarmDirection.GetHashCode();
if (Severity != 0) hash ^= Severity.GetHashCode();
- if (Predecessor != 0) hash ^= Predecessor.GetHashCode();
if (DebounceValue != 0) hash ^= DebounceValue.GetHashCode();
if (EventType != 0) hash ^= EventType.GetHashCode();
if (EventName.Length != 0) hash ^= EventName.GetHashCode();
@@ -280,48 +248,40 @@ namespace Tango.PMR.EmbeddedParameters {
output.WriteRawTag(8);
output.WriteEnum((int) AlarmSource);
}
- if (Frequency != 0) {
- output.WriteRawTag(16);
- output.WriteUInt32(Frequency);
- }
if (DeviceId != 0) {
- output.WriteRawTag(24);
+ output.WriteRawTag(16);
output.WriteUInt32(DeviceId);
}
if (ModuleDeviceId != 0) {
- output.WriteRawTag(32);
+ output.WriteRawTag(24);
output.WriteUInt32(ModuleDeviceId);
}
if (AlarmValue != 0) {
- output.WriteRawTag(40);
+ output.WriteRawTag(32);
output.WriteUInt32(AlarmValue);
}
if (AlarmDirection != false) {
- output.WriteRawTag(48);
+ output.WriteRawTag(40);
output.WriteBool(AlarmDirection);
}
if (Severity != 0) {
- output.WriteRawTag(56);
+ output.WriteRawTag(48);
output.WriteEnum((int) Severity);
}
- if (Predecessor != 0) {
- output.WriteRawTag(64);
- output.WriteUInt32(Predecessor);
- }
if (DebounceValue != 0) {
- output.WriteRawTag(72);
+ output.WriteRawTag(56);
output.WriteUInt32(DebounceValue);
}
if (EventType != 0) {
- output.WriteRawTag(80);
+ output.WriteRawTag(64);
output.WriteEnum((int) EventType);
}
if (EventName.Length != 0) {
- output.WriteRawTag(90);
+ output.WriteRawTag(74);
output.WriteString(EventName);
}
if (IsPersistent != false) {
- output.WriteRawTag(96);
+ output.WriteRawTag(80);
output.WriteBool(IsPersistent);
}
}
@@ -332,9 +292,6 @@ namespace Tango.PMR.EmbeddedParameters {
if (AlarmSource != 0) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) AlarmSource);
}
- if (Frequency != 0) {
- size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Frequency);
- }
if (DeviceId != 0) {
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(DeviceId);
}
@@ -350,9 +307,6 @@ namespace Tango.PMR.EmbeddedParameters {
if (Severity != 0) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Severity);
}
- if (Predecessor != 0) {
- size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Predecessor);
- }
if (DebounceValue != 0) {
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(DebounceValue);
}
@@ -376,9 +330,6 @@ namespace Tango.PMR.EmbeddedParameters {
if (other.AlarmSource != 0) {
AlarmSource = other.AlarmSource;
}
- if (other.Frequency != 0) {
- Frequency = other.Frequency;
- }
if (other.DeviceId != 0) {
DeviceId = other.DeviceId;
}
@@ -394,9 +345,6 @@ namespace Tango.PMR.EmbeddedParameters {
if (other.Severity != 0) {
Severity = other.Severity;
}
- if (other.Predecessor != 0) {
- Predecessor = other.Predecessor;
- }
if (other.DebounceValue != 0) {
DebounceValue = other.DebounceValue;
}
@@ -424,46 +372,38 @@ namespace Tango.PMR.EmbeddedParameters {
break;
}
case 16: {
- Frequency = input.ReadUInt32();
- break;
- }
- case 24: {
DeviceId = input.ReadUInt32();
break;
}
- case 32: {
+ case 24: {
ModuleDeviceId = input.ReadUInt32();
break;
}
- case 40: {
+ case 32: {
AlarmValue = input.ReadUInt32();
break;
}
- case 48: {
+ case 40: {
AlarmDirection = input.ReadBool();
break;
}
- case 56: {
+ case 48: {
severity_ = (global::Tango.PMR.Debugging.DebugLogCategory) input.ReadEnum();
break;
}
- case 64: {
- Predecessor = input.ReadUInt32();
- break;
- }
- case 72: {
+ case 56: {
DebounceValue = input.ReadUInt32();
break;
}
- case 80: {
+ case 64: {
eventType_ = (global::Tango.PMR.Diagnostics.EventType) input.ReadEnum();
break;
}
- case 90: {
+ case 74: {
EventName = input.ReadString();
break;
}
- case 96: {
+ case 80: {
IsPersistent = input.ReadBool();
break;
}