diff --git a/silecs-codegen/src/xml/fesa/fesa_3_0_0/generateFesaDesign.py b/silecs-codegen/src/xml/fesa/fesa_3_0_0/generateFesaDesign.py index 7338f0fb3bc04e7b2777c9e9afe1314e5bc95920..43b972eadb21a9916ade572929cb9ddc88402d80 100644 --- a/silecs-codegen/src/xml/fesa/fesa_3_0_0/generateFesaDesign.py +++ b/silecs-codegen/src/xml/fesa/fesa_3_0_0/generateFesaDesign.py @@ -229,10 +229,10 @@ class FESADesignGenerator3_0_0(object): dim.setContent(str(len(defaultNode.getContent()))) return fieldNode - def getOrCreateRegisterValueItems(self,prop,block,isSetting): + def getOrCreateRegisterValueItems(self,prop,block,direction): for register in block.getDesignRegisters(): if register.generateFesaValueItem: - self.getOrCreateValueItem(prop,register,isSetting) + self.getOrCreateValueItem(prop,register,direction) def getOrCreateSettingProperty(self,parent,actionsNode,block): iecommon.logDebug('Generating SettingProperty for Block: ' + block.name, {'debuglog': True}) @@ -242,12 +242,23 @@ class FESADesignGenerator3_0_0(object): else: prop = getOrCreateNamedChildElement(parent,'setting-property',block.getFesaName()) fillAttributes(prop, {'visibility': 'development', 'multiplexed': 'false'}) - self.getOrCreateRegisterValueItems(prop,block,True) + self.getOrCreateRegisterValueItems(prop,block,"INOUT") self.getOrCreateUpdateFlagItem(prop) self.getOrCreateCyleNameItem(prop) self.getOrCreateAction(prop,block.fesaSetServerActionName,'set',actionsNode,'custom') self.getOrCreateAction(prop,block.fesaGetServerActionName,'get',actionsNode,'custom') return prop + + def getOrCreateCommandProperty(self,parent,actionsNode,block): + iecommon.logDebug('Generating CommandProperty for Block: ' + block.name, {'debuglog': True}) + if( hasChildren(parent)): + prop = getOrCreateNamedPreviousSiblingElement(parent,getFirstChild(parent), 'command-property',block.getFesaName()) + else: + prop = getOrCreateNamedChildElement(parent,'command-property',block.getFesaName()) + fillAttributes(prop, {'visibility': 'development', 'multiplexed': 'false'}) + self.getOrCreateRegisterValueItems(prop,block,"IN") + self.getOrCreateAction(prop,block.fesaSetServerActionName,'set',actionsNode,'custom') + return prop def getOrCreateAcquisitionProperty(self,parent,actionsNode,block): iecommon.logDebug('Generating AcquisitionProperty for Block: ' + block.name, {'debuglog': True}) @@ -257,7 +268,7 @@ class FESADesignGenerator3_0_0(object): else: prop = getOrCreateNamedChildElement(parent,'acquisition-property',block.getFesaName()) fillAttributes(prop, {'visibility': 'development', 'subscribable': 'true', 'multiplexed': 'false', 'on-change': 'true'}) - self.getOrCreateRegisterValueItems(prop,block,False) + self.getOrCreateRegisterValueItems(prop,block,"OUT") self.getOrCreateAcqStampItem(prop) self.getOrCreateUpdateFlagItem(prop) self.getOrCreateCyleNameItem(prop) @@ -265,13 +276,15 @@ class FESADesignGenerator3_0_0(object): self.getOrCreateAction(prop,block.fesaGetServerActionName,'get',actionsNode,'custom') return prop - def getOrCreateGSISettingProperty(self,parent,actionsNode,block): iecommon.logDebug('Generating GSISettingProperty for Block: ' + block.name, {'debuglog': True}) - powerProp = parent.xpathEval('GSI-Power-Property')[0] # template is used --> there has to be a power prop + powerProps = parent.xpathEval('GSI-Power-Property') + if len(powerProps) == 0: + raise Exception("Error: A GSI-Power-Property needs to be available to generate a GSISettingProperty") + powerProp = powerProps[0] # template is used --> there has to be a power prop prop = getOrCreateNamedPreviousSiblingElement(parent,powerProp, 'GSI-Setting-Property',block.getFesaName()) fillAttributes(prop, {'visibility': 'development', 'multiplexed': 'false'}) - self.getOrCreateRegisterValueItems(prop,block,True) + self.getOrCreateRegisterValueItems(prop,block,"INOUT") self.getOrCreateUpdateFlagItem(prop) self.getOrCreateCyleNameItem(prop) self.getOrCreateAction(prop,block.fesaSetServerActionName,'set',actionsNode,'custom') @@ -280,10 +293,12 @@ class FESADesignGenerator3_0_0(object): def getOrCreateGSIAcquisitionProperty(self,parent,actionsNode,block): iecommon.logDebug('Generating GSIAcquisitionProperty for Block: ' + block.name, {'debuglog': True}) - versionProp = parent.xpathEval('GSI-Version-Property')[0] # template is used --> there has to be a version prop - prop = getOrCreateNamedPreviousSiblingElement(parent,versionProp, 'GSI-Acquisition-Property',block.getFesaName()) + versionProps = parent.xpathEval('GSI-Version-Property') + if len(versionProps) == 0: + raise Exception("Error: A GSI-Version-Property needs to be available to generate a GSIAcquisitionProperty") + prop = getOrCreateNamedPreviousSiblingElement(parent,versionProps[0], 'GSI-Acquisition-Property',block.getFesaName()) fillAttributes(prop, {'visibility': 'development', 'subscribable': 'true', 'multiplexed': 'false', 'on-change': 'true'}) - self.getOrCreateRegisterValueItems(prop,block,False) + self.getOrCreateRegisterValueItems(prop,block,"OUT") self.getOrCreateAcqStampItem(prop) self.getOrCreateUpdateFlagItem(prop) self.getOrCreateCyleNameItem(prop) @@ -295,17 +310,40 @@ class FESADesignGenerator3_0_0(object): # propertyType only used during creation ! If named property already exists, it is just returned, no matter which type def getOrCreateFESAProperty(self,parent,actionsNode,block): if self.isGSITemplate(parent): - if parent.get_name() == 'setting': - return self.getOrCreateGSISettingProperty(parent,actionsNode,block) + if block.isSetting(): + if block.getFesaName() == 'Power': + raise Exception("Error: Please use '@generateFesaProperty=false' for the GSI-Power-Property and connect silecs-fields manually") + else: + return self.getOrCreateGSISettingProperty(parent,actionsNode,block) + elif block.isCommand(): + if block.getFesaName() == 'Init': + raise Exception("Error: Please use '@generateFesaProperty=false' for the GSI-Init-Property and connect silecs-fields manually") + elif block.getFesaName() == 'Reset': + raise Exception("Error: Please use '@generateFesaProperty=false' for the GSI-Reset-Property and connect silecs-fields manually") + else: + return self.getOrCreateCommandProperty(parent,actionsNode,block) + elif block.isAcquisition(): + if block.getFesaName() == 'Status': + raise Exception("Error: Please use '@generateFesaProperty=false' for the GSI-Status-Property and connect silecs-fields manually") + elif block.getFesaName() == 'ModuleStatus': + raise Exception("Error: Please use '@generateFesaProperty=false' for the GSI-ModuleStatus-Property and connect silecs-fields manually") + elif block.getFesaName() == 'Version': + raise Exception("Error: Please use '@generateFesaProperty=false' for the GSI-Version-Property and connect silecs-fields manually") + else: + return self.getOrCreateGSIAcquisitionProperty(parent,actionsNode,block) else: - return self.getOrCreateGSIAcquisitionProperty(parent,actionsNode,block) + raise Exception( "Cannot identify FESA GSI Property-type to use for block:" + block.name ) else: - if parent.get_name() == 'setting': + if block.isSetting(): return self.getOrCreateSettingProperty(parent,actionsNode,block) - else: + elif block.isCommand(): + return self.getOrCreateCommandProperty(parent,actionsNode,block) + elif block.isAcquisition(): return self.getOrCreateAcquisitionProperty(parent,actionsNode,block) + else: + raise Exception( "Cannot identify FESA Property-type to use for block:" + block.name ) - def getOrCreateValueItem(self,propertyNode,register,isSetting): + def getOrCreateValueItem(self,propertyNode,register,direction): iecommon.logDebug('Generating ValueItem for Register: ' + register.name, {'debuglog': True}) result = propertyNode.xpathEval("value-item[@name='" + register.getFesaFieldName() + "']") if len(result): @@ -315,10 +353,7 @@ class FESADesignGenerator3_0_0(object): valueItemNode = getOrCreateNamedPreviousSiblingElement(propertyNode,result[0],'value-item',register.getFesaFieldName()) else: valueItemNode = getOrCreateNamedChildElement(propertyNode,'value-item',register.getFesaFieldName()) - if isSetting: - fillAttributes(valueItemNode, {'direction': 'INOUT'}) - else: - fillAttributes(valueItemNode, {'direction': 'OUT'}) + fillAttributes(valueItemNode, {'direction': direction}) self.getOrCreateType(valueItemNode,register) self.getOrCreateFieldRef(valueItemNode,register.getFesaFieldName()) diff --git a/silecs-codegen/src/xml/test/fesa/GSIClassTemplateFESA431.xml b/silecs-codegen/src/xml/test/fesa/GSIClassTemplateFESA431.xml new file mode 100644 index 0000000000000000000000000000000000000000..c24d5b69f998db6aabede82c726c259263771eca --- /dev/null +++ b/silecs-codegen/src/xml/test/fesa/GSIClassTemplateFESA431.xml @@ -0,0 +1,703 @@ +<?xml version="1.0" encoding="UTF-8"?> +<equipment-model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../design-gsi.xsd"> + <information> + <class-name>GSIClassTemplate</class-name> + <class-major-version>0</class-major-version> + <class-minor-version>1</class-minor-version> + <class-tiny-version>0</class-tiny-version> + <type>Final</type> + <state>development</state> + <description>An empty design with GSI-specific standard properties</description> + <fesa-version>DEV</fesa-version> + <repository-path>undefined</repository-path> + </information> + <ownership> + <responsible name="CSCO"/> + <creator login="Undefined"/> + </ownership> + <interface> + <device-interface> + <setting> + <GSI-Init-Property multiplexed="false" name="Init" visibility="operational"> + <description>Control property, used to initialize the device with default values from the device instantiation file</description> + <set-action partial-setting="true" transaction="true"> + <server-action-ref server-action-name-ref="InitSetAction"/> + </set-action> + </GSI-Init-Property> + <GSI-Reset-Property multiplexed="false" name="Reset" visibility="operational"> + <description>Control property, used to reset the device while keeping the persistent data.</description> + <set-action partial-setting="true" transaction="true"> + <server-action-ref server-action-name-ref="ResetSetAction"/> + </set-action> + </GSI-Reset-Property> + <GSI-Setting-Property multiplexed="false" name="Setting" visibility="operational"> + <description>Used for setting hardware parameters for controlling the device.</description> + <update-flag-item direction="OUT" name="updateFlags" optional="true"> + <builtin-type-scalar data-type-name-ref="NOTIFICATION_UPDATE"/> + </update-flag-item> + <cycle-name-item direction="OUT" name="cycleName" optional="true"> + <array type="char"> + <dim>32</dim> + </array> + </cycle-name-item> + <set-action partial-setting="true" transaction="true"> + <server-action-ref server-action-name-ref="SettingSetAction"/> + </set-action> + <get-action> + <server-action-ref server-action-name-ref="SettingGetAction"/> + </get-action> + </GSI-Setting-Property> + <GSI-Power-Property multiplexed="false" name="Power" visibility="operational"> + <description>Used to turn the power of a device on or off.</description> + <update-flag-item direction="OUT" name="updateFlags" optional="true"> + <builtin-type-scalar data-type-name-ref="NOTIFICATION_UPDATE"/> + </update-flag-item> + <cycle-name-item direction="OUT" name="cycleName" optional="true"> + <array type="char"> + <dim>32</dim> + </array> + </cycle-name-item> + <set-action partial-setting="true" transaction="true"> + <server-action-ref server-action-name-ref="PowerSetAction"/> + </set-action> + <get-action> + <server-action-ref server-action-name-ref="PowerGetAction"/> + </get-action> + <power-item direction="INOUT" name="power"> + <custom-type-scalar data-type-name-ref="DEVICE_POWER"/> + + <data-field-ref field-name-ref="power"/> + </power-item> + </GSI-Power-Property> + </setting> + <acquisition> + <GSI-Status-Property multiplexed="false" name="Status" on-change="true" subscribable="true" visibility="operational"> + <description>Used to display the (cycle independent) overall status of the device.</description> + <description>Detailed status information may be additionally added to this property.</description> + <acq-stamp-item direction="OUT" name="acqStamp"> + <scalar type="int64_t"/> + </acq-stamp-item> + <update-flag-item direction="OUT" name="updateFlags" optional="true"> + <builtin-type-scalar data-type-name-ref="NOTIFICATION_UPDATE"/> + </update-flag-item> + <cycle-name-item direction="OUT" name="cycleName" optional="true"> + <array type="char"> + <dim>32</dim> + </array> + </cycle-name-item> + <cycle-stamp-item direction="OUT" name="cycleStamp" optional="true"> + <scalar type="int64_t"/> + </cycle-stamp-item> + <get-action> + <server-action-ref server-action-name-ref="StatusGetAction"/> + </get-action> + <status-item direction="OUT" name="status"> + <custom-type-scalar data-type-name-ref="DEVICE_STATUS"/> + + <data-field-ref field-name-ref="status"/> + </status-item> + <detailed-status-item direction="OUT" name="detailedStatus"> + <description>Detailed status should consist of an array of boolean values considered as detailed status information as well as a +corresponding string array containing keys to illustrate the meaning of the detailed status information.</description> + <array type="bool"> + <custom-constant-dim constant-name-ref="DETAILED_STATUS_SIZE"/> + </array> + <data-field-ref field-name-ref="detailedStatus"/> + </detailed-status-item> + <detailed-status-labels-item direction="OUT" name="detailedStatus_labels"> + <description>Labels of detailed status bits.</description> + <array2D type="char"> + <custom-constant-dim1 constant-name-ref="DETAILED_STATUS_SIZE"/> + <custom-constant-dim2 constant-name-ref="MAX_DETAILED_STATUS_LABEL_LENGTH"/> + </array2D> + <data-field-ref field-name-ref="detailedStatus_labels"/> + </detailed-status-labels-item> + <detailed-status-severity-item direction="OUT" name="detailedStatus_severity"> + <description>Severities of the detailed status bits</description> + <custom-type-array data-type-name-ref="DETAILED_STATUS_SEVERITY"> + <custom-constant-dim constant-name-ref="DETAILED_STATUS_SIZE"/> + </custom-type-array> + <data-field-ref field-name-ref="detailedStatus_severity"/> + </detailed-status-severity-item> + <powerState-item direction="OUT" name="powerState"> + <description>Power state of the device (ON, OFF)</description> + <custom-type-scalar data-type-name-ref="DEVICE_POWER_STATE"/> + + <data-field-ref field-name-ref="powerState"/> + </powerState-item> + <control-item direction="OUT" name="control"> + <custom-type-scalar data-type-name-ref="DEVICE_CONTROL"/> + <data-field-ref field-name-ref="control"/> + </control-item> + <interlock-item direction="OUT" name="interlock"> + <description>Interlock state of the device</description> + <scalar type="bool"/> + <data-field-ref field-name-ref="interlock"/> + </interlock-item> + <opReady-item direction="OUT" name="opReady"> + <description>Contains the devices state regarding operation</description> + <scalar type="bool"/> + <data-field-ref field-name-ref="opReady"/> + </opReady-item> + <modulesReady-item direction="OUT" name="modulesReady"> + <description>Contains the devices module state</description> + <scalar type="bool"/> + <data-field-ref field-name-ref="modulesReady"/> + </modulesReady-item> + <error_collection-item direction="OUT"> + <error_codes direction="OUT" name="error_codes"> + <array type="int32_t"> + <custom-constant-dim constant-name-ref="MAX_NUMBER_OF_ERROR_MESSAGES"/> + </array> + </error_codes> + <error_messages direction="OUT" name="error_messages"> + <array2D type="char"> + <custom-constant-dim1 constant-name-ref="MAX_NUMBER_OF_ERROR_MESSAGES"/> + <custom-constant-dim2 constant-name-ref="MAX_ERROR_MESSAGE_LENGTH"/> + </array2D> + </error_messages> + <error_timestamps direction="OUT" name="error_timestamps"> + <array type="int64_t"> + <custom-constant-dim constant-name-ref="MAX_NUMBER_OF_ERROR_MESSAGES"/> + </array> + </error_timestamps> + <error_cycle_names direction="OUT" name="error_cycle_names"> + <array2D type="char"> + <custom-constant-dim1 constant-name-ref="MAX_NUMBER_OF_ERROR_MESSAGES"/> + <custom-constant-dim2 constant-name-ref="MAX_ERROR_MESSAGE_LENGTH"/> + </array2D> + </error_cycle_names> + <error_collection-field-ref field-name-ref="error_collection"/> + </error_collection-item> + </GSI-Status-Property> + <GSI-ModuleStatus-Property visibility="development" subscribable="true" name="ModuleStatus" multiplexed="false"> + <description>Gives detailed information on the state of 3rd party hardware and software components which are required to operate the device.</description> + <acq-stamp-item name="acqStamp" direction="OUT"> + <scalar type="int64_t" /> + </acq-stamp-item> + <update-flag-item optional="true" name="updateFlags" direction="OUT"> + <builtin-type-scalar data-type-name-ref="NOTIFICATION_UPDATE" /> + </update-flag-item> + <cycle-name-item optional="true" name="cycleName" direction="OUT"> + <array type="char"> + <dim>32</dim> + </array> + </cycle-name-item> + <cycle-stamp-item optional="true" name="cycleStamp" direction="OUT"> + <scalar type="int64_t" /> + </cycle-stamp-item> + <get-action> + <server-action-ref server-action-name-ref="ModuleStatusGetAction" /> + </get-action> + <module-status-item name="moduleStatus" direction="OUT"> + <custom-type-array data-type-name-ref="MODULE_STATUS"> + <custom-constant-dim constant-name-ref="MODULE_STATUS_SIZE" /> + </custom-type-array> + <data-field-ref field-name-ref="moduleStatus" /> + </module-status-item> + <module-status-labels-item name="moduleStatus_labels" direction="OUT"> + <array2D type="char"> + <custom-constant-dim1 constant-name-ref="MODULE_STATUS_SIZE" /> + <custom-constant-dim2 constant-name-ref="MAX_MODULE_STATUS_LABEL_LENGTH" /> + </array2D> + <data-field-ref field-name-ref="moduleStatus_labels" /> + </module-status-labels-item> + </GSI-ModuleStatus-Property> + <GSI-Acquisition-Property multiplexed="true" name="Acquisition" on-change="true" subscribable="true" visibility="operational"> + <description>Used for returning acquisition data which is retrieved from the hardware.</description> + <acq-stamp-item direction="OUT" name="acqStamp"> + <scalar type="int64_t"/> + </acq-stamp-item> + <update-flag-item direction="OUT" name="updateFlags" optional="true"> + <builtin-type-scalar data-type-name-ref="NOTIFICATION_UPDATE"/> + </update-flag-item> + <cycle-name-item direction="OUT" name="cycleName" optional="true"> + <array type="char"> + <dim>32</dim> + </array> + </cycle-name-item> + <cycle-stamp-item direction="OUT" name="cycleStamp" optional="true"> + <scalar type="int64_t"/> + </cycle-stamp-item> + <get-action> + <server-action-ref server-action-name-ref="AcquisitionGetAction"/> + </get-action> + <acquisition-context-item direction="OUT"> + <processIndex direction="OUT" name="processIndex"> + <scalar type="int32_t"/> + </processIndex> + <sequenceIndex direction="OUT" name="sequenceIndex"> + <scalar type="int32_t"/> + </sequenceIndex> + <chainIndex direction="OUT" name="chainIndex"> + <scalar type="int32_t"/> + </chainIndex> + <eventNumber direction="OUT" name="eventNumber"> + <scalar type="int32_t"/> + </eventNumber> + <timingGroupID direction="OUT" name="timingGroupID"> + <scalar type="int32_t"/> + </timingGroupID> + <acquisitionStamp direction="OUT" name="acquisitionStamp"> + <scalar type="int64_t"/> + </acquisitionStamp> + <eventStamp direction="OUT" name="eventStamp"> + <scalar type="int64_t"/> + </eventStamp> + <processStartStamp direction="OUT" name="processStartStamp"> + <scalar type="int64_t"/> + </processStartStamp> + <sequenceStartStamp direction="OUT" name="sequenceStartStamp"> + <scalar type="int64_t"/> + </sequenceStartStamp> + <chainStartStamp direction="OUT" name="chainStartStamp"> + <scalar type="int64_t"/> + </chainStartStamp> + <acquisition-context-field-ref field-name-ref="acquisitionContext"/> + </acquisition-context-item> + </GSI-Acquisition-Property> + <GSI-Version-Property multiplexed="false" name="Version" on-change="false" subscribable="false" visibility="operational"> + <description>Returns the current software and hardware versions of a piece of equipment.</description> + <acq-stamp-item direction="OUT" name="acqStamp"> + <scalar type="int64_t"/> + </acq-stamp-item> + <update-flag-item direction="OUT" name="updateFlags" optional="true"> + <builtin-type-scalar data-type-name-ref="NOTIFICATION_UPDATE"/> + </update-flag-item> + <cycle-name-item direction="OUT" name="cycleName" optional="true"> + <array type="char"> + <dim>32</dim> + </array> + </cycle-name-item> + <cycle-stamp-item direction="OUT" name="cycleStamp" optional="true"> + <scalar type="int64_t"/> + </cycle-stamp-item> + <get-action> + <server-action-ref server-action-name-ref="VersionGetAction"/> + </get-action> + <version-item direction="OUT" name="classVersion"> + <array type="char"> + <custom-constant-dim constant-name-ref="MAX_VERSION_NAME_LENGTH"/> + </array> + </version-item> + <version-item direction="OUT" name="deployUnitVersion"> + <array type="char"> + <custom-constant-dim constant-name-ref="MAX_VERSION_NAME_LENGTH"/> + </array> + </version-item> + <version-item direction="OUT" name="fesaVersion"> + <array type="char"> + <custom-constant-dim constant-name-ref="MAX_VERSION_NAME_LENGTH"/> + </array> + </version-item> + </GSI-Version-Property> + </acquisition> + </device-interface> + <global-interface> + <setting> + <diagnostic-property multiplexed="false" name="DiagnosticSetting" visibility="expert"> + <description>Generic property which allows to diagnose any FESA classes</description> + <mode-item direction="INOUT" name="enableDiagMode"> + <scalar type="bool"/> + </mode-item> + <host-item direction="INOUT" name="hostName"> + <description>Host of the FESA class</description> + <array type="char"> + <dim>32</dim> + </array> + </host-item> + <port-item direction="INOUT" name="portNumber"> + <description>Port used by the FESA class</description> + <scalar type="int32_t"/> + </port-item> + <config-item direction="IN" name="requestConfig"> + <scalar type="bool"/> + </config-item> + <state-item direction="IN" name="requestState"> + <scalar type="bool"/> + </state-item> + <fwk-topic-item direction="INOUT" name="fwkTopic"> + <builtin-type-scalar data-type-name-ref="DIAG_FWK_TOPIC"/> + </fwk-topic-item> + <custom-topic-item direction="INOUT" name="customTopic"> + <custom-type-scalar data-type-name-ref="DIAG_TOPIC"/> + </custom-topic-item> + <device-trace-item direction="INOUT" name="traceDevices"> + <array type="char"> + <dim>320</dim> + </array> + </device-trace-item> + <bypass-action-item direction="INOUT" name="bypassActions"> + <array type="char"> + <dim>320</dim> + </array> + </bypass-action-item> + </diagnostic-property> + </setting> + <acquisition> + <GSI-DeviceDescription-Property multiplexed="false" name="DeviceDescription" on-change="false" subscribable="false" visibility="operational"> + <timing-info-item direction="OUT" name="deviceNameTimingReceiver"> + <array type="char"> + <variable-dim/> + </array> + <data-field-ref field-name-ref="deviceNameTimingReceiver"/> + </timing-info-item> + <property-info-item direction="OUT" name="propertyNames"> + <array2D type="char"> + <variable-dim1/> + <variable-dim2/> + </array2D> + </property-info-item> + <device-info-item direction="OUT" name="deviceNames"> + <array2D type="char"> + <variable-dim1/> + <variable-dim2/> + </array2D> + </device-info-item> + <global-device-info-item direction="OUT" name="globalDeviceName"> + <array type="char"> + <variable-dim/> + </array> + </global-device-info-item> + <host-info-item direction="OUT" name="host"> + <array type="char"> + <variable-dim/> + </array> + </host-info-item> + </GSI-DeviceDescription-Property> + </acquisition> + </global-interface> + </interface> + <builtin-types> + <notification-update-enum name="NOTIFICATION_UPDATE"> + <IMMEDIATE access="RO" symbol="IMMEDIATE" value="1"/> + <SET access="RO" symbol="SET" value="2"/> + </notification-update-enum> + <diag-fwk-topic name="DIAG_FWK_TOPIC"> + <b0 name="SRV_GET_ACTION_PROFIING"/> + <b1 name="SRV_SET_ACTION_PROFILING"/> + <b2 name="RT_ACTION_PROFILING"/> + <b3 name="EVENT_PROFILING"/> + <b4 name="NOTIFICATION_PROFILING"/> + <b5 name="SRV_GET_ACTION_TRACKING"/> + <b6 name="SRV_SET_ACTION_TRACKING"/> + <b7 name="RT_ACTION_TRACKING"/> + <b8 name="EVENT_TRACKING"/> + <b9 name="NOTIFICATION_TRACKING"/> + <b10 name="PERSISTENCY_TRACKING"/> + <b11 name="TRANSACTION_TRACKING"/> + <b12 name="SUBSCRIPTION_TRACKING"/> + <b13 name="SIGNAL_HANDLER_TRACKING"/> + <b14 name="LOCAL_CONNECTION_TRACKING"/> + </diag-fwk-topic> + <fault-severity name="FaultSeverity"> + <description>Enumeration listing the available fault severities used by the fault fields</description> + <INFO access="RO" meaning="NONE" value="0" symbol="INFO" /> + <WARNING access="RO" meaning="WARNING" value="1" symbol="WARNING" /> + <ERROR access="RO" meaning="ERROR" value="2" symbol="ERROR" /> + <CRITICAL access="RO" meaning="ERROR" value="3" symbol="CRITICAL" /> + </fault-severity> + + </builtin-types> + <custom-types> + <diag-custom-topic name="DIAG_TOPIC"> + </diag-custom-topic> + <enum name="DEVICE_STATUS"> + <!--Possible (mutually exclusive) values to describe the device status--> + + <item access="RW" meaning="NONE" symbol="UNKNOWN" value="0"/> + <!--The device status is unknown--> + + <item access="RW" meaning="NONE" symbol="OK" value="1"/> + <!--The device is in fully operational state--> + + <item access="RW" meaning="NONE" symbol="WARNING" value="2"/> + <!--The device is not fully operational; A device in WARNING state can still be used operationally, --> + <!--but clients must be informed of a problem that might become worse. Details are explained in the errorMsg field.--> + + <item access="RW" meaning="NONE" symbol="ERROR" value="3"/> + <!--The device is in a fault state. Details are explained in the errorMsg field--> + </enum> + <enum name="DEVICE_POWER_STATE"> + <!--Possible (mutually exclusive) values to describe the power-state of the device.--> + + <item access="RW" meaning="NONE" symbol="UNKNOWN" value="0"/> + <!--The device mode is unknown--> + + <item access="RW" meaning="ON" symbol="ON" value="1"/> + <!--The device is in fully operational state--> + + <item access="RW" meaning="NONE" symbol="OFF" value="2"/> + <!--The device is turned off--> + + <item access="RW" meaning="NONE" symbol="STANDBY" value="3"/> + <!--The device is in a stand-by mode. This mode is a sort of “parking mode†in which the device can --> + <!--stay for hours or even days. It is defined by the following characteristics:--> + <!--It is safe, it does not wear out, it consumes little energy.--> + <!--Furthermore, it takes a short time to go from STANDBY to ON mode--> + + <item access="RW" meaning="NONE" symbol="POWER_DOWN" value="4"/> + <!--The device is shutting down. Note that some properties may not be accessible during this time.--> + <!--After shutdown the device will be in the mode OFF--> + + <item access="RW" meaning="NONE" symbol="POWER_UP" value="5"/> + <!--The device is starting up. Note that some properties may not be accessible during this time.--> + <!--After (re-)starting the device probably will be in the mode ON--> + + </enum> + <enum name="DEVICE_POWER"> + <!--An enumeration Type used to control the operational mode of the device.--> + <!--Its values are a subset of those in the DEVICE_POWER_STATE type--> + <item access="RW" meaning="ON" symbol="ON" value="1"/> + <!--The device is in fully operational state--> + + <item access="RW" meaning="OFF" symbol="OFF" value="2"/> + <!--The device is turned off--> + </enum> + <enum name="DEVICE_CONTROL"> + <!--Possible values to describe the control mode of a device--> + <!--Currently two control modes (LOCAL, REMOTE) are defined--> + + <item access="RW" meaning="NONE" symbol="REMOTE" value="0"/> + <!--The device can be controlled normally through the control system--> + + <item access="RW" meaning="NONE" symbol="LOCAL" value="1"/> + <!--The device can be controlled locally. But it can be accessed in read-only mode via the control system--> + </enum> + <enum name="TOL_CHECK_MODE"> + <!--This constant defines possible modes to check whether a control value is inside the tolerance values.--> + <!--Used to give information on how the tolerance fields are used to calculate the xxx_status information.--> + + <item access="RO" symbol="ABS" value="0"/> + <!--Use the absolute tolerance _tolAbs--> + + <item access="RO" symbol="REL" value="1"/> + <!--Use the relative tolerance _tolRel--> + </enum> + <bit-enum-32bits name="AQN_STATUS"> + <!--Possible values to describe the acquisition status of a field (in the _status suffix)--> + <!--If this suffix is missing, it means that no additional status information is provided for the corresponding field--> + <!--If all bits are 0, this means that the corresponding field is OK.--> + <!--Only the lower 16 bits are standardized, the upper 16 bits can be defined by the equipment specialist.--> + <!--The difference between the Status property and the _status suffix is described in the section on the Status property.--> + <b0 name="NOT_OK"/> + <!--Some problem occurred that is not represented by the other bits. This property is called--> + <!-- NOT_OK so that it is not mixed up with ERROR or WARNING in the Status property--> + <b1 name="BAD_QUALITY"/> + <!--The value was acquired with a degraded quality. This is typically used for measurements.--> + <b2 name="DIFFERENT_FROM_SETTING"/> + <!--Different from the requested control value (for discrete values)--><!--or out of tolerance (for continuous values).--> + <b3 name="OUT_OF_RANGE"/> + <!--The value is out of the normal range (e.g. a temperature is too high or too low).--> + <b4 name="BUSY"/> + <!--The property value is changing in response to receiving a new control value (e.g. moving to a--> + <!--new position, charging a capacitor, ...). If the value change does not reach the requested new--> + <!--value within the maximum timeout, the BUSY bit should remain=1 and the TIMEOUT bit must be turned on.--> + <b5 name="TIMEOUT"/> + <!--A timeout occurred, because the property did not reach the reqested new control value within the--> + <!--maximum allowable time. A timeout normally indicates a problem to be addressed by the--> + <!--equipment specialist. This is typically used for slow changing control values that are BUSY while they change.--> + <b6 name="bit6_is_reserved_for_later_usage"/> + <b7 name="bit7_is_reserved_for_later_usage"/> + <b8 name="bit8_is_reserved_for_later_usage"/> + <b9 name="bit9_is_reserved_for_later_usage"/> + <b10 name="bit10_is_reserved_for_later_usage"/> + <b11 name="bit11_is_reserved_for_later_usage"/> + <b12 name="bit12_is_reserved_for_later_usage"/> + <b13 name="bit13_is_reserved_for_later_usage"/> + <b14 name="bit14_is_reserved_for_later_usage"/> + <b15 name="bit15_is_reserved_for_later_usage"/> + <!--bit 6 to 15 are reserved ... dont use them!--> + + <b16 name="bit_16_and_higher_can_be_used_by_the_class_developer"/> + <!--into bit 16..32 you can put in anything you want--> + </bit-enum-32bits> + + <struct name="GSI_ERROR"> + <!--This struct-item describes the structure of an GSI-error--> + <struct-item name="error_string"> + <!--This string holds the error-message--> + <array type="char"> + <custom-constant-dim constant-name-ref="MAX_ERROR_MESSAGE_LENGTH"/> + </array> + </struct-item> + <struct-item name="error_code"> + <!--The error code according to the defined error-message--> + <scalar type="int32_t"/> + </struct-item> + <!--The timestamp when the error occured--> + <struct-item name="error_timestamp"> + <scalar type="int64_t"/> + </struct-item> + <!--The cycle for which the error occured--> + <struct-item name="error_cycle_name"> + <array type="char"> + <custom-constant-dim constant-name-ref="MAX_CYCLE_NAME_LENGTH"/> + </array> + </struct-item> + </struct> + <struct name="GSI_ACQ_CONTEXT"><description>WhiteRabbit event specific acquisition information</description> + <struct-item name="processIndex"> + <description>Used in order to index process-multiplexed data</description> + <scalar type="int32_t" /> + </struct-item> + <struct-item name="sequenceIndex"> + <description>Used in order to index sequence-multiplexed data</description> + <scalar type="int32_t" /> + </struct-item> + <struct-item name="chainIndex"> + <description>Refers to a specific beam production chain</description> + <scalar type="int32_t" /> + </struct-item> + <struct-item name="eventNumber"> + <description>The number of the event describes it's type</description> + <scalar type="int32_t" /> + </struct-item> + <struct-item name="timingGroupID"> + <description>ID of the timing group for which the event is relevant</description> + <scalar type="int32_t" /> + </struct-item> + <struct-item name="acquisitionStamp" > + <description>The acquisition stamp is used to indicate when a measurement was done</description> + <scalar type="int64_t"/> + </struct-item> + <struct-item name="eventStamp"> + <description>The event stamp is used to indicate when WhiteRabbit event was triggered on the Timing Receiver</description> + <scalar type="int64_t" /> + </struct-item> + <struct-item name="processStartStamp"> + <description>The process start stamp indicates when the first event of the current process was triggered</description> + <scalar type="int64_t" /> + </struct-item> + <struct-item name="sequenceStartStamp"> + <description>The sequence start stamp indicates when the first event of the current sequence was triggered</description> + <scalar type="int64_t" /> + </struct-item> + <struct-item name="chainStartStamp"> + <description>The chain start stamp indicates when the first event of the current chain was triggered</description> + <scalar type="int64_t" /> + </struct-item> + </struct> + <constant name="MAX_ERROR_MESSAGE_LENGTH" type="uint32_t" value="256"/> + <constant name="MAX_NUMBER_OF_ERROR_MESSAGES" type="uint32_t" value="16"/> + <constant name="MAX_CYCLE_NAME_LENGTH" type="uint32_t" value="256"/> + <constant name="MAX_VERSION_NAME_LENGTH" type="uint32_t" value="256"/> + <constant name="MAX_DETAILED_STATUS_LABEL_LENGTH" type="uint32_t" value="30"/> + <constant name="DETAILED_STATUS_SIZE" type="uint32_t" value="2"/> + <enum name="DETAILED_STATUS_SEVERITY"> + <item access="RO" symbol="INFO" value="0"/> + <item access="RO" symbol="WARNING_ON_FALSE" value="1"/> + <item access="RO" symbol="ERROR_ON_FALSE" value="2"/> + </enum> + <enum name="MODULE_STATUS"> + <!-- Mutually exclusive values to describe the status of a hardware / software module--> + <item access="RO" value="0" symbol="UNKNOWN" /> + <!--The status of the module is not known--> + <item access="RO" value="1" symbol="OK" /> + <!--The module is in fully operational state--> + <item access="RO" value="2" symbol="WARNING" /> + <!--The module is not fully operational; A module in WARNING state may still be used operationally, --> + <!--but clients must be informed of a problem that might become worse. --> + <item access="RO" value="3" symbol="ERROR" /> + <!--The module is in a fault state. The related device is not operational.--> + <item access="RO" value="4" symbol="NOT_AVAILABLE" /> + <!--The module is missing. The related device is not operational.--> + </enum> + <constant name="MAX_MODULE_STATUS_LABEL_LENGTH" type="uint32_t" value="30"/> + <constant name="MODULE_STATUS_SIZE" type="uint32_t" value="2"/> + </custom-types> + <data> + <device-data> + <configuration> + <GSI-detailed-status-labels-field name="detailedStatus_labels"> + <array2D type="char"> + <custom-constant-dim1 constant-name-ref="DETAILED_STATUS_SIZE"/> + <custom-constant-dim2 constant-name-ref="MAX_DETAILED_STATUS_LABEL_LENGTH"/> + </array2D> + <default>{myStatusLabel1,myStatusLabel2}</default> + </GSI-detailed-status-labels-field> + <GSI-detailed-status-severity-field name="detailedStatus_severity"> + <custom-type-array data-type-name-ref="DETAILED_STATUS_SEVERITY"> + <custom-constant-dim constant-name-ref="DETAILED_STATUS_SIZE"/> + </custom-type-array> + <default>{INFO,INFO}</default> + </GSI-detailed-status-severity-field> + <GSI-module-status-labels-field name="moduleStatus_labels"> + <array2D type="char"> + <custom-constant-dim1 constant-name-ref="MODULE_STATUS_SIZE" /> + + <custom-constant-dim2 constant-name-ref="MAX_MODULE_STATUS_LABEL_LENGTH" /> + </array2D> + <default>{myModule1,myModule2}</default> + </GSI-module-status-labels-field> + </configuration> + <setting> + <GSI-power-field multiplexed="false" name="power" persistent="false"> + <custom-type-scalar data-type-name-ref="DEVICE_POWER"/> + </GSI-power-field> + </setting> + <acquisition> + <GSI-control-field multiplexed="false" name="control"> + <custom-type-scalar data-type-name-ref="DEVICE_CONTROL"/> + </GSI-control-field> + <GSI-powerState-field multiplexed="false" name="powerState"> + <custom-type-scalar data-type-name-ref="DEVICE_POWER_STATE"/> + </GSI-powerState-field> + <GSI-status-field multiplexed="false" name="status"> + <custom-type-scalar data-type-name-ref="DEVICE_STATUS"/> + </GSI-status-field> + <GSI-interlock-field multiplexed="false" name="interlock"> + <scalar type="bool"/> + </GSI-interlock-field> + <GSI-opReady-field multiplexed="false" name="opReady"> + <scalar type="bool"/> + </GSI-opReady-field> + <GSI-modulesReady-field name="modulesReady" multiplexed="false"> + <scalar type="bool" /> + </GSI-modulesReady-field> + <GSI-detailed-status-field multiplexed="false" name="detailedStatus"> + <array type="bool"> + <custom-constant-dim constant-name-ref="DETAILED_STATUS_SIZE"/> + </array> + </GSI-detailed-status-field> + <GSI-module-status-field name="moduleStatus" multiplexed="false"> + <custom-type-array data-type-name-ref="MODULE_STATUS"> + <custom-constant-dim constant-name-ref="MODULE_STATUS_SIZE" /> + </custom-type-array> + </GSI-module-status-field> + <GSI-acquisition-context-field multiplexed="true" name="acquisitionContext"> + <custom-type-scalar data-type-name-ref="GSI_ACQ_CONTEXT"/> + </GSI-acquisition-context-field> + <GSI-error_collection-field multiplexed="false" name="error_collection"> + <custom-type-array data-type-name-ref="GSI_ERROR"> + <custom-constant-dim constant-name-ref="MAX_NUMBER_OF_ERROR_MESSAGES"/> + </custom-type-array> + </GSI-error_collection-field> + </acquisition> + </device-data> + <global-data> + <configuration> + <!-- The name of the timing receiver --> + <GSI-timing-receiver-name-field name="deviceNameTimingReceiver"> + <array type="char"> + <!-- The number of the timing receiver --> + <variable-dim/> + </array> + </GSI-timing-receiver-name-field> + </configuration> + </global-data> + </data> + <actions> + <set-server-action implementation="default" name="InitSetAction"/> + <set-server-action implementation="default" name="ResetSetAction"/> + <set-server-action implementation="default" name="SettingSetAction"/> + <set-server-action implementation="default" name="PowerSetAction"/> + <get-server-action implementation="default" name="PowerGetAction"/> + <get-server-action implementation="default" name="SettingGetAction"/> + <get-server-action implementation="default" name="AcquisitionGetAction"/> + <get-server-action implementation="default" name="StatusGetAction"/> + <get-server-action implementation="default" name="VersionGetAction"/> + <get-server-action implementation="default" name="ModuleStatusGetAction"/> + </actions> + +</equipment-model> \ No newline at end of file diff --git a/silecs-codegen/src/xml/test/fesa/generateFesaDesignTest.py b/silecs-codegen/src/xml/test/fesa/generateFesaDesignTest.py index e995f16f382bc531fb612ca642e3c9c16e36b733..e45d48934325e0276cc9bfccee99c38ac55e883b 100644 --- a/silecs-codegen/src/xml/test/fesa/generateFesaDesignTest.py +++ b/silecs-codegen/src/xml/test/fesa/generateFesaDesignTest.py @@ -21,6 +21,7 @@ import fesa.fesa_3_0_0.generateFesaDesign import fesa.fesa_3_1_0.generateFesaDesign import libxml2 +import unittest simpleSilecsDesign = '''<?xml version="1.0" encoding="UTF-8"?> <SILECS-Design silecs-version="0.10.0" created="03/02/16" updated="03/02/16" @@ -36,6 +37,11 @@ simpleSilecsDesign = '''<?xml version="1.0" encoding="UTF-8"?> <scalar format="uint8"/> </Setting-Register> </Setting-Block> + <Command-Block name="Command" generateFesaProperty="true"> + <Setting-Register name="mySettingRegister" generateFesaValueItem="true"> + <scalar format="uint8"/> + </Setting-Register> + </Command-Block> <Acquisition-Block name="Acquisition" generateFesaProperty="true"> <Acquisition-Register name="myAcqRegister" generateFesaValueItem="true"> <scalar format="uint8"/> @@ -50,7 +56,7 @@ def testFillXML_EmptyTemplate_3_0_0(generator): generator.fillXML('3.0.0', 'MyClass', fesaRoot,simpleSilecsDesignRoot,logTopics={'errorlog': True}) assertTrue( fesaRoot.xpathEval('/equipment-model/events') != None ) assertTrue( fesaRoot.xpathEval('/equipment-model/scheduling-units') != None ) - #etree.tostring(fesaRoot) + def testFillXML_GSITemplate_3_0_0(generator): fesaRoot = libxml2.parseFile("test/fesa/GSIClassTemplateFESA300.xml") @@ -70,14 +76,12 @@ def testFillXML_GSITemplate_3_0_0(generator): setting = fesaRoot.xpathEval('/equipment-model/interface/device-interface/setting')[0] firstGSISettingProp = setting.xpathEval('GSI-Setting-Property')[0] assertTrue( acquisition.xpathEval('*')[0].prop('name') != firstGSISettingProp.prop('name') ) # check if generated at right position - #etree.tostring(fesaRoot) def testFillXML_EmptyTemplate_3_1_0(generator): fesaRoot = libxml2.parseFile("test/fesa/emptyTemplateFESA300.xml") generator.fillXML('3.1.0', 'MyClass', fesaRoot,simpleSilecsDesignRoot,logTopics={'errorlog': True}) assertTrue( fesaRoot.xpathEval('/equipment-model/events') != None ) assertTrue( fesaRoot.xpathEval('/equipment-model/scheduling-units') != None ) - #etree.tostring(fesaRoot) def testFillXML_GSITemplate_3_1_0(generator): fesaRoot = libxml2.parseFile("test/fesa/GSIClassTemplateFESA300.xml") @@ -96,12 +100,35 @@ def testFillXML_GSITemplate_3_1_0(generator): setting = fesaRoot.xpathEval('/equipment-model/interface/device-interface/setting')[0] firstGSISettingProp = setting.xpathEval('GSI-Setting-Property')[0] assertTrue( acquisition.xpathEval('*')[0].prop('name') != firstGSISettingProp.prop('name') ) # check if generated at right position - #etree.tostring(fesaRoot) -def testFillXML_AllTypes_3_1_0(generator): +def testFillXML_GSITemplate_3_1_0_Exceptions(generator): fesaRoot = libxml2.parseFile("test/fesa/GSIClassTemplateFESA300.xml") + myRoot = simpleSilecsDesignRoot + commandBlock = myRoot.xpathEval('/SILECS-Design/SILECS-Class/Command-Block')[0] + + commandBlock.setProp("name", "Init") + try: + generator.fillXML('3.1.0', 'MyClass', fesaRoot,myRoot,logTopics={'errorlog': True}) + except: + print "test passed" + else: + print "Test Failed: testFillXML_GSITemplate_3_1_0_Exceptions - Init \n No Exception was thrown" + sys.exit(1) + + commandBlock.setProp("name", "Reset") + try: + generator.fillXML('3.1.0', 'MyClass', fesaRoot,myRoot,logTopics={'errorlog': True}) + except: + print "test passed" + else: + print "Test Failed: testFillXML_GSITemplate_3_1_0_Exceptions - Reset \n No Exception was thrown" + sys.exit(1) + + +def testFillXML_AllTypes_4_3_1(generator): + fesaRoot = libxml2.parseFile("test/fesa/GSIClassTemplateFESA431.xml") silecsRoot = libxml2.parseFile("test/AllTypesFESA.silecsdesign") - fesaRoot = generator.fillXML('3.1.0', 'MyClass', fesaRoot,silecsRoot,logTopics={'errorlog': True}) + fesaRoot = generator.fillXML('4.3.0', 'MyClass', fesaRoot,silecsRoot,logTopics={'errorlog': True}) fesaNewDocPath = "test/generated_temp/AllTypesFESA.design" fesaCompareDocPath = "test/generated_correct/AllTypesFESA.design" with open(fesaNewDocPath, 'w') as fd: @@ -111,11 +138,12 @@ def testFillXML_AllTypes_3_1_0(generator): assertFileEqual( fesaNewDocPath, fesaCompareDocPath) def runTests(): - generator = fesa.fesa_3_0_0.generateFesaDesign.FESADesignGenerator3_0_0(); - testFillXML_EmptyTemplate_3_0_0(generator) - testFillXML_GSITemplate_3_0_0(generator) - generator = fesa.fesa_3_1_0.generateFesaDesign.FESADesignGenerator3_1_0(); - testFillXML_EmptyTemplate_3_1_0(generator) - testFillXML_GSITemplate_3_1_0(generator) - testFillXML_AllTypes_3_1_0(generator) + generator300 = fesa.fesa_3_0_0.generateFesaDesign.FESADesignGenerator3_0_0(); + testFillXML_EmptyTemplate_3_0_0(generator300) + testFillXML_GSITemplate_3_0_0(generator300) + generator310 = fesa.fesa_3_1_0.generateFesaDesign.FESADesignGenerator3_1_0(); + testFillXML_EmptyTemplate_3_1_0(generator310) + testFillXML_GSITemplate_3_1_0(generator310) + testFillXML_AllTypes_4_3_1(generator310) + testFillXML_GSITemplate_3_1_0_Exceptions(generator310) allTestsOk() diff --git a/silecs-codegen/src/xml/test/generated_correct/AllTypesFESA.design b/silecs-codegen/src/xml/test/generated_correct/AllTypesFESA.design index 6d7ee3735fdcaaa346442e0b4accf3a0765915c7..d6d300c11a3b60a1fd2eb604d3bd85f367c9852e 100644 --- a/silecs-codegen/src/xml/test/generated_correct/AllTypesFESA.design +++ b/silecs-codegen/src/xml/test/generated_correct/AllTypesFESA.design @@ -1,34 +1,37 @@ <?xml version="1.0" encoding="UTF-8"?> <equipment-model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../design-gsi.xsd"> - <information> - <class-name>MyClass</class-name> - <class-major-version>0</class-major-version> - <class-minor-version>1</class-minor-version> - <class-tiny-version>0</class-tiny-version> - <type>Final</type> - <state>development</state> - <description>An Empty design with GSI-specific standard properties</description> - <fesa-version>3.1.0</fesa-version> - <repository-path>undefined</repository-path> - </information> - <ownership> - <responsible name="CSCO"/> - <creator login="schwinn"/> - </ownership> + <information> + <class-name>MyClass</class-name> + <class-major-version>0</class-major-version> + <class-minor-version>1</class-minor-version> + <class-tiny-version>0</class-tiny-version> + <type>Final</type> + <state>development</state> + <description>An empty design with GSI-specific standard properties</description> + <fesa-version>4.3.0</fesa-version> + <repository-path>undefined</repository-path> + </information> + <ownership> + <responsible name="CSCO"/> + <creator login="schwinn"/> + </ownership> <interface> <device-interface> <setting> - <GSI-Init-Property multiplexed="false" name="Init" visibility="operational"> + <command-property name="MyWOBlockProp" multiplexed="false" visibility="development"><value-item name="WO_dt_fesa" direction="IN"><array type="double"><dim>10</dim></array><data-field-ref field-name-ref="WO_dt_fesa"/></value-item><value-item name="WO_real_fesa" direction="IN"><array type="float"><dim>10</dim></array><data-field-ref field-name-ref="WO_real_fesa"/></value-item><value-item name="WO_dint_fesa" direction="IN"><array type="int32_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_dint_fesa"/></value-item><value-item name="WO_int_fesa" direction="IN"><array type="int16_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_int_fesa"/></value-item><value-item name="WO_dword_fesa" direction="IN"><array type="int64_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_dword_fesa"/></value-item><value-item name="WO_word_fesa" direction="IN"><array type="int32_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_word_fesa"/></value-item><value-item name="WO_byte_fesa" direction="IN"><array type="int16_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_byte_fesa"/></value-item><value-item name="WO_char_fesa" direction="IN"><array type="int8_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_char_fesa"/></value-item><value-item name="WO_date_fesa" direction="IN"><array type="double"><dim>10</dim></array><data-field-ref field-name-ref="WO_date_fesa"/></value-item><value-item name="WO_string_fesa" direction="IN"><array2D type="char"><dim1>10</dim1><dim2>64</dim2></array2D><data-field-ref field-name-ref="WO_string_fesa"/></value-item><value-item name="WO_float32_fesa" direction="IN"><array type="float"><dim>10</dim></array><data-field-ref field-name-ref="WO_float32_fesa"/></value-item><value-item name="WO_uint32_fesa" direction="IN"><array type="int64_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_uint32_fesa"/></value-item><value-item name="WO_int32_fesa" direction="IN"><array type="int32_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_int32_fesa"/></value-item><value-item name="WO_uint16_fesa" direction="IN"><array type="int32_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_uint16_fesa"/></value-item><value-item name="WO_int16_fesa" direction="IN"><array type="int16_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_int16_fesa"/></value-item><value-item name="WO_uint8_fesa" direction="IN"><array type="int16_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_uint8_fesa"/></value-item><value-item name="WO_int8" direction="IN"><array type="int8_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_int8"/></value-item><set-action><server-action-ref server-action-name-ref="SetMyWOBlockProp"/></set-action></command-property><GSI-Init-Property multiplexed="false" name="Init" visibility="operational"> + <description>Control property, used to initialize the device with default values from the device instantiation file</description> <set-action partial-setting="true" transaction="true"> <server-action-ref server-action-name-ref="InitSetAction"/> </set-action> </GSI-Init-Property> <GSI-Reset-Property multiplexed="false" name="Reset" visibility="operational"> + <description>Control property, used to reset the device while keeping the persistent data.</description> <set-action partial-setting="true" transaction="true"> <server-action-ref server-action-name-ref="ResetSetAction"/> </set-action> </GSI-Reset-Property> <GSI-Setting-Property multiplexed="false" name="Setting" visibility="operational"> + <description>Used for setting hardware parameters for controlling the device.</description> <update-flag-item direction="OUT" name="updateFlags" optional="true"> <builtin-type-scalar data-type-name-ref="NOTIFICATION_UPDATE"/> </update-flag-item> @@ -44,9 +47,10 @@ <server-action-ref server-action-name-ref="SettingGetAction"/> </get-action> </GSI-Setting-Property> - <GSI-Setting-Property name="MyRWBlockProp" multiplexed="false" visibility="development"><value-item name="RW_dt_fesa" direction="INOUT"><array2D type="double"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_dt_fesa"/></value-item><value-item name="RW_real_fesa" direction="INOUT"><array2D type="float"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_real_fesa"/></value-item><value-item name="RW_dint_fesa" direction="INOUT"><array2D type="int32_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_dint_fesa"/></value-item><value-item name="RW_int_fesa" direction="INOUT"><array2D type="int16_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_int_fesa"/></value-item><value-item name="RW_dword_fesa" direction="INOUT"><array2D type="int64_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_dword_fesa"/></value-item><value-item name="RW_word_fesa" direction="INOUT"><array2D type="int32_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_word_fesa"/></value-item><value-item name="RW_byte_fesa" direction="INOUT"><array2D type="int16_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_byte_fesa"/></value-item><value-item name="RW_char_fesa" direction="INOUT"><array2D type="int8_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_char_fesa"/></value-item><value-item name="RW_date_fesa" direction="INOUT"><array2D type="double"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_date_fesa"/></value-item><value-item name="RW_float32_fesa" direction="INOUT"><array2D type="float"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_float32_fesa"/></value-item><value-item name="RW_uint32_fesa" direction="INOUT"><array2D type="int64_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_uint32_fesa"/></value-item><value-item name="RW_int32_fesa" direction="INOUT"><array2D type="int32_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_int32_fesa"/></value-item><value-item name="RW_uint16_fesa" direction="INOUT"><array2D type="int32_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_uint16_fesa"/></value-item><value-item name="RW_int16_fesa" direction="INOUT"><array2D type="int16_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_int16_fesa"/></value-item><value-item name="RW_uint8_fesa" direction="INOUT"><array2D type="int16_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_uint8_fesa"/></value-item><value-item name="RW_int8" direction="INOUT"><array2D type="int8_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_int8"/></value-item><update-flag-item direction="OUT" optional="true" name="updateFlags"><builtin-type-scalar data-type-name-ref="NOTIFICATION_UPDATE"/></update-flag-item><cycle-name-item direction="OUT" optional="true" name="cycleName"><array type="char"><dim>32</dim></array></cycle-name-item><set-action><server-action-ref server-action-name-ref="SetMyRWBlockProp"/></set-action><get-action><server-action-ref server-action-name-ref="GetMyRWBlockProp"/></get-action></GSI-Setting-Property><GSI-Setting-Property name="MyWOBlockProp" multiplexed="false" visibility="development"><value-item name="WO_dt_fesa" direction="INOUT"><array type="double"><dim>10</dim></array><data-field-ref field-name-ref="WO_dt_fesa"/></value-item><value-item name="WO_real_fesa" direction="INOUT"><array type="float"><dim>10</dim></array><data-field-ref field-name-ref="WO_real_fesa"/></value-item><value-item name="WO_dint_fesa" direction="INOUT"><array type="int32_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_dint_fesa"/></value-item><value-item name="WO_int_fesa" direction="INOUT"><array type="int16_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_int_fesa"/></value-item><value-item name="WO_dword_fesa" direction="INOUT"><array type="int64_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_dword_fesa"/></value-item><value-item name="WO_word_fesa" direction="INOUT"><array type="int32_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_word_fesa"/></value-item><value-item name="WO_byte_fesa" direction="INOUT"><array type="int16_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_byte_fesa"/></value-item><value-item name="WO_char_fesa" direction="INOUT"><array type="int8_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_char_fesa"/></value-item><value-item name="WO_date_fesa" direction="INOUT"><array type="double"><dim>10</dim></array><data-field-ref field-name-ref="WO_date_fesa"/></value-item><value-item name="WO_string_fesa" direction="INOUT"><array2D type="char"><dim1>10</dim1><dim2>64</dim2></array2D><data-field-ref field-name-ref="WO_string_fesa"/></value-item><value-item name="WO_float32_fesa" direction="INOUT"><array type="float"><dim>10</dim></array><data-field-ref field-name-ref="WO_float32_fesa"/></value-item><value-item name="WO_uint32_fesa" direction="INOUT"><array type="int64_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_uint32_fesa"/></value-item><value-item name="WO_int32_fesa" direction="INOUT"><array type="int32_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_int32_fesa"/></value-item><value-item name="WO_uint16_fesa" direction="INOUT"><array type="int32_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_uint16_fesa"/></value-item><value-item name="WO_int16_fesa" direction="INOUT"><array type="int16_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_int16_fesa"/></value-item><value-item name="WO_uint8_fesa" direction="INOUT"><array type="int16_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_uint8_fesa"/></value-item><value-item name="WO_int8" direction="INOUT"><array type="int8_t"><dim>10</dim></array><data-field-ref field-name-ref="WO_int8"/></value-item><update-flag-item direction="OUT" optional="true" name="updateFlags"><builtin-type-scalar data-type-name-ref="NOTIFICATION_UPDATE"/></update-flag-item><cycle-name-item direction="OUT" optional="true" name="cycleName"><array type="char"><dim>32</dim></array></cycle-name-item><set-action><server-action-ref server-action-name-ref="SetMyWOBlockProp"/></set-action><get-action><server-action-ref server-action-name-ref="GetMyWOBlockProp"/></get-action></GSI-Setting-Property><GSI-Power-Property multiplexed="false" name="Power" visibility="operational"> + <GSI-Setting-Property name="MyRWBlockProp" multiplexed="false" visibility="development"><value-item name="RW_dt_fesa" direction="INOUT"><array2D type="double"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_dt_fesa"/></value-item><value-item name="RW_real_fesa" direction="INOUT"><array2D type="float"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_real_fesa"/></value-item><value-item name="RW_dint_fesa" direction="INOUT"><array2D type="int32_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_dint_fesa"/></value-item><value-item name="RW_int_fesa" direction="INOUT"><array2D type="int16_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_int_fesa"/></value-item><value-item name="RW_dword_fesa" direction="INOUT"><array2D type="int64_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_dword_fesa"/></value-item><value-item name="RW_word_fesa" direction="INOUT"><array2D type="int32_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_word_fesa"/></value-item><value-item name="RW_byte_fesa" direction="INOUT"><array2D type="int16_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_byte_fesa"/></value-item><value-item name="RW_char_fesa" direction="INOUT"><array2D type="int8_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_char_fesa"/></value-item><value-item name="RW_date_fesa" direction="INOUT"><array2D type="double"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_date_fesa"/></value-item><value-item name="RW_float32_fesa" direction="INOUT"><array2D type="float"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_float32_fesa"/></value-item><value-item name="RW_uint32_fesa" direction="INOUT"><array2D type="int64_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_uint32_fesa"/></value-item><value-item name="RW_int32_fesa" direction="INOUT"><array2D type="int32_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_int32_fesa"/></value-item><value-item name="RW_uint16_fesa" direction="INOUT"><array2D type="int32_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_uint16_fesa"/></value-item><value-item name="RW_int16_fesa" direction="INOUT"><array2D type="int16_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_int16_fesa"/></value-item><value-item name="RW_uint8_fesa" direction="INOUT"><array2D type="int16_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_uint8_fesa"/></value-item><value-item name="RW_int8" direction="INOUT"><array2D type="int8_t"><dim1>2</dim1><dim2>2</dim2></array2D><data-field-ref field-name-ref="RW_int8"/></value-item><update-flag-item direction="OUT" optional="true" name="updateFlags"><builtin-type-scalar data-type-name-ref="NOTIFICATION_UPDATE"/></update-flag-item><cycle-name-item direction="OUT" optional="true" name="cycleName"><array type="char"><dim>32</dim></array></cycle-name-item><set-action><server-action-ref server-action-name-ref="SetMyRWBlockProp"/></set-action><get-action><server-action-ref server-action-name-ref="GetMyRWBlockProp"/></get-action></GSI-Setting-Property><GSI-Power-Property multiplexed="false" name="Power" visibility="operational"> + <description>Used to turn the power of a device on or off.</description> <update-flag-item direction="OUT" name="updateFlags" optional="true"> - <builtin-type-scalar data-type-name-ref="NOTIFICATION_UPDATE"/> + <builtin-type-scalar data-type-name-ref="NOTIFICATION_UPDATE"/> </update-flag-item> <cycle-name-item direction="OUT" name="cycleName" optional="true"> <array type="char"> @@ -68,6 +72,8 @@ </setting> <acquisition> <GSI-Status-Property multiplexed="false" name="Status" on-change="true" subscribable="true" visibility="operational"> + <description>Used to display the (cycle independent) overall status of the device.</description> + <description>Detailed status information may be additionally added to this property.</description> <acq-stamp-item direction="OUT" name="acqStamp"> <scalar type="int64_t"/> </acq-stamp-item> @@ -91,12 +97,15 @@ <data-field-ref field-name-ref="status"/> </status-item> <detailed-status-item direction="OUT" name="detailedStatus"> + <description>Detailed status should consist of an array of boolean values considered as detailed status information as well as a +corresponding string array containing keys to illustrate the meaning of the detailed status information.</description> <array type="bool"> <custom-constant-dim constant-name-ref="DETAILED_STATUS_SIZE"/> </array> <data-field-ref field-name-ref="detailedStatus"/> </detailed-status-item> <detailed-status-labels-item direction="OUT" name="detailedStatus_labels"> + <description>Labels of detailed status bits.</description> <array2D type="char"> <custom-constant-dim1 constant-name-ref="DETAILED_STATUS_SIZE"/> <custom-constant-dim2 constant-name-ref="MAX_DETAILED_STATUS_LABEL_LENGTH"/> @@ -104,30 +113,34 @@ <data-field-ref field-name-ref="detailedStatus_labels"/> </detailed-status-labels-item> <detailed-status-severity-item direction="OUT" name="detailedStatus_severity"> + <description>Severities of the detailed status bits</description> <custom-type-array data-type-name-ref="DETAILED_STATUS_SEVERITY"> <custom-constant-dim constant-name-ref="DETAILED_STATUS_SIZE"/> </custom-type-array> <data-field-ref field-name-ref="detailedStatus_severity"/> </detailed-status-severity-item> <powerState-item direction="OUT" name="powerState"> + <description>Power state of the device (ON, OFF)</description> <custom-type-scalar data-type-name-ref="DEVICE_POWER_STATE"/> <data-field-ref field-name-ref="powerState"/> </powerState-item> <control-item direction="OUT" name="control"> <custom-type-scalar data-type-name-ref="DEVICE_CONTROL"/> - <data-field-ref field-name-ref="control"/> </control-item> <interlock-item direction="OUT" name="interlock"> + <description>Interlock state of the device</description> <scalar type="bool"/> <data-field-ref field-name-ref="interlock"/> </interlock-item> <opReady-item direction="OUT" name="opReady"> + <description>Contains the devices state regarding operation</description> <scalar type="bool"/> <data-field-ref field-name-ref="opReady"/> </opReady-item> <modulesReady-item direction="OUT" name="modulesReady"> + <description>Contains the devices module state</description> <scalar type="bool"/> <data-field-ref field-name-ref="modulesReady"/> </modulesReady-item> @@ -158,42 +171,40 @@ </error_collection-item> </GSI-Status-Property> <GSI-ModuleStatus-Property visibility="development" subscribable="true" name="ModuleStatus" multiplexed="false"> - <acq-stamp-item name="acqStamp" direction="OUT"> - <scalar type="int64_t"/> - </acq-stamp-item> - <update-flag-item optional="true" name="updateFlags" direction="OUT"> - <builtin-type-scalar data-type-name-ref="NOTIFICATION_UPDATE"/> - </update-flag-item> - <cycle-name-item optional="true" name="cycleName" direction="OUT"> - <array type="char"> - <dim>32</dim> - </array> - </cycle-name-item> - <cycle-stamp-item optional="true" name="cycleStamp" direction="OUT"> - <scalar type="int64_t"/> - </cycle-stamp-item> - <get-action> - <server-action-ref server-action-name-ref="ModuleStatusGetAction"/> - </get-action> - <module-status-item name="moduleStatus" direction="OUT"> - <custom-type-array data-type-name-ref="MODULE_STATUS"> - <custom-constant-dim constant-name-ref="MODULE_STATUS_SIZE"/> - - </custom-type-array> - - <data-field-ref field-name-ref="moduleStatus"/> - </module-status-item> - <module-status-labels-item name="moduleStatus_labels" direction="OUT"> - <array2D type="char"> - <custom-constant-dim1 constant-name-ref="MODULE_STATUS_SIZE"/> - <custom-constant-dim2 constant-name-ref="MAX_MODULE_STATUS_LABEL_LENGTH"/> - - </array2D> - - <data-field-ref field-name-ref="moduleStatus_labels"/> - </module-status-labels-item> + <description>Gives detailed information on the state of 3rd party hardware and software components which are required to operate the device.</description> + <acq-stamp-item name="acqStamp" direction="OUT"> + <scalar type="int64_t"/> + </acq-stamp-item> + <update-flag-item optional="true" name="updateFlags" direction="OUT"> + <builtin-type-scalar data-type-name-ref="NOTIFICATION_UPDATE"/> + </update-flag-item> + <cycle-name-item optional="true" name="cycleName" direction="OUT"> + <array type="char"> + <dim>32</dim> + </array> + </cycle-name-item> + <cycle-stamp-item optional="true" name="cycleStamp" direction="OUT"> + <scalar type="int64_t"/> + </cycle-stamp-item> + <get-action> + <server-action-ref server-action-name-ref="ModuleStatusGetAction"/> + </get-action> + <module-status-item name="moduleStatus" direction="OUT"> + <custom-type-array data-type-name-ref="MODULE_STATUS"> + <custom-constant-dim constant-name-ref="MODULE_STATUS_SIZE"/> + </custom-type-array> + <data-field-ref field-name-ref="moduleStatus"/> + </module-status-item> + <module-status-labels-item name="moduleStatus_labels" direction="OUT"> + <array2D type="char"> + <custom-constant-dim1 constant-name-ref="MODULE_STATUS_SIZE"/> + <custom-constant-dim2 constant-name-ref="MAX_MODULE_STATUS_LABEL_LENGTH"/> + </array2D> + <data-field-ref field-name-ref="moduleStatus_labels"/> + </module-status-labels-item> </GSI-ModuleStatus-Property> <GSI-Acquisition-Property multiplexed="true" name="Acquisition" on-change="true" subscribable="true" visibility="operational"> + <description>Used for returning acquisition data which is retrieved from the hardware.</description> <acq-stamp-item direction="OUT" name="acqStamp"> <scalar type="int64_t"/> </acq-stamp-item> @@ -212,27 +223,41 @@ <server-action-ref server-action-name-ref="AcquisitionGetAction"/> </get-action> <acquisition-context-item direction="OUT"> - <acqStamp direction="OUT" name="acqStampGSI"> - <scalar type="int64_t"/> - </acqStamp> - <cycleStamp direction="OUT" name="cycleStampGSI"> - <scalar type="int64_t"/> - </cycleStamp> - <cycleName direction="OUT" name="cycleNameGSI"> - <array type="char"> - <custom-constant-dim constant-name-ref="MAX_CYCLE_NAME_LENGTH"/> - </array> - </cycleName> - <beamProcessID direction="OUT" name="beamProcessID"> + <processIndex direction="OUT" name="processIndex"> + <scalar type="int32_t"/> + </processIndex> + <sequenceIndex direction="OUT" name="sequenceIndex"> <scalar type="int32_t"/> - </beamProcessID> - <sequenceID direction="OUT" name="sequenceID"> + </sequenceIndex> + <chainIndex direction="OUT" name="chainIndex"> <scalar type="int32_t"/> - </sequenceID> + </chainIndex> + <eventNumber direction="OUT" name="eventNumber"> + <scalar type="int32_t"/> + </eventNumber> + <timingGroupID direction="OUT" name="timingGroupID"> + <scalar type="int32_t"/> + </timingGroupID> + <acquisitionStamp direction="OUT" name="acquisitionStamp"> + <scalar type="int64_t"/> + </acquisitionStamp> + <eventStamp direction="OUT" name="eventStamp"> + <scalar type="int64_t"/> + </eventStamp> + <processStartStamp direction="OUT" name="processStartStamp"> + <scalar type="int64_t"/> + </processStartStamp> + <sequenceStartStamp direction="OUT" name="sequenceStartStamp"> + <scalar type="int64_t"/> + </sequenceStartStamp> + <chainStartStamp direction="OUT" name="chainStartStamp"> + <scalar type="int64_t"/> + </chainStartStamp> <acquisition-context-field-ref field-name-ref="acquisitionContext"/> </acquisition-context-item> </GSI-Acquisition-Property> <GSI-Acquisition-Property name="MyROBlockProp" subscribable="true" multiplexed="false" on-change="true" visibility="development"><value-item name="RO_dt_fesa" direction="OUT"><scalar type="double"/><data-field-ref field-name-ref="RO_dt_fesa"/></value-item><value-item name="RO_real_fesa" direction="OUT"><scalar type="float"/><data-field-ref field-name-ref="RO_real_fesa"/></value-item><value-item name="RO_dint_fesa" direction="OUT"><scalar type="int32_t"/><data-field-ref field-name-ref="RO_dint_fesa"/></value-item><value-item name="RO_int_fesa" direction="OUT"><scalar type="int16_t"/><data-field-ref field-name-ref="RO_int_fesa"/></value-item><value-item name="RO_dword_fesa" direction="OUT"><scalar type="int64_t"/><data-field-ref field-name-ref="RO_dword_fesa"/></value-item><value-item name="RO_word_fesa" direction="OUT"><scalar type="int32_t"/><data-field-ref field-name-ref="RO_word_fesa"/></value-item><value-item name="RO_byte_fesa" direction="OUT"><scalar type="int16_t"/><data-field-ref field-name-ref="RO_byte_fesa"/></value-item><value-item name="RO_char_fesa" direction="OUT"><scalar type="int8_t"/><data-field-ref field-name-ref="RO_char_fesa"/></value-item><value-item name="RO_date_fesa" direction="OUT"><scalar type="double"/><data-field-ref field-name-ref="RO_date_fesa"/></value-item><value-item name="RO_string_fesa" direction="OUT"><array type="char"><dim>64</dim></array><data-field-ref field-name-ref="RO_string_fesa"/></value-item><value-item name="RO_float32_fesa" direction="OUT"><scalar type="float"/><data-field-ref field-name-ref="RO_float32_fesa"/></value-item><value-item name="RO_uint32_fesa" direction="OUT"><scalar type="int64_t"/><data-field-ref field-name-ref="RO_uint32_fesa"/></value-item><value-item name="RO_int32_fesa" direction="OUT"><scalar type="int32_t"/><data-field-ref field-name-ref="RO_int32_fesa"/></value-item><value-item name="RO_uint16_fesa" direction="OUT"><scalar type="int32_t"/><data-field-ref field-name-ref="RO_uint16_fesa"/></value-item><value-item name="RO_int16_fesa" direction="OUT"><scalar type="int16_t"/><data-field-ref field-name-ref="RO_int16_fesa"/></value-item><value-item name="RO_uint8_fesa" direction="OUT"><scalar type="int16_t"/><data-field-ref field-name-ref="RO_uint8_fesa"/></value-item><value-item name="RO_int8" direction="OUT"><scalar type="int8_t"/><data-field-ref field-name-ref="RO_int8"/></value-item><acq-stamp-item direction="OUT" name="acqStamp"><scalar type="int64_t"/></acq-stamp-item><update-flag-item direction="OUT" optional="true" name="updateFlags"><builtin-type-scalar data-type-name-ref="NOTIFICATION_UPDATE"/></update-flag-item><cycle-name-item direction="OUT" optional="true" name="cycleName"><array type="char"><dim>32</dim></array></cycle-name-item><cycle-stamp-item direction="OUT" optional="true" name="cycleStamp"><scalar type="int64_t"/></cycle-stamp-item><get-action><server-action-ref server-action-name-ref="GetMyROBlockProp"/></get-action><acquisition-context-item direction="OUT"><processIndex direction="OUT" name="processIndex"><scalar type="int32_t"/></processIndex><sequenceIndex direction="OUT" name="sequenceIndex"><scalar type="int32_t"/></sequenceIndex><chainIndex direction="OUT" name="chainIndex"><scalar type="int32_t"/></chainIndex><eventNumber direction="OUT" name="eventNumber"><scalar type="int32_t"/></eventNumber><timingGroupID direction="OUT" name="timingGroupID"><scalar type="int32_t"/></timingGroupID><acquisitionStamp direction="OUT" name="acquisitionStamp"><scalar type="int64_t"/></acquisitionStamp><eventStamp direction="OUT" name="eventStamp"><scalar type="int64_t"/></eventStamp><processStartStamp direction="OUT" name="processStartStamp"><scalar type="int64_t"/></processStartStamp><sequenceStartStamp direction="OUT" name="sequenceStartStamp"><scalar type="int64_t"/></sequenceStartStamp><chainStartStamp direction="OUT" name="chainStartStamp"><scalar type="int64_t"/></chainStartStamp><acquisition-context-field-ref field-name-ref="acquisitionContext"/></acquisition-context-item></GSI-Acquisition-Property><GSI-Version-Property multiplexed="false" name="Version" on-change="false" subscribable="false" visibility="operational"> + <description>Returns the current software and hardware versions of a piece of equipment.</description> <acq-stamp-item direction="OUT" name="acqStamp"> <scalar type="int64_t"/> </acq-stamp-item> @@ -276,11 +301,13 @@ <scalar type="bool"/> </mode-item> <host-item direction="INOUT" name="hostName"> + <description>Host of the FESA class</description> <array type="char"> <dim>32</dim> </array> </host-item> <port-item direction="INOUT" name="portNumber"> + <description>Port used by the FESA class</description> <scalar type="int32_t"/> </port-item> <config-item direction="IN" name="requestConfig"> @@ -342,7 +369,7 @@ </global-interface> </interface> <builtin-types> - <notification-update-enum name="NOTIFICATION_UPDATE"> + <notification-update-enum name="NOTIFICATION_UPDATE"> <IMMEDIATE access="RO" symbol="IMMEDIATE" value="1"/> <SET access="RO" symbol="SET" value="2"/> </notification-update-enum> @@ -364,11 +391,11 @@ <b14 name="LOCAL_CONNECTION_TRACKING"/> </diag-fwk-topic> <fault-severity name="FaultSeverity"> - <description>Enumeration listing the available fault severities used by the fault fields</description> - <INFO access="RO" meaning="NONE" value="0" symbol="INFO"/> - <WARNING access="RO" meaning="WARNING" value="1" symbol="WARNING"/> - <ERROR access="RO" meaning="ERROR" value="2" symbol="ERROR"/> - <CRITICAL access="RO" meaning="ERROR" value="3" symbol="CRITICAL"/> + <description>Enumeration listing the available fault severities used by the fault fields</description> + <INFO access="RO" meaning="NONE" value="0" symbol="INFO"/> + <WARNING access="RO" meaning="WARNING" value="1" symbol="WARNING"/> + <ERROR access="RO" meaning="ERROR" value="2" symbol="ERROR"/> + <CRITICAL access="RO" meaning="ERROR" value="3" symbol="CRITICAL"/> </fault-severity> </builtin-types> @@ -509,27 +536,46 @@ </array> </struct-item> </struct> - <struct name="GSI_ACQ_CONTEXT"> - <!--This struct-item describes all AcquisitionContext items which are relevant for GSI--> - <struct-item name="acqStamp"> - <!--The acquisition stamp is used to indicate when a measurement was done --> + <struct name="GSI_ACQ_CONTEXT"><description>WhiteRabbit event specific acquisition information</description> + <struct-item name="processIndex"> + <description>Used in order to index process-multiplexed data</description> + <scalar type="int32_t"/> + </struct-item> + <struct-item name="sequenceIndex"> + <description>Used in order to index sequence-multiplexed data</description> + <scalar type="int32_t"/> + </struct-item> + <struct-item name="chainIndex"> + <description>Refers to a specific beam production chain</description> + <scalar type="int32_t"/> + </struct-item> + <struct-item name="eventNumber"> + <description>The number of the event describes it's type</description> + <scalar type="int32_t"/> + </struct-item> + <struct-item name="timingGroupID"> + <description>ID of the timing group for which the event is relevant</description> + <scalar type="int32_t"/> + </struct-item> + <struct-item name="acquisitionStamp"> + <description>The acquisition stamp is used to indicate when a measurement was done</description> <scalar type="int64_t"/> </struct-item> - <struct-item name="cycleStamp"> - <!--The cycle stamp is used to indicate when a specific cycle has started--> + <struct-item name="eventStamp"> + <description>The event stamp is used to indicate when WhiteRabbit event was triggered on the Timing Receiver</description> <scalar type="int64_t"/> </struct-item> - <struct-item name="cycleName"> - <!--The cycle name indicates the cycle which started at time of the cycleStamp --> - <array type="char"> - <custom-constant-dim constant-name-ref="MAX_CYCLE_NAME_LENGTH"/> - </array> + <struct-item name="processStartStamp"> + <description>The process start stamp indicates when the first event of the current process was triggered</description> + <scalar type="int64_t"/> </struct-item> - <struct-item name="beamProcessID"> - <scalar type="int32_t"/> + <struct-item name="sequenceStartStamp"> + <description>The sequence start stamp indicates when the first event of the current sequence was triggered</description> + <scalar type="int64_t"/> </struct-item> - <struct-item name="sequenceID"> - <scalar type="int32_t"/> + <struct-item name="chainStartStamp"> + <description>The chain start stamp indicates when the first event of the current chain was triggered</description> + <scalar type="int64_t"/> </struct-item> </struct> <constant name="MAX_ERROR_MESSAGE_LENGTH" type="uint32_t" value="256"/> @@ -545,16 +591,16 @@ </enum> <enum name="MODULE_STATUS"> <!-- Mutually exclusive values to describe the status of a hardware / software module--> - <item access="RO" value="0" symbol="UNKNOWN"/> - <!--The status of the module is not known--> - <item access="RO" value="1" symbol="OK"/> - <!--The module is in fully operational state--> - <item access="RO" value="2" symbol="WARNING"/> - <!--The module is not fully operational; A module in WARNING state may still be used operationally, --> - <!--but clients must be informed of a problem that might become worse. --> - <item access="RO" value="3" symbol="ERROR"/> - <!--The module is in a fault state. The related device is not operational.--> - <item access="RO" value="4" symbol="NOT_AVAILABLE"/> + <item access="RO" value="0" symbol="UNKNOWN"/> + <!--The status of the module is not known--> + <item access="RO" value="1" symbol="OK"/> + <!--The module is in fully operational state--> + <item access="RO" value="2" symbol="WARNING"/> + <!--The module is not fully operational; A module in WARNING state may still be used operationally, --> + <!--but clients must be informed of a problem that might become worse. --> + <item access="RO" value="3" symbol="ERROR"/> + <!--The module is in a fault state. The related device is not operational.--> + <item access="RO" value="4" symbol="NOT_AVAILABLE"/> <!--The module is missing. The related device is not operational.--> </enum> <constant name="MAX_MODULE_STATUS_LABEL_LENGTH" type="uint32_t" value="30"/> @@ -577,12 +623,12 @@ <default>{INFO,INFO}</default> </GSI-detailed-status-severity-field> <GSI-module-status-labels-field name="moduleStatus_labels"> - <array2D type="char"> - <custom-constant-dim1 constant-name-ref="MODULE_STATUS_SIZE"/> - - <custom-constant-dim2 constant-name-ref="MAX_MODULE_STATUS_LABEL_LENGTH"/> - </array2D> - <default>{myModule1,myModule2}</default> + <array2D type="char"> + <custom-constant-dim1 constant-name-ref="MODULE_STATUS_SIZE"/> + + <custom-constant-dim2 constant-name-ref="MAX_MODULE_STATUS_LABEL_LENGTH"/> + </array2D> + <default>{myModule1,myModule2}</default> </GSI-module-status-labels-field> </configuration> <setting> @@ -607,7 +653,7 @@ <scalar type="bool"/> </GSI-opReady-field> <GSI-modulesReady-field name="modulesReady" multiplexed="false"> - <scalar type="bool"/> + <scalar type="bool"/> </GSI-modulesReady-field> <GSI-detailed-status-field multiplexed="false" name="detailedStatus"> <array type="bool"> @@ -615,10 +661,9 @@ </array> </GSI-detailed-status-field> <GSI-module-status-field name="moduleStatus" multiplexed="false"> - <custom-type-array data-type-name-ref="MODULE_STATUS"> - <custom-constant-dim constant-name-ref="MODULE_STATUS_SIZE"/> - - </custom-type-array> + <custom-type-array data-type-name-ref="MODULE_STATUS"> + <custom-constant-dim constant-name-ref="MODULE_STATUS_SIZE"/> + </custom-type-array> </GSI-module-status-field> <GSI-acquisition-context-field multiplexed="true" name="acquisitionContext"> <custom-type-scalar data-type-name-ref="GSI_ACQ_CONTEXT"/> @@ -651,7 +696,8 @@ <get-server-action implementation="default" name="SettingGetAction"/> <get-server-action implementation="default" name="AcquisitionGetAction"/> <get-server-action implementation="default" name="StatusGetAction"/> - <get-server-action implementation="default" name="VersionGetAction"/><get-server-action implementation="default" name="ModuleStatusGetAction"/> - <get-server-action name="GetMyROBlockProp" implementation="custom"/><set-server-action name="SetMyRWBlockProp" implementation="custom"/><get-server-action name="GetMyRWBlockProp" implementation="custom"/><set-server-action name="SetMyWOBlockProp" implementation="custom"/><get-server-action name="GetMyWOBlockProp" implementation="custom"/></actions> + <get-server-action implementation="default" name="VersionGetAction"/> + <get-server-action implementation="default" name="ModuleStatusGetAction"/> + <get-server-action name="GetMyROBlockProp" implementation="custom"/><set-server-action name="SetMyRWBlockProp" implementation="custom"/><get-server-action name="GetMyRWBlockProp" implementation="custom"/><set-server-action name="SetMyWOBlockProp" implementation="custom"/></actions> </equipment-model>