Skip to content
Snippets Groups Projects
Commit a0838f35 authored by Pascal Verdier's avatar Pascal Verdier
Browse files

CheckedAttributes attribute added.

parent 766e84c2
No related branches found
No related merge requests found
# Changelog
#### HdbAttributeCheck -1.2 (16/03/2018):
CheckedAttributes attribute added.
#### HdbAttributeCheck -1.1 (16/03/2018):
Initial revision
......@@ -31,6 +31,14 @@
</argout>
<status abstract="true" inherited="true" concrete="true" concreteHere="false"/>
</commands>
<attributes name="CheckedAttributes" attType="Spectrum" rwType="READ" displayLevel="OPERATOR" polledPeriod="1000" maxX="128" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:StringType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="Checked Attributes list" label="Checked Attributes" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<states name="ON" description="All attributes are OK">
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</states>
......
......@@ -218,6 +218,37 @@ public class HdbAttributeCheck {
}
//========================================================
// Attribute data members and related methods
//========================================================
/**
* Attribute CheckedAttributes, String, Spectrum, READ
* description:
* Checked Attributes list
*/
@Attribute(name="CheckedAttributes", isPolled=true, pollingPeriod=1000)
@AttributeProperties(description="Checked Attributes list", label="Checked Attributes")
private String[] checkedAttributes = new String[128];
/**
* Read attribute CheckedAttributes
*
* @return attribute value
* @throws DevFailed if read attribute failed.
*/
public org.tango.server.attribute.AttributeValue getCheckedAttributes() throws DevFailed {
xlogger.entry();
org.tango.server.attribute.AttributeValue
attributeValue = new org.tango.server.attribute.AttributeValue();
/*----- PROTECTED REGION ID(HdbAttributeCheck.getCheckedAttributes) ENABLED START -----*/
checkedAttributes = attributeList;
/*----- PROTECTED REGION END -----*/ // HdbAttributeCheck.getCheckedAttributes
attributeValue.setValue(checkedAttributes);
xlogger.exit();
return attributeValue;
}
//========================================================
......@@ -279,8 +310,16 @@ public class HdbAttributeCheck {
//========================================================
/*----- PROTECTED REGION ID(HdbAttributeCheck.methods) ENABLED START -----*/
// Put your own methods here
public HdbAttributeCheck() {
String applicationName = getClass().getPackage().getImplementationTitle();
String release = getClass().getPackage().getImplementationVersion();
if (release!=null)
applicationName += "-" + release;
else
applicationName += " release number not found";
System.out.println(applicationName);
}
/*----- PROTECTED REGION END -----*/ // HdbAttributeCheck.methods
......@@ -294,6 +333,12 @@ public class HdbAttributeCheck {
*/
public static void main(final String[] args) {
/*----- PROTECTED REGION ID(HdbAttributeCheck.main) ENABLED START -----*/
if (args.length>0) {
if (args[0].equals("--version")) {
new HdbAttributeCheck();
System.exit(0);
}
}
/*----- PROTECTED REGION END -----*/ // HdbAttributeCheck.main
ServerManager.getInstance().start(args, HdbAttributeCheck.class);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment