3using System.Threading.Tasks;
19 private string name =
string.Empty;
20 private string className =
string.Empty;
21 private string serialNumber =
string.Empty;
22 private string meterNumber =
string.Empty;
23 private string meterLocation =
string.Empty;
24 private string manufacturerDomain =
string.Empty;
25 private string model =
string.Empty;
26 private string productUrl =
string.Empty;
28 private string country =
string.Empty;
29 private string region =
string.Empty;
30 private string city =
string.Empty;
31 private string area =
string.Empty;
32 private string street =
string.Empty;
33 private string streetNr =
string.Empty;
34 private string building =
string.Empty;
35 private string apartment =
string.Empty;
36 private string room =
string.Empty;
38 private double? latitude =
null;
39 private double? longitude =
null;
40 private double? altitude =
null;
41 private double? version =
null;
54 [Page(16,
"Identity", 0)]
55 [Header(28,
"Name:", 10)]
56 [ToolTip(29,
"An additional name can be provided here.")]
57 [DefaultValueStringEmpty]
61 set => this.name = value;
67 [Page(16,
"Identity", 0)]
68 [Header(31,
"Class:", 20)]
69 [ToolTip(32,
"Class of node.")]
70 [DefaultValueStringEmpty]
73 get => this.className;
74 set => this.className = value;
80 [Page(16,
"Identity", 0)]
81 [Header(34,
"Serial number:", 30)]
82 [ToolTip(35,
"Serial number of device.")]
83 [DefaultValueStringEmpty]
86 get => this.serialNumber;
87 set => this.serialNumber = value;
93 [Page(16,
"Identity", 0)]
94 [Header(37,
"Meter number:", 40)]
95 [ToolTip(38,
"Additional identity of meter.")]
96 [DefaultValueStringEmpty]
99 get => this.meterNumber;
100 set => this.meterNumber = value;
106 [Page(16,
"Identity", 0)]
107 [Header(40,
"Meter location:", 50)]
108 [ToolTip(41,
"Identity of the location of the meter.")]
109 [DefaultValueStringEmpty]
112 get => this.meterLocation;
113 set => this.meterLocation = value;
119 [Page(16,
"Identity", 0)]
120 [Header(43,
"Manufacturer domain:", 60)]
121 [ToolTip(44,
"A domain controlled by the manufacturer.")]
122 [DefaultValueStringEmpty]
125 get => this.manufacturerDomain;
126 set => this.manufacturerDomain = value;
132 [Page(16,
"Identity", 0)]
133 [Header(46,
"Model:", 70)]
134 [ToolTip(47,
"Model name of the device.")]
135 [DefaultValueStringEmpty]
139 set => this.model = value;
145 [Page(16,
"Identity", 0)]
146 [Header(78,
"Version:", 80)]
147 [ToolTip(79,
"Version number of model of device.")]
152 set => this.version = value;
158 [Page(16,
"Identity", 0)]
159 [Header(49,
"Product URL:", 90)]
160 [ToolTip(50,
"A URL with more information about the product.")]
161 [DefaultValueStringEmpty]
164 get => this.productUrl;
165 set => this.productUrl = value;
171 [Page(51,
"Location", 10)]
172 [Header(52,
"Country:", 10)]
173 [ToolTip(53,
"Country of device.")]
174 [DefaultValueStringEmpty]
178 set => this.country = value;
184 [Page(51,
"Location", 10)]
185 [Header(55,
"Region:", 20)]
186 [ToolTip(56,
"Region of device.")]
187 [DefaultValueStringEmpty]
191 set => this.region = value;
197 [Page(51,
"Location", 10)]
198 [Header(58,
"City:", 30)]
199 [ToolTip(59,
"City of device.")]
200 [DefaultValueStringEmpty]
204 set => this.city = value;
210 [Page(51,
"Location", 10)]
211 [Header(61,
"Area:", 40)]
212 [ToolTip(62,
"Area of device.")]
213 [DefaultValueStringEmpty]
217 set => this.area = value;
223 [Page(51,
"Location", 10)]
224 [Header(64,
"Street:", 50)]
225 [ToolTip(65,
"Street device resides on.")]
226 [DefaultValueStringEmpty]
230 set => this.street = value;
236 [Page(51,
"Location", 10)]
237 [Header(67,
"Street number:", 60)]
238 [ToolTip(68,
"Street number where device resides.")]
239 [DefaultValueStringEmpty]
242 get => this.streetNr;
243 set => this.streetNr = value;
253 if (
string.IsNullOrEmpty(this.streetNr))
255 else if (
string.IsNullOrEmpty(this.street))
256 return this.streetNr;
258 return this.street +
" " + this.streetNr;
265 [Page(51,
"Location", 10)]
266 [Header(69,
"Building:", 70)]
267 [ToolTip(70,
"Building device resides in.")]
268 [DefaultValueStringEmpty]
271 get => this.building;
272 set => this.building = value;
278 [Page(51,
"Location", 10)]
279 [Header(72,
"Apartment:", 80)]
280 [ToolTip(73,
"Apartment device resides in.")]
281 [DefaultValueStringEmpty]
284 get => this.apartment;
285 set => this.apartment = value;
291 [Page(51,
"Location", 10)]
292 [Header(75,
"Room:", 90)]
293 [ToolTip(76,
"Room device resides in.")]
294 [DefaultValueStringEmpty]
298 set => this.room = value;
304 [Page(81,
"Position", 20)]
305 [Header(82,
"Latitude:", 10)]
306 [ToolTip(83,
"Latitude of device.")]
311 get => this.latitude;
312 set => this.latitude = value;
318 [Page(81,
"Position", 20)]
319 [Header(84,
"Longitude:", 20)]
320 [ToolTip(85,
"Longitude of device.")]
325 get => this.longitude;
326 set => this.longitude = value;
332 [Page(81,
"Position", 20)]
333 [Header(86,
"Altitude:", 30)]
334 [ToolTip(87,
"Altitude of device.")]
338 get => this.altitude;
339 set => this.altitude = value;
350 LinkedList<Parameter> Result = await base.GetDisplayableParametersAsync(
Language, Caller) as LinkedList<Parameter>;
352 if (!
string.IsNullOrEmpty(this.name))
355 if (!
string.IsNullOrEmpty(this.className))
358 if (!
string.IsNullOrEmpty(this.serialNumber))
361 if (!
string.IsNullOrEmpty(this.meterNumber))
364 if (!
string.IsNullOrEmpty(this.meterLocation))
367 if (!
string.IsNullOrEmpty(this.manufacturerDomain))
370 if (!
string.IsNullOrEmpty(this.model))
373 if (this.version.HasValue)
376 if (!
string.IsNullOrEmpty(this.country))
379 if (!
string.IsNullOrEmpty(this.region))
382 if (!
string.IsNullOrEmpty(this.city))
385 if (!
string.IsNullOrEmpty(this.area))
389 if (!
string.IsNullOrEmpty(s))
392 if (!
string.IsNullOrEmpty(this.building))
395 if (!
string.IsNullOrEmpty(this.apartment))
398 if (!
string.IsNullOrEmpty(this.room))
401 if (this.latitude.HasValue)
404 if (this.longitude.HasValue)
407 if (this.altitude.HasValue)
417 public override async Task<KeyValuePair<string, object>[]>
GetMetaData()
419 List<KeyValuePair<string, object>> Result =
new List<KeyValuePair<string, object>>(await base.GetMetaData());
421 if (!
string.IsNullOrEmpty(this.name))
422 Result.Add(
new KeyValuePair<string, object>(
"NAME",
this.name));
424 if (!
string.IsNullOrEmpty(this.className))
425 Result.Add(
new KeyValuePair<string, object>(
"CLASS",
this.className));
427 if (!
string.IsNullOrEmpty(this.serialNumber))
428 Result.Add(
new KeyValuePair<string, object>(
"SN",
this.serialNumber));
430 if (!
string.IsNullOrEmpty(this.meterNumber))
431 Result.Add(
new KeyValuePair<string, object>(
"MNR",
this.meterNumber));
433 if (!
string.IsNullOrEmpty(this.meterLocation))
434 Result.Add(
new KeyValuePair<string, object>(
"MLOC",
this.meterLocation));
436 if (!
string.IsNullOrEmpty(this.manufacturerDomain))
437 Result.Add(
new KeyValuePair<string, object>(
"MAN",
this.manufacturerDomain));
439 if (!
string.IsNullOrEmpty(this.model))
440 Result.Add(
new KeyValuePair<string, object>(
"MODEL",
this.model));
442 if (this.version.HasValue)
443 Result.Add(
new KeyValuePair<string, object>(
"V", this.version.Value));
445 if (!
string.IsNullOrEmpty(this.productUrl))
446 Result.Add(
new KeyValuePair<string, object>(
"PURL",
this.productUrl));
448 if (!
string.IsNullOrEmpty(this.country))
449 Result.Add(
new KeyValuePair<string, object>(
"COUNTRY",
this.country));
451 if (!
string.IsNullOrEmpty(this.region))
452 Result.Add(
new KeyValuePair<string, object>(
"REGION",
this.region));
454 if (!
string.IsNullOrEmpty(this.city))
455 Result.Add(
new KeyValuePair<string, object>(
"CITY",
this.city));
457 if (!
string.IsNullOrEmpty(this.area))
458 Result.Add(
new KeyValuePair<string, object>(
"AREA",
this.area));
460 if (!
string.IsNullOrEmpty(this.street))
461 Result.Add(
new KeyValuePair<string, object>(
"STREET",
this.street));
463 if (!
string.IsNullOrEmpty(this.streetNr))
464 Result.Add(
new KeyValuePair<string, object>(
"STREETNR",
this.streetNr));
466 if (!
string.IsNullOrEmpty(this.building))
467 Result.Add(
new KeyValuePair<string, object>(
"BLD",
this.building));
469 if (!
string.IsNullOrEmpty(this.apartment))
470 Result.Add(
new KeyValuePair<string, object>(
"APT",
this.apartment));
472 if (!
string.IsNullOrEmpty(this.room))
473 Result.Add(
new KeyValuePair<string, object>(
"ROOM",
this.room));
475 if (this.latitude.HasValue)
476 Result.Add(
new KeyValuePair<string, object>(
"LAT", this.latitude.Value));
478 if (this.longitude.HasValue)
479 Result.Add(
new KeyValuePair<string, object>(
"LON", this.longitude.Value));
481 if (this.altitude.HasValue)
482 Result.Add(
new KeyValuePair<string, object>(
"ALT", this.altitude.Value));
484 return Result.ToArray();
496 if (!
string.IsNullOrEmpty(this.name))
499 if (!
string.IsNullOrEmpty(this.className))
502 if (!
string.IsNullOrEmpty(this.serialNumber))
505 if (!
string.IsNullOrEmpty(this.meterNumber))
508 if (!
string.IsNullOrEmpty(this.meterLocation))
511 if (!
string.IsNullOrEmpty(this.manufacturerDomain))
514 if (!
string.IsNullOrEmpty(this.model))
517 if (this.version.HasValue)
520 if (!
string.IsNullOrEmpty(this.country))
523 if (!
string.IsNullOrEmpty(this.region))
526 if (!
string.IsNullOrEmpty(this.city))
529 if (!
string.IsNullOrEmpty(this.area))
533 if (!
string.IsNullOrEmpty(s))
536 if (!
string.IsNullOrEmpty(this.building))
539 if (!
string.IsNullOrEmpty(this.apartment))
542 if (!
string.IsNullOrEmpty(this.room))
545 if (this.latitude.HasValue)
548 if (this.longitude.HasValue)
551 if (this.altitude.HasValue)
Helps with parsing of commong data types.
static byte GetNrDecimals(double x)
Calculates the number of decimals of a floating-point number.
A chunked list is a linked list of chunks of objects of type T .
void Add(T Item)
Adds an item to the collection.
Contains information about a language.
Task< string > GetStringAsync(Type Type, int Id, string Default)
Gets the string value of a string ID. If no such string exists, a string is created with the default ...
Base class for all metering nodes.
Defines the Metering Topology data source. This data source contains a tree structure of persistent r...
Tokens available in request.
Represents a physical quantity value.
Represents a string value.
FieldQoS
Field Quality of Service flags
FieldType
Field Type flags