aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.PMR/EmbeddedParameters/AlarmHandlingItem.cs
blob: 25f40a731f758d5fe342ad318cb8a4749aa814ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: AlarmHandlingItem.proto
#pragma warning disable 1591, 0612, 3021
#region Designer generated code

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Tango.PMR.EmbeddedParameters {

  /// <summary>Holder for reflection information generated from AlarmHandlingItem.proto</summary>
  public static partial class AlarmHandlingItemReflection {

    #region Descriptor
    /// <summary>File descriptor for AlarmHandlingItem.proto</summary>
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static AlarmHandlingItemReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "ChdBbGFybUhhbmRsaW5nSXRlbS5wcm90bxIcVGFuZ28uUE1SLkVtYmVkZGVk",
            "UGFyYW1ldGVycxoVQWxhcm1Tb3VyY2VUeXBlLnByb3RvGhZEZWJ1Z0xvZ0Nh",
            "dGVnb3J5LnByb3RvGg9FdmVudFR5cGUucHJvdG8i2wIKEUFsYXJtSGFuZGxp",
            "bmdJdGVtEkIKC0FsYXJtU291cmNlGAEgASgOMi0uVGFuZ28uUE1SLkVtYmVk",
            "ZGVkUGFyYW1ldGVycy5BbGFybVNvdXJjZVR5cGUSEAoIRGV2aWNlSWQYAiAB",
            "KA0SFgoOTW9kdWxlRGV2aWNlSWQYAyABKA0SEgoKQWxhcm1WYWx1ZRgEIAEo",
            "DRIWCg5BbGFybURpcmVjdGlvbhgFIAEoCBI3CghTZXZlcml0eRgGIAEoDjIl",
            "LlRhbmdvLlBNUi5EZWJ1Z2dpbmcuRGVidWdMb2dDYXRlZ29yeRIVCg1EZWJv",
            "dW5jZVZhbHVlGAcgASgNEjMKCUV2ZW50VHlwZRgIIAEoDjIgLlRhbmdvLlBN",
            "Ui5EaWFnbm9zdGljcy5FdmVudFR5cGUSEQoJRXZlbnROYW1lGAkgASgJEhQK",
            "DElzUGVyc2lzdGVudBgKIAEoCEIoCiZjb20udHdpbmUudGFuZ28ucG1yLmVt",
            "YmVkZGVkcGFyYW1ldGVyc2IGcHJvdG8z"));
      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", "DeviceId", "ModuleDeviceId", "AlarmValue", "AlarmDirection", "Severity", "DebounceValue", "EventType", "EventName", "IsPersistent" }, null, null, null)
          }));
    }
    #endregion

  }
  #region Messages
  public sealed partial class AlarmHandlingItem : pb::IMessage<AlarmHandlingItem> {
    private static readonly pb::MessageParser<AlarmHandlingItem> _parser = new pb::MessageParser<AlarmHandlingItem>(() => new AlarmHandlingItem());
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<AlarmHandlingItem> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Tango.PMR.EmbeddedParameters.AlarmHandlingItemReflection.Descriptor.MessageTypes[0]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public AlarmHandlingItem() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public AlarmHandlingItem(AlarmHandlingItem other) : this() {
      alarmSource_ = other.alarmSource_;
      deviceId_ = other.deviceId_;
      moduleDeviceId_ = other.moduleDeviceId_;
      alarmValue_ = other.alarmValue_;
      alarmDirection_ = other.alarmDirection_;
      severity_ = other.severity_;
      debounceValue_ = other.debounceValue_;
      eventType_ = other.eventType_;
      eventName_ = other.eventName_;
      isPersistent_ = other.isPersistent_;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public AlarmHandlingItem Clone() {
      return new AlarmHandlingItem(this);
    }

    /// <summary>Field number for the "AlarmSource" field.</summary>
    public const int AlarmSourceFieldNumber = 1;
    private global::Tango.PMR.EmbeddedParameters.AlarmSourceType alarmSource_ = 0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Tango.PMR.EmbeddedParameters.AlarmSourceType AlarmSource {
      get { return alarmSource_; }
      set {
        alarmSource_ = value;
      }
    }

    /// <summary>Field number for the "DeviceId" field.</summary>
    public const int DeviceIdFieldNumber = 2;
    private uint deviceId_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public uint DeviceId {
      get { return deviceId_; }
      set {
        deviceId_ = value;
      }
    }

    /// <summary>Field number for the "ModuleDeviceId" field.</summary>
    public const int ModuleDeviceIdFieldNumber = 3;
    private uint moduleDeviceId_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public uint ModuleDeviceId {
      get { return moduleDeviceId_; }
      set {
        moduleDeviceId_ = value;
      }
    }

    /// <summary>Field number for the "AlarmValue" field.</summary>
    public const int AlarmValueFieldNumber = 4;
    private uint alarmValue_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public uint AlarmValue {
      get { return alarmValue_; }
      set {
        alarmValue_ = value;
      }
    }

    /// <summary>Field number for the "AlarmDirection" field.</summary>
    public const int AlarmDirectionFieldNumber = 5;
    private bool alarmDirection_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool AlarmDirection {
      get { return alarmDirection_; }
      set {
        alarmDirection_ = value;
      }
    }

    /// <summary>Field number for the "Severity" field.</summary>
    public const int SeverityFieldNumber = 6;
    private global::Tango.PMR.Debugging.DebugLogCategory severity_ = 0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Tango.PMR.Debugging.DebugLogCategory Severity {
      get { return severity_; }
      set {
        severity_ = value;
      }
    }

    /// <summary>Field number for the "DebounceValue" field.</summary>
    public const int DebounceValueFieldNumber = 7;
    private uint debounceValue_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public uint DebounceValue {
      get { return debounceValue_; }
      set {
        debounceValue_ = value;
      }
    }

    /// <summary>Field number for the "EventType" field.</summary>
    public const int EventTypeFieldNumber = 8;
    private global::Tango.PMR.Diagnostics.EventType eventType_ = 0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Tango.PMR.Diagnostics.EventType EventType {
      get { return eventType_; }
      set {
        eventType_ = value;
      }
    }

    /// <summary>Field number for the "EventName" field.</summary>
    public const int EventNameFieldNumber = 9;
    private string eventName_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string EventName {
      get { return eventName_; }
      set {
        eventName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "IsPersistent" field.</summary>
    public const int IsPersistentFieldNumber = 10;
    private bool isPersistent_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool IsPersistent {
      get { return isPersistent_; }
      set {
        isPersistent_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as AlarmHandlingItem);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(AlarmHandlingItem other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (AlarmSource != other.AlarmSource) 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 (DebounceValue != other.DebounceValue) return false;
      if (EventType != other.EventType) return false;
      if (EventName != other.EventName) return false;
      if (IsPersistent != other.IsPersistent) return false;
      return true;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (AlarmSource != 0) hash ^= AlarmSource.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 (DebounceValue != 0) hash ^= DebounceValue.GetHashCode();
      if (EventType != 0) hash ^= EventType.GetHashCode();
      if (EventName.Length != 0) hash ^= EventName.GetHashCode();
      if (IsPersistent != false) hash ^= IsPersistent.GetHashCode();
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void WriteTo(pb::CodedOutputStream output) {
      if (AlarmSource != 0) {
        output.WriteRawTag(8);
        output.WriteEnum((int) AlarmSource);
      }
      if (DeviceId != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(DeviceId);
      }
      if (ModuleDeviceId != 0) {
        output.WriteRawTag(24);
        output.WriteUInt32(ModuleDeviceId);
      }
      if (AlarmValue != 0) {
        output.WriteRawTag(32);
        output.WriteUInt32(AlarmValue);
      }
      if (AlarmDirection != false) {
        output.WriteRawTag(40);
        output.WriteBool(AlarmDirection);
      }
      if (Severity != 0) {
        output.WriteRawTag(48);
        output.WriteEnum((int) Severity);
      }
      if (DebounceValue != 0) {
        output.WriteRawTag(56);
        output.WriteUInt32(DebounceValue);
      }
      if (EventType != 0) {
        output.WriteRawTag(64);
        output.WriteEnum((int) EventType);
      }
      if (EventName.Length != 0) {
        output.WriteRawTag(74);
        output.WriteString(EventName);
      }
      if (IsPersistent != false) {
        output.WriteRawTag(80);
        output.WriteBool(IsPersistent);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (AlarmSource != 0) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) AlarmSource);
      }
      if (DeviceId != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(DeviceId);
      }
      if (ModuleDeviceId != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(ModuleDeviceId);
      }
      if (AlarmValue != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(AlarmValue);
      }
      if (AlarmDirection != false) {
        size += 1 + 1;
      }
      if (Severity != 0) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Severity);
      }
      if (DebounceValue != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(DebounceValue);
      }
      if (EventType != 0) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EventType);
      }
      if (EventName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(EventName);
      }
      if (IsPersistent != false) {
        size += 1 + 1;
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(AlarmHandlingItem other) {
      if (other == null) {
        return;
      }
      if (other.AlarmSource != 0) {
        AlarmSource = other.AlarmSource;
      }
      if (other.DeviceId != 0) {
        DeviceId = other.DeviceId;
      }
      if (other.ModuleDeviceId != 0) {
        ModuleDeviceId = other.ModuleDeviceId;
      }
      if (other.AlarmValue != 0) {
        AlarmValue = other.AlarmValue;
      }
      if (other.AlarmDirection != false) {
        AlarmDirection = other.AlarmDirection;
      }
      if (other.Severity != 0) {
        Severity = other.Severity;
      }
      if (other.DebounceValue != 0) {
        DebounceValue = other.DebounceValue;
      }
      if (other.EventType != 0) {
        EventType = other.EventType;
      }
      if (other.EventName.Length != 0) {
        EventName = other.EventName;
      }
      if (other.IsPersistent != false) {
        IsPersistent = other.IsPersistent;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 8: {
            alarmSource_ = (global::Tango.PMR.EmbeddedParameters.AlarmSourceType) input.ReadEnum();
            break;
          }
          case 16: {
            DeviceId = input.ReadUInt32();
            break;
          }
          case 24: {
            ModuleDeviceId = input.ReadUInt32();
            break;
          }
          case 32: {
            AlarmValue = input.ReadUInt32();
            break;
          }
          case 40: {
            AlarmDirection = input.ReadBool();
            break;
          }
          case 48: {
            severity_ = (global::Tango.PMR.Debugging.DebugLogCategory) input.ReadEnum();
            break;
          }
          case 56: {
            DebounceValue = input.ReadUInt32();
            break;
          }
          case 64: {
            eventType_ = (global::Tango.PMR.Diagnostics.EventType) input.ReadEnum();
            break;
          }
          case 74: {
            EventName = input.ReadString();
            break;
          }
          case 80: {
            IsPersistent = input.ReadBool();
            break;
          }
        }
      }
    }

  }

  #endregion

}

#endregion Designer generated code