forked from klauweg/vitalk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vito_parameter.c
695 lines (593 loc) · 18.4 KB
/
vito_parameter.c
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
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <termios.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <string.h>
#include <stdint.h>
#include <time.h>
#include <assert.h>
#include "vito_parameter.h"
#include "vito_io.h"
#include "fehlerliste.h"
#define CACHE_TIME 6
// Das prologue() Makro wird verwendet, um den Anfang der
// Parameterfunktionen zu bauen:
#define prologue() \
static time_t old_time = 0; \
uint8_t vitomem[30]; \
time_t new_time = time(NULL) / (CACHE_TIME); \
if ( new_time > old_time ) \
{
// Das epilogue() Makro wird verwendet, um das Ende der
// Parameterfunktionen zu bauen:
#define epilogue() \
old_time = new_time; \
} \
return cache;
// OBACHT:
// wenn in den vito_read() Aufrufen der Parameterfunktionen ein
// Fehler auftritt (-1), muss gleich mit return beendet werden,
// damit old_time=new_time nicht erreicht wird und beim naechsten
// Aufruf ein fehlerhafter Wert aus dem Cache statt einem Fehler
// zurueckgegeben wird.
////////////////////////// PARAMETERFUNKTIONEN ////////////////////
/* -------------------------------- */
const char * const read_deviceid( void )
{
static char cache[10];
prologue()
if ( vito_read( 0x00f8, 2, vitomem ) < 0 )
return "NULL";
// Normalerweise sind die Parameter in Little Endian
// Byteorder, aber bei der Deviceid hat sich offenbar
// die umgekehrte Interpretation durchgesetzt:
sprintf( cache, "0x%4x", (vitomem[0] << 8) + vitomem[1] );
epilogue()
}
/* -------------------------------- */
const char * const read_systemtime( void )
{
static char cache[16];
prologue()
if ( vito_read( 0x088e, 8, vitomem ) < 0 )
return "NULL";
sprintf( cache, "%02X%02X%02X%02X%02X%02X%02X%02X", vitomem[0], vitomem[1], vitomem[2], vitomem[3], vitomem[4], vitomem[5], vitomem[6], vitomem[7] );
epilogue()
}
/* -------------------------------- */
const char * const write_systemtime( const char * value_str )
{
uint8_t vito_date[8];
time_t tt;
struct tm* t;
time(&tt);
t = localtime(&tt);
vito_date[0] = TOBCD((t->tm_year + 1900) / 100);
vito_date[1] = TOBCD(t->tm_year - 100 ); // according to the range settable on the Vitodens LCD frontpanel
vito_date[2] = TOBCD(t->tm_mon + 1);
vito_date[3] = TOBCD(t->tm_mday);
vito_date[4] = TOBCD(t->tm_wday);
vito_date[5] = TOBCD(t->tm_hour);
vito_date[6] = TOBCD(t->tm_min);
vito_date[7] = TOBCD(t->tm_sec);
if ( vito_write(0x088e, 8, vito_date) < 0)
{
return "Vitodens communication Error on setting systemtime";
}
else
{
return "OK";
}
}
/* -------------------------------- */
const char * const read_mode( void )
{
static char cache[5];
prologue()
if ( vito_read( 0x2323, 1, vitomem ) < 0 )
return "NULL";
sprintf( cache, "%u", vitomem[0] );
epilogue()
}
/* -------------------------------- */
const char * const write_mode( const char * value_str )
{
uint8_t content[3];
int mode;
mode = atoi( value_str );
// Dauernd reduziert und dauernd normal unterstuetzt meine Vitodens offenbar nicht:
if ( mode < 0 || mode > 2 )
return "Illegal Mode!";
content[0] = mode & 0xff; // unnoetig, aber deutlicher
if ( vito_write(0x2323, 1, content) < 0 )
return "Vitodens communication Error";
else
return "OK";
}
/* -------------------------------- */
const char * const read_mode_text( void )
{
const char * const mode = read_mode();
if ( strcmp(mode,"NULL") == 0)
return "NULL";
switch ( atoi(mode) )
{
case 0: return "Abschaltbetrieb";
case 1: return "Nur Warmwasser";
case 2: return "Heizen und Warmwasser";
default: return "UNKNOWN";
}
}
/* -------------------------------- */
// Das Auslesen der Fehlerliste ist etwas konfus, denn in dem
// vito.xml file von ceteris paribus werden 9 byte pro Eintrag
// gelesen. Ich sehe den Sinn aber nicht? Ich muss mal noch beobachten was passiert
// wenn mehr als ein Eintrag in der Fehlerliste steht!
const char * const read_errors( void )
{
static char cache[50];
prologue()
int i;
// Die 10 Fehlermeldungen einlesen:
for ( i=0; i <= 9; i++)
{
if ( vito_read( 0x7507 + (i*0x0009), 1, vitomem ) < 0 )
return "NULL";
sprintf( cache + (4*i), "%03u,", vitomem[0] );
}
cache[39]='\0'; //letztes Komma ueberschreiben
epilogue()
}
/* -------------------------------- */
// Die 10 Fehlerspeicherplaetze als Textstrings zurueckgeben:
const char * const read_errors_text( void )
{
static char cache[80*10];
char zeile[80];
const char * errors;
int n_error;
int i;
errors = read_errors();
if ( strcmp( errors, "NULL" ) == 0 )
return "NULL";
cache[0] = '\0';
for ( i = 0; i <= 9; i++ ) // 10 Fehler
{
n_error = atoi(errors + (i*4));
assert ( n_error >= 0 && n_error <= 255 );
sprintf( zeile, "0x%02x %s\n", n_error, fehlerliste[n_error] );
strcat( cache, zeile );
}
return cache;
}
//////////////////// KESSEL
/* -------------------------------- */
const char * const read_abgas_temp( void )
{
static char cache[6];
prologue()
if ( vito_read( 0x0808, 2, vitomem) < 0 )
return "NULL";
sprintf( cache, "%3.2f", ( vitomem[0] + (vitomem[1] << 8)) / 10.0 );
epilogue()
}
/* -------------------------------- */
const char * const read_k_ist_temp( void )
{
static char cache[6];
prologue()
if ( vito_read( 0x0802, 2, vitomem) < 0 )
return "NULL";
sprintf( cache, "%3.2f", ( vitomem[0] + (vitomem[1] << 8)) / 10.0 );
epilogue()
}
const char * const read_k_ist_temp_tp( void )
{
static char cache[6];
prologue()
if ( vito_read( 0x0810, 2, vitomem) < 0 )
return "NULL";
sprintf( cache, "%3.2f", ( vitomem[0] + (vitomem[1] << 8)) / 10.0 );
epilogue()
}
const char * const read_k_soll_temp( void )
{
static char cache[6];
prologue()
if ( vito_read( 0x555a, 2, vitomem) < 0 )
return "NULL";
sprintf( cache, "%3.2f", ( vitomem[0] + (vitomem[1] << 8)) / 10.0 );
epilogue()
}
//////////////////// WARMWASSER
/* -------------------------------- */
const char * const read_ww_soll_temp( void)
{
static char cache[6];
prologue()
if ( vito_read( 0x6300, 1, vitomem) < 0 )
return "NULL";
sprintf( cache, "%u", vitomem[0] );
epilogue()
}
/* -------------------------------- */
const char * const write_ww_soll_temp( const char *value_str )
{
uint8_t content[3];
int temp;
temp = atoi( value_str );
if ( temp < 5 || temp > 60 )
return "WW_soll_temp: range exceeded!";
content[0] = temp & 0xff; // unnoetig, aber deutlicher
if ( vito_write(0x6300, 1, content) < 0 )
return "Vitodens communication Error";
else
return "OK";
}
/* -------------------------------- */
const char * const read_ww_offset( void)
{
static char cache[6];
prologue()
if ( vito_read( 0x6760, 1, vitomem) < 0 )
return "NULL";
sprintf( cache, "%u", vitomem[0] );
epilogue()
}
/* -------------------------------- */
const char * const read_ww_ist_temp_tp( void )
{
static char cache[6];
prologue()
if ( vito_read( 0x0812, 2, vitomem) < 0 )
return "NULL";
sprintf( cache, "%3.2f", ( vitomem[0] + (vitomem[1] << 8)) / 10.0 );
epilogue()
}
/* -------------------------------- */
const char * const read_ww_ist_temp( void )
{
static char cache[6];
prologue()
if ( vito_read( 0x0804, 2, vitomem) < 0 )
return "NULL";
sprintf( cache, "%3.2f", ( vitomem[0] + (vitomem[1] << 8)) / 10.0 );
epilogue()
}
/////////////////// AUSSENTEMPERATUR
/* -------------------------------- */
const char * const read_outdoor_temp_tp( void )
{
static char cache[6];
prologue()
if ( vito_read( 0x5525, 2, vitomem) < 0 )
return "NULL";
sprintf( cache, "%3.2f", ((int16_t)( vitomem[0] + (vitomem[1] << 8))) / 10.0 );
epilogue()
}
/* -------------------------------- */
const char * const read_outdoor_temp_smooth( void )
{
static char cache[6];
prologue()
if ( vito_read( 0x5527, 2, vitomem) < 0 )
return "NULL";
sprintf( cache, "%3.2f", ((int16_t)( vitomem[0] + (vitomem[1] << 8))) / 10.0 );
epilogue()
}
/* -------------------------------- */
const char * const read_outdoor_temp( void )
{
static char cache[6];
prologue()
if ( vito_read( 0x0800, 2, vitomem) < 0 )
return "NULL";
sprintf( cache, "%3.2f", ((int16_t)( vitomem[0] + (vitomem[1] << 8))) / 10.0 );
epilogue()
}
/////////////////// BRENNER
/* -------------------------------- */
const char * const read_starts(void )
{
static char cache[20];
prologue()
if ( vito_read( 0x088A, 4, vitomem) < 0 )
return "NULL";
unsigned int value;
value = vitomem[0] + (vitomem[1] << 8) + (vitomem[2] << 16) + (vitomem[3] << 24);
sprintf( cache, "%u", value );
epilogue()
}
/* -------------------------------- */
const char * const read_runtime( void )
{
static char cache[20];
prologue()
if ( vito_read( 0x0886, 4, vitomem) < 0 )
return "NULL";
unsigned int value;
value = vitomem[0] + (vitomem[1] << 8) + (vitomem[2] << 16) + (vitomem[3] << 24);
sprintf( cache, "%u", value );
epilogue()
}
/* -------------------------------- */
const char * const read_runtime_h( void )
{
static char cache[20];
const char *result;
result = read_runtime();
if ( strcmp( result, "NULL" ) == 0 )
return "NULL";
sprintf( cache, "%06.1f", atoi(result) / 3600.0 );
return cache;
}
/* -------------------------------- */
const char * const read_power( void )
{
static char cache[6];
prologue()
if ( vito_read( 0xa38f, 1, vitomem) < 0 )
return "NULL";
sprintf( cache, "%3.1f", vitomem[0] / 2.0 );
epilogue()
}
/////////////////// HYDRAULIK
/* -------------------------------- */
const char * const read_ventil( void )
{
static char cache[5];
prologue()
if ( vito_read( 0x0a10, 1, vitomem) < 0 )
return "NULL";
sprintf( cache, "%u", vitomem[0] );
epilogue()
}
/* -------------------------------- */
const char * const read_ventil_text( void )
{
const char *result;
result = read_ventil();
if ( strcmp( result, "NULL" ) == 0 )
return "NULL";
switch (atoi(result))
{
case 0: return "undefiniert";
case 1: return "Heizkreis";
case 2: return "Mittelstellung";
case 3: return "Warmwasserbereitung";
default: return "UNKNOWN";
}
}
/* -------------------------------- */
const char * const read_pump_power( void )
{
static char cache[5];
prologue()
if ( vito_read( 0x0a3c, 1, vitomem) < 0 )
return "NULL";
sprintf( cache, "%u", vitomem[0] );
epilogue()
}
/* -------------------------------- */
const char * const read_flow( void )
{
static char cache[10];
prologue()
if ( vito_read( 0x0c24, 2, vitomem) < 0 )
return "NULL";
sprintf( cache, "%u", (vitomem[0] + (vitomem[1] << 8)) );
epilogue()
}
/////////////////// HEIZKREIS
/* -------------------------------- */
const char * const read_vl_soll_temp( void )
{
static char cache[6];
prologue()
if ( vito_read( 0x2544, 2, vitomem) < 0 )
return "NULL";
sprintf( cache, "%3.2f", ( vitomem[0] + (vitomem[1] << 8)) / 10.0 );
epilogue()
}
/* -------------------------------- */
const char * const read_raum_soll_temp( void )
{
static char cache[6];
prologue()
if ( vito_read( 0x2306, 1, vitomem) < 0 )
return "NULL";
sprintf( cache, "%u", vitomem[0] );
epilogue()
}
/* -------------------------------- */
const char * const write_raum_soll_temp( const char *value_str )
{
uint8_t content[3];
int temp;
temp = atoi( value_str );
if ( temp < 10 || temp > 30 )
return "Raum_soll_temp: range exceeded!";
content[0] = temp & 0xff; // unnoetig, aber deutlicher
if ( vito_write(0x2306, 1, content) < 0 )
return "Vitodens communication Error";
else
return "OK";
}
/* -------------------------------- */
const char * const read_red_raum_soll_temp( void )
{
static char cache[6];
prologue()
if ( vito_read( 0x2307, 1, vitomem) < 0 )
return "NULL";
sprintf( cache, "%u", vitomem[0] );
epilogue()
}
/* -------------------------------- */
const char * const write_red_raum_soll_temp( const char *value_str )
{
uint8_t content[3];
int temp;
temp = atoi( value_str );
if ( temp < 10 || temp > 30 )
return "Raum_soll_temp: range exceeded!";
content[0] = temp & 0xff; // unnoetig, aber deutlicher
if ( vito_write(0x2307, 1, content) < 0 )
return "Vitodens communication Error";
else
return "OK";
}
/* -------------------------------- */
const char * const read_neigung( void )
{
static char cache[6];
prologue()
if ( vito_read( 0x27d3, 1, vitomem) < 0 )
return "NULL";
sprintf( cache, "%2.1f", vitomem[0] / 10.0 );
epilogue()
}
/* -------------------------------- */
const char * const read_niveau( void )
{
static char cache[5];
prologue()
if ( vito_read( 0x27d4, 1, vitomem) < 0 )
return "NULL";
sprintf( cache, "%u", vitomem[0] );
epilogue()
}
/* -------------------------------- */
const char * const read_pp_max( void )
{
static char cache[5];
prologue()
if ( vito_read( 0x27e6, 1, vitomem) < 0 )
return "NULL";
sprintf( cache, "%u", vitomem[0] );
epilogue()
}
/* -------------------------------- */
const char * const write_pp_max( const char *value_str )
{
uint8_t content[3];
int temp;
temp = atoi( value_str );
if ( temp < 0 || temp > 100 )
return "Max. Pumpenleistung: range exceeded!";
content[0] = temp & 0xff; // unnoetig, aber deutlicher
if ( vito_write(0x27e6, 1, content) < 0 )
return "Vitodens communication Error";
else
return "OK";
}
/* -------------------------------- */
const char * const read_pp_min( void )
{
static char cache[5];
prologue()
if ( vito_read( 0x27e7, 1, vitomem) < 0 )
return "NULL";
sprintf( cache, "%u", vitomem[0] );
epilogue()
}
/* -------------------------------- */
const char * const write_pp_min( const char *value_str )
{
uint8_t content[3];
int temp;
temp = atoi( value_str );
if ( temp < 0 || temp > 100 )
return "Min. Pumpenleistung: range exceeded!";
content[0] = temp & 0xff; // unnoetig, aber deutlicher
if ( vito_write(0x27e7, 1, content) < 0 )
return "Vitodens communication Error";
else
return "OK";
}
//////////////////////////////////////////////////////////////////////////
// obacht: maximale Befehlslaenge 20 Zeichen, sonst klemmt der telnet-parser
const struct s_parameter parameter_liste[] = {
{ "errors", "Error History (numerisch)", "", P_ERRORS, &read_errors, NULL },
{ "errors_text", "Error History (text)", "", P_ERRORS, &read_errors_text, NULL },
{ "deviceid", "Geraeteidentifikation", "", P_ALLGEMEIN, &read_deviceid, NULL },
{ "systemtime", "Systemzeit", "", P_ALLGEMEIN, &read_systemtime, &write_systemtime },
{ "mode", "Betriebsmodus (numerisch)", "", P_ALLGEMEIN, &read_mode, &write_mode },
{ "mode_text", "Betriebsmodus (text)", "", P_ALLGEMEIN, &read_mode_text, NULL },
{ "outdoor_temp", "Aussentemperatur", "°C", P_ALLGEMEIN, &read_outdoor_temp, NULL },
{ "outdoor_temp_tp", "Aussentemperatur Tiefpass", "°C", P_ALLGEMEIN, &read_outdoor_temp_tp, NULL },
{ "outdoor_temp_smooth", "Aussentemperatur Gedaempft", "°C", P_ALLGEMEIN, &read_outdoor_temp_smooth, NULL },
{ "k_ist_temp", "Kessel Ist Temperatur", "°C", P_KESSEL, &read_k_ist_temp, NULL },
{ "k_ist_temp_tp", "Kessel Ist T. nach Tiefpass", "°C", P_KESSEL, &read_k_ist_temp_tp, NULL },
{ "k_soll_temp", "Kessel Soll Temperatur", "°C", P_KESSEL, &read_k_soll_temp, NULL },
{ "k_abgas_temp", "Kessel Abgastemperatur", "°C", P_KESSEL, &read_abgas_temp, NULL },
{ "ww_soll_temp", "Warmwasser Soll Temperatur", "°C", P_WARMWASSER, &read_ww_soll_temp, &write_ww_soll_temp },
{ "ww_ist_temp", "Warmwasser Ist Temperatur", "°C", P_WARMWASSER, &read_ww_ist_temp, NULL },
{ "ww_ist_temp_tp", "Warmwasser Ist Temp. Tiefpass", "°C", P_WARMWASSER, &read_ww_ist_temp_tp, NULL },
{ "ww_offset", "Offset Kessel/WW Soll", "K", P_WARMWASSER, &read_ww_offset, NULL },
{ "vl_soll_temp", "Vorlauf Solltemperatur", "°C", P_HEIZKREIS, &read_vl_soll_temp, NULL },
{ "raum_soll_temp", "Raum Solltemperatur", "°C", P_HEIZKREIS, &read_raum_soll_temp, &write_raum_soll_temp },
{ "red_raum_soll_temp", "Reduzierte Raum Solltemperatur", "°C", P_HEIZKREIS, &read_red_raum_soll_temp, &write_red_raum_soll_temp },
{ "niveau", "Heizkurve Niveau", "K", P_HEIZKREIS, &read_niveau, NULL },
{ "neigung", "Heizkurve Neigung", "", P_HEIZKREIS, &read_neigung, NULL },
{ "pp_max", "Pumpenleistung Maximal", "%", P_HEIZKREIS, &read_pp_max, &write_pp_max },
{ "pp_min", "Pumpenleistung Minimal", "%", P_HEIZKREIS, &read_pp_min, &write_pp_min },
{ "starts", "Brennerstarts", "", P_BRENNER, &read_starts, NULL },
{ "runtime_h", "Brennerlaufzeit", "h", P_BRENNER, &read_runtime_h, NULL },
{ "runtime", "Brennerlaufzeit", "s", P_BRENNER, &read_runtime, NULL },
{ "power", "Brennerleistung", "%", P_BRENNER, &read_power, NULL },
{ "ventil", "Ventilstellung", "", P_HYDRAULIK, &read_ventil, NULL },
{ "ventil_text", "Ventilstellung", "", P_HYDRAULIK, &read_ventil_text, NULL },
{ "pump_power", "Pumpenleistung", "%", P_HYDRAULIK, &read_pump_power, NULL },
/* { "flow", "Volumenstrom", "l/h", P_HYDRAULIK, &read_flow, NULL }, */
{ NULL, NULL, NULL, 0, NULL, NULL }
};
/////////////////////////////////////////////////////////////////////////////////
// Parameter Wert nachschlagen nach Name
const char * const get_v( const char *name )
{
int i=0;
while( parameter_liste[i].p_name ) // Ende der Liste ?
{
if ( strcmp( name, parameter_liste[i].p_name ) == 0 ) // Parametername gefunden?
{
if ( parameter_liste[i].f_read ) // Gibts eine Zugriffsfunktion?
return parameter_liste[i].f_read();
else
return "Function not implemented.";
}
i++;
}
return "Parameter not found.";
}
// Einheit fuer Parameter nachschlagen
const char * const get_u( const char *name )
{
int i=0;
while( parameter_liste[i].p_name ) // Ende der Liste
{
if ( strcmp( name, parameter_liste[i].p_name ) == 0 ) // Parametername gefunden?
return parameter_liste[i].p_einheit;
i++;
}
return "Parameter not found.";
}
// Parameterwert setzen
const char * const set_v( const char *name, const char *value )
{
int i=0;
while( parameter_liste[i].p_name ) // Ende der Liste ?
{
if ( strcmp( name, parameter_liste[i].p_name ) == 0 ) // Parametername gefunden?
{
if ( parameter_liste[i].f_write ) // Gibts eine Schreibfunktion?
return parameter_liste[i].f_write( value );
else
return "Read only!";
}
i++;
}
return "Unknown Parameter!";
}