aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Utilities
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-11-02 17:31:05 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-11-02 17:31:05 +0200
commitadab159475b2c21141a5c4d6aa6a0c95d70af17f (patch)
tree3e5403cb617a24983e1df111559f423c36e1f86f /Software/Visual_Studio/Utilities
parent2bfca4fac0ca1b3d489d20ce7c4799e05876ecb5 (diff)
downloadTango-adab159475b2c21141a5c4d6aa6a0c95d70af17f.tar.gz
Tango-adab159475b2c21141a5c4d6aa6a0c95d70af17f.zip
Added IsPersistent to alarams handling.
Diffstat (limited to 'Software/Visual_Studio/Utilities')
-rw-r--r--Software/Visual_Studio/Utilities/Tango.AlarmParametersGenerator/Program.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Utilities/Tango.AlarmParametersGenerator/Program.cs b/Software/Visual_Studio/Utilities/Tango.AlarmParametersGenerator/Program.cs
index ac31cfb9c..a18befe34 100644
--- a/Software/Visual_Studio/Utilities/Tango.AlarmParametersGenerator/Program.cs
+++ b/Software/Visual_Studio/Utilities/Tango.AlarmParametersGenerator/Program.cs
@@ -32,6 +32,7 @@ namespace Tango.AlarmParametersGenerator
public String Guidance { get; set; }
//Embedded
+ public String Persistent { get; set; }
public String SWIndex { get; set; }
public String Frequency { get; set; }
public String Source { get; set; }
@@ -102,6 +103,7 @@ namespace Tango.AlarmParametersGenerator
alarm.Predecessor = item.Predeccesor.ToUint();
alarm.DebounceValue = item.DebounceValue.ToUint();
alarm.EventType = (EventType)item.Code.ToUint();
+ alarm.IsPersistent = item.Persistent.ToBooleanYesNo();
parameters.AlarmItem.Add(alarm);
}
@@ -147,5 +149,10 @@ namespace Tango.AlarmParametersGenerator
{
return String.IsNullOrWhiteSpace(str) ? false : (str.Contains("0") ? false : true);
}
+
+ public static bool ToBooleanYesNo(this String str)
+ {
+ return String.IsNullOrWhiteSpace(str) ? false : (str.Contains("Yes") ? true : false);
+ }
}
} \ No newline at end of file