Generation working and Compilation of MARTe components

This commit is contained in:
ferrog
2025-05-13 16:03:11 +00:00
parent 3a5e378d99
commit 4faee3802a
1571 changed files with 611466 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
importClass(Packages.org.csstudio.opibuilder.scriptUtil.PVUtil);
importClass(Packages.org.csstudio.opibuilder.scriptUtil.ColorFontUtil);
importPackage(Packages.org.csstudio.opibuilder.scriptUtil.*);
var table = widget.getTable();
var func = display.getPropertyValue("name");
var i = 0;
var row = 0;
var col = 3;
// ConsoleUtil.writeInfo("Trigger PV : " + triggerPV.getName());
while (triggerPV != pvs[i]) {
// ConsoleUtil.writeInfo("pvs[i] : " + pvs[i].getName());
if (col == 5) {
if (pvs[i+1].getName().indexOf("PLC-IOCHLTS") != -1) {
col = col+1;
}
else {
col = 3
row = row+1;
}
}
else if (col == 3) {
if ( (pvs[i+1].getName().indexOf("-SYSHLTS") != -1) || (pvs[i+1].getName().indexOf("-HLTS") != -1)) {
col = 3;
row = row+1;
}
else if (pvs[i+1].getName().indexOf("-IOCHLTS") != -1) {
if (pvs[i+1].getName().indexOf("CORE-IOCHLTS") != -1) {
col = 4;
}
else {
col = 5;
}
}
else {
col += 1;
if (col > 5) {
row += 1;
col = 3;
}
}
}
else {
col += 1;
if (col > 6) {
row += 1;
col = 3;
}
}
i += 1;
}
table.setCellText(row, col, PVUtil.getString(triggerPV))
var s = PVUtil.getSeverity(triggerPV)
color = ColorFontUtil.WHITE
if( s == 0) {
color = ColorFontUtil.GREEN
}
else if( s == 1) {
color = ColorFontUtil.RED
}
else if( s == 2) {
color = ColorFontUtil.YELLOW
}
else if( s == 3) {
color = ColorFontUtil.PINK
}
else if( s == 3) {
color = ColorFontUtil.PINK
}
table.setCellBackground(row, col, color)

View File

@@ -0,0 +1,619 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
SDD Generated Configuration
CODAC-VERSION: 6.1.2
WARNING: This is an automatically generated file. PLEASE DO NOT MODIFY.
-->
<display typeId="org.csstudio.opibuilder.Display" version="1.0">
<widget_type>Display</widget_type>
<macros>
<include_parent_macros>true</include_parent_macros>
</macros>
<width>3236</width>
<rules />
<scripts />
<show_ruler>true</show_ruler>
<height>1760</height>
<show_edit_range>true</show_edit_range>
<name>EC-GN-SYSM</name>
<grid_space>6</grid_space>
<snap_to_geometry>true</snap_to_geometry>
<show_grid>true</show_grid>
<y>0</y>
<actions hook="false" />
<foreground_color>
<color name="IO Foreground" />
</foreground_color>
<background_color>
<color name="IO Background" />
</background_color>
<x>0</x>
<auto_zoom_to_fit_all>false</auto_zoom_to_fit_all>
<auto_scale_widgets>
<auto_scale_widgets>false</auto_scale_widgets>
<min_width>-1</min_width>
<min_height>-1</min_height>
</auto_scale_widgets>
<!-- ************************************************************************************************************************************************ -->
<!-- ++++++++++ Start Top 2 Rows ++++++++++ -->
<widget typeId="org.csstudio.opibuilder.widgets.groupingContainer" version="1.0">
<enabled>true</enabled>
<widget_type>Grouping Container</widget_type>
<macros>
<include_parent_macros>true</include_parent_macros>
</macros>
<visible>true</visible>
<border_style>6</border_style>
<rules />
<lock_children>true</lock_children>
<scripts />
<border_width>2</border_width>
<scale_options>
<width_scalable>false</width_scalable>
<height_scalable>false</height_scalable>
<keep_wh_ratio>false</keep_wh_ratio>
</scale_options>
<name>groupHeading</name>
<border_color>
<color name="IO Border" red="0" green="0" blue="0" />
</border_color>
<transparent>true</transparent>
<show_scrollbar>false</show_scrollbar>
<actions hook="false" />
<y>0</y>
<foreground_color>
<color red="192" green="192" blue="192" />
</foreground_color>
<background_color>
<color red="240" green="240" blue="240" />
</background_color>
<x>0</x>
<tooltip />
<width>1243</width>
<height>50</height>
</widget>
<!-- ++++++++++ End Top 2 Rows ++++++++++ -->
<!-- ************************************************************************************************************************************************ -->
<!-- ++++++++++ Start Cubicles Summary Table ++++++++++ -->
<widget typeId="org.csstudio.opibuilder.widgets.Label" version="1.0.0">
<actions hook="false" hook_all="false"/>
<auto_size>true</auto_size>
<background_color>
<color blue="235" green="235" name="IO Background" red="235"/>
</background_color>
<border_color>
<color blue="0" green="0" name="IO Border" red="0"/>
</border_color>
<border_style>0</border_style>
<border_width>2</border_width>
<enabled>false</enabled>
<font>
<opifont.name fontName="DejaVu Sans Mono" height="10" pixels="false" style="0">IO Label</opifont.name>
</font>
<foreground_color>
<color blue="0" green="0" name="IO Text Fg" red="0"/>
</foreground_color>
<height>13</height>
<horizontal_alignment>0</horizontal_alignment>
<name>Label Template</name>
<rules/>
<scale_options>
<width_scalable>false</width_scalable>
<height_scalable>false</height_scalable>
<keep_wh_ratio>false</keep_wh_ratio>
</scale_options>
<scripts/>
<show_scrollbar>false</show_scrollbar>
<text>Cubicles</text>
<tooltip/>
<transparent>true</transparent>
<vertical_alignment>1</vertical_alignment>
<visible>true</visible>
<widget_type>Label</widget_type>
<width>40</width>
<wrap_words>true</wrap_words>
<x>6</x>
<y>54</y>
</widget>
<widget typeId="org.csstudio.opibuilder.widgets.table" version="1.0">
<visible>true</visible>
<default_content>
</default_content>
<scripts>
<path pathString="scripts/CubiclesTableSelectionMonitor.js" checkConnect="true" sfe="false" seoe="false">
<pv trig="true">1</pv>
</path>
<path pathString="scripts/DisplayPVValuesInCubicleOverview.js" checkConnect="false" sfe="false" seoe="false">
</path>
</scripts>
<height>200</height>
<name>EC-GN-SYSM</name>
<scale_options>
<width_scalable>false</width_scalable>
<height_scalable>false</height_scalable>
<keep_wh_ratio>false</keep_wh_ratio>
</scale_options>
<background_color>
<color red="240" green="240" blue="240" />
</background_color>
<foreground_color>
<color red="192" green="192" blue="192" />
</foreground_color>
<column_header_visible>true</column_header_visible>
<widget_type>Table</widget_type>
<enabled>true</enabled>
<font>
<opifont.name fontName="DejaVu Sans Mono-regular" height="10" style="0">IO Scale</opifont.name>
</font>
<width>1400</width>
<border_style>6</border_style>
<column_headers>
<row>
<col>Name</col>
<col>50</col>
<col>no</col>
</row>
<row>
<col>Physical Name</col>
<col>120</col>
<col></col>
</row>
<row>
<col>Description</col>
<col>120</col>
<col>no</col>
</row>
<row>
<col>Cubicle health summary</col>
<col>100</col>
<col>no</col>
</row>
<row>
<col>PLC health summary</col>
<col>100</col>
<col>no</col>
</row>
<row>
<col>Location</col>
<col>100</col>
<col>no</col>
</row>
<row>
<col>Macro PPPP</col>
<col>0</col>
<col>no</col>
</row>
<row>
<col>Macro PP</col>
<col>0</col>
<col>no</col>
</row>
<row>
<col>Macro NNNN</col>
<col>0</col>
<col>no</col>
</row>
</column_headers>
<editable>false</editable>
<rules />
<border_width>2</border_width>
<border_color>
<color name="IO Border" red="0" green="0" blue="0"/>
</border_color>
<columns_count>7</columns_count>
<actions hook="false" hook_all="false" />
<y>90</y>
<tooltip></tooltip>
<x>6</x>
</widget>
<!-- ++++++++++ End Cubicles Summary Table ++++++++++ -->
<!-- ++++++++++ Start PLCs Summary Table ++++++++++ -->
<widget typeId="org.csstudio.opibuilder.widgets.Label" version="1.0.0">
<actions hook="false" hook_all="false"/>
<auto_size>true</auto_size>
<background_color>
<color blue="235" green="235" name="IO Background" red="235"/>
</background_color>
<border_color>
<color blue="0" green="0" name="IO Border" red="0"/>
</border_color>
<border_style>0</border_style>
<border_width>2</border_width>
<enabled>false</enabled>
<font>
<opifont.name fontName="DejaVu Sans Mono" height="10" pixels="false" style="0">IO Label</opifont.name>
</font>
<foreground_color>
<color blue="0" green="0" name="IO Text Fg" red="0"/>
</foreground_color>
<height>13</height>
<horizontal_alignment>0</horizontal_alignment>
<name>Label Template</name>
<rules/>
<scale_options>
<width_scalable>false</width_scalable>
<height_scalable>false</height_scalable>
<keep_wh_ratio>false</keep_wh_ratio>
</scale_options>
<scripts/>
<show_scrollbar>false</show_scrollbar>
<text>PLCs</text>
<tooltip/>
<transparent>true</transparent>
<vertical_alignment>1</vertical_alignment>
<visible>true</visible>
<widget_type>Label</widget_type>
<width>26</width>
<wrap_words>true</wrap_words>
<x>6</x>
<y>320</y>
</widget>
<widget typeId="org.csstudio.opibuilder.widgets.table" version="1.0">
<visible>true</visible>
<default_content>
<row>
<col>P0</col>
<col>52RF01-PLC-4110</col>
<col></col>
<col></col>
<col></col>
<col></col>
<col></col>
</row>
</default_content>
<scripts>
<path pathString="scripts/PLCsTableSelectionMonitor.js" checkConnect="true" sfe="false" seoe="false">
<pv trig="true">1</pv>
</path>
<path pathString="scripts/DisplayPVValuesInPLCOverview.js" checkConnect="false" sfe="false" seoe="false">
<pv trig="true">EC-GN-SYSM-52RF-01:PLC4110-PLCHLTS</pv>
<pv trig="true">EC-GN-SYSM-52RF-01:PLC4110-EVTHLTS</pv>
<pv trig="true">EC-GN-SYSM-52RF-01:PLC4110-FRAMEC</pv>
</path>
</scripts>
<height>200</height>
<name>EC-GN-SYSM</name>
<scale_options>
<width_scalable>false</width_scalable>
<height_scalable>false</height_scalable>
<keep_wh_ratio>false</keep_wh_ratio>
</scale_options>
<background_color>
<color red="240" green="240" blue="240" />
</background_color>
<foreground_color>
<color red="192" green="192" blue="192" />
</foreground_color>
<column_header_visible>true</column_header_visible>
<widget_type>Table</widget_type>
<enabled>true</enabled>
<font>
<opifont.name fontName="DejaVu Sans Mono-regular" height="10" style="0">IO Scale</opifont.name>
</font>
<width>1400</width>
<border_style>6</border_style>
<column_headers>
<row>
<col>Name</col>
<col>50</col>
<col>no</col>
</row>
<row>
<col>Physical Name</col>
<col>120</col>
<col></col>
</row>
<row>
<col>Description</col>
<col>120</col>
<col>no</col>
</row>
<row>
<col>PLC health summary</col>
<col>100</col>
<col>no</col>
</row>
<row>
<col>ALIVEC</col>
<col>100</col>
<col>no</col>
</row>
<row>
<col>Event health summary</col>
<col>100</col>
<col>no</col>
</row>
<row>
<col>FRAMEC</col>
<col>100</col>
<col>no</col>
</row>
</column_headers>
<editable>false</editable>
<rules />
<border_width>2</border_width>
<border_color>
<color name="IO Border" red="0" green="0" blue="0"/>
</border_color>
<columns_count>5</columns_count>
<actions hook="false" hook_all="false" />
<y>350</y>
<tooltip></tooltip>
<x>6</x>
</widget>
<!-- ++++++++++ End PLCs Summary Table ++++++++++ -->
<!-- ++++++++++ Start Control Units Summary Table ++++++++++ -->
<widget typeId="org.csstudio.opibuilder.widgets.Label" version="1.0.0">
<actions hook="false" hook_all="false"/>
<auto_size>true</auto_size>
<background_color>
<color blue="235" green="235" name="IO Background" red="235"/>
</background_color>
<border_color>
<color blue="0" green="0" name="IO Border" red="0"/>
</border_color>
<border_style>0</border_style>
<border_width>2</border_width>
<enabled>false</enabled>
<font>
<opifont.name fontName="DejaVu Sans Mono" height="10" pixels="false" style="0">IO Label</opifont.name>
</font>
<foreground_color>
<color blue="0" green="0" name="IO Text Fg" red="0"/>
</foreground_color>
<height>13</height>
<horizontal_alignment>0</horizontal_alignment>
<name>Label Template</name>
<rules/>
<scale_options>
<width_scalable>false</width_scalable>
<height_scalable>false</height_scalable>
<keep_wh_ratio>false</keep_wh_ratio>
</scale_options>
<scripts/>
<show_scrollbar>false</show_scrollbar>
<text>Control Units</text>
<tooltip/>
<transparent>true</transparent>
<vertical_alignment>1</vertical_alignment>
<visible>true</visible>
<widget_type>Label</widget_type>
<width>59</width>
<wrap_words>true</wrap_words>
<x>6</x>
<y>570</y>
</widget>
<widget typeId="org.csstudio.opibuilder.widgets.table" version="1.0">
<visible>true</visible>
<default_content>
<row>
<col>H0</col>
<col>52RF01-PSH-4410</col>
<col></col>
<col></col>
<col></col>
<col></col>
<col></col>
<col>Plant System Host</col>
</row>
<row>
<col>F0</col>
<col>52RF01-PCF-4210</col>
<col></col>
<col></col>
<col></col>
<col></col>
<col></col>
<col>Fast Controller</col>
</row>
</default_content>
<scripts>
<path pathString="scripts/ControlUnitsTableSelectionMonitor.js" checkConnect="true" sfe="false" seoe="false">
<pv trig="true">1</pv>
</path>
<path pathString="scripts/DisplayPVValuesInOverview.js" checkConnect="false" sfe="false" seoe="false">
<pv trig="true">EC-GN-SYSM-52RF-01:PCF4210-SYSHLTS</pv>
<pv trig="true">EC-GN-SYSM-52RF-01:PSH4410-SYSHLTS</pv>
</path>
</scripts>
<height>300</height>
<name>EC-GN-SYSM</name>
<scale_options>
<width_scalable>false</width_scalable>
<height_scalable>false</height_scalable>
<keep_wh_ratio>false</keep_wh_ratio>
</scale_options>
<background_color>
<color red="240" green="240" blue="240" />
</background_color>
<foreground_color>
<color red="192" green="192" blue="192" />
</foreground_color>
<column_header_visible>true</column_header_visible>
<widget_type>Table</widget_type>
<enabled>true</enabled>
<font>
<opifont.name fontName="DejaVu Sans Mono-regular" height="10" style="0">IO Scale</opifont.name>
</font>
<width>1400</width>
<border_style>6</border_style>
<column_headers>
<row>
<col>Name</col>
<col>50</col>
<col>no</col>
</row>
<row>
<col>Physical Name</col>
<col>120</col>
<col></col>
</row>
<row>
<col>Description</col>
<col>120</col>
<col>no</col>
</row>
<row>
<col>Controller health summary</col>
<col>150</col>
<col>no</col>
</row>
<row>
<col>PSH0CORE IOC health summary</col>
<col>100</col>
<col>no</col>
</row>
<row>
<col>Controller IOC health summary</col>
<col>100</col>
<col>no</col>
</row>
<row>
<col>PLC IOC health summary</col>
<col>100</col>
<col>no</col>
</row>
<row>
<col>Type</col>
<col>100</col>
<col>no</col>
</row>
</column_headers>
<editable>false</editable>
<rules />
<border_width>2</border_width>
<border_color>
<color name="IO Border" red="0" green="0" blue="0"/>
</border_color>
<columns_count>7</columns_count>
<actions hook="false" hook_all="false" />
<y>600</y>
<tooltip></tooltip>
<x>6</x>
</widget>
<!-- ++++++++++ End Control Units Summary Table ++++++++++ -->
<!-- ++++++++++ Start I&C Project Info Container ++++++++++ -->
<widget typeId="org.csstudio.opibuilder.widgets.groupingContainer" version="1.0">
<enabled>true</enabled>
<widget_type>Grouping Container</widget_type>
<macros>
<include_parent_macros>true</include_parent_macros>
</macros>
<visible>true</visible>
<width>1243</width>
<scale_options>
<width_scalable>false</width_scalable>
<height_scalable>false</height_scalable>
<keep_wh_ratio>false</keep_wh_ratio>
</scale_options>
<border_style>6</border_style>
<rules />
<lock_children>true</lock_children>
<scripts />
<height>48</height>
<border_width>2</border_width>
<name>groupICProjectInfo</name>
<border_color>
<color name="IO Border" red="0" green="0" blue="0" />
</border_color>
<transparent>true</transparent>
<show_scrollbar>false</show_scrollbar>
<actions hook="false" />
<y>1400</y>
<foreground_color>
<color red="192" green="192" blue="192" />
</foreground_color>
<background_color>
<color red="240" green="240" blue="240" />
</background_color>
<x>0</x>
<tooltip />
<widget typeId="org.csstudio.opibuilder.widgets.Label" version="1.0.0">
<actions hook="false" hook_all="false"/>
<auto_size>true</auto_size>
<background_color>
<color blue="235" green="235" name="IO Background" red="235"/>
</background_color>
<border_color>
<color blue="0" green="0" name="IO Border" red="0"/>
</border_color>
<border_style>0</border_style>
<border_width>2</border_width>
<enabled>false</enabled>
<font>
<opifont.name fontName="DejaVu Sans Mono" height="10" pixels="false" style="0">IO Label</opifont.name>
</font>
<foreground_color>
<color blue="0" green="0" name="IO Text Fg" red="0"/>
</foreground_color>
<height>38</height>
<horizontal_alignment>0</horizontal_alignment>
<name>I&amp;C Project Name: EC-GN, Version: 1</name>
<rules/>
<scale_options>
<width_scalable>false</width_scalable>
<height_scalable>false</height_scalable>
<keep_wh_ratio>false</keep_wh_ratio>
</scale_options>
<scripts/>
<show_scrollbar>false</show_scrollbar>
<text>I&amp;C Project Name: EC-GN, Version: 1</text>
<tooltip/>
<transparent>true</transparent>
<vertical_alignment>1</vertical_alignment>
<visible>true</visible>
<widget_type>Label</widget_type>
<width>3000</width>
<wrap_words>true</wrap_words>
<x>40</x>
<y>0</y>
</widget>
</widget>
<!-- ++++++++++ End I&C Project Info Container ++++++++++ -->
<!-- ************************************************************************************************************************************************ -->
</display>

View File

@@ -0,0 +1,260 @@
/**
* @file EPICSCAInput.h
* @brief Header file for class EPICSCAInput
* @date 20/04/2017
* @author Andre Neto
*
* @copyright Copyright 2015 F4E | European Joint Undertaking for ITER and
* the Development of Fusion Energy ('Fusion for Energy').
* Licensed under the EUPL, Version 1.1 or - as soon they will be approved
* by the European Commission - subsequent versions of the EUPL (the "Licence")
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl
*
* @warning Unless required by applicable law or agreed to in writing,
* software distributed under the Licence is distributed on an "AS IS"
* basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the Licence permissions and limitations under the Licence.
* @details This header file contains the declaration of the class EPICSCAInput
* with all of its public, protected and private members. It may also include
* definitions for inline methods which need to be visible to the compiler.
*/
#ifndef JAEPICSCAINPUT_H_
#define JAEPICSCAINPUT_H_
/*---------------------------------------------------------------------------*/
/* Standard header includes */
/*---------------------------------------------------------------------------*/
#include <cadef.h>
/*---------------------------------------------------------------------------*/
/* Project header includes */
/*---------------------------------------------------------------------------*/
#include "DataSourceI.h"
#include "EmbeddedServiceMethodBinderI.h"
#include "EventSem.h"
#include "SingleThreadService.h"
/*---------------------------------------------------------------------------*/
/* Class declaration */
/*---------------------------------------------------------------------------*/
namespace MARTe {
/**
* Maximum size that a PV name may have
*/
/*lint -esym(551, MARTe::PV_NAME_MAX_SIZE) the symbol is used to define the size of PVWrapper below*/
const uint32 PV_NAME_MAX_SIZE = 64u;
/**
* Wraps a PV
*/
struct PVWrapper {
/**
* The channel identifier
*/
chid pvChid;
/**
* The event identifier
*/
evid pvEvid;
/**
* The PV type
*/
chtype pvType;
/**
* The memory of the signal associated to this channel
*/
void *memory;
void *previousValue;
/**
* The number of elements > 0
*/
uint32 numberOfElements;
/**
* The memory size
*/
uint32 memorySize;
/**
* The PV name
*/
char8 pvName[PV_NAME_MAX_SIZE];
};
/**
* @brief A DataSource which allows to retrieved data from any number of PVs using the EPICS channel access client protocol.
* Data is asynchronously retrieved using ca_create_subscriptions in the context of a different thread (w.r.t. to the real-time thread).
*
* The configuration syntax is (names are only given as an example):
*
* <pre>
* +EPICSCAInput_1 = {
* Class = JAEPICSCA::JAEPICSCAInput
* StackSize = 1048576 //Optional the EmbeddedThread stack size. Default value is THREADS_DEFAULT_STACKSIZE * 4u
* CPUs = 0xff //Optional the affinity of the EmbeddedThread (where the EPICS context is attached).
* Signals = {
* PV1 = { //At least one shall be defined
* PVName = My::PV1 //Compulsory. Name of the PV.
* Type = uint32 //Compulsory. Supported types are char8[40], string[40], uint8, int8, uint16, int16, int32, uint32, uint64, int64, float32 and float64
* NumberOfElements = 1 //Arrays also supported
* }
* ...
* }
* }
*
* </pre>
*/
class JAEPICSCAInput: public DataSourceI, public EmbeddedServiceMethodBinderI {
public:
CLASS_REGISTER_DECLARATION()
/**
* @brief Default constructor. NOOP.
*/
JAEPICSCAInput();
/**
* @brief Destructor.
* @details TODO.
*/
virtual ~JAEPICSCAInput();
/**
* @brief See DataSourceI::AllocateMemory. NOOP.
* @return true.
*/
virtual bool AllocateMemory();
/**
* @brief See DataSourceI::GetNumberOfMemoryBuffers.
* @return 1.
*/
virtual uint32 GetNumberOfMemoryBuffers();
/**
* @brief See DataSourceI::GetSignalMemoryBuffer.
* @pre
* SetConfiguredDatabase
*/
virtual bool GetSignalMemoryBuffer(const uint32 signalIdx,
const uint32 bufferIdx,
void *&signalAddress);
/**
* @brief See DataSourceI::GetNumberOfMemoryBuffers.
* @details Only InputSignals are supported.
* @return MemoryMapInputBroker.
*/
virtual const char8 *GetBrokerName(StructuredDataI &data,
const SignalDirection direction);
/**
* @brief See DataSourceI::GetInputBrokers.
* @details adds a memory MemoryMapInputBroker instance to the inputBrokers
* @return true.
*/
virtual bool GetInputBrokers(ReferenceContainer &inputBrokers,
const char8* const functionName,
void * const gamMemPtr);
/**
* @brief See DataSourceI::GetOutputBrokers.
* @return false.
*/
virtual bool GetOutputBrokers(ReferenceContainer &outputBrokers,
const char8* const functionName,
void * const gamMemPtr);
/**
* @brief See DataSourceI::PrepareNextState. NOOP.
* @return true.
*/
virtual bool PrepareNextState(const char8 * const currentStateName,
const char8 * const nextStateName);
/**
* @brief Loads and verifies the configuration parameters detailed in the class description.
* @return true if all the mandatory parameters are correctly specified and if the specified optional parameters have valid values.
*/
virtual bool Initialise(StructuredDataI & data);
/**
* @brief Final verification of all the parameters. Setup of the memory required to hold all the signals.
* @details This method verifies that all the parameters requested by the GAMs interacting with this DataSource
* are valid and consistent with the parameters set during the initialisation phase.
* In particular the following conditions shall be met:
* - All the signals have the PVName defined
* - All the signals have one of the following types: uint32, int32, float32 or float64.
* @return true if all the parameters are valid and the conditions above are met.
*/
virtual bool SetConfiguredDatabase(StructuredDataI & data);
/**
* @brief Gets the affinity of the thread which is going to be used to asynchronously read data from the ca_create_subscription.
* @return the the affinity of the thread which is going to be used to asynchronously read data from the ca_create_subscription.
*/
uint32 GetCPUMask() const;
/**
* @brief Gets the stack size of the thread which is going to be used to asynchronously read data from the ca_create_subscription.
* @return the stack size of the thread which is going to be used to asynchronously read data from the ca_create_subscription.
*/
uint32 GetStackSize() const;
/**
* @brief Provides the context to execute all the EPICS relevant calls.
* @details Executes in the context of a spawned thread the following EPICS calls:
* ca_context_create, ca_create_channel, ca_create_subscription, ca_clear_subscription,
* ca_clear_event, ca_clear_channel, ca_detach_context and ca_context_destroy
* @return ErrorManagement::NoError if all the EPICS calls return without any error.
*/
virtual ErrorManagement::ErrorType Execute(ExecutionInfo & info);
/**
* @brief See DataSourceI::Synchronise.
* @return false.
*/
virtual bool Synchronise();
/**
* @brief Registered as the ca_create_subscription callback function.
* It calls updates the memory of the corresponding PV variable.
*/
friend void JAEPICSCAInputEventCallback(struct event_handler_args args);
private:
/**
* List of PVs.
*/
PVWrapper *pvs;
/**
* The CPU mask for the executor
*/
uint32 cpuMask;
/**
* The stack size
*/
uint32 stackSize;
/**
* The EmbeddedThread where the ca_pend_event is executed.
*/
SingleThreadService executor;
/**
* Stores the configuration information received at Initialise.
*/
ConfigurationDatabase originalSignalInformation;
};
}
/*---------------------------------------------------------------------------*/
/* Inline method definitions */
/*---------------------------------------------------------------------------*/
#endif /* EPICSCADATASOURCE_H_ */