Feedback senden!
(Bearbeiten)
IPS_GetVariableProfile
array IPS_GetVariableProfile (string $ProfilName)
Parameterliste
ProfilName |
Name des Variablenprofils
|
Rückgabewerte
Folgende Informationen stehen als key => value Paare zur Verfügung:
Index |
Typ |
Beschreibung |
Associations |
array |
Array mit Wert, Name, Icon, Color Paaren (siehe Associations Tabelle) |
Icon |
string |
Icon des Variablenprofils |
IsReadOnly |
boolean |
TRUE, wenn es ein systemerstelltes Profil ist, welches nicht geändert werden kann. |
__MaxValue_ |
float |
Maximalwert für die Visualisierung |
MinValue |
float |
Minimalwert für die Visualisierung |
StepSize |
float |
Schrittweite für die Visualisierung; 0, wenn Assoziationstabelle genutzt werden soll |
Digits |
integer |
Anzahl der Nachkommastellen |
Prefix |
string |
Präfix für die Visualisierung |
Suffix |
string |
Suffix für die Visualisierung |
ProfileName |
string |
Name des Profils (~ = Systemprofil) |
ProfileType |
integer |
Typ des Profils (Siehe ProfilTyp Tabelle) |
Associations Tabelle
Index |
Typ |
Beschreibung |
Value |
float |
Wert, zu dem der Name und das Icon verknüpft werden sollen |
Name |
string |
Name zum angegebenen Wert |
Icon |
string |
Icon zum angegebenen Wert |
Color |
integer |
Farbwert im HTML Farbcode (z.b. 0x0000FF für Blau). Sonderfall: -1 für transparent |
ProfilTyp
Profiltyp und der Variablentyp (IPS_CreateVariable) müssen identisch sein, damit eine Anzeige im WebFront korrekt dargestellt werden kann.
Wert |
Beschreibung |
0 |
Ein Profil vom Typ Boolean |
1 |
Ein Profil vom Typ Integer |
2 |
Ein Profil vom Typ Float |
3 |
Ein Profil vom Typ String |
|
Beschreibung
Die Funktion liefert ein Array mit Informationen über das Variableprofil mit dem Namen ProfilName.
Beispiel
print_r( IPS_GetVariableProfile("~WindDirection") );
/* liefert z.B.:
Array
(
[Associations] => Array
(
)
[Digits] => 1
[Icon] => WindDirection
[IsReadOnly] => 1
[MaxValue] => 360
[MinValue] => 0
[Prefix] =>
[ProfileName] => ~WindDirection
[ProfileType] => 2
[StepSize] => 60
[Suffix] => °
)
*/